








#import "NetOldMixerBit.h"

#define BasqueUnlearn self.frame.size.width

@interface NetOldMixerBit()



@property (nonatomic, strong) NSMutableArray                            *artBitsArray;



@property (nonatomic, strong) NSMutableArray <RemoveProductsCell *>      *keepArray;



@property (strong, nonatomic) NSMutableArray <RemoveProductsCell *>      *theMalayCaps;



@property (assign, nonatomic) NSInteger                                 count;



@property (nonatomic, assign) AdjustedTipBankFreeExecuting                          status;



@property (nonatomic, assign) NSInteger                                 channelCount;



@property (nonatomic, assign) CGFloat                                   oneBin;

@end

@implementation NetOldMixerBit

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.status = DrainMillionDescenderFormFixClock;
    }
    return self;
}

- (void)busPickClick
{
    
    if (self.keepArray.firstObject) {
        
        
        RemoveProductsCell *sandboxView = self.keepArray.firstObject;
        
        sandboxView.frame = CGRectMake(BasqueUnlearn, 0, sandboxView.busSaltSize.width, sandboxView.busSaltSize.height);
        
        self.oneBin = sandboxView.oneBin;
        
        self.channelCount = sandboxView.channelCount;
        
        
        NSInteger row = [self croppingRedClipSchemesRunPluralVitamin:sandboxView];
        
        
        if (row >= 0) {
            
            
            [self.keepArray removeObjectAtIndex:0];
            
            
            if (![self.subviews containsObject:sandboxView]) {
                [self addSubview:sandboxView];
            }
            sandboxView.frame = CGRectMake(BasqueUnlearn,  row * (sandboxView.busSaltSize.height + _oneBin), sandboxView.busSaltSize.width, sandboxView.busSaltSize.height);
            
            
            [_artBitsArray setObject:sandboxView atIndexedSubscript:row];
            
            
            if ([self.delegate respondsToSelector:@selector(putSyntaxKitView:willDisplayCell:)]) {
                [self.delegate putSyntaxKitView:self willDisplayCell:sandboxView];
            }
            
            
            [self.theMalayCaps addObject:sandboxView];
            
            [sandboxView brushDisparityTorqueOutMercury:^{
                
                
                [sandboxView setTransform:CGAffineTransformMakeTranslation(- sandboxView.frame.size.width-BasqueUnlearn, 0)];
                
            } completion:^(BOOL finished) {
                
                [sandboxView removeFromSuperview];
                
                
                [self.theMalayCaps removeObject:sandboxView];
                
                
                if ([self.delegate respondsToSelector:@selector(putSyntaxKitView:didEndDisplayingCell:)]) {
                    [self.delegate putSyntaxKitView:self didEndDisplayingCell:sandboxView];
                }
                
                
                if (--self.count <= 0) {
                    if ([self.delegate respondsToSelector:@selector(segueMetricWalkingDisallowSegmentedPenBedHeap:)]) {
                        [self.delegate segueMetricWalkingDisallowSegmentedPenBedHeap:self];
                    }
                    self.count = 0;
                }
                
                

            }];
        }
    }
    
    [self performSelector:@selector(busPickClick) withObject:nil afterDelay:0.45f];
}


- (void)tamilBedArtPan:(NSArray <RemoveProductsCell *> *)barrages
{
    self.count += barrages.count;
    [self.keepArray addObjectsFromArray:barrages];
}

- (void)start
{
    if (self.status == FootClosureServiceExceededSmileGaelic) {
        return;
    }
    self.status = FootClosureServiceExceededSmileGaelic;
    
    [self busPickClick];
}

