// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/codegen_expression.c
// Function: print_expression
void print_expression(struct PrinterState *ptr_prs, const struct Expr *ref_expr)
{
	const struct Expr expr = *ref_expr;
	switch (expr.category) {
	case FPCALL_EXPR_RETURNING_INTEGER_CLASS:
	case FPCALL_EXPR_RETURNING_MEMORY_CLASS:
	case FUNCCALL_EXPR_RETURNING_INTEGER_CLASS:
	case FUNCCALL_EXPR_RETURNING_MEMORY_CLASS: {
		unsupported("struct/union returned by function used as a pure rvalue");
	}
	case STRUCT_OR_UNION_ASSIGNMENT_EXPR: {
		print_address_of_lvalue(
		    ptr_prs, expr.ptr1, "left hand of struct/union assignment");
		print_address_of_lvalue_or_struct_or_union(
		    ptr_prs, expr.ptr2, "right hand of struct/union assignment");
		int size = expr.size_info_for_struct_or_union_assign;
		gen_copy_1st_struct_or_union_to_2nd_and_discard(size);
		gen_push_int(143253); /* random garbage */
		return;
	}
	case VOID_EXPR: {
		gen_push_int(123); /* random garbage */
		return;
	}
	case NULLPTR: {
		gen_push_nullptr();
		return;
	}
	case PTR_STRUCT_AND_OFFSET: {
		print_address_of_lvalue_or_struct_or_union(
		    ptr_prs, expr.ptr1, "struct/union whose member is to be accessed");
		int offset = expr.struct_offset;
		if (offset) {
			gen_push_int(offset);
			gen_cltq();
			gen_op_8byte("addq");
		}
		return;
	}
	case POINTER_MINUS_POINTER: {
		print_expression(ptr_prs, expr.ptr1);
		print_expression(ptr_prs, expr.ptr2);
		int size = expr.size_info_for_pointer_arith;
		gen_op_8byte("subq");
		gen_div_by_const(size);
		return;
	}
	case POINTER_PLUS_INT:
	case POINTER_MINUS_INT: {
		int size = expr.size_info_for_pointer_arith;
		print_expression(ptr_prs, expr.ptr1);
		print_expression(ptr_prs, expr.ptr2);
		print_op_pointer_plusminus_int(expr.category == POINTER_PLUS_INT, size);
		return;
	}
	case POSTFIX_INCREMENT:
	case POSTFIX_DECREMENT: {
		enum SimpleBinOp opkind2 = expr.category == POSTFIX_INCREMENT
		                               ? SIMPLE_BIN_OP_PLUS
		                               : SIMPLE_BIN_OP_MINUS;

		print_expression_as_lvalue(ptr_prs, expr.ptr1);
		gen_push_int(1);

		print_simple_binary_op(opkind2, &expr.ptr1->details.type,
		                       expr.size_info_for_pointer_arith);

		gen_assign_nbyte(
		    size_of_basic(&expr.ptr1->details.type, "postfix inc/dec"));

		gen_push_int(-1);

		print_simple_binary_op(opkind2, &expr.ptr1->details.type,
		                       expr.size_info_for_pointer_arith);

		return;
	}

	case LOCAL_VAR_: {
		if (expr.details.true_type.type_category == ARRAY) {
			gen_push_address_of_local(expr.local_var_offset);
			return;
		}
		gen_push_from_local_nbyte(
		    size_of_basic(&expr.details.type, "local var as rvalue"),
		    expr.local_var_offset);

		return;
	}

	case GLOBAL_VAR_: {
		printf("//global `%s` as rvalue\n", expr.global_var_name);

		if (expr.details.true_type.type_category == ARRAY) {
			gen_push_address_of_global(expr.global_var_name);
			return;
		}

		gen_push_address_of_global(expr.global_var_name);
		gen_peek_and_dereference_nbyte(
		    size_of_basic(&expr.details.type, "global var as rvalue"));

		return;
	}

	case SIMPLE_BINARY_EXPR: {
		print_expression(ptr_prs, expr.ptr1);
		print_expression(ptr_prs, expr.ptr2);
		print_simple_binary_op(expr.simple_binary_operator,
		                       &expr.ptr1->details.type,
		                       expr.size_info_for_pointer_arith);
		return;
	}

	case COMMA_EXPR: {
		print_expression_or_addr_of_struct_or_union(
		    ptr_prs, expr.ptr1, "struct as the first operand of comma");

		if (is_struct_or_union(&expr.ptr2->details.type)) {
			simple_error("struct/union is used as the right operand of comma "
			             "operator, but the result of comma expression is used "
			             "in a non-struct/non-union manner.\n");

		} else {
			print_expression(ptr_prs, expr.ptr2);
		}

		gen_discard2nd();
		return;
	}

	case LOGICAL_OR_EXPR: {

		int label1 = get_new_label_name(ptr_prs);
		int label2 = get_new_label_name(ptr_prs);
		print_expression(ptr_prs, expr.ptr1);

		gen_if_nonzero_jmp_nbyte(
		    size_of_basic(&expr.ptr1->details.type, "operand of logical or"),
		    label1, 0);
		print_expression(ptr_prs, expr.ptr2);
		gen_discard();
		gen_if_nonzero_jmp_nbyte(
		    size_of_basic(&expr.ptr2->details.type, "operand of logical or"),
		    label1, -8);
		gen_discard();
		gen_push_int(0);
		gen_jump(label2, "logical OR");
		gen_label(label1);
		gen_discard();
		gen_push_int(1);
		gen_label(label2);
		return;
	}
	case LOGICAL_AND_EXPR: {

		int label1 = get_new_label_name(ptr_prs);
		int label2 = get_new_label_name(ptr_prs);
		print_expression(ptr_prs, expr.ptr1);

		gen_if_zero_jmp_nbyte(
		    size_of_basic(&expr.ptr1->details.type, "operand of logical and"),
		    label1, 0);
		print_expression(ptr_prs, expr.ptr2);
		gen_discard();
		gen_if_zero_jmp_nbyte(
		    size_of_basic(&expr.ptr2->details.type, "operand of logical and"),
		    label1, -8);
		gen_discard();
		gen_push_int(1);
		gen_jump(label2, "logical AND");
		printf(".L%d:\n", label1);
		gen_discard();
		gen_push_int(0);
		printf(".L%d:\n", label2);
		return;
	}

	case ASSIGNMENT_EXPR: {

		print_expression_as_lvalue(ptr_prs, expr.ptr1);
		print_expression(ptr_prs, expr.ptr2);

		gen_discard2nd();

		struct Type type = expr.ptr1->details.type;

		gen_assign_nbyte(size_of_basic(&type, "operand of assignment"));

		return;
	}
	case COMPOUND_ASSIGNMENT_EXPR: {

		print_expression_as_lvalue(ptr_prs, expr.ptr1);
		print_expression(ptr_prs, expr.ptr2);

		print_simple_binary_op(expr.simple_binary_operator,
		                       &expr.ptr1->details.type,
		                       expr.size_info_for_pointer_arith);

		struct Type type = expr.ptr1->details.type;

		gen_assign_nbyte(size_of_basic(&type, "operand of assignment"));

		return;
	}
	case INT_VALUE:
		gen_push_int(expr.int_value);
		return;
	case UNARY_OP_EXPR:
		switch (expr.unary_operator) {
		case UNARY_OP_NOT: {
			print_expression(ptr_prs, expr.ptr1);
			if (size_of_basic(&expr.ptr1->details.type,
			                  "operand of logical not") == 8) {
				gen_logical_not_of_pointer();
			} else {
				gen_unary_not();
			}
			return;
		}
		case UNARY_OP_TILDA:
			print_expression(ptr_prs, expr.ptr1);
			gen_unary("notl");
			return;
		case UNARY_OP_PLUS:
			print_expression(ptr_prs, expr.ptr1);
			/* do nothing */
			return;
		case UNARY_OP_MINUS:
			print_expression(ptr_prs, expr.ptr1);
			gen_unary("negl");
			return;

		case UNARY_OP_PLUS_PLUS:
		case UNARY_OP_MINUS_MINUS: {
			print_expression_as_lvalue(ptr_prs, expr.ptr1);

			gen_push_int(1);
			print_simple_binary_op(
			    expr.unary_operator == UNARY_OP_PLUS_PLUS ? SIMPLE_BIN_OP_PLUS
			                                              : SIMPLE_BIN_OP_MINUS,
			    &expr.ptr1->details.type, expr.size_info_for_pointer_arith);

			struct Type type = expr.ptr1->details.type;

			gen_assign_nbyte(size_of_basic(&type, "prefix inc/dec"));
			return;
		}

		case UNARY_OP_AND: {
			struct Type type = expr.ptr1->details.type;
			struct Type true_type = expr.ptr1->details.true_type;
			if (type.type_category == PTR_ &&
			    true_type.type_category == ARRAY) {
				print_expression(ptr_prs, expr.ptr1);
			} else {
				print_address_of_lvalue(
				    ptr_prs, expr.ptr1, "address requested by & operator");
			}
			return;
		}

		case UNARY_OP_ASTERISK: {
			print_expression(ptr_prs, expr.ptr1);
			struct Type type = expr.details.type;
			struct Type true_type = expr.details.true_type;

			if (type.type_category == PTR_ &&
			    true_type.type_category == ARRAY) {
				/* do not dereference, if it is an array */
				return;
			}
			gen_peek_and_dereference_nbyte(
			    size_of_basic(&type, "*expr as rvalue"));

			return;
		}
		}
		return;
	case CONDITIONAL_EXPR: {
		int label1 = get_new_label_name(ptr_prs);
		int label2 = get_new_label_name(ptr_prs);

		print_expression(ptr_prs, expr.ptr1);
		gen_if_zero_jmp_nbyte(
		    size_of_basic(&expr.ptr1->details.type,
		                  "condition of conditional expression"),
		    label1, 0);
		print_expression(ptr_prs, expr.ptr2);
		gen_jump(label2, "ternary operator");
		gen_label(label1);
		print_expression(ptr_prs, expr.ptr3);
		gen_label(label2);
		gen_discard2nd();
		return;
	}
	case FPCALL_EXPR: {
		struct Type ret_type = expr.details.type;

		print_expression(ptr_prs, expr.ptr1);
		pass_args(ptr_prs, &expr.args);
		gen_pop_to_reg_8byte("r11");

		int size = ret_type.type_category == VOID_
		               ? 4 /* for convenience */
		               : size_of_basic(&ret_type, "return value");

		gen_raw_call_partA();
		gen_call_reg_and_push_ret_of_nbyte(size, "r11");

		return;
	}
	case FUNCCALL_EXPR: {
		const char *ident_str = expr.global_var_name;
		struct Type ret_type = expr.details.type;

		int arg_stacksize = count_args(&expr.args) * 8;
		if (arg_stacksize % 16 != 0) {
			unsupported("misaligned stack");
		}
		gen_raw_call_partA();
		pass_args(ptr_prs, &expr.args);

		int size = ret_type.type_category == VOID_
		               ? 4 /* for convenience */
		               : size_of_basic(&ret_type, "return value");

		gen_push_ret_of_nbyte(size, ident_str, arg_stacksize);

		return;
	}
	case BUILTIN_FUNCCALL_EXPR: {
		const char *ident_str = expr.global_var_name;

		for (int counter = expr.args.length - 1; counter >= 0; counter--) {
			const struct Expr *ptr_expr_ = expr.args.vector[counter];

			print_expression(ptr_prs, ptr_expr_);
		}

		handle_builtin(ptr_prs, ident_str);

		for (int counter = expr.args.length - 1; counter >= 0; counter--) {
			gen_discard();
		}
		gen_push_int(5432); /* a dummy value to be discarded */

		return;
	}

	case STRING_LITERAL: {
		const char *str = expr.literal_string;
		push_vector(&ptr_prs->string_constant_pool, str);
		gen_push_address_of_str(ptr_prs->string_constant_pool.length - 1);
	}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp            # imm = 0x470
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x110(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x10e0
movl -0x70(%rbp), %eax
movq %rax, -0x458(%rbp)
subq $0x1b, %rax
ja 0x59b0
movq -0x458(%rbp), %rax
leaq 0xed36(%rip), %rcx      # 0x13d10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xf156(%rip), %rdi      # 0x14140
callq 0xb1f0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq 0xf17a(%rip), %rdx      # 0x14178
callq 0x4b30
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq 0xf18b(%rip), %rdx      # 0x1419d
callq 0x4bc0
movl -0x18(%rbp), %eax
movl %eax, -0x114(%rbp)
movl -0x114(%rbp), %edi
callq 0xe170
movl $0x22f95, %edi          # imm = 0x22F95
callq 0xd190
jmp 0x59b0
movl $0x7b, %edi
callq 0xd190
jmp 0x59b0
callq 0xd3d0
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq 0xf161(%rip), %rdx      # 0x141c3
callq 0x4bc0
movl -0x14(%rbp), %eax
movl %eax, -0x118(%rbp)
cmpl $0x0, -0x118(%rbp)
je 0x5095
movl -0x118(%rbp), %edi
callq 0xd190
callq 0xd9f0
leaq 0xf15f(%rip), %rdi      # 0x141ef
callq 0xd9b0
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
movl -0x1c(%rbp), %eax
movl %eax, -0x11c(%rbp)
leaq 0xf130(%rip), %rdi      # 0x141f4
callq 0xd9b0
movl -0x11c(%rbp), %edi
callq 0xdb60
jmp 0x59b0
movl -0x1c(%rbp), %eax
movl %eax, -0x120(%rbp)
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
cmpl $0x2, -0x70(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edi
movl -0x120(%rbp), %esi
callq 0x5c70
jmp 0x59b0
movl -0x70(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0xa, %edx
cmovel %ecx, %eax
movl %eax, -0x124(%rbp)
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x5cb0
movl $0x1, %edi
callq 0xd190
movl -0x124(%rbp), %edi
movq -0x60(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x5dd0
movq -0x60(%rbp), %rdi
leaq 0xf097(%rip), %rsi      # 0x141f9
callq 0xb280
movl %eax, %edi
callq 0xd940
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0xd190
movl -0x124(%rbp), %edi
movq -0x60(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x5dd0
jmp 0x59b0
cmpl $0x2, -0xc0(%rbp)
jne 0x51a5
movl -0x20(%rbp), %edi
callq 0xd1d0
jmp 0x59b0
leaq -0x110(%rbp), %rdi
leaq 0xf056(%rip), %rsi      # 0x14209
callq 0xb280
movl %eax, %edi
movl -0x20(%rbp), %esi
callq 0xd260
jmp 0x59b0
movq -0x40(%rbp), %rsi
leaq 0xf04b(%rip), %rdi      # 0x1421d
movb $0x0, %al
callq 0x1080
cmpl $0x2, -0xc0(%rbp)
jne 0x51f0
movq -0x40(%rbp), %rdi
callq 0xd2e0
jmp 0x59b0
movq -0x40(%rbp), %rdi
callq 0xd2e0
leaq -0x110(%rbp), %rdi
leaq 0xf02f(%rip), %rsi      # 0x14236
callq 0xb280
movl %eax, %edi
callq 0xdc80
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
movl -0x6c(%rbp), %edi
movq -0x60(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x5dd0
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq 0xed80(%rip), %rdx      # 0x13fd5
callq 0x5b90
movq -0x58(%rbp), %rdi
callq 0xb250
cmpl $0x0, %eax
je 0x5274
leaq 0xefdc(%rip), %rdi      # 0x1424b
callq 0xb150
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
callq 0xd8b0
jmp 0x59b0
movq -0x8(%rbp), %rdi
callq 0x12b0
movl %eax, -0x128(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12b0
movl %eax, -0x12c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x60(%rbp), %rdi
leaq 0xf015(%rip), %rsi      # 0x142d6
callq 0xb280
movl %eax, %edi
movl -0x128(%rbp), %esi
xorl %edx, %edx
callq 0xd630
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
callq 0xd880
movq -0x58(%rbp), %rdi
leaq 0xefe4(%rip), %rsi      # 0x142d6
callq 0xb280
movl %eax, %edi
movl -0x128(%rbp), %esi
movl $0xfffffff8, %edx       # imm = 0xFFFFFFF8
callq 0xd630
callq 0xd880
xorl %edi, %edi
callq 0xd190
movl -0x12c(%rbp), %edi
leaq 0xfbd5(%rip), %rsi      # 0x14ef7
callq 0xd4f0
movl -0x128(%rbp), %edi
callq 0xd6f0
callq 0xd880
movl $0x1, %edi
callq 0xd190
movl -0x12c(%rbp), %edi
callq 0xd6f0
jmp 0x59b0
movq -0x8(%rbp), %rdi
callq 0x12b0
movl %eax, -0x130(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12b0
movl %eax, -0x134(%rbp)
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x60(%rbp), %rdi
leaq 0xef65(%rip), %rsi      # 0x142ec
callq 0xb280
movl %eax, %edi
movl -0x130(%rbp), %esi
xorl %edx, %edx
callq 0xd550
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
callq 0xd880
movq -0x58(%rbp), %rdi
leaq 0xef34(%rip), %rsi      # 0x142ec
callq 0xb280
movl %eax, %edi
movl -0x130(%rbp), %esi
movl $0xfffffff8, %edx       # imm = 0xFFFFFFF8
callq 0xd550
callq 0xd880
movl $0x1, %edi
callq 0xd190
movl -0x134(%rbp), %edi
leaq 0xfaf5(%rip), %rsi      # 0x14ee0
callq 0xd4f0
movl -0x130(%rbp), %esi
leaq 0xef06(%rip), %rdi      # 0x14303
movb $0x0, %al
callq 0x1080
callq 0xd880
xorl %edi, %edi
callq 0xd190
movl -0x134(%rbp), %esi
leaq 0xeee6(%rip), %rdi      # 0x14303
movb $0x0, %al
callq 0x1080
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x5cb0
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
callq 0xd8b0
movq -0x60(%rbp), %rsi
leaq -0x188(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
leaq -0x188(%rbp), %rdi
leaq 0xee9f(%rip), %rsi      # 0x1430a
callq 0xb280
movl %eax, %edi
callq 0xd940
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x5cb0
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
movl -0x6c(%rbp), %edi
movq -0x60(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x5dd0
movq -0x60(%rbp), %rsi
leaq -0x1d8(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
leaq -0x1d8(%rbp), %rdi
leaq 0xee42(%rip), %rsi      # 0x1430a
callq 0xb280
movl %eax, %edi
callq 0xd940
jmp 0x59b0
movl -0x48(%rbp), %edi
callq 0xd190
jmp 0x59b0
movl -0x68(%rbp), %eax
movq %rax, -0x460(%rbp)
subq $0x7, %rax
ja 0x56d8
movq -0x460(%rbp), %rax
leaq 0xe878(%rip), %rcx      # 0x13d80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x60(%rbp), %rdi
leaq 0xedf7(%rip), %rsi      # 0x14320
callq 0xb280
cmpl $0x8, %eax
jne 0x553a
callq 0xdc50
jmp 0x553f
callq 0xda20
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
leaq 0xeddf(%rip), %rdi      # 0x14337
callq 0xda50
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
leaq 0xedb4(%rip), %rdi      # 0x1433c
callq 0xda50
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x5cb0
movl $0x1, %edi
callq 0xd190
movl -0x68(%rbp), %ecx
movl $0x1, %edi
xorl %eax, %eax
cmpl $0x4, %ecx
cmovel %eax, %edi
movq -0x60(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x5dd0
movq -0x60(%rbp), %rsi
leaq -0x228(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
leaq -0x228(%rbp), %rdi
leaq 0xed59(%rip), %rsi      # 0x14341
callq 0xb280
movl %eax, %edi
callq 0xd940
jmp 0x59b0
movq -0x60(%rbp), %rsi
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
movq -0x60(%rbp), %rsi
addq $0x50, %rsi
leaq -0x2c8(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
cmpl $0x1, -0x278(%rbp)
jne 0x5648
cmpl $0x2, -0x2c8(%rbp)
jne 0x5648
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
jmp 0x565c
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq 0xecf9(%rip), %rdx      # 0x14350
callq 0x4b30
jmp 0x59b0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
leaq -0x110(%rbp), %rsi
leaq -0x318(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
leaq -0x110(%rbp), %rsi
addq $0x50, %rsi
leaq -0x368(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
cmpl $0x1, -0x318(%rbp)
jne 0x56b9
cmpl $0x2, -0x368(%rbp)
jne 0x56b9
jmp 0x59b0
leaq -0x318(%rbp), %rdi
leaq 0xeca9(%rip), %rsi      # 0x14370
callq 0xb280
movl %eax, %edi
callq 0xdc80
jmp 0x59b0
jmp 0x59b0
movq -0x8(%rbp), %rdi
callq 0x12b0
movl %eax, -0x36c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12b0
movl %eax, -0x370(%rbp)
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x60(%rbp), %rdi
leaq 0xe776(%rip), %rsi      # 0x13e89
callq 0xb280
movl %eax, %edi
movl -0x36c(%rbp), %esi
xorl %edx, %edx
callq 0xd550
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4f90
movl -0x370(%rbp), %edi
leaq 0xe7c7(%rip), %rsi      # 0x13f08
callq 0xd4f0
movl -0x36c(%rbp), %edi
callq 0xd6f0
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x4f90
movl -0x370(%rbp), %edi
callq 0xd6f0
callq 0xd8b0
jmp 0x59b0
leaq -0x110(%rbp), %rsi
leaq -0x3c0(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x4f90
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
addq $0xe0, %rsi
callq 0x59c0
leaq 0xe7a2(%rip), %rdi      # 0x13f58
callq 0xdde0
cmpl $0x7, -0x3c0(%rbp)
jne 0x57d1
movl $0x4, %eax
movl %eax, -0x464(%rbp)
jmp 0x57ea
leaq -0x3c0(%rbp), %rdi
leaq 0xe1f8(%rip), %rsi      # 0x139d7
callq 0xb280
movl %eax, -0x464(%rbp)
movl -0x464(%rbp), %eax
movl %eax, -0x3c4(%rbp)
callq 0xeac0
movl -0x3c4(%rbp), %edi
leaq 0xe750(%rip), %rsi      # 0x13f58
callq 0xd400
jmp 0x59b0
movq -0x40(%rbp), %rax
movq %rax, -0x3d0(%rbp)
leaq -0x110(%rbp), %rsi
leaq -0x420(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
leaq -0x110(%rbp), %rdi
addq $0xe0, %rdi
callq 0x5ac0
shll $0x3, %eax
movl %eax, -0x424(%rbp)
movl -0x424(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x5870
leaq 0xe6f1(%rip), %rdi      # 0x13f5c
callq 0xb1f0
callq 0xeac0
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
addq $0xe0, %rsi
callq 0x59c0
cmpl $0x7, -0x420(%rbp)
jne 0x58a2
movl $0x4, %eax
movl %eax, -0x468(%rbp)
jmp 0x58bb
leaq -0x420(%rbp), %rdi
leaq 0xe127(%rip), %rsi      # 0x139d7
callq 0xb280
movl %eax, -0x468(%rbp)
movl -0x468(%rbp), %eax
movl %eax, -0x428(%rbp)
movl -0x428(%rbp), %edi
movq -0x3d0(%rbp), %rsi
movl -0x424(%rbp), %edx
callq 0xd340
jmp 0x59b0
movq -0x40(%rbp), %rax
movq %rax, -0x430(%rbp)
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x434(%rbp)
cmpl $0x0, -0x434(%rbp)
jl 0x593b
movq -0x28(%rbp), %rax
movslq -0x434(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x440(%rbp)
movq -0x8(%rbp), %rdi
movq -0x440(%rbp), %rsi
callq 0x4f90
movl -0x434(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x434(%rbp)
jmp 0x58fb
movq -0x8(%rbp), %rdi
movq -0x430(%rbp), %rsi
callq 0x5be0
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x444(%rbp)
cmpl $0x0, -0x444(%rbp)
jl 0x5976
callq 0xd880
movl -0x444(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x444(%rbp)
jmp 0x5957
movl $0x1538, %edi           # imm = 0x1538
callq 0xd190
jmp 0x59b0
movq -0x38(%rbp), %rax
movq %rax, -0x450(%rbp)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x450(%rbp), %rsi
callq 0x62c0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edi
subl $0x1, %edi
callq 0xd220
addq $0x470, %rsp            # imm = 0x470
popq %rbp
retq
nopl (%rax)