// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/semantics.c
// Function: _type
static void __type(
	ParserContext *ctx,
	ParserASTNode *node,
	uint8_t *type,
	bool first_type
) {
	assert(ctx);
	assert(node);
	
	#define _SET_TYPE(t) { if (type != NULL) { *type = (t); } }

	switch (node->type) {
		case BE_NODE_TYPE_CHAR: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_CHAR)
			break;
		}
		case BE_NODE_TYPE_INT8: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_INT8)
			break;
		}
		case BE_NODE_TYPE_UINT8: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_UINT8)
			break;
		}
		case BE_NODE_TYPE_INT16: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_INT16)
			break;
		}
		case BE_NODE_TYPE_UINT16: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_UINT16)
			break;
		}
		case BE_NODE_TYPE_INT32: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_INT32)
			break;
		}
		case BE_NODE_TYPE_UINT32: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_UINT32)
			break;
		}
		case BE_NODE_TYPE_INT64: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_INT64)
			break;
		}
		case BE_NODE_TYPE_UINT64: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_UINT64)
			break;
		}
		case BE_NODE_TYPE_FLOAT: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_FLOAT)
			break;
		}
		case BE_NODE_TYPE_DOUBLE: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_DOUBLE)
			break;
		}
		case BE_NODE_TYPE_VA_LIST: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_VA_LIST)
			break;
		}
		case BE_NODE_TYPE_STRUCT: {
			assert(node->nchilds == 1);

			_SET_TYPE(BE_TYPE_STRUCT)

			ParserASTNode *node_id = node->childs[0];
			assert(node_id->type == BE_NODE_IDENTIFIER);

			LexerToken *token = node_id->token;
			ParserSymbol *symbol_struct = parser_get_symbol_from_node(ctx, node, BE_SYM_STRUCT, token);
			if (symbol_struct == NULL) {
				_SYNERR_TOKEN(ctx, token, "undefined struct.");
			} else {
				if (first_type
						&& BE_STRUCT_SYMBOL_GET_DUMMY(symbol_struct)) {
					_SYNERR_TOKEN(ctx, token, "struct not implemented.");
				}
			}

			break;
		}
		case BE_NODE_TYPE_ARRAY: {
			assert(node->nchilds == 2);

			_SET_TYPE(BE_TYPE_ARRAY)

			ParserASTNode *node_array_dims = node->childs[0];
			assert(node_array_dims->type == BE_NODE_TYPE_ARRAY_DIMS);
			for (int i = 0; i < node_array_dims->nchilds; i++) {
				ParserASTNode *node_array_dim = node_array_dims->childs[i];
				assert(node_array_dim->type == BE_NODE_LITERAL_UINT);

				uint64_t dim = be_parser_get_uint_val(ctx, node_array_dim);
				if (dim == 0) {
					_SYNERR_NODE(
						ctx,
						node_array_dim,
						"array dimension size cannot be 0."
					);
				}
			}
			
			ParserASTNode *node_type = node->childs[1];
			__type(ctx, node_type, NULL, false);

			break;
		}
		case BE_NODE_TYPE_FUNC: {
			assert(node->nchilds == 1 || node->nchilds == 2);

			_SET_TYPE(BE_TYPE_FUNC)

			ParserASTNode *node_params = NULL;
			ParserASTNode *node_type = NULL;

			node_params = node->childs[0];
			for (int i = 0; i < node_params->nchilds; i++) {
				ParserASTNode *node_param = node_params->childs[i];
				switch (node_param->type) {
					case BE_NODE_FUNC_PARAMS_ELLIPSIS_ITEM: {

						break;
					}
					case BE_NODE_FUNC_PARAMS_ITEM: {
						assert(node_param->nchilds == 2);
						
						ParserASTNode *node_param_id = node_param->childs[0];

						ParserASTNode *node_param_type = node_param->childs[1];
						__type(ctx, node_param_type, NULL, false);

						break;
					}
					default: {
						assert(0);
					}
				}
			}
			
			if (node->nchilds == 2) {
				node_type = node->childs[1];
				__type(ctx, node_type, NULL, false);
			}

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

			_SET_TYPE(BE_TYPE_POINTER)

			ParserASTNode *node_type = node->childs[0];
			__type(ctx, node_type, NULL, false);

			break;
		}
		case BE_NODE_TYPE_VOID: {
			assert(node->nchilds == 0);
			_SET_TYPE(BE_TYPE_VOID)
			break;
		}
		default: {
			assert(0);
		}
	}

	#undef	_SET_TYPE
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4b0, %rsp            # imm = 0x4B0
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4f807
jmp 0x4f826
leaq 0x30953(%rip), %rdi     # 0x80161
leaq 0x3306b(%rip), %rsi     # 0x82880
movl $0x34c, %edx            # imm = 0x34C
leaq 0x33410(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x4f82f
jmp 0x4f84e
leaq 0x26d26(%rip), %rdi     # 0x7655c
leaq 0x33043(%rip), %rsi     # 0x82880
movl $0x34d, %edx            # imm = 0x34D
leaq 0x333e8(%rip), %rcx     # 0x82c31
callq 0x30a0
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4a4(%rbp)
subl $0x400, %eax            # imm = 0x400
je 0x4f99a
jmp 0x4f867
movl -0x4a4(%rbp), %eax
subl $0x401, %eax            # imm = 0x401
je 0x4f9d8
jmp 0x4f87a
movl -0x4a4(%rbp), %eax
subl $0x402, %eax            # imm = 0x402
je 0x4fa54
jmp 0x4f88d
movl -0x4a4(%rbp), %eax
subl $0x403, %eax            # imm = 0x403
je 0x4fad0
jmp 0x4f8a0
movl -0x4a4(%rbp), %eax
subl $0x404, %eax            # imm = 0x404
je 0x4fb4c
jmp 0x4f8b3
movl -0x4a4(%rbp), %eax
subl $0x405, %eax            # imm = 0x405
je 0x4fa16
jmp 0x4f8c6
movl -0x4a4(%rbp), %eax
subl $0x406, %eax            # imm = 0x406
je 0x4fa92
jmp 0x4f8d9
movl -0x4a4(%rbp), %eax
subl $0x407, %eax            # imm = 0x407
je 0x4fb0e
jmp 0x4f8ec
movl -0x4a4(%rbp), %eax
subl $0x408, %eax            # imm = 0x408
je 0x4fb8a
jmp 0x4f8ff
movl -0x4a4(%rbp), %eax
subl $0x409, %eax            # imm = 0x409
je 0x4fbc8
jmp 0x4f912
movl -0x4a4(%rbp), %eax
subl $0x40a, %eax            # imm = 0x40A
je 0x4fc06
jmp 0x4f925
movl -0x4a4(%rbp), %eax
subl $0x40b, %eax            # imm = 0x40B
je 0x4fc44
jmp 0x4f938
movl -0x4a4(%rbp), %eax
subl $0x410, %eax            # imm = 0x410
je 0x4fc82
jmp 0x4f94b
movl -0x4a4(%rbp), %eax
subl $0x420, %eax            # imm = 0x420
je 0x4fd6f
jmp 0x4f95e
movl -0x4a4(%rbp), %eax
subl $0x430, %eax            # imm = 0x430
je 0x4fec0
jmp 0x4f971
movl -0x4a4(%rbp), %eax
subl $0x440, %eax            # imm = 0x440
je 0x50072
jmp 0x4f984
movl -0x4a4(%rbp), %eax
subl $0x4ff, %eax            # imm = 0x4FF
je 0x500d5
jmp 0x50110
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4f9a6
jmp 0x4f9c5
leaq 0x332c4(%rip), %rdi     # 0x82c71
leaq 0x32ecc(%rip), %rsi     # 0x82880
movl $0x353, %edx            # imm = 0x353
leaq 0x33271(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4f9d3
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4f9e4
jmp 0x4fa03
leaq 0x33286(%rip), %rdi     # 0x82c71
leaq 0x32e8e(%rip), %rsi     # 0x82880
movl $0x358, %edx            # imm = 0x358
leaq 0x33233(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fa11
movq -0x18(%rbp), %rax
movb $0x2, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fa22
jmp 0x4fa41
leaq 0x33248(%rip), %rdi     # 0x82c71
leaq 0x32e50(%rip), %rsi     # 0x82880
movl $0x35d, %edx            # imm = 0x35D
leaq 0x331f5(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fa4f
movq -0x18(%rbp), %rax
movb $0x6, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fa60
jmp 0x4fa7f
leaq 0x3320a(%rip), %rdi     # 0x82c71
leaq 0x32e12(%rip), %rsi     # 0x82880
movl $0x362, %edx            # imm = 0x362
leaq 0x331b7(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fa8d
movq -0x18(%rbp), %rax
movb $0x3, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fa9e
jmp 0x4fabd
leaq 0x331cc(%rip), %rdi     # 0x82c71
leaq 0x32dd4(%rip), %rsi     # 0x82880
movl $0x367, %edx            # imm = 0x367
leaq 0x33179(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4facb
movq -0x18(%rbp), %rax
movb $0x7, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fadc
jmp 0x4fafb
leaq 0x3318e(%rip), %rdi     # 0x82c71
leaq 0x32d96(%rip), %rsi     # 0x82880
movl $0x36c, %edx            # imm = 0x36C
leaq 0x3313b(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fb09
movq -0x18(%rbp), %rax
movb $0x4, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fb1a
jmp 0x4fb39
leaq 0x33150(%rip), %rdi     # 0x82c71
leaq 0x32d58(%rip), %rsi     # 0x82880
movl $0x371, %edx            # imm = 0x371
leaq 0x330fd(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fb47
movq -0x18(%rbp), %rax
movb $0x8, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fb58
jmp 0x4fb77
leaq 0x33112(%rip), %rdi     # 0x82c71
leaq 0x32d1a(%rip), %rsi     # 0x82880
movl $0x376, %edx            # imm = 0x376
leaq 0x330bf(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fb85
movq -0x18(%rbp), %rax
movb $0x5, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fb96
jmp 0x4fbb5
leaq 0x330d4(%rip), %rdi     # 0x82c71
leaq 0x32cdc(%rip), %rsi     # 0x82880
movl $0x37b, %edx            # imm = 0x37B
leaq 0x33081(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fbc3
movq -0x18(%rbp), %rax
movb $0x9, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fbd4
jmp 0x4fbf3
leaq 0x33096(%rip), %rdi     # 0x82c71
leaq 0x32c9e(%rip), %rsi     # 0x82880
movl $0x380, %edx            # imm = 0x380
leaq 0x33043(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fc01
movq -0x18(%rbp), %rax
movb $0xa, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fc12
jmp 0x4fc31
leaq 0x33058(%rip), %rdi     # 0x82c71
leaq 0x32c60(%rip), %rsi     # 0x82880
movl $0x385, %edx            # imm = 0x385
leaq 0x33005(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fc3f
movq -0x18(%rbp), %rax
movb $0xb, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x4fc50
jmp 0x4fc6f
leaq 0x3301a(%rip), %rdi     # 0x82c71
leaq 0x32c22(%rip), %rsi     # 0x82880
movl $0x38a, %edx            # imm = 0x38A
leaq 0x32fc7(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fc7d
movq -0x18(%rbp), %rax
movb $0xc, (%rax)
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x4fc8e
jmp 0x4fcad
leaq 0x27779(%rip), %rdi     # 0x7740e
leaq 0x32be4(%rip), %rsi     # 0x82880
movl $0x38f, %edx            # imm = 0x38F
leaq 0x32f89(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fcbb
movq -0x18(%rbp), %rax
movb $0xd, (%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x4fcd8
jmp 0x4fcf7
leaq 0x272c3(%rip), %rdi     # 0x76fa2
leaq 0x32b9a(%rip), %rsi     # 0x82880
movl $0x394, %edx            # imm = 0x394
leaq 0x32f3f(%rip), %rcx     # 0x82c31
callq 0x30a0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rcx
movl $0x2, %edx
callq 0x82f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x4fd3f
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq 0x32f49(%rip), %rdx     # 0x82c84
callq *%rax
jmp 0x4fd6a
testb $0x1, -0x19(%rbp)
je 0x4fd68
movq -0x38(%rbp), %rax
testb $0x1, 0x40(%rax)
je 0x4fd68
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq 0x32f30(%rip), %rdx     # 0x82c96
callq *%rax
jmp 0x4fd6a
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x4fd7b
jmp 0x4fd9a
leaq 0x32fc2(%rip), %rdi     # 0x82d44
leaq 0x32af7(%rip), %rsi     # 0x82880
movl $0x3a4, %edx            # imm = 0x3A4
leaq 0x32e9c(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4fda8
movq -0x18(%rbp), %rax
movb $0xe, (%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x421, (%rax)          # imm = 0x421
jne 0x4fdc5
jmp 0x4fde4
leaq 0x32ee2(%rip), %rdi     # 0x82cae
leaq 0x32aad(%rip), %rsi     # 0x82880
movl $0x3a9, %edx            # imm = 0x3A9
leaq 0x32e52(%rip), %rcx     # 0x82c31
callq 0x30a0
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x4fe92
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpl $0x300, (%rax)          # imm = 0x300
jne 0x4fe1d
jmp 0x4fe3c
leaq 0x32ebb(%rip), %rdi     # 0x82cdf
leaq 0x32a55(%rip), %rsi     # 0x82880
movl $0x3ac, %edx            # imm = 0x3AC
leaq 0x32dfa(%rip), %rcx     # 0x82c31
callq 0x30a0
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3e290
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x4fe82
leaq -0x460(%rbp), %rdi
leaq 0x32eaa(%rip), %rsi     # 0x82d0c
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x460(%rbp), %rdx
callq *%rax
jmp 0x4fe84
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4fdeb
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x468(%rbp)
movq -0x8(%rbp), %rdi
movq -0x468(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x4f7e0
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
je 0x4fed4
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x4fed6
jmp 0x4fef5
leaq 0x32e51(%rip), %rdi     # 0x82d2e
leaq 0x3299c(%rip), %rsi     # 0x82880
movl $0x3be, %edx            # imm = 0x3BE
leaq 0x32d41(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x4ff03
movq -0x18(%rbp), %rax
movb $0xf, (%rax)
movq $0x0, -0x470(%rbp)
movq $0x0, -0x478(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x470(%rbp)
movl $0x0, -0x47c(%rbp)
movl -0x47c(%rbp), %eax
movq -0x470(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x5003a
movq -0x470(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x47c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x488(%rbp)
movq -0x488(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4a8(%rbp)
subl $0xa02, %eax            # imm = 0xA02
je 0x4ff94
jmp 0x4ff80
movl -0x4a8(%rbp), %eax
subl $0xa03, %eax            # imm = 0xA03
jne 0x50005
jmp 0x4ff8f
jmp 0x50024
movq -0x488(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x4ffa3
jmp 0x4ffc2
leaq 0x32dad(%rip), %rdi     # 0x82d57
leaq 0x328cf(%rip), %rsi     # 0x82880
movl $0x3ce, %edx            # imm = 0x3CE
leaq 0x32c74(%rip), %rcx     # 0x82c31
callq 0x30a0
movq -0x488(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x490(%rbp)
movq -0x488(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x498(%rbp)
movq -0x8(%rbp), %rdi
movq -0x498(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x4f7e0
jmp 0x50024
leaq 0x2344e(%rip), %rdi     # 0x7345a
leaq 0x3286d(%rip), %rsi     # 0x82880
movl $0x3d8, %edx            # imm = 0x3D8
leaq 0x32c12(%rip), %rcx     # 0x82c31
callq 0x30a0
jmp 0x50026
movl -0x47c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x47c(%rbp)
jmp 0x4ff35
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x5006d
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x478(%rbp)
movq -0x8(%rbp), %rdi
movq -0x478(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x4f7e0
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x5007e
jmp 0x5009d
leaq 0x27389(%rip), %rdi     # 0x7740e
leaq 0x327f4(%rip), %rsi     # 0x82880
movl $0x3e5, %edx            # imm = 0x3E5
leaq 0x32b99(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x500ab
movq -0x18(%rbp), %rax
movb $0x10, (%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x4a0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x4a0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x4f7e0
jmp 0x5012f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x500e1
jmp 0x50100
leaq 0x32b89(%rip), %rdi     # 0x82c71
leaq 0x32791(%rip), %rsi     # 0x82880
movl $0x3ef, %edx            # imm = 0x3EF
leaq 0x32b36(%rip), %rcx     # 0x82c31
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x5010e
movq -0x18(%rbp), %rax
movb $-0x1, (%rax)
jmp 0x5012f
leaq 0x23343(%rip), %rdi     # 0x7345a
leaq 0x32762(%rip), %rsi     # 0x82880
movl $0x3f4, %edx            # imm = 0x3F4
leaq 0x32b07(%rip), %rcx     # 0x82c31
callq 0x30a0
addq $0x4b0, %rsp            # imm = 0x4B0
popq %rbp
retq
nopl (%rax,%rax)