- (void)stop
{
    if (self.status == DrainMillionDescenderFormFixClock) {
        return;
    }
    self.status = DrainMillionDescenderFormFixClock;
    
    if (self.theMalayCaps.count) {
        [self.theMalayCaps makeObjectsPerformSelector:@selector(pause)];
    }
    
    if (self.keepArray.count > 0) {
        [NSObject cancelPreviousPerformRequestsWithTarget:self];
    }
    
    
    [self.theMalayCaps  makeObjectsPerformSelector:@selector(removeFromSuperview)];
    self.channelCount       = 0;
    self.count              = 0;
    [self.theMalayCaps  removeAllObjects];
    [self.keepArray     removeAllObjects];
    [self.artBitsArray  removeAllObjects];
    
    self.theMalayCaps       = nil;
    self.keepArray          = nil;
    self.artBitsArray       = nil;
}


- (NSInteger)croppingRedClipSchemesRunPluralVitamin:(RemoveProductsCell *)newBarrage
{
    for (int row = 0; row<_artBitsArray.count; row++) {
        NSObject *object = _artBitsArray[row];
        if ([object isKindOfClass:[NSNumber class]]) { 
            
            return row;
            
        }else if ([object isKindOfClass:[RemoveProductsCell class]]) { 
            
            RemoveProductsCell *herOnceSun = (RemoveProductsCell*)object;
            
            if ([self croppingRedClipSchemesRunPluralVitamin:herOnceSun justDigit:newBarrage]) {
                
                return row;
            }
        }
    }
    
    return -1;
}


- (BOOL)croppingRedClipSchemesRunPluralVitamin:(RemoveProductsCell *)herOnceSun justDigit:(RemoveProductsCell *)newBarrage
{
    
    if (herOnceSun.status == SpeakerOptimizedGermanExcludedForwardKernels) {
        return NO;
    }
    
    
    CGRect rect = [herOnceSun.layer.presentationLayer frame];
    if (rect.origin.x>BasqueUnlearn - herOnceSun.frame.size.width) {
        
        return NO;
    }else if (rect.size.width == 0)
    {
        
        return NO;
    }
    else if (herOnceSun.frame.size.width > newBarrage.frame.size.width) {
        
        return YES;
    }else
    {
        
        CGFloat time = BasqueUnlearn/(BasqueUnlearn+newBarrage.frame.size.width)*newBarrage.eraSpecified;
        
        CGFloat once = rect.origin.x - time/(herOnceSun.eraSpecified)*(BasqueUnlearn + herOnceSun.frame.size.width);
        if (once < -herOnceSun.frame.size.width) {
            
            return YES;
        }
    }
    return NO;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint parentChar  = [touch locationInView:self];
    for (RemoveProductsCell *sandboxView in [self subviews])
    {
        if ([sandboxView.layer.presentationLayer hitTest:parentChar])
        {
            
            if ([self.delegate respondsToSelector:@selector(putSyntaxKitView:hybridAboutCell:)]) {
                [self.delegate putSyntaxKitView:self hybridAboutCell:sandboxView];
            }
            break;
        }
    }
}




- (NSMutableArray<RemoveProductsCell *> *)keepArray {
    if (!_keepArray) {
        _keepArray = [[NSMutableArray alloc] init];
    }
    return _keepArray;
}


- (NSMutableArray<RemoveProductsCell *> *)theMalayCaps {
    if (!_theMalayCaps) {
        _theMalayCaps = [[NSMutableArray alloc] init];
    }
    return _theMalayCaps;
}


- (void)setChannelCount:(NSInteger)channelCount
{
    
    if (self.artBitsArray.count < channelCount) { 
        
        for (NSInteger row = self.artBitsArray.count; row < channelCount; row++) {
            NSNumber *number = [NSNumber numberWithBool:YES];
            [self.artBitsArray setObject:number atIndexedSubscript:row];
        }
        
    }else {
        
        for (NSInteger row = channelCount; row < self.artBitsArray.count; row++) {
            [self.artBitsArray removeObjectAtIndex:row];
        }
    }
    
    _channelCount = channelCount;
    
}


- (NSMutableArray *)artBitsArray {
    if (!_artBitsArray) {
        _artBitsArray = [[NSMutableArray alloc] init];
    }
    return _artBitsArray;
}

@end
