







#import "OddFatSinMixerCell.h"
#define turnOne(who) __weak typeof(who) weak##who = who;
#define answerSaw(who) __strong typeof(who) who = weak##who;

@interface OddFatSinMixerCell()



@property (nonatomic, strong) NSTimer *outer;

@property (nonatomic, assign) BOOL napWordManDeep;

@end

@implementation OddFatSinMixerCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _faceMixSize = CGSizeMake(200, 40);
        _awayFlashOff = 4;
        _model = nil;
        _channelCount = 3;
        _drySun = 0;
        _sumYetHaveDown = 0;
        _status = LabelMindResourceSmileCentralDisallow;
        _napWordManDeep = NO;
        
    }
    return self;
}

- (void)seventeenDriveOldUnsafeScheduledValue
{
    CGFloat outerSub = [[self.layer presentationLayer] frame].origin.x;
    CGFloat bitAwayWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + bitAwayWidth) / self.awayFlashOff;
    
    
    CGFloat urgentBadTime = bitAwayWidth / speed;
    
    if (_sumYetHaveDown > 0) {
        self.status = CupMalformedTexturedPrefixesKilowattsAlarm;
        if (outerSub > -1 && outerSub < 1) {
            
            if (_napWordManDeep) { return;}
            _napWordManDeep = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_sumYetHaveDown];
            [self performSelector:@selector(artKitStatus) withObject:nil afterDelay:_sumYetHaveDown - urgentBadTime];
        }
    }
}
- (void)artKitStatus
{
    self.status = HandSwipeCocoaCatLaunchingMid;
}

- (void)removalVoiceMetricMasterSaw:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = HandSwipeCocoaCatLaunchingMid;
    
    _outer = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(seventeenDriveOldUnsafeScheduledValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_outer forMode:NSRunLoopCommonModes];
    
    
    turnOne(self);
    [UIView animateWithDuration:self.awayFlashOff delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        answerSaw(self);
        self->_status = HandSwipeCocoaCatLaunchingMid;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_outer) {
            [self->_outer invalidate];
            self->_outer = nil;
        }
        
    }];
}

- (void)pause
{
    
    CFTimeInterval wristTime = [self.layer convertTime:CACurrentMediaTime() fromLayer:nil];
    
    
    self.layer.timeOffset = wristTime;
    
    
    self.layer.speed = 0;
}

- (void)resume
{
    
    CFTimeInterval wristTime = self.layer.timeOffset;
    
    CFTimeInterval pushMeterMixer = CACurrentMediaTime() - wristTime;
    
    self.layer.timeOffset = 0;
    
    self.layer.beginTime = pushMeterMixer;
    
    self.layer.speed = 1;
}


@end
