// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/./edge264_headers.c
// Function: worker_loop
void *ADD_VARIANT(worker_loop)(Edge264Decoder *dec) {
	Edge264Context c;
	c.d = dec;
	c.n_threads = dec->n_threads;
	c.log_cb = dec->log_cb;
	c.log_arg = dec->log_arg;
	if (c.n_threads)
		pthread_mutex_lock(&dec->lock);
	for (;;) {
		while (c.n_threads && !dec->ready_tasks)
			pthread_cond_wait(&dec->task_ready, &dec->lock);
		int task_id = __builtin_ctz(dec->ready_tasks); // FIXME arbitrary selection for now
		int currPic = dec->taskPics[task_id];
		dec->pending_tasks &= ~(1 << task_id);
		dec->ready_tasks &= ~(1 << task_id);
		if (c.n_threads)
			pthread_mutex_unlock(&dec->lock);
		c.t = dec->tasks[task_id];
		initialize_context(&c, currPic);
		size_t ret = 0;
		if (!c.t.pps.entropy_coding_mode_flag) {
			c.mb_skip_run = -1;
			parse_slice_data_cavlc(&c);
			// FIXME detect and signal error
		} else {
			// cabac_alignment_one_bit gives a good probability to catch random errors.
			if (cabac_start(&c)) {
				ret = EBADMSG; // FIXME error_flag
			} else {
				cabac_init(&c);
				c.mb_qp_delta_nz = 0;
				parse_slice_data_cabac(&c);
				// the possibility of cabac_zero_word implies we cannot rely on rbsp_end
				if (c.t._gb.msb_cache || (c.t._gb.lsb_cache & (c.t._gb.lsb_cache - 1))) {
					ret = EBADMSG; // FIXME error_flag
				}
			}
		}
		
		// deblock the rest of mbs in this slice
		if (c.t.next_deblock_addr >= 0) {
			c.t.next_deblock_addr = max(c.t.next_deblock_addr, c.t.first_mb_in_slice);
			c.mby = (unsigned)c.t.next_deblock_addr / (unsigned)c.t.pic_width_in_mbs;
			c.mbx = (unsigned)c.t.next_deblock_addr % (unsigned)c.t.pic_width_in_mbs;
			c.samples_mb[0] = c.t.samples_base + (c.mbx + c.mby * c.t.stride[0]) * 16;
			c.samples_mb[1] = c.t.samples_base + c.t.plane_size_Y + (c.mbx + c.mby * c.t.stride[1]) * 8;
			c.samples_mb[2] = c.samples_mb[1] + (c.t.stride[1] >> 1);
			c._mb = (Edge264Macroblock *)(c.t.samples_base + c.t.plane_size_Y + c.t.plane_size_C) + c.mbx + c.mby * (c.t.pic_width_in_mbs + 1);
			while (c.t.next_deblock_addr < c.CurrMbAddr) {
				deblock_mb(&c);
				c.t.next_deblock_addr++;
				c._mb++;
				c.mbx++;
				c.samples_mb[0] += 16;
				c.samples_mb[1] += 8;
				c.samples_mb[2] += 8;
				if (c.mbx >= c.t.pic_width_in_mbs) {
					c._mb++;
					c.mbx = 0;
					c.samples_mb[0] += c.t.stride[0] * 16 - c.t.pic_width_in_mbs * 16;
					c.samples_mb[1] += c.t.stride[1] * 8 - c.t.pic_width_in_mbs * 8;
					c.samples_mb[2] += c.t.stride[1] * 8 - c.t.pic_width_in_mbs * 8;
				}
			}
		}
		
		// on error, recover mbs and signal them as erroneous (allows overwrite by redundant slices)
		if (__builtin_expect(ret != 0, 0))
			recover_slice(&c, currPic);
		
		// update dec->next_deblock_addr, considering it might have reached first_mb_in_slice since start
		if (dec->next_deblock_addr[currPic] >= c.t.first_mb_in_slice &&
		    !(c.t.disable_deblocking_filter_idc == 0 && c.t.next_deblock_addr < 0)) {
			dec->next_deblock_addr[currPic] = c.CurrMbAddr;
			pthread_cond_broadcast(&dec->task_progress);
		}
		
		// deblock the rest of the frame if all mbs have been decoded correctly
		int remaining_mbs = ret ?: __atomic_sub_fetch(&dec->remaining_mbs[currPic], c.CurrMbAddr - c.t.first_mb_in_slice, __ATOMIC_ACQ_REL);
		if (remaining_mbs == 0) {
			c.t.next_deblock_addr = dec->next_deblock_addr[currPic];
			c.CurrMbAddr = c.t.pic_width_in_mbs * c.t.pic_height_in_mbs;
			if ((unsigned)c.t.next_deblock_addr < c.CurrMbAddr) {
				c.mby = (unsigned)c.t.next_deblock_addr / (unsigned)c.t.pic_width_in_mbs;
				c.mbx = (unsigned)c.t.next_deblock_addr % (unsigned)c.t.pic_width_in_mbs;
				c.samples_mb[0] = c.t.samples_base + (c.mbx + c.mby * c.t.stride[0]) * 16;
				c.samples_mb[1] = c.t.samples_base + c.t.plane_size_Y + (c.mbx + c.mby * c.t.stride[1]) * 8;
				c.samples_mb[2] = c.samples_mb[1] + (c.t.stride[1] >> 1);
				c._mb = (Edge264Macroblock *)(c.t.samples_base + c.t.plane_size_Y + c.t.plane_size_C) + c.mbx + c.mby * (c.t.pic_width_in_mbs + 1);
				while (c.t.next_deblock_addr < c.CurrMbAddr) {
					deblock_mb(&c);
					c.t.next_deblock_addr++;
					c._mb++;
					c.mbx++;
					c.samples_mb[0] += 16;
					c.samples_mb[1] += 8;
					c.samples_mb[2] += 8;
					if (c.mbx >= c.t.pic_width_in_mbs) {
						c._mb++;
						c.mbx = 0;
						c.samples_mb[0] += c.t.stride[0] * 16 - c.t.pic_width_in_mbs * 16;
						c.samples_mb[1] += c.t.stride[1] * 8 - c.t.pic_width_in_mbs * 8;
						c.samples_mb[2] += c.t.stride[1] * 8 - c.t.pic_width_in_mbs * 8;
					}
				}
			}
			dec->next_deblock_addr[currPic] = INT_MAX; // signals the frame is complete
		}
		
		// if multi-threaded, check if we are the last task to touch this frame and ensure it is complete
		if (c.n_threads) {
			pthread_mutex_lock(&dec->lock);
			pthread_cond_signal(&dec->task_complete);
			if (remaining_mbs == 0) {
				pthread_cond_broadcast(&dec->task_progress);
				dec->ready_tasks = ready_tasks(dec);
				if (dec->ready_tasks)
					pthread_cond_broadcast(&dec->task_ready);
			}
		}
		if (c.t.free_cb)
			c.t.free_cb(c.t.free_arg, (int)ret);
		dec->busy_tasks &= ~(1 << task_id);
		dec->task_dependencies[task_id] = 0;
		dec->taskPics[task_id] = -1;
		
		// in single-thread mode update the buffer pointer and return
		if (!c.n_threads) {
			dec->_gb = c.t._gb;
			return (void *)ret;
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x40, %rsp
subq $0x2fc0, %rsp           # imm = 0x2FC0
movq %rdi, 0x2d40(%rsp)
movq 0x2d40(%rsp), %rax
movq %rax, 0x6f0(%rsp)
movq 0x2d40(%rsp), %rax
movb 0x20(%rax), %al
movb %al, 0x690(%rsp)
movq 0x2d40(%rsp), %rax
movq 0x7c90(%rax), %rax
movq %rax, 0x1d00(%rsp)
movq 0x2d40(%rsp), %rax
movq 0x7c98(%rax), %rax
movq %rax, 0x1d08(%rsp)
cmpb $0x0, 0x690(%rsp)
je 0x82c5
movq 0x2d40(%rsp), %rdi
addq $0x1580, %rdi           # imm = 0x1580
callq 0x7160
jmp 0x82c7
jmp 0x82c9
movsbl 0x690(%rsp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x23(%rsp)
je 0x82f5
movq 0x2d40(%rsp), %rax
cmpw $0x0, 0x163c(%rax)
setne %al
xorb $-0x1, %al
movb %al, 0x23(%rsp)
movb 0x23(%rsp), %al
testb $0x1, %al
jne 0x82ff
jmp 0x8324
movq 0x2d40(%rsp), %rdi
addq $0x15a8, %rdi           # imm = 0x15A8
movq 0x2d40(%rsp), %rsi
addq $0x1580, %rsi           # imm = 0x1580
callq 0x7050
jmp 0x82c9
movq 0x2d40(%rsp), %rax
movzwl 0x163c(%rax), %eax
tzcntl %eax, %eax
movl %eax, 0x3c(%rsp)
movq 0x2d40(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movsbl 0x1780(%rax,%rcx), %eax
movl %eax, 0x38(%rsp)
movl 0x3c(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
xorl $-0x1, %edx
movq 0x2d40(%rsp), %rax
movzwl 0x163a(%rax), %ecx
andl %edx, %ecx
movw %cx, 0x163a(%rax)
movl 0x3c(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
xorl $-0x1, %edx
movq 0x2d40(%rsp), %rax
movzwl 0x163c(%rax), %ecx
andl %edx, %ecx
movw %cx, 0x163c(%rax)
cmpb $0x0, 0x690(%rsp)
je 0x83be
movq 0x2d40(%rsp), %rdi
addq $0x1580, %rdi           # imm = 0x1580
callq 0x70e0
leaq 0x40(%rsp), %rdi
movq 0x2d40(%rsp), %rsi
addq $0x1790, %rsi           # imm = 0x1790
movslq 0x3c(%rsp), %rax
imulq $0x650, %rax, %rax      # imm = 0x650
addq %rax, %rsi
movl $0x650, %edx            # imm = 0x650
callq 0x70c0
movl 0x38(%rsp), %esi
leaq 0x40(%rsp), %rdi
callq 0x90e0
movq $0x0, 0x30(%rsp)
cmpb $0x0, 0x260(%rsp)
jne 0x8423
movl $0xffffffff, 0x6a0(%rsp) # imm = 0xFFFFFFFF
leaq 0x40(%rsp), %rdi
callq 0x9fb0
jmp 0x8485
leaq 0x40(%rsp), %rdi
callq 0xac50
cmpl $0x0, %eax
je 0x843d
movq $0x4a, 0x30(%rsp)
jmp 0x8483
leaq 0x40(%rsp), %rdi
callq 0xade0
movb $0x0, 0x691(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xb420
cmpq $0x0, 0x58(%rsp)
jne 0x8478
movq 0x50(%rsp), %rax
movq 0x50(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x8481
movq $0x4a, 0x30(%rsp)
jmp 0x8483
jmp 0x8485
cmpl $0x0, 0x84(%rsp)
jl 0x8741
movl 0x84(%rsp), %ecx
movl 0x88(%rsp), %eax
movl %ecx, 0x2d4c(%rsp)
movl %eax, 0x2d48(%rsp)
movl 0x2d4c(%rsp), %eax
cmpl 0x2d48(%rsp), %eax
jle 0x84cc
movl 0x2d4c(%rsp), %eax
movl %eax, 0x1c(%rsp)
jmp 0x84d7
movl 0x2d48(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
movswl 0x70(%rsp), %ecx
xorl %edx, %edx
divl %ecx
movw %ax, 0x696(%rsp)
movl 0x84(%rsp), %eax
movswl 0x70(%rsp), %ecx
xorl %edx, %edx
divl %ecx
movw %dx, %ax
movw %ax, 0x694(%rsp)
movq 0x98(%rsp), %rax
movswl 0x694(%rsp), %ecx
movswl 0x696(%rsp), %edx
movzwl 0x74(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
shll $0x4, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6a8(%rsp)
movq 0x98(%rsp), %rax
movslq 0x7c(%rsp), %rcx
addq %rcx, %rax
movswl 0x694(%rsp), %ecx
movswl 0x696(%rsp), %edx
movzwl 0x76(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b0(%rsp)
movq 0x6b0(%rsp), %rax
movzwl 0x76(%rsp), %ecx
sarl %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b8(%rsp)
movq 0x98(%rsp), %rax
movslq 0x7c(%rsp), %rcx
addq %rcx, %rax
movslq 0x80(%rsp), %rcx
addq %rcx, %rax
movswl 0x694(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x130, %rcx, %rcx      # imm = 0x130
addq %rcx, %rax
movswl 0x696(%rsp), %ecx
movswl 0x70(%rsp), %edx
addl $0x1, %edx
imull %edx, %ecx
movslq %ecx, %rcx
imulq $0x130, %rcx, %rcx      # imm = 0x130
addq %rcx, %rax
movq %rax, 0x6c0(%rsp)
movl 0x84(%rsp), %eax
cmpl 0x698(%rsp), %eax
jge 0x873f
leaq 0x40(%rsp), %rdi
callq 0xc050
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
movq 0x6c0(%rsp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, 0x6c0(%rsp)
movw 0x694(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x694(%rsp)
movq 0x6a8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x6a8(%rsp)
movq 0x6b0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x6b0(%rsp)
movq 0x6b8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x6b8(%rsp)
movswl 0x694(%rsp), %eax
movswl 0x70(%rsp), %ecx
cmpl %ecx, %eax
jl 0x873a
movq 0x6c0(%rsp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, 0x6c0(%rsp)
movw $0x0, 0x694(%rsp)
movzwl 0x74(%rsp), %ecx
shll $0x4, %ecx
movswl 0x70(%rsp), %eax
shll $0x4, %eax
subl %eax, %ecx
movq 0x6a8(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6a8(%rsp)
movzwl 0x76(%rsp), %ecx
shll $0x3, %ecx
movswl 0x70(%rsp), %eax
shll $0x3, %eax
subl %eax, %ecx
movq 0x6b0(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b0(%rsp)
movzwl 0x76(%rsp), %ecx
shll $0x3, %ecx
movswl 0x70(%rsp), %eax
shll $0x3, %eax
subl %eax, %ecx
movq 0x6b8(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b8(%rsp)
jmp 0x85f8
jmp 0x8741
cmpq $0x0, 0x30(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x8765
movl 0x38(%rsp), %esi
leaq 0x40(%rsp), %rdi
callq 0x104b0
movq 0x2d40(%rsp), %rax
movslq 0x38(%rsp), %rcx
movl 0x16c0(%rax,%rcx,4), %eax
cmpl 0x88(%rsp), %eax
jb 0x87c5
movsbl 0x67(%rsp), %eax
cmpl $0x0, %eax
jne 0x8796
cmpl $0x0, 0x84(%rsp)
jl 0x87c5
movl 0x698(%rsp), %edx
movq 0x2d40(%rsp), %rax
movslq 0x38(%rsp), %rcx
movl %edx, 0x16c0(%rax,%rcx,4)
movq 0x2d40(%rsp), %rdi
addq $0x15d8, %rdi           # imm = 0x15D8
callq 0x7040
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x87e1
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x8823
movq 0x2d40(%rsp), %rdx
movslq 0x38(%rsp), %rsi
movl 0x698(%rsp), %eax
movl 0x88(%rsp), %ecx
subl %ecx, %eax
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %ecx
movl %ecx, %eax
negl %eax
lock
xaddl %eax, 0x1640(%rdx,%rsi,4)
subl %ecx, %eax
movl %eax, 0x24(%rsp)
movslq 0x24(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0x8af1
movq 0x2d40(%rsp), %rax
movslq 0x38(%rsp), %rcx
movl 0x16c0(%rax,%rcx,4), %eax
movl %eax, 0x84(%rsp)
movswl 0x70(%rsp), %eax
movswl 0x72(%rsp), %ecx
imull %ecx, %eax
movl %eax, 0x698(%rsp)
movl 0x84(%rsp), %eax
cmpl 0x698(%rsp), %eax
jae 0x8ad9
movl 0x84(%rsp), %eax
movswl 0x70(%rsp), %ecx
xorl %edx, %edx
divl %ecx
movw %ax, 0x696(%rsp)
movl 0x84(%rsp), %eax
movswl 0x70(%rsp), %ecx
xorl %edx, %edx
divl %ecx
movw %dx, %ax
movw %ax, 0x694(%rsp)
movq 0x98(%rsp), %rax
movswl 0x694(%rsp), %ecx
movswl 0x696(%rsp), %edx
movzwl 0x74(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
shll $0x4, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6a8(%rsp)
movq 0x98(%rsp), %rax
movslq 0x7c(%rsp), %rcx
addq %rcx, %rax
movswl 0x694(%rsp), %ecx
movswl 0x696(%rsp), %edx
movzwl 0x76(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b0(%rsp)
movq 0x6b0(%rsp), %rax
movzwl 0x76(%rsp), %ecx
sarl %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b8(%rsp)
movq 0x98(%rsp), %rax
movslq 0x7c(%rsp), %rcx
addq %rcx, %rax
movslq 0x80(%rsp), %rcx
addq %rcx, %rax
movswl 0x694(%rsp), %ecx
movslq %ecx, %rcx
imulq $0x130, %rcx, %rcx      # imm = 0x130
addq %rcx, %rax
movswl 0x696(%rsp), %ecx
movswl 0x70(%rsp), %edx
addl $0x1, %edx
imull %edx, %ecx
movslq %ecx, %rcx
imulq $0x130, %rcx, %rcx      # imm = 0x130
addq %rcx, %rax
movq %rax, 0x6c0(%rsp)
movl 0x84(%rsp), %eax
cmpl 0x698(%rsp), %eax
jge 0x8ad7
leaq 0x40(%rsp), %rdi
callq 0xc050
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
movq 0x6c0(%rsp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, 0x6c0(%rsp)
movw 0x694(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x694(%rsp)
movq 0x6a8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x6a8(%rsp)
movq 0x6b0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x6b0(%rsp)
movq 0x6b8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x6b8(%rsp)
movswl 0x694(%rsp), %eax
movswl 0x70(%rsp), %ecx
cmpl %ecx, %eax
jl 0x8ad2
movq 0x6c0(%rsp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, 0x6c0(%rsp)
movw $0x0, 0x694(%rsp)
movzwl 0x74(%rsp), %ecx
shll $0x4, %ecx
movswl 0x70(%rsp), %eax
shll $0x4, %eax
subl %eax, %ecx
movq 0x6a8(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6a8(%rsp)
movzwl 0x76(%rsp), %ecx
shll $0x3, %ecx
movswl 0x70(%rsp), %eax
shll $0x3, %eax
subl %eax, %ecx
movq 0x6b0(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b0(%rsp)
movzwl 0x76(%rsp), %ecx
shll $0x3, %ecx
movswl 0x70(%rsp), %eax
shll $0x3, %eax
subl %eax, %ecx
movq 0x6b8(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x6b8(%rsp)
jmp 0x8990
jmp 0x8ad9
movq 0x2d40(%rsp), %rax
movslq 0x38(%rsp), %rcx
movl $0x7fffffff, 0x16c0(%rax,%rcx,4) # imm = 0x7FFFFFFF
cmpb $0x0, 0x690(%rsp)
je 0x9017
movq 0x2d40(%rsp), %rdi
addq $0x1580, %rdi           # imm = 0x1580
callq 0x7160
movq 0x2d40(%rsp), %rdi
addq $0x1608, %rdi           # imm = 0x1608
callq 0x70a0
cmpl $0x0, 0x2c(%rsp)
jne 0x9015
movq 0x2d40(%rsp), %rdi
addq $0x15d8, %rdi           # imm = 0x15D8
callq 0x7040
movq 0x2d40(%rsp), %rax
movq %rax, 0x2da8(%rsp)
movq 0x2da8(%rsp), %rax
movq %rax, 0x2e08(%rsp)
movl $0x7fffffff, 0x2ea8(%rsp) # imm = 0x7FFFFFFF
movl 0x2ea8(%rsp), %eax
movl %eax, 0x2eec(%rsp)
movl %eax, 0x2ee8(%rsp)
movl %eax, 0x2ee4(%rsp)
movl %eax, 0x2ee0(%rsp)
movl 0x2ee4(%rsp), %edx
movl 0x2ee8(%rsp), %ecx
movl 0x2eec(%rsp), %eax
vmovd 0x2ee0(%rsp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, 0x2ed0(%rsp)
vmovdqa 0x2ed0(%rsp), %xmm0
vmovdqa %xmm0, 0x2df0(%rsp)
movq 0x2e08(%rsp), %rax
vmovdqa 0x2df0(%rsp), %xmm2
vmovdqa 0x16c0(%rax), %xmm1
vmovdqa 0x16d0(%rax), %xmm0
vpcmpeqd %xmm2, %xmm1, %xmm1
vpcmpeqd %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, 0x2f60(%rsp)
vmovdqa %xmm0, 0x2f50(%rsp)
vmovdqa 0x2f60(%rsp), %xmm0
vmovdqa 0x2f50(%rsp), %xmm1
vpackssdw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2de0(%rsp)
movq 0x2e08(%rsp), %rax
vmovdqa 0x2df0(%rsp), %xmm2
vmovdqa 0x16e0(%rax), %xmm1
vmovdqa 0x16f0(%rax), %xmm0
vpcmpeqd %xmm2, %xmm1, %xmm1
vpcmpeqd %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, 0x2f40(%rsp)
vmovdqa %xmm0, 0x2f30(%rsp)
vmovdqa 0x2f40(%rsp), %xmm0
vmovdqa 0x2f30(%rsp), %xmm1
vpackssdw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2dd0(%rsp)
movq 0x2e08(%rsp), %rax
vmovdqa 0x2df0(%rsp), %xmm2
vmovdqa 0x1700(%rax), %xmm1
vmovdqa 0x1710(%rax), %xmm0
vpcmpeqd %xmm2, %xmm1, %xmm1
vpcmpeqd %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, 0x2f20(%rsp)
vmovdqa %xmm0, 0x2f10(%rsp)
vmovdqa 0x2f20(%rsp), %xmm0
vmovdqa 0x2f10(%rsp), %xmm1
vpackssdw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2dc0(%rsp)
movq 0x2e08(%rsp), %rax
vmovdqa 0x2df0(%rsp), %xmm2
vmovdqa 0x1720(%rax), %xmm1
vmovdqa 0x1730(%rax), %xmm0
vpcmpeqd %xmm2, %xmm1, %xmm1
vpcmpeqd %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, 0x2f00(%rsp)
vmovdqa %xmm0, 0x2ef0(%rsp)
vmovdqa 0x2f00(%rsp), %xmm0
vmovdqa 0x2ef0(%rsp), %xmm1
vpackssdw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2db0(%rsp)
vmovdqa 0x2de0(%rsp), %xmm1
vmovdqa 0x2dd0(%rsp), %xmm0
vmovdqa %xmm1, 0x2e70(%rsp)
vmovdqa %xmm0, 0x2e60(%rsp)
vmovdqa 0x2e70(%rsp), %xmm0
vmovdqa 0x2e60(%rsp), %xmm1
vpacksswb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2e20(%rsp)
vmovdqa 0x2e20(%rsp), %xmm0
vpmovmskb %xmm0, %eax
vmovdqa 0x2dc0(%rsp), %xmm1
vmovdqa 0x2db0(%rsp), %xmm0
vmovdqa %xmm1, 0x2e50(%rsp)
vmovdqa %xmm0, 0x2e40(%rsp)
vmovdqa 0x2e50(%rsp), %xmm0
vmovdqa 0x2e40(%rsp), %xmm1
vpacksswb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2e10(%rsp)
vmovdqa 0x2e10(%rsp), %xmm0
vpmovmskb %xmm0, %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, 0x2eac(%rsp)
movl 0x2eac(%rsp), %eax
movl %eax, 0x2ecc(%rsp)
movl %eax, 0x2ec8(%rsp)
movl %eax, 0x2ec4(%rsp)
movl %eax, 0x2ec0(%rsp)
movl 0x2ec4(%rsp), %edx
movl 0x2ec8(%rsp), %ecx
movl 0x2ecc(%rsp), %eax
vmovd 0x2ec0(%rsp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, 0x2eb0(%rsp)
vmovdqa 0x2eb0(%rsp), %xmm0
vpternlogq $0xf, %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, 0x2d90(%rsp)
movq 0x2da8(%rsp), %rax
vmovdqa 0x1740(%rax), %xmm0
vmovdqa 0x2d90(%rsp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vpxor %xmm1, %xmm1, %xmm1
vpcmpeqd %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2d80(%rsp)
movq 0x2da8(%rsp), %rax
vmovdqa 0x1750(%rax), %xmm0
vmovdqa 0x2d90(%rsp), %xmm2
vpand %xmm2, %xmm0, %xmm0
vpcmpeqd %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2d70(%rsp)
movq 0x2da8(%rsp), %rax
vmovdqa 0x1760(%rax), %xmm0
vmovdqa 0x2d90(%rsp), %xmm2
vpand %xmm2, %xmm0, %xmm0
vpcmpeqd %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2d60(%rsp)
movq 0x2da8(%rsp), %rax
vmovdqa 0x1770(%rax), %xmm0
vmovdqa 0x2d90(%rsp), %xmm1
vptestnmd %xmm1, %xmm0, %k0
vpmovm2d %k0, %xmm0
vmovdqa %xmm0, 0x2d50(%rsp)
movq 0x2da8(%rsp), %rax
movzwl 0x163a(%rax), %eax
vmovdqa 0x2d80(%rsp), %xmm1
vmovdqa 0x2d70(%rsp), %xmm0
vmovdqa %xmm1, 0x2fa0(%rsp)
vmovdqa %xmm0, 0x2f90(%rsp)
vmovdqa 0x2fa0(%rsp), %xmm0
vmovdqa 0x2f90(%rsp), %xmm1
vpackssdw %xmm1, %xmm0, %xmm1
vmovdqa 0x2d60(%rsp), %xmm2
vmovdqa 0x2d50(%rsp), %xmm0
vmovdqa %xmm2, 0x2f80(%rsp)
vmovdqa %xmm0, 0x2f70(%rsp)
vmovdqa 0x2f80(%rsp), %xmm0
vmovdqa 0x2f70(%rsp), %xmm2
vpackssdw %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, 0x2e90(%rsp)
vmovdqa %xmm0, 0x2e80(%rsp)
vmovdqa 0x2e90(%rsp), %xmm0
vmovdqa 0x2e80(%rsp), %xmm1
vpacksswb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x2e30(%rsp)
vmovdqa 0x2e30(%rsp), %xmm0
vpmovmskb %xmm0, %ecx
andl %ecx, %eax
movw %ax, %cx
movq 0x2d40(%rsp), %rax
movw %cx, 0x163c(%rax)
movq 0x2d40(%rsp), %rax
cmpw $0x0, 0x163c(%rax)
je 0x9013
movq 0x2d40(%rsp), %rdi
addq $0x15a8, %rdi           # imm = 0x15A8
callq 0x7040
jmp 0x9015
jmp 0x9017
cmpq $0x0, 0x1a0(%rsp)
je 0x903b
movq 0x1a0(%rsp), %rax
movq 0x1a8(%rsp), %rdi
movq 0x30(%rsp), %rcx
movl %ecx, %esi
callq *%rax
movl 0x3c(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
xorl $-0x1, %edx
movq 0x2d40(%rsp), %rax
movzwl 0x1638(%rax), %ecx
andl %edx, %ecx
movw %cx, 0x1638(%rax)
movq 0x2d40(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movl $0x0, 0x1740(%rax,%rcx,4)
movq 0x2d40(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movb $-0x1, 0x1780(%rax,%rcx)
cmpb $0x0, 0x690(%rsp)
jne 0x90cd
movq 0x2d40(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, (%rax)
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x58(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq 0x30(%rsp), %rax
movq %rbp, %rsp
popq %rbp
retq
jmp 0x82c7
nopw %cs:(%rax,%rax)