// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/semantics.c
// Function: expr_unary
static void _expr_unary(
	ParserContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);

	uint32_t node_type = node->type;

	switch (node_type) {
		case FE_NODE_EXPR_NOT:
		case FE_NODE_EXPR_BNOT: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			_expr_unary_postfix(ctx, node_oprd);

			if (!_is_integer_type_node(ctx, node_oprd)) {
				switch (node_type) {
					case FE_NODE_EXPR_NOT: {
						_SYNERR_NODE(ctx, node, "unary operator '!' need integer operand.");
						break;
					}
					case FE_NODE_EXPR_BNOT: {
						_SYNERR_NODE(ctx, node, "unary operator '~' need integer operand.");
						break;
					}
					default: {
						assert(0);
					}
				}
			}

			FE_EXPR_AST_NODE_COPY(node, node_oprd);

			if (FE_EXPR_AST_NODE_GET_CONSTANT(node_oprd)) {
				_calc_unary_constexpr(ctx, node_type, node, node_oprd);
			}
			break;
		}
		case FE_NODE_EXPR_POSITIVE:
		case FE_NODE_EXPR_NEGATIVE: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			_expr_unary_postfix(ctx, node_oprd);

			if (!_is_number_type_node(ctx, node_oprd)) {
				switch (node_type) {
					case FE_NODE_EXPR_POSITIVE: {
						_SYNERR_NODE(ctx, node, "unary operator '+' need number operand.");
						break;
					}
					case FE_NODE_EXPR_NEGATIVE: {
						_SYNERR_NODE(ctx, node, "unary operator '-' need number operand.");
						break;
					}
					default: {
						assert(0);
					}
				}
			}

			FE_EXPR_AST_NODE_COPY(node, node_oprd);

			if (FE_EXPR_AST_NODE_GET_CONSTANT(node_oprd)) {
				FE_EXPR_AST_NODE_COPY_CONSTANT(node, node_oprd);
				_calc_unary_constexpr(ctx, node_type, node, node_oprd);
			}
			break;
		}
		case FE_NODE_EXPR_INC_LEFT:
		case FE_NODE_EXPR_DEC_LEFT: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			_expr_unary_postfix(ctx, node_oprd);

			if (!_expr_is_lvalue(ctx, node_oprd)) {
				switch (node_type) {
					case FE_NODE_EXPR_INC_LEFT: {
						_SYNERR_NODE(ctx, node, "unary operator prefix '++' need number left value operand.");
						break;
					}
					case FE_NODE_EXPR_DEC_LEFT: {
						_SYNERR_NODE(ctx, node, "unary operator prefix '--' need number left value operand.");
						break;
					}
					default: {
						assert(0);
					}
				}
			}

			if (!_is_number_type_node(ctx, node_oprd)) {
				switch (node_type) {
					case FE_NODE_EXPR_INC_LEFT: {
						_SYNERR_NODE(ctx, node, "unary operator prefix '++' need number left value operand.");
						break;
					}
					case FE_NODE_EXPR_DEC_LEFT: {
						_SYNERR_NODE(ctx, node, "unary operator prefix '--' need number left value operand.");
						break;
					}
					default: {
						assert(0);
					}
				}
			}

			FE_EXPR_AST_NODE_COPY(node, node_oprd);

			FE_EXPR_AST_NODE_SET_CONSTANT(node, false);
			break;
		}
		case FE_NODE_EXPR_SIZEOF: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			ParserASTNode *type_node = NULL;
			switch (_get_node_catagory(node_oprd->type)) {
				case FE_SEM_NODE_CATEGORY_TYPE: {
					_type(ctx, node_oprd, NULL);
					type_node = node_oprd;
					break;
				}
				case FE_SEM_NODE_CATAGORY_EXPR: {
					_expr(ctx, node_oprd);
					type_node = FE_EXPR_AST_NODE_GET_TYPE_NODE(node_oprd);
					break;
				}
				default: {
					assert(0);
					break;
				}
			}

			if (ctx->arch == FE_ARCH_32) {
				FE_EXPR_AST_NODE_SET_TYPE(node, FE_TYPE_UINT32);
				FE_EXPR_AST_NODE_SET_TYPE_NODE(node, _NODE_TYPE_UINT32);

				FE_EXPR_AST_NODE_SET_CONSTEXPR_RESULT_UINT32_VAL(
					node, (uint32_t) _calc_type_size(ctx, node, type_node)
				);
			} else if (ctx->arch == FE_ARCH_64) {
				FE_EXPR_AST_NODE_SET_TYPE(node, FE_TYPE_UINT64);
				FE_EXPR_AST_NODE_SET_TYPE_NODE(node, _NODE_TYPE_UINT64);
			
				FE_EXPR_AST_NODE_SET_CONSTEXPR_RESULT_UINT64_VAL(
					node, (uint64_t) _calc_type_size(ctx, node, type_node)
				);
			} else {
				assert(0);
			}

			FE_EXPR_AST_NODE_SET_CONSTANT(node, true);

			break;
		}
		case FE_NODE_EXPR_ALIGNOF: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			ParserASTNode *type_node = NULL;
			switch (_get_node_catagory(node_oprd->type)) {
				case FE_SEM_NODE_CATEGORY_TYPE: {
					_type(ctx, node_oprd, NULL);
					type_node = node_oprd;
					break;
				}
				case FE_SEM_NODE_CATAGORY_EXPR: {
					_expr(ctx, node_oprd);
					type_node = FE_EXPR_AST_NODE_GET_TYPE_NODE(node_oprd);
					break;
				}
				default: {
					assert(0);
					break;
				}
			}

			size_t align = 0;
			if (node_oprd->type == FE_NODE_EXPR_ATOM
					&& node_oprd->childs[0]->type == FE_NODE_IDENTIFIER) {
				ParserSymbol *symbol = parser_get_symbol_from_node(
					ctx, node, FE_SYM_VAR, node_oprd->childs[0]->token
				);
				if (symbol != NULL) {
					align = FE_VAR_SYMBOL_GET_ALIGN(symbol);
				} else {
					align = _calc_type_align(ctx, node, type_node);
				}
			} else {
				align = _calc_type_align(ctx, node, type_node);
			}

			if (ctx->arch == FE_ARCH_32) {
				FE_EXPR_AST_NODE_SET_TYPE(node, FE_TYPE_UINT32);
				FE_EXPR_AST_NODE_SET_TYPE_NODE(node, _NODE_TYPE_UINT32);

				FE_EXPR_AST_NODE_SET_CONSTEXPR_RESULT_UINT32_VAL(
					node, (uint32_t) align
				);
			} else if (ctx->arch == FE_ARCH_64) {
				FE_EXPR_AST_NODE_SET_TYPE(node, FE_TYPE_UINT64);
				FE_EXPR_AST_NODE_SET_TYPE_NODE(node, _NODE_TYPE_UINT64);
			
				FE_EXPR_AST_NODE_SET_CONSTEXPR_RESULT_UINT64_VAL(
					node, (uint64_t) align
				);
			} else {
				assert(0);
			}

			FE_EXPR_AST_NODE_SET_CONSTANT(node, true);
			break;
		}
		case FE_NODE_EXPR_REF: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			_expr_unary_postfix(ctx, node_oprd);

			if (!_expr_is_lvalue(ctx, node_oprd)) {
				_SYNERR_NODE(ctx, node, "unary operator '&' need left value operand.");
			}

			ParserASTNode *node_oprd_type = FE_EXPR_AST_NODE_GET_TYPE_NODE(node_oprd);

			ParserASTNode *node_pointer_type = _NEW_NODE(ctx, FE_NODE_TYPE_POINTER, NULL);
			parser_add_child(ctx, node_pointer_type, node_oprd_type);

			FE_EXPR_AST_NODE_SET_TYPE(node, FE_TYPE_POINTER);
			FE_EXPR_AST_NODE_SET_TYPE_NODE(node, node_pointer_type);

			FE_EXPR_AST_NODE_SET_CONSTANT(node, false);
			break;
		}
		case FE_NODE_EXPR_DEREF: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			_expr_unary_postfix(ctx, node_oprd);

			ParserASTNode *node_oprd_type = FE_EXPR_AST_NODE_GET_TYPE_NODE(node_oprd);
			if (node_oprd_type->type != FE_NODE_TYPE_POINTER) {
				_SYNERR_NODE(ctx, node, "unary operator '*' need pointer type operand.");
			}

			ParserASTNode *node_oprd_child_type = node_oprd_type->childs[0];
			if (node_oprd_child_type->type == FE_NODE_TYPE_VOID) {
				_SYNERR_NODE(ctx, node, "unary operator '*' operand type cannot be void pointer type.");
			}

			FE_EXPR_AST_NODE_SET_TYPE(node, _get_type_by_type_node(ctx, node_oprd_child_type));
			FE_EXPR_AST_NODE_SET_TYPE_NODE(node, node_oprd_child_type);

			FE_EXPR_AST_NODE_SET_CONSTANT(node, false);
			break;
		}
		case FE_NODE_EXPR_CAST: {
			assert(node->nchilds == 2);

			ParserASTNode *node_type = node->childs[0];
			ParserASTNode *node_expr = node->childs[1];

			_type(ctx, node_type, NULL);
			_expr(ctx, node_expr);

			FE_EXPR_AST_NODE_COPY(node, node_expr);

			uint8_t node_type_type = _get_type_by_type_node(ctx, node_type);
			if (node_type_type == FE_TYPE_STRUCT
					|| node_type_type == FE_TYPE_ARRAY
					|| node_type_type == FE_TYPE_FUNC) {
				_SYNERR_NODE(
					ctx, node, "operator cast cannot cast operand to struct type or array type or function type."
				);
			}

			ParserASTNode *node_expr_type = FE_EXPR_AST_NODE_GET_TYPE_NODE(node_expr);
			uint8_t node_expr_type_type = _get_type_by_type_node(ctx, node_expr_type);
			if (node_expr_type_type == FE_TYPE_STRUCT
					|| node_expr_type_type == FE_TYPE_ARRAY
					|| node_expr_type_type == FE_TYPE_FUNC) {
				_SYNERR_NODE(
					ctx, node, "operator cast cannot cast struct type or array type or function type operand."
				);
			}

			FE_EXPR_AST_NODE_SET_TYPE(node, _get_type_by_type_node(ctx, node_type));
			FE_EXPR_AST_NODE_SET_TYPE_NODE(node, node_type);

			if (FE_EXPR_AST_NODE_GET_CONSTANT(node_expr)) {
				FE_EXPR_AST_NODE_SET_CONSTANT(node, true);
				_calc_cast_constexpr(ctx, node_type_type, node, node_expr);
			}
			break;
		}
		case FE_NODE_EXPR_VA_ARG: {
			assert(node->nchilds == 2);

			ParserASTNode *node_expr = node->childs[0];
			ParserASTNode *node_type = node->childs[1];

			_expr(ctx, node_expr);

			uint8_t type = FE_TYPE_UNKNOWN;
			_type(ctx, node_type, &type);

			if (FE_EXPR_AST_NODE_GET_TYPE(node_expr) != FE_TYPE_VA_LIST) {
				_SYNERR_NODE(
					ctx, node, "operator __va_arg first parameter type must be '__va_list'."
				);
			}

			if (!_is_primitive_type(type)
					&& !_is_pointer_type(type)) {
				_SYNERR_NODE(
					ctx, node, "operator __va_arg first parameter must be primitive type or pointer type."
				);
			}

			FE_EXPR_AST_NODE_SET_TYPE(node, type);
			FE_EXPR_AST_NODE_SET_TYPE_NODE(node, node_type);

			FE_EXPR_AST_NODE_SET_CONSTANT(node, false);

			break;
		}
		default: {
			_expr_unary_postfix(ctx, node);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3d20, %rsp           # imm = 0x3D20
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5623c
jmp 0x5625b
leaq 0x26313(%rip), %rdi     # 0x7c556
leaq 0x28000(%rip), %rsi     # 0x7e24a
movl $0xdeb, %edx            # imm = 0xDEB
leaq 0x28a26(%rip), %rcx     # 0x7ec7c
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x56264
jmp 0x56283
leaq 0x1fd68(%rip), %rdi     # 0x75fd3
leaq 0x27fd8(%rip), %rsi     # 0x7e24a
movl $0xdec, %edx            # imm = 0xDEC
leaq 0x289fe(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0xfffff140, %eax       # imm = 0xFFFFF140
movl %eax, %ecx
movq %rcx, -0x3d08(%rbp)
subl $0xe, %eax
ja 0x57039
movq -0x3d08(%rbp), %rax
leaq 0x27950(%rip), %rcx     # 0x7dc04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x562c9
jmp 0x562e8
leaq 0x28e20(%rip), %rdi     # 0x7f0f0
leaq 0x27f73(%rip), %rsi     # 0x7e24a
movl $0xdf3, %edx            # imm = 0xDF3
leaq 0x28999(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x572f0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x526c0
testb $0x1, %al
jne 0x563bb
movl -0x14(%rbp), %eax
movl %eax, -0x3d0c(%rbp)
subl $0xec0, %eax            # imm = 0xEC0
je 0x5633a
jmp 0x5632b
movl -0x3d0c(%rbp), %eax
subl $0xec3, %eax            # imm = 0xEC3
je 0x5636a
jmp 0x5639a
leaq -0x420(%rbp), %rdi
leaq 0x28967(%rip), %rsi     # 0x7ecaf
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x420(%rbp), %rdx
callq *%rax
jmp 0x563b9
leaq -0x820(%rbp), %rdi
leaq 0x28960(%rip), %rsi     # 0x7ecd8
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x820(%rbp), %rdx
callq *%rax
jmp 0x563b9
leaq 0x1c0ba(%rip), %rdi     # 0x7245b
leaq 0x27ea2(%rip), %rsi     # 0x7e24a
movl $0xe03, %edx            # imm = 0xE03
leaq 0x288c8(%rip), %rcx     # 0x7ec7c
callq 0x30a0
jmp 0x563bb
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x20(%rbp), %rsi
addq $0x60, %rsi
movl $0x30, %edx
callq 0x3110
movq -0x20(%rbp), %rax
testb $0x1, 0x70(%rax)
je 0x563f3
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x57560
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x56404
jmp 0x56423
leaq 0x28ce5(%rip), %rdi     # 0x7f0f0
leaq 0x27e38(%rip), %rsi     # 0x7e24a
movl $0xe11, %edx            # imm = 0xE11
leaq 0x2885e(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x828(%rbp)
movq -0x8(%rbp), %rdi
movq -0x828(%rbp), %rsi
callq 0x572f0
movq -0x8(%rbp), %rdi
movq -0x828(%rbp), %rsi
callq 0x57d20
testb $0x1, %al
jne 0x564ff
movl -0x14(%rbp), %eax
movl %eax, -0x3d10(%rbp)
subl $0xec1, %eax            # imm = 0xEC1
je 0x5647e
jmp 0x5646f
movl -0x3d10(%rbp), %eax
subl $0xec2, %eax            # imm = 0xEC2
je 0x564ae
jmp 0x564de
leaq -0xc30(%rbp), %rdi
leaq 0x28875(%rip), %rsi     # 0x7ed01
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0xc30(%rbp), %rdx
callq *%rax
jmp 0x564fd
leaq -0x1030(%rbp), %rdi
leaq 0x2886d(%rip), %rsi     # 0x7ed29
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x1030(%rbp), %rdx
callq *%rax
jmp 0x564fd
leaq 0x1bf76(%rip), %rdi     # 0x7245b
leaq 0x27d5e(%rip), %rsi     # 0x7e24a
movl $0xe21, %edx            # imm = 0xE21
leaq 0x28784(%rip), %rcx     # 0x7ec7c
callq 0x30a0
jmp 0x564ff
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x828(%rbp), %rsi
addq $0x60, %rsi
movl $0x30, %edx
callq 0x3110
movq -0x828(%rbp), %rax
testb $0x1, 0x70(%rax)
je 0x56554
movq -0x828(%rbp), %rax
movb 0x70(%rax), %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x70(%rax)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x828(%rbp), %rcx
callq 0x57560
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x56565
jmp 0x56584
leaq 0x28b84(%rip), %rdi     # 0x7f0f0
leaq 0x27cd7(%rip), %rsi     # 0x7e24a
movl $0xe30, %edx            # imm = 0xE30
leaq 0x286fd(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x1038(%rbp)
movq -0x8(%rbp), %rdi
movq -0x1038(%rbp), %rsi
callq 0x572f0
movq -0x8(%rbp), %rdi
movq -0x1038(%rbp), %rsi
callq 0x510c0
cmpl $0x0, %eax
jne 0x56661
movl -0x14(%rbp), %eax
movl %eax, -0x3d14(%rbp)
subl $0xec4, %eax            # imm = 0xEC4
je 0x565e0
jmp 0x565d1
movl -0x3d14(%rbp), %eax
subl $0xec5, %eax            # imm = 0xEC5
je 0x56610
jmp 0x56640
leaq -0x1440(%rbp), %rdi
leaq 0x28763(%rip), %rsi     # 0x7ed51
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x1440(%rbp), %rdx
callq *%rax
jmp 0x5665f
leaq -0x1840(%rbp), %rdi
leaq 0x2876e(%rip), %rsi     # 0x7ed8c
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x1840(%rbp), %rdx
callq *%rax
jmp 0x5665f
leaq 0x1be14(%rip), %rdi     # 0x7245b
leaq 0x27bfc(%rip), %rsi     # 0x7e24a
movl $0xe40, %edx            # imm = 0xE40
leaq 0x28622(%rip), %rcx     # 0x7ec7c
callq 0x30a0
jmp 0x56661
movq -0x8(%rbp), %rdi
movq -0x1038(%rbp), %rsi
callq 0x57d20
testb $0x1, %al
jne 0x5671b
movl -0x14(%rbp), %eax
movl %eax, -0x3d18(%rbp)
subl $0xec4, %eax            # imm = 0xEC4
je 0x5669a
jmp 0x5668b
movl -0x3d18(%rbp), %eax
subl $0xec5, %eax            # imm = 0xEC5
je 0x566ca
jmp 0x566fa
leaq -0x1c40(%rbp), %rdi
leaq 0x286a9(%rip), %rsi     # 0x7ed51
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x1c40(%rbp), %rdx
callq *%rax
jmp 0x56719
leaq -0x2040(%rbp), %rdi
leaq 0x286b4(%rip), %rsi     # 0x7ed8c
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x2040(%rbp), %rdx
callq *%rax
jmp 0x56719
leaq 0x1bd5a(%rip), %rdi     # 0x7245b
leaq 0x27b42(%rip), %rsi     # 0x7e24a
movl $0xe50, %edx            # imm = 0xE50
leaq 0x28568(%rip), %rcx     # 0x7ec7c
callq 0x30a0
jmp 0x5671b
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x1038(%rbp), %rsi
addq $0x60, %rsi
movl $0x30, %edx
callq 0x3110
movq -0x10(%rbp), %rax
movb $0x0, 0x70(%rax)
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x56751
jmp 0x56770
leaq 0x28998(%rip), %rdi     # 0x7f0f0
leaq 0x27aeb(%rip), %rsi     # 0x7e24a
movl $0xe5b, %edx            # imm = 0xE5B
leaq 0x28511(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x2048(%rbp)
movq $0x0, -0x2050(%rbp)
movq -0x2048(%rbp), %rax
movl (%rax), %edi
callq 0x4f080
movl %eax, %ecx
movl %ecx, -0x3d1c(%rbp)
subl $0x1, %eax
je 0x567b7
jmp 0x567aa
movl -0x3d1c(%rbp), %eax
subl $0x2, %eax
je 0x567db
jmp 0x567ff
movq -0x8(%rbp), %rdi
movq -0x2048(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4f0d0
movq -0x2048(%rbp), %rax
movq %rax, -0x2050(%rbp)
jmp 0x5681e
movq -0x8(%rbp), %rdi
movq -0x2048(%rbp), %rsi
callq 0x4f4b0
movq -0x2048(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x2050(%rbp)
jmp 0x5681e
leaq 0x1bc55(%rip), %rdi     # 0x7245b
leaq 0x27a3d(%rip), %rsi     # 0x7e24a
movl $0xe6b, %edx            # imm = 0xE6B
leaq 0x28463(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x8(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x56869
movq -0x10(%rbp), %rax
movb $0x8, 0x60(%rax)
movq -0x10(%rbp), %rax
leaq 0x37205(%rip), %rcx     # 0x8da40
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x2050(%rbp), %rdx
callq 0x57dd0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
movb $0x8, 0x71(%rax)
jmp 0x568d7
movq -0x8(%rbp), %rax
cmpl $0x2, 0x30(%rax)
jne 0x568b6
movq -0x10(%rbp), %rax
movb $0x9, 0x60(%rax)
movq -0x10(%rbp), %rax
leaq 0x3721a(%rip), %rcx     # 0x8daa0
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x2050(%rbp), %rdx
callq 0x57dd0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rax
movb $0x9, 0x71(%rax)
jmp 0x568d5
leaq 0x1bb9e(%rip), %rdi     # 0x7245b
leaq 0x27986(%rip), %rsi     # 0x7e24a
movl $0xe7f, %edx            # imm = 0xE7F
leaq 0x283ac(%rip), %rcx     # 0x7ec7c
callq 0x30a0
jmp 0x568d7
movq -0x10(%rbp), %rax
movb $0x1, 0x70(%rax)
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x568f0
jmp 0x5690f
leaq 0x287f9(%rip), %rdi     # 0x7f0f0
leaq 0x2794c(%rip), %rsi     # 0x7e24a
movl $0xe87, %edx            # imm = 0xE87
leaq 0x28372(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x2058(%rbp)
movq $0x0, -0x2060(%rbp)
movq -0x2058(%rbp), %rax
movl (%rax), %edi
callq 0x4f080
movl %eax, %ecx
movl %ecx, -0x3d20(%rbp)
subl $0x1, %eax
je 0x56956
jmp 0x56949
movl -0x3d20(%rbp), %eax
subl $0x2, %eax
je 0x5697a
jmp 0x5699e
movq -0x8(%rbp), %rdi
movq -0x2058(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4f0d0
movq -0x2058(%rbp), %rax
movq %rax, -0x2060(%rbp)
jmp 0x569bd
movq -0x8(%rbp), %rdi
movq -0x2058(%rbp), %rsi
callq 0x4f4b0
movq -0x2058(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x2060(%rbp)
jmp 0x569bd
leaq 0x1bab6(%rip), %rdi     # 0x7245b
leaq 0x2789e(%rip), %rsi     # 0x7e24a
movl $0xe97, %edx            # imm = 0xE97
leaq 0x282c4(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq $0x0, -0x2068(%rbp)
movq -0x2058(%rbp), %rax
cmpl $0xee0, (%rax)          # imm = 0xEE0
jne 0x56a53
movq -0x2058(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x56a53
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x2058(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movl $0x1, %edx
callq 0x82f0
movq %rax, -0x2070(%rbp)
cmpq $0x0, -0x2070(%rbp)
je 0x56a36
movq -0x2070(%rbp), %rax
movslq 0x60(%rax), %rax
movq %rax, -0x2068(%rbp)
jmp 0x56a51
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x2060(%rbp), %rdx
callq 0x4f150
movq %rax, -0x2068(%rbp)
jmp 0x56a6e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x2060(%rbp), %rdx
callq 0x4f150
movq %rax, -0x2068(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x56aac
movq -0x10(%rbp), %rax
movb $0x8, 0x60(%rax)
movq -0x10(%rbp), %rax
leaq 0x36fb5(%rip), %rcx     # 0x8da40
movq %rcx, 0x68(%rax)
movq -0x2068(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
movb $0x8, 0x71(%rax)
jmp 0x56b0a
movq -0x8(%rbp), %rax
cmpl $0x2, 0x30(%rax)
jne 0x56ae9
movq -0x10(%rbp), %rax
movb $0x9, 0x60(%rax)
movq -0x10(%rbp), %rax
leaq 0x36fd7(%rip), %rcx     # 0x8daa0
movq %rcx, 0x68(%rax)
movq -0x2068(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rax
movb $0x9, 0x71(%rax)
jmp 0x56b08
leaq 0x1b96b(%rip), %rdi     # 0x7245b
leaq 0x27753(%rip), %rsi     # 0x7e24a
movl $0xeba, %edx            # imm = 0xEBA
leaq 0x28179(%rip), %rcx     # 0x7ec7c
callq 0x30a0
jmp 0x56b0a
movq -0x10(%rbp), %rax
movb $0x1, 0x70(%rax)
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x56b23
jmp 0x56b42
leaq 0x285c6(%rip), %rdi     # 0x7f0f0
leaq 0x27719(%rip), %rsi     # 0x7e24a
movl $0xec1, %edx            # imm = 0xEC1
leaq 0x2813f(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x2078(%rbp)
movq -0x8(%rbp), %rdi
movq -0x2078(%rbp), %rsi
callq 0x572f0
movq -0x8(%rbp), %rdi
movq -0x2078(%rbp), %rsi
callq 0x510c0
cmpl $0x0, %eax
jne 0x56ba7
leaq -0x2480(%rbp), %rdi
leaq 0x28240(%rip), %rsi     # 0x7edc7
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x2480(%rbp), %rdx
callq *%rax
movq -0x2078(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x2488(%rbp)
movq -0x8(%rbp), %rdi
movl $0x440, %esi            # imm = 0x440
leaq 0x1e4dc(%rip), %rdx     # 0x750a5
xorl %eax, %eax
movl %eax, %ecx
callq 0x58210
movq %rax, -0x2490(%rbp)
movq -0x8(%rbp), %rdi
movq -0x2490(%rbp), %rsi
movq -0x2488(%rbp), %rdx
callq 0x7e20
movq -0x10(%rbp), %rax
movb $0x10, 0x60(%rax)
movq -0x2490(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x70(%rax)
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x56c20
jmp 0x56c3f
leaq 0x284c9(%rip), %rdi     # 0x7f0f0
leaq 0x2761c(%rip), %rsi     # 0x7e24a
movl $0xed6, %edx            # imm = 0xED6
leaq 0x28042(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x2498(%rbp)
movq -0x8(%rbp), %rdi
movq -0x2498(%rbp), %rsi
callq 0x572f0
movq -0x2498(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x24a0(%rbp)
movq -0x24a0(%rbp), %rax
cmpl $0x440, (%rax)          # imm = 0x440
je 0x56cb0
leaq -0x28a0(%rbp), %rdi
leaq 0x28163(%rip), %rsi     # 0x7edf3
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x28a0(%rbp), %rdx
callq *%rax
movq -0x24a0(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28a8(%rbp)
movq -0x28a8(%rbp), %rax
cmpl $0x4ff, (%rax)          # imm = 0x4FF
jne 0x56d02
leaq -0x2cb0(%rbp), %rdi
leaq 0x2813f(%rip), %rsi     # 0x7ee21
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x2cb0(%rbp), %rdx
callq *%rax
movq -0x8(%rbp), %rdi
movq -0x28a8(%rbp), %rsi
callq 0x4d750
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x60(%rax)
movq -0x28a8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x70(%rax)
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x56d43
jmp 0x56d62
leaq 0x2792a(%rip), %rdi     # 0x7e674
leaq 0x274f9(%rip), %rsi     # 0x7e24a
movl $0xeec, %edx            # imm = 0xEEC
leaq 0x27f1f(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x2cb8(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x2cc0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x2cb8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4f0d0
movq -0x8(%rbp), %rdi
movq -0x2cc0(%rbp), %rsi
callq 0x4f4b0
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x2cc0(%rbp), %rsi
addq $0x60, %rsi
movl $0x30, %edx
callq 0x3110
movq -0x8(%rbp), %rdi
movq -0x2cb8(%rbp), %rsi
callq 0x4d750
movb %al, -0x2cc1(%rbp)
movzbl -0x2cc1(%rbp), %eax
cmpl $0xd, %eax
je 0x56e02
movzbl -0x2cc1(%rbp), %eax
cmpl $0xe, %eax
je 0x56e02
movzbl -0x2cc1(%rbp), %eax
cmpl $0xf, %eax
jne 0x56e30
leaq -0x30d0(%rbp), %rdi
leaq 0x2804e(%rip), %rsi     # 0x7ee5e
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30d0(%rbp), %rdx
callq *%rax
movq -0x2cc0(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x30d8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30d8(%rbp), %rsi
callq 0x4d750
movb %al, -0x30d9(%rbp)
movzbl -0x30d9(%rbp), %eax
cmpl $0xd, %eax
je 0x56e7c
movzbl -0x30d9(%rbp), %eax
cmpl $0xe, %eax
je 0x56e7c
movzbl -0x30d9(%rbp), %eax
cmpl $0xf, %eax
jne 0x56eaa
leaq -0x34e0(%rbp), %rdi
leaq 0x28025(%rip), %rsi     # 0x7eeaf
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x34e0(%rbp), %rdx
callq *%rax
movq -0x8(%rbp), %rdi
movq -0x2cb8(%rbp), %rsi
callq 0x4d750
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x60(%rax)
movq -0x2cb8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x2cc0(%rbp), %rax
testb $0x1, 0x70(%rax)
je 0x56f04
movq -0x10(%rbp), %rax
movb $0x1, 0x70(%rax)
movq -0x8(%rbp), %rdi
movb -0x2cc1(%rbp), %al
movq -0x10(%rbp), %rdx
movq -0x2cc0(%rbp), %rcx
movzbl %al, %esi
callq 0x582a0
jmp 0x57046
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x56f15
jmp 0x56f34
leaq 0x27758(%rip), %rdi     # 0x7e674
leaq 0x27327(%rip), %rsi     # 0x7e24a
movl $0xf13, %edx            # imm = 0xF13
leaq 0x27d4d(%rip), %rcx     # 0x7ec7c
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x34e8(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x34f0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x34e8(%rbp), %rsi
callq 0x4f4b0
movb $0x0, -0x34f1(%rbp)
movq -0x8(%rbp), %rdi
movq -0x34f0(%rbp), %rsi
leaq -0x34f1(%rbp), %rdx
callq 0x4f0d0
movq -0x34e8(%rbp), %rax
movzbl 0x60(%rax), %eax
cmpl $0xc, %eax
je 0x56fc5
leaq -0x3900(%rbp), %rdi
leaq 0x27f58(%rip), %rsi     # 0x7eefd
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x3900(%rbp), %rdx
callq *%rax
movzbl -0x34f1(%rbp), %edi
callq 0x4d470
testb $0x1, %al
jne 0x57013
movzbl -0x34f1(%rbp), %edi
callq 0x4d4c0
testb $0x1, %al
jne 0x57013
leaq -0x3d00(%rbp), %rdi
leaq 0x27f46(%rip), %rsi     # 0x7ef39
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x3d00(%rbp), %rdx
callq *%rax
movb -0x34f1(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x60(%rax)
movq -0x34f0(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x70(%rax)
jmp 0x57046
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x572f0
addq $0x3d20, %rsp           # imm = 0x3D20
popq %rbp
retq
nop