// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/simplify.c
// Function: simplify_compare_constant
static int simplify_compare_constant(struct instruction *insn, long long value)
{
	unsigned size = insn->itype->bit_size;
	unsigned long long bits = bits_mask(size);
	struct instruction *def;
	pseudo_t src1, src2;
	unsigned int osize;
	int changed = 0;

	switch (insn->opcode) {
	case OP_SET_LT:
		if (!value)
			break;
		if (value == sign_bit(size))	// (x <  SMIN) --> 0
			return replace_with_pseudo(insn, value_pseudo(0));
		if (value == sign_mask(size))	// (x <  SMAX) --> (x != SMAX)
			return replace_opcode(insn, OP_SET_NE);
		if (value == sign_bit(size) + 1)// (x < SMIN + 1) --> (x == SMIN)
			return replace_binop_value(insn, OP_SET_EQ, sign_bit(size));
		if (!(value & sign_bit(size)))
			changed |= replace_binop_value(insn, OP_SET_LE, (value - 1) & bits);
		break;
	case OP_SET_LE:
		if (!value)
			break;
		if (value == sign_mask(size))	// (x <= SMAX) --> 1
			return replace_with_pseudo(insn, value_pseudo(1));
		if (value == sign_bit(size))	// (x <= SMIN) --> (x == SMIN)
			return replace_opcode(insn, OP_SET_EQ);
		if (value == sign_mask(size) - 1) // (x <= SMAX - 1) --> (x != SMAX)
			return replace_binop_value(insn, OP_SET_NE, sign_mask(size));
		if (value & sign_bit(size))
			changed |= replace_binop_value(insn, OP_SET_LT, (value + 1) & bits);
		break;
	case OP_SET_GE:
		if (!value)
			break;
		if (value == sign_bit(size))	// (x >= SMIN) --> 1
			return replace_with_pseudo(insn, value_pseudo(1));
		if (value == sign_mask(size))	// (x >= SMAX) --> (x == SMAX)
			return replace_opcode(insn, OP_SET_EQ);
		if (value == sign_bit(size) + 1)// (x >= SMIN + 1) --> (x != SMIN)
			return replace_binop_value(insn, OP_SET_NE, sign_bit(size));
		if (!(value & sign_bit(size)))
			changed |= replace_binop_value(insn, OP_SET_GT, (value - 1) & bits);
		break;
	case OP_SET_GT:
		if (!value)
			break;
		if (value == sign_mask(size))	// (x >  SMAX) --> 0
			return replace_with_pseudo(insn, value_pseudo(0));
		if (value == sign_bit(size))	// (x >  SMIN) --> (x != SMIN)
			return replace_opcode(insn, OP_SET_NE);
		if (value == sign_mask(size) - 1) // (x > SMAX - 1) --> (x == SMAX)
			return replace_binop_value(insn, OP_SET_EQ, sign_mask(size));
		if (value & sign_bit(size))
			changed |= replace_binop_value(insn, OP_SET_GE, (value + 1) & bits);
		break;

	case OP_SET_B:
		if (!value)			// (x < 0) --> 0
			return replace_with_pseudo(insn, value_pseudo(0));
		if (value == 1)			// (x < 1) --> (x == 0)
			return replace_binop_value(insn, OP_SET_EQ, 0);
		else if (value == bits)		// (x < ~0) --> (x != ~0)
			return replace_binop_value(insn, OP_SET_NE, value);
		else				// (x < y) --> (x <= (y-1))
			changed |= replace_binop_value(insn, OP_SET_BE, (value - 1) & bits);
		break;
	case OP_SET_AE:
		if (!value)			// (x >= 0) --> 1
			return replace_with_pseudo(insn, value_pseudo(1));
		if (value == 1)			// (x >= 1) --> (x != 0)
			return replace_binop_value(insn, OP_SET_NE, 0);
		else if (value == bits)		// (x >= ~0) --> (x == ~0)
			return replace_binop_value(insn, OP_SET_EQ, value);
		else				// (x >= y) --> (x > (y-1)
			changed |= replace_binop_value(insn, OP_SET_A, (value - 1) & bits);
		break;
	case OP_SET_BE:
		if (!value)			// (x <= 0) --> (x == 0)
			return replace_opcode(insn, OP_SET_EQ);
		if (value == bits)		// (x <= ~0) --> 1
			return replace_with_pseudo(insn, value_pseudo(1));
		if (value == (bits - 1))	// (x <= ~1) --> (x != ~0)
			return replace_binop_value(insn, OP_SET_NE, bits);
		if (value == (bits >> 1))	// (x u<= SMAX) --> (x s>= 0)
			changed |= replace_binop_value(insn, OP_SET_GE, 0);
		break;
	case OP_SET_A:
		if (!value)			// (x > 0) --> (x != 0)
			return replace_opcode(insn, OP_SET_NE);
		if (value == bits)		// (x > ~0) --> 0
			return replace_with_pseudo(insn, value_pseudo(0));
		if (value == (bits - 1))	// (x > ~1) --> (x == ~0)
			return replace_binop_value(insn, OP_SET_EQ, bits);
		if (value == (bits >> 1))	// (x u> SMAX) --> (x s< 0)
			changed |= replace_binop_value(insn, OP_SET_LT, 0);
		break;
	}

	src1 = insn->src1;
	src2 = insn->src2;
	value = src2->value;
	switch (DEF_OPCODE(def, src1)) {
	case OP_AND:
		if (!constant(def->src2))
			break;
		bits = def->src2->value;
		switch (insn->opcode) {
		case OP_SET_EQ:
			if ((value & bits) != value)
				return replace_with_value(insn, 0);
			if (value == bits && is_power_of_2(bits))
				return replace_binop_value(insn, OP_SET_NE, 0);
			break;
		case OP_SET_NE:
			if ((value & bits) != value)
				return replace_with_value(insn, 1);
			if (value == bits && is_power_of_2(bits))
				return replace_binop_value(insn, OP_SET_EQ, 0);
			break;
		case OP_SET_LE: case OP_SET_LT:
			value = sign_extend(value, def->size);
			if (insn->opcode == OP_SET_LT)
				value -= 1;
			if (bits & sign_bit(def->size))
				break;
			if (value < 0)
				return replace_with_value(insn, 0);
			if (value >= (long long)bits)
				return replace_with_value(insn, 1);
			if (value == 0)
				return replace_opcode(insn, OP_SET_EQ);
			break;
		case OP_SET_GT: case OP_SET_GE:
			value = sign_extend(value, def->size);
			if (insn->opcode == OP_SET_GE)
				value -= 1;
			if (bits & sign_bit(def->size))
				break;
			if (value < 0)
				return replace_with_value(insn, 1);
			if (value >= (long long)bits)
				return replace_with_value(insn, 0);
			if (value == 0)
				return replace_opcode(insn, OP_SET_NE);
			break;
		case OP_SET_B:
			if (value > bits)
				return replace_with_value(insn, 1);
			break;
		case OP_SET_BE:
			if (value >= bits)
				return replace_with_value(insn, 1);
			break;
		case OP_SET_AE:
			if (value > bits)
				return replace_with_value(insn, 0);
			break;
		case OP_SET_A:
			if (value >= bits)
				return replace_with_value(insn, 0);
			break;
		}
		break;
	case OP_OR:
		if (!constant(def->src2))
			break;
		bits = def->src2->value;
		switch (insn->opcode) {
		case OP_SET_EQ:
			if ((value & bits) != bits)
				return replace_with_value(insn, 0);
			break;
		case OP_SET_NE:
			if ((value & bits) != bits)
				return replace_with_value(insn, 1);
			break;
		case OP_SET_B:
			if (bits >= value)
				return replace_with_value(insn, 0);
			break;
		case OP_SET_BE:
			if (bits > value)
				return replace_with_value(insn, 0);
			break;
		case OP_SET_AE:
			if (bits > value)
				return replace_with_value(insn, 1);
			break;
		case OP_SET_A:
			if (bits >= value)
				return replace_with_value(insn, 1);
			break;
		case OP_SET_LT:
			value -= 1;
		case OP_SET_LE:
			if (bits & sign_bit(def->size)) {
				value = sign_extend(value, def->size);
				if (value >= -1)
					return replace_with_value(insn, 1);
			}
			break;
		case OP_SET_GE:
			value -= 1;
		case OP_SET_GT:
			if (bits & sign_bit(def->size)) {
				value = sign_extend(value, def->size);
				if (value >= -1)
					return replace_with_value(insn, 0);
			}
			break;
		}
		break;
	case OP_SEXT:				// sext(x) cmp C --> x cmp trunc(C)
		osize = def->orig_type->bit_size;
		if (is_signed_constant(value, osize, size)) {
			insn->itype = def->orig_type;
			insn->src2 = value_pseudo(zero_extend(value, osize));
			return replace_pseudo(insn, &insn->src1, def->src);
		}
		switch (insn->opcode) {
		case OP_SET_BE:
			if (value >= sign_bit(osize)) {
				insn->itype = def->orig_type;
				replace_binop_value(insn, OP_SET_GE, 0);
				return replace_pseudo(insn, &insn->src1, def->src);
			}
			break;
		case OP_SET_A:
			if (value >= sign_bit(osize)) {
				insn->itype = def->orig_type;
				replace_binop_value(insn, OP_SET_LT, 0);
				return replace_pseudo(insn, &insn->src1, def->src);
			}
			break;
		case OP_SET_LT: case OP_SET_LE:
			if (value < sign_bit(size))
				return replace_with_value(insn, 1);
			else
				return replace_with_value(insn, 0);
			break;
		case OP_SET_GE: case OP_SET_GT:
			if (value < sign_bit(size))
				return replace_with_value(insn, 0);
			else
				return replace_with_value(insn, 1);
			break;
		}
		break;
	case OP_TRUNC:
		osize = def->orig_type->bit_size;
		switch (insn->opcode) {
		case OP_SET_EQ: case OP_SET_NE:
			if (one_use(def->target)) {
				insn->itype = def->orig_type;
				def->type = def->orig_type;
				def->size = osize;
				def->src2 = value_pseudo(bits);
				return replace_opcode(def, OP_AND);
			}
			break;
		}
		break;
	case OP_ZEXT:
		osize = def->orig_type->bit_size;
		bits = bits_mask(osize);
		if (value <= bits) {
			const struct opcode_table *op = &opcode_table[insn->opcode];
			if (op->flags & OPF_SIGNED)
				insn->opcode = op->sign;
			insn->itype = def->orig_type;
			return replace_pseudo(insn, &insn->src1, def->src);
		}
		switch (insn->opcode) {
		case OP_SET_LT: case OP_SET_LE:
			if (sign_extend(value, size) > (long long)bits)
				return replace_with_value(insn, 1);
			else
				return replace_with_value(insn, 0);
			break;
		case OP_SET_GE: case OP_SET_GT:
			if (sign_extend(value, size) > (long long)bits)
				return replace_with_value(insn, 0);
			else
				return replace_with_value(insn, 1);
			break;
		case OP_SET_B: case OP_SET_BE:
			return replace_with_value(insn, 1);
		case OP_SET_AE: case OP_SET_A:
			return replace_with_value(insn, 0);
		}
		break;
	}
	return changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x50(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3acf0
movq %rax, -0x28(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
addl $-0x28, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x7, %eax
ja 0x3a15a
movq -0x58(%rbp), %rax
leaq 0x2f4be(%rip), %rcx     # 0x68ed8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, -0x18(%rbp)
jne 0x39a2f
jmp 0x3a15a
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jne 0x39a70
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1a390
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jne 0x39aa2
movq -0x10(%rbp), %rdi
movl $0x30, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x78(%rbp), %rax
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x39aeb
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq -0x80(%rbp), %rdi
movq %rax, %rdx
movl $0x27, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x88(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x39b31
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
andq -0x28(%rbp), %rdx
movl $0x29, %esi
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3a15a
cmpq $0x0, -0x18(%rbp)
jne 0x39b42
jmp 0x3a15a
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jne 0x39b90
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x1, %edi
callq 0x1a390
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jne 0x39bc8
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq %rax, %rcx
movq -0xa8(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x39c1d
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq -0xb0(%rbp), %rdi
movq %rax, %rdx
movl $0x30, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0xb8(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0x39c63
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
andq -0x28(%rbp), %rdx
movl $0x28, %esi
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3a15a
cmpq $0x0, -0x18(%rbp)
jne 0x39c74
jmp 0x3a15a
movq -0x18(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
jne 0x39cc2
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0x1, %edi
callq 0x1a390
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq %rax, %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
jne 0x39cfa
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0xd8(%rbp), %rax
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x39d4f
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq -0xe0(%rbp), %rdi
movq %rax, %rdx
movl $0x30, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0xe8(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x39d95
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
andq -0x28(%rbp), %rdx
movl $0x2b, %esi
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3a15a
cmpq $0x0, -0x18(%rbp)
jne 0x39da6
jmp 0x3a15a
movq -0x18(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq %rax, %rcx
movq -0xf0(%rbp), %rax
cmpq %rcx, %rax
jne 0x39df3
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1a390
movq -0xf8(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x100(%rbp), %rax
cmpq %rcx, %rax
jne 0x39e2b
movq -0x10(%rbp), %rdi
movl $0x30, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0x108(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq %rax, %rcx
movq -0x108(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x39e80
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae90
movq -0x110(%rbp), %rdi
movq %rax, %rdx
movl $0x27, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x118(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0x39ec6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
andq -0x28(%rbp), %rdx
movl $0x2a, %esi
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3a15a
cmpq $0x0, -0x18(%rbp)
jne 0x39efd
movq -0x10(%rbp), %rax
movq %rax, -0x120(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1a390
movq -0x120(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
cmpq $0x1, -0x18(%rbp)
jne 0x39f1e
movq -0x10(%rbp), %rdi
movl $0x27, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x39f42
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x30, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
andq -0x28(%rbp), %rdx
movl $0x2d, %esi
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x39f64
jmp 0x3a15a
cmpq $0x0, -0x18(%rbp)
jne 0x39f9c
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movl $0x1, %edi
callq 0x1a390
movq -0x128(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
cmpq $0x1, -0x18(%rbp)
jne 0x39fbd
movq -0x10(%rbp), %rdi
movl $0x30, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x39fe1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x27, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
andq -0x28(%rbp), %rdx
movl $0x2f, %esi
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3a003
jmp 0x3a15a
cmpq $0x0, -0x18(%rbp)
jne 0x3a025
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x3a05b
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
movl $0x1, %edi
callq 0x1a390
movq -0x130(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x3a086
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x30, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jne 0x3a0ae
movq -0x10(%rbp), %rdi
movl $0x2a, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3a15a
cmpq $0x0, -0x18(%rbp)
jne 0x3a0d0
movq -0x10(%rbp), %rdi
movl $0x30, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x3a105
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1a390
movq -0x138(%rbp), %rdi
movq %rax, %rsi
callq 0x357e0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x3a130
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x27, %esi
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jne 0x3a158
movq -0x10(%rbp), %rdi
movl $0x28, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3a15a
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x3a1ab
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x3a1ab
movq -0x30(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
movl %eax, -0x13c(%rbp)
jmp 0x3a1b5
xorl %eax, %eax
movl %eax, -0x13c(%rbp)
jmp 0x3a1b5
movl -0x13c(%rbp), %eax
addl $-0x16, %eax
movl %eax, %ecx
movq %rcx, -0x148(%rbp)
subl $0x20, %eax
ja 0x3ab6a
movq -0x148(%rbp), %rax
leaq 0x2ed1a(%rip), %rcx     # 0x68ef8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x382a0
cmpl $0x0, %eax
jne 0x3a1fe
jmp 0x3ab6a
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
addl $-0x27, %eax
movl %eax, %ecx
movq %rcx, -0x150(%rbp)
subl $0x9, %eax
ja 0x3a4fc
movq -0x150(%rbp), %rax
leaq 0x2edaa(%rip), %rcx     # 0x68fe4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
andq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x3a266
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x3a298
movq -0x28(%rbp), %rdi
callq 0x3b370
cmpl $0x0, %eax
je 0x3a298
movq -0x10(%rbp), %rdi
movl $0x30, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
movq -0x18(%rbp), %rax
andq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x3a2c1
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x3a2f3
movq -0x28(%rbp), %rdi
callq 0x3b370
cmpl $0x0, %eax
je 0x3a2f3
movq -0x10(%rbp), %rdi
movl $0x27, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
shrl $0x8, %esi
callq 0x3ae20
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x28, %eax
jne 0x3a328
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
shrl $0x8, %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x158(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0x3a359
jmp 0x3a4fc
cmpq $0x0, -0x18(%rbp)
jge 0x3a375
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x3a395
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
cmpq $0x0, -0x18(%rbp)
jne 0x3a3b2
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
shrl $0x8, %esi
callq 0x3ae20
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x2a, %eax
jne 0x3a3e7
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
shrl $0x8, %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x160(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0x3a418
jmp 0x3a4fc
cmpq $0x0, -0x18(%rbp)
jge 0x3a435
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x3a454
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
cmpq $0x0, -0x18(%rbp)
jne 0x3a471
movq -0x10(%rbp), %rdi
movl $0x30, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x3a496
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3a4b8
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x3a4d9
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3a4fa
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a4fc
jmp 0x3ab6a
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x382a0
cmpl $0x0, %eax
jne 0x3a518
jmp 0x3ab6a
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
addl $-0x27, %eax
movl %eax, %ecx
movq %rcx, -0x168(%rbp)
subl $0x9, %eax
ja 0x3a71d
movq -0x168(%rbp), %rax
leaq 0x2ea68(%rip), %rcx     # 0x68fbc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
andq -0x28(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x3a580
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a71d
movq -0x18(%rbp), %rax
andq -0x28(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x3a5a9
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a71d
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x3a5cd
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a71d
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x3a5f1
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a71d
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x3a616
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a71d
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x3a63b
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a71d
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
shrl $0x8, %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x170(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0x3a6ad
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
shrl $0x8, %esi
callq 0x3ae20
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jl 0x3a6ab
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a6ad
jmp 0x3a71d
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
shrl $0x8, %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x178(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0x3a71b
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
shrl $0x8, %esi
callq 0x3ae20
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jl 0x3a719
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a71b
jmp 0x3a71d
jmp 0x3ab6a
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x50(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x3b3b0
testb $0x1, %al
jne 0x3a745
jmp 0x3a795
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x3b400
movq %rax, %rdi
callq 0x1a390
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x38d50
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
addl $-0x28, %eax
movl %eax, %ecx
movq %rcx, -0x180(%rbp)
subl $0x7, %eax
ja 0x3a938
movq -0x180(%rbp), %rax
leaq 0x2e7db(%rip), %rcx     # 0x68f9c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x188(%rbp)
movl -0x44(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x188(%rbp), %rax
cmpq %rcx, %rax
jb 0x3a82f
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
movl $0x2a, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x38d50
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a938
movq -0x18(%rbp), %rax
movq %rax, -0x190(%rbp)
movl -0x44(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x190(%rbp), %rax
cmpq %rcx, %rax
jb 0x3a899
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
movl $0x28, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3b320
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x38d50
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a938
movq -0x18(%rbp), %rax
movq %rax, -0x198(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x198(%rbp), %rax
cmpq %rcx, %rax
jae 0x3a8d6
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movl -0x1c(%rbp), %edi
callq 0x3ae70
movq %rax, %rcx
movq -0x1a0(%rbp), %rax
cmpq %rcx, %rax
jae 0x3a922
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3ab6a
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x50(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
movl %eax, -0x1a4(%rbp)
subl $0x27, %eax
je 0x3a96e
jmp 0x3a961
movl -0x1a4(%rbp), %eax
subl $0x30, %eax
jne 0x3a9e9
jmp 0x3a96e
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3ad20
testb $0x1, %al
jne 0x3a981
jmp 0x3a9e7
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x44(%rbp), %edx
movq -0x30(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x1a390
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rdi
movl $0x16, %esi
callq 0x3b2f0
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3a9e9
jmp 0x3ab6a
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x50(%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %edi
callq 0x3acf0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x3aaa0
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x29126(%rip), %rax     # 0x63b50
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
shrq $0x28, %rax
andq $0xff, %rax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x3aa6f
movq -0x50(%rbp), %rax
movq (%rax), %rax
shlq $0x28, %rax
sarq $0x38, %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0x7f, %edx
andl $-0x80, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x38d50
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
addl $-0x28, %eax
movl %eax, %ecx
movq %rcx, -0x1b0(%rbp)
subl $0x7, %eax
ja 0x3ab68
movq -0x1b0(%rbp), %rax
leaq 0x2e4b0(%rip), %rcx     # 0x68f7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x3ae20
cmpq -0x28(%rbp), %rax
jle 0x3aafa
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x3ae20
cmpq -0x28(%rbp), %rax
jle 0x3ab30
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x39480
movl %eax, -0x4(%rbp)
jmp 0x3ab70
jmp 0x3ab6a
movl -0x48(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopl (%rax)