// File: /workspace/github_c_makefile_star2_O2/hsjoihs[P]c-compiler/parse_analyze_statement.c
// Function: parse_statement
struct Statement parse_statement(struct AnalyzerState *ptr_ps,
                                 const struct Token **ptr_tokvec)
{
	const struct Token *tokvec = *ptr_tokvec;
	if (tokvec[0].kind == RES_CASE || tokvec[0].kind == RES_DEFAULT ||
	    (tokvec[0].kind == IDENT_OR_RESERVED && tokvec[1].kind == COLON)) {
		return parse_labeled_statement(ptr_ps, ptr_tokvec);
	}

	switch (tokvec[0].kind) {
	case LEFT_BRACE: {
		return parse_compound_statement(ptr_ps, ptr_tokvec);
	}

	case RES_IF: {
		++tokvec;
		expect_and_consume(&tokvec, LEFT_PAREN,
		                   "left parenthesis immediately after `if`");

		const struct UntypedExpr u = parse_expression(&tokvec);
		struct Expr expr = typecheck_expression(ptr_ps, &u);
		expect_scalar(&expr.details.type, "`if` statement");

		expect_and_consume(&tokvec, RIGHT_PAREN, "right parenthesis of `if`");

		struct Statement *ptr_inner_s = calloc(1, sizeof(struct Statement));
		*ptr_inner_s = parse_statement(ptr_ps, &tokvec);

		struct Statement s;
		s.labels = init_vector();
		s.expr1 = expr;
		if (tokvec[0].kind == RES_ELSE) { /* must bind to the most inner one */
			++tokvec;
			struct Statement *ptr_inner_s2 =
			    calloc(1, sizeof(struct Statement));
			*ptr_inner_s2 = parse_statement(ptr_ps, &tokvec);

			*ptr_tokvec = tokvec;

			s.category = IF_ELSE_STATEMENT;
			s.statement_vector = init_vector();
			push_vector(&s.statement_vector, ptr_inner_s);
			push_vector(&s.statement_vector, ptr_inner_s2);
			return s;
		}

		*ptr_tokvec = tokvec;
		s.category = IF_STATEMENT;
		s.inner_statement = ptr_inner_s;
		return s;
	}

	case RES_SWITCH: {
		++tokvec;
		expect_and_consume(&tokvec, LEFT_PAREN,
		                   "left parenthesis immediately after `switch`");

		const struct UntypedExpr u = parse_expression(&tokvec);

		struct Expr expr = typecheck_expression(ptr_ps, &u);
		expect_and_consume(&tokvec, RIGHT_PAREN,
		                   "right parenthesis of `switch`");

		expect_integral(
		    &expr.details.type,
		    "controlling expression of `switch` must be integer type");

		struct Statement *ptr_inner_s = calloc(1, sizeof(struct Statement));
		*ptr_inner_s = parse_statement(ptr_ps, &tokvec);

		struct Statement s;
		s.labels = init_vector();
		s.expr1 = expr;
		*ptr_tokvec = tokvec;
		s.category = SWITCH_STATEMENT;
		s.inner_statement = ptr_inner_s;
		return s;
	}

	case RES_RETURN: {
		++tokvec;
		*ptr_tokvec = tokvec;
		struct Statement s;
		s.labels = init_vector();
		s.category = RETURN_STATEMENT;

		if (tokvec[0].kind == SEMICOLON) {
			++tokvec;
			s.expr1.category = VOID_EXPR;
			s.expr1.details.type.type_category = VOID_;
			s.expr1.details.true_type.type_category = VOID_;
		} else {
			const struct UntypedExpr u = parse_expression(&tokvec);
			struct Expr expr = typecheck_expression(ptr_ps, &u);

			if (ptr_ps->func_ret_type.type_category == PTR_) {
				struct TypePair details;
				details.type = ptr_ps->func_ret_type;
				details.true_type = ptr_ps->func_ret_type;
				cast_to_null_pointer_if_possible(&expr, &details);
				if_function_cast_to_pointer(&expr);
			}

			expect_type(ptr_ps, &expr.details.type, &ptr_ps->func_ret_type,
			            "mismatched type in the return value");
			expect_and_consume(&tokvec, SEMICOLON,
			                   "semicolon (after `return expr`)");
			s.expr1 = expr;
		}

		*ptr_tokvec = tokvec;
		return s;
	}

	case RES_DO: {
		++tokvec;

		struct Statement inner_s = parse_statement(ptr_ps, &tokvec);

		expect_and_consume(&tokvec, RES_WHILE, "`while` of do-while");
		expect_and_consume(&tokvec, LEFT_PAREN, "left parenthesis of do-while");

		const struct UntypedExpr u = parse_expression(&tokvec);

		struct Expr expr = typecheck_expression(ptr_ps, &u);
		expect_scalar(&expr.details.type, "`do-while` statement");

		expect_and_consume(&tokvec, RIGHT_PAREN,
		                   "right parenthesis of do-while");
		expect_and_consume(&tokvec, SEMICOLON, "semicolon after do-while");
		*ptr_tokvec = tokvec;

		struct Statement s;
		s.labels = init_vector();
		s.category = DO_WHILE_STATEMENT;
		s.expr1 = expr;

		struct Statement *ptr_inner_s = calloc(1, sizeof(struct Statement));
		*ptr_inner_s = inner_s;
		s.inner_statement = ptr_inner_s;
		return s;
	}

	case RES_WHILE: {
		++tokvec;

		expect_and_consume(&tokvec, LEFT_PAREN, "left parenthesis of while");

		const struct UntypedExpr u = parse_expression(&tokvec);

		struct Expr expr = typecheck_expression(ptr_ps, &u);
		expect_scalar(&expr.details.type, "`while` statement");

		expect_and_consume(&tokvec, RIGHT_PAREN, "left parenthesis of while");

		struct Statement inner_s = parse_statement(ptr_ps, &tokvec);

		*ptr_tokvec = tokvec;

		struct Statement s;
		s.labels = init_vector();
		s.category = WHILE_STATEMENT;
		s.expr1 = expr;

		struct Statement *ptr_inner_s = calloc(1, sizeof(struct Statement));
		*ptr_inner_s = inner_s;
		s.inner_statement = ptr_inner_s;
		return s;
	}

	case RES_BREAK: {
		++tokvec;
		expect_and_consume(&tokvec, SEMICOLON, "semicolon after `break`");
		*ptr_tokvec = tokvec;

		struct Statement s;
		s.labels = init_vector();
		s.category = BREAK_STATEMENT;
		return s;
	}

	case RES_CONTINUE: {
		++tokvec;
		expect_and_consume(&tokvec, SEMICOLON, "semicolon after `continue`");
		*ptr_tokvec = tokvec;

		struct Statement s;
		s.labels = init_vector();
		s.category = CONTINUE_STATEMENT;
		return s;
	}

	case RES_GOTO: {
		++tokvec;
		expect_and_consume(&tokvec, IDENT_OR_RESERVED,
		                   "identifier after `goto`");
		const char *ident = tokvec[-1].ident_str;
		expect_and_consume(&tokvec, SEMICOLON,
		                   "semicolon after `goto identifier`");
		*ptr_tokvec = tokvec;

		struct Statement s;
		s.labels = init_vector();
		s.category = GOTO_STATEMENT;
		s.destination = ident;
		return s;
	}

	case RES_FOR: {

		++tokvec;
		expect_and_consume(&tokvec, LEFT_PAREN, "left parenthesis of `for`");

		/* make the whole thing into a block*/
		struct Statement statement;
		statement.category = COMPOUND_STATEMENT;
		statement.labels = init_vector();
		statement.statement_vector = init_vector();

		/* block scope begins */
		struct ScopeChain current_table = ptr_ps->scope_chain;
		struct ScopeChain new_table;
		new_table.var_table = init_map();
		new_table.outer = &current_table;
		ptr_ps->scope_chain = new_table;

		struct Expr expr1;
		struct Expr expr2;
		struct Expr expr3;

		if (tokvec[0].kind == SEMICOLON) { /* expression1 is missing */
			expr1 = integer_1();
			++tokvec;
		} else if (can_start_a_type(tokvec)) {
			const char *str;
			struct UntypedExpr *ptr_uexpr;
			const struct Type vartype =
			    parse_declaration(&tokvec, &str, &ptr_uexpr);

			struct Expr *ptr_expr = declare_var_and_return_initializer(
			    ptr_ps, &vartype, str, ptr_uexpr, &statement);

			expr1 = ptr_expr ? *ptr_expr : integer_1();
		} else {
			const struct UntypedExpr u = parse_expression(&tokvec);
			expr1 = typecheck_expression(ptr_ps, &u);
			expect_and_consume(&tokvec, SEMICOLON, "first semicolon of `for`");
		}

		if (tokvec[0].kind == SEMICOLON) { /* expression2 is missing */
			expr2 = integer_1();
		} else {
			const struct UntypedExpr u = parse_expression(&tokvec);
			expr2 = typecheck_expression(ptr_ps, &u);
		}
		expect_scalar(&expr2.details.type, "`for` statement");
		expect_and_consume(&tokvec, SEMICOLON, "second semicolon of `for`");

		if (tokvec[0].kind == RIGHT_PAREN) { /* expression3 is missing */
			expr3 = integer_1();
		} else {
			const struct UntypedExpr u = parse_expression(&tokvec);
			expr3 = typecheck_expression(ptr_ps, &u);
		}
		expect_and_consume(&tokvec, RIGHT_PAREN, "right parenthesis of `for`");
		struct Statement s;
		s.labels = init_vector();
		s.category = FOR_STATEMENT;
		s.expr1 = expr1;
		s.expr2 = expr2;
		s.expr3 = expr3;

		struct Statement inner_s = parse_statement(ptr_ps, &tokvec);
		*ptr_tokvec = tokvec;
		struct Statement *ptr_inner_s = calloc(1, sizeof(struct Statement));
		*ptr_inner_s = inner_s;
		s.inner_statement = ptr_inner_s;

		struct Statement *ptr_s = calloc(1, sizeof(struct Statement));
		*ptr_s = s;
		push_vector(&statement.statement_vector, ptr_s);

		/* block scope ends */
		ptr_ps->scope_chain = current_table;
		return statement;
	}

	default: {
		const struct UntypedExpr uexpr = parse_expression(&tokvec);
		struct Expr expr = typecheck_expression(ptr_ps, &uexpr);

		expect_and_consume(&tokvec, SEMICOLON, "semicolon after an expression");

		*ptr_tokvec = tokvec;

		struct Statement s;
		s.labels = init_vector();
		s.category = EXPRESSION_STATEMENT;
		s.expr1 = expr;
		return s;
	}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x9e8, %rsp            # imm = 0x9E8
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rdi, %rbx
movq (%rdx), %r13
movq %r13, -0x30(%rbp)
movl (%r13), %eax
leal -0x2c(%rax), %ecx
cmpl $0x15, %ecx
ja 0x2a49
leaq 0xadc7(%rip), %rax      # 0xd7f4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2903
jmp 0x341f
cmpl $0x49, %eax
je 0x2fe3
cmpl $0x19, %eax
je 0x3060
cmpl $0x1e, %eax
je 0x304d
cmpl $0x18, %eax
jne 0x2a70
cmpl $0x1d, 0x20(%r13)
je 0x2a36
leaq -0x278(%rbp), %rdi
movq %r15, %r13
movq %rbx, %r15
leaq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x78ba
leaq -0x608(%rbp), %rdi
movq %r12, %rsi
leaq -0x278(%rbp), %rdx
callq 0x54d7
leaq 0xb080(%rip), %rdx      # 0xdb26
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x8168
movq (%rbx), %rax
movq %r15, %rbx
movq %rax, (%r13)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
movl $0x9, (%r14)
addq $0x18, %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
leaq -0x608(%rbp), %rsi
callq 0x1100
jmp 0x341f
movq %rbx, -0x38(%rbp)
addq $0x20, %r13
leaq -0x30(%rbp), %rbx
movq %r13, (%rbx)
leaq 0xad79(%rip), %rdx      # 0xd881
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x8168
leaq -0x160(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x78ba
leaq -0x278(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x54d7
leaq 0xad68(%rip), %rsi      # 0xd8a9
movq %rbx, %rdi
callq 0x4edd
leaq 0xad68(%rip), %rdx      # 0xd8b8
pushq $0x7
popq %rsi
leaq -0x30(%rbp), %rdi
callq 0x8168
pushq $0x1
popq %rdi
movl $0x390, %esi            # imm = 0x390
callq 0x10d0
movq %rax, %rbx
leaq -0x608(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
leaq -0x30(%rbp), %rdx
callq 0x29f3
movl $0x390, %edx            # imm = 0x390
movq %rbx, -0x40(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1100
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
leaq 0x18(%r14), %rdi
movl $0x100, %edx            # imm = 0x100
leaq -0x278(%rbp), %rsi
callq 0x1100
leaq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x2d, (%rax)
jne 0x30af
addq $0x20, %rax
leaq -0x30(%rbp), %rcx
movq %rax, (%rcx)
pushq $0x1
popq %rdi
movl $0x390, %esi            # imm = 0x390
callq 0x10d0
movq %rax, %rbx
movq %r13, %rdi
movq %r12, %rsi
leaq -0x30(%rbp), %r12
movq %r12, %rdx
callq 0x29f3
movl $0x390, %edx            # imm = 0x390
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1100
movq (%r12), %rax
movq %rax, (%r15)
movl $0x2, (%r14)
leaq 0x8(%r14), %r15
callq 0x49e0
movq %rax, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %r15, %rdi
movq -0x40(%rbp), %rsi
callq 0x4a57
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4a57
jmp 0x341b
addq $0x20, %r13
movq %rbx, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq %r13, (%rbx)
leaq 0xadb9(%rip), %rdx      # 0xda15
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x8168
leaq -0x160(%rbp), %rdi
movq %rbx, %rsi
callq 0x78ba
leaq -0x278(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
leaq -0x160(%rbp), %rdx
callq 0x54d7
leaq 0xad99(%rip), %rsi      # 0xda2f
movq %r13, %rdi
callq 0x4edd
pushq $0x7
popq %rsi
movq %rbx, %rdi
leaq 0xad6a(%rip), %rdx      # 0xda15
callq 0x8168
leaq -0x608(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x29f3
movq (%rbx), %rax
movq %rax, (%r15)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
movl $0x4, (%r14)
jmp 0x2da7
addq $0x20, %r13
movq %rbx, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq %r13, (%rbx)
leaq -0x608(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x29f3
leaq 0xac89(%rip), %rdx      # 0xd998
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x8168
leaq 0xac8b(%rip), %rdx      # 0xd9ac
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x8168
leaq -0x160(%rbp), %rdi
movq %rbx, %rsi
callq 0x78ba
leaq -0x278(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
leaq -0x160(%rbp), %rdx
callq 0x54d7
leaq 0xac6e(%rip), %rsi      # 0xd9c9
movq %r13, %rdi
callq 0x4edd
leaq 0xac74(%rip), %rdx      # 0xd9de
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x8168
leaq 0xac80(%rip), %rdx      # 0xd9fc
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x8168
movq (%rbx), %rax
movq %rax, (%r15)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
movl $0x5, (%r14)
leaq 0x18(%r14), %rdi
movl $0x100, %edx            # imm = 0x100
movq %r13, %rsi
callq 0x1100
pushq $0x1
popq %rdi
movl $0x390, %esi            # imm = 0x390
callq 0x10d0
movq %rax, %rbx
movl $0x390, %edx            # imm = 0x390
movq %rax, %rdi
leaq -0x608(%rbp), %rsi
callq 0x1100
movq %rbx, 0x318(%r14)
jmp 0x341b
addq $0x20, %r13
movq %rbx, %r12
leaq -0x30(%rbp), %rbx
movq %r13, (%rbx)
leaq 0xac5c(%rip), %rdx      # 0xda59
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x8168
movq (%rbx), %rax
movq %r12, %rbx
movq %rax, (%r15)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
movl $0x8, (%r14)
jmp 0x341f
addq $0x20, %r13
leaq -0x30(%rbp), %rdi
movq %r13, (%rdi)
leaq 0xaa90(%rip), %rdx      # 0xd8d2
pushq $0x6
popq %rsi
movq %rdi, %r13
callq 0x8168
leaq -0x160(%rbp), %rdi
movq %r13, %rsi
callq 0x78ba
leaq -0x278(%rbp), %rdi
movq %r12, %rsi
leaq -0x160(%rbp), %rdx
callq 0x54d7
leaq 0xaa85(%rip), %rdx      # 0xd8fe
pushq $0x7
popq %rsi
movq %r13, %rdi
callq 0x8168
leaq 0xaa91(%rip), %rsi      # 0xd91c
leaq -0x278(%rbp), %rdi
callq 0x4f46
pushq $0x1
popq %rdi
movl $0x390, %esi            # imm = 0x390
callq 0x10d0
movq %rax, %r13
movq %r12, %rsi
movq %rbx, %r12
leaq -0x608(%rbp), %rbx
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x29f3
movl $0x390, %edx            # imm = 0x390
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rbx
callq 0x1100
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
leaq 0x18(%r14), %rdi
movl $0x100, %edx            # imm = 0x100
leaq -0x278(%rbp), %rsi
callq 0x1100
leaq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, (%r15)
movl $0xb, (%r14)
movq %r13, 0x318(%r14)
jmp 0x341f
movq %rbx, -0x38(%rbp)
addq $0x20, %r13
leaq -0x30(%rbp), %rbx
movq %r13, (%rbx)
leaq 0xab80(%rip), %rdx      # 0xdaae
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x8168
andl $0x0, (%r14)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
callq 0x49e0
movq %rax, 0x8(%r14)
movq %rdx, 0x10(%r14)
movups (%r12), %xmm0
leaq -0x60(%rbp), %r13
movaps %xmm0, (%r13)
callq 0x9319
movq %rax, (%r12)
movq %r13, 0x8(%r12)
movq (%rbx), %rdi
cmpl $0x1a, (%rdi)
jne 0x30c9
leaq -0x160(%rbp), %rdi
callq 0x3699
addq $0x20, -0x30(%rbp)
jmp 0x3241
addq $0x20, %r13
movq %rbx, %r12
leaq -0x30(%rbp), %rbx
movq %r13, (%rbx)
leaq 0xaa91(%rip), %rdx      # 0xda41
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x8168
movq (%rbx), %rax
movq %r12, %rbx
movq %rax, (%r15)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
movl $0x7, (%r14)
jmp 0x341f
addq $0x20, %r13
movq %rbx, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq %r13, (%rbx)
leaq 0xaa7b(%rip), %rdx      # 0xda74
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x8168
movq (%rbx), %rax
movq -0x18(%rax), %r12
leaq 0xaa7a(%rip), %rdx      # 0xda8c
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x8168
movq (%rbx), %rax
movq -0x38(%rbp), %rbx
movq %rax, (%r15)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
movl $0xc, (%r14)
movq %r12, 0x388(%r14)
jmp 0x341f
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3434
jmp 0x341f
leaq 0x20(%r13), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%r15)
callq 0x49e0
movq %rax, 0x378(%r14)
movq %rdx, 0x380(%r14)
movl $0x6, (%r14)
cmpl $0x1a, 0x20(%r13)
jne 0x3135
addq $0x40, %r13
movl $0x13, 0xb8(%r14)
pushq $0x7
popq %rax
movl %eax, 0x18(%r14)
movl %eax, 0x68(%r14)
jmp 0x31f8
movq %rax, (%r15)
movl $0x1, (%r14)
movq -0x40(%rbp), %rax
movq %rax, 0x318(%r14)
jmp 0x341b
callq 0x8cfa
testl %eax, %eax
je 0x3200
leaq -0x608(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x278(%rbp), %r13
leaq -0x708(%rbp), %rbx
movq %r13, %rdx
movq %rbx, %rcx
callq 0x8d23
movq (%r13), %rdx
movq (%rbx), %rcx
movq %r12, %rdi
leaq -0x608(%rbp), %rsi
movq %r14, %r8
callq 0x36c5
leaq -0x160(%rbp), %rdi
testq %rax, %rax
je 0x323c
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0x1100
jmp 0x3241
movq %rbx, -0x38(%rbp)
leaq -0x278(%rbp), %rbx
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x78ba
leaq -0x608(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x54d7
leaq 0x20(%r12), %rbx
cmpl $0x1, 0x20(%r12)
jne 0x31ab
pushq $0xa
popq %rax
leaq -0x160(%rbp), %rdx
movq %rax, %rcx
movq %rdx, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq -0x110(%rbp), %rdi
movq %rax, %rcx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq -0x608(%rbp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x500b
movq %r13, %rdi
callq 0x5038
leaq 0xa7a2(%rip), %rcx      # 0xd954
leaq -0x608(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x4c73
leaq 0xa7aa(%rip), %rdx      # 0xd978
leaq -0x30(%rbp), %rbx
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x8168
addq $0x18, %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r13, %rsi
callq 0x1100
movq (%rbx), %r13
movq -0x38(%rbp), %rbx
movq %r13, (%r15)
jmp 0x341f
leaq -0x608(%rbp), %rbx
leaq -0x30(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x78ba
leaq -0x160(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x54d7
leaq 0xa899(%rip), %rdx      # 0xdac8
pushq $0x1a
popq %rsi
movq %r13, %rdi
callq 0x8168
jmp 0x3241
callq 0x3699
movq -0x30(%rbp), %rax
cmpl $0x1a, (%rax)
jne 0x3258
leaq -0x708(%rbp), %rdi
callq 0x3699
jmp 0x327d
leaq -0x608(%rbp), %rbx
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x78ba
leaq -0x708(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x54d7
addq $0x8, %r14
leaq 0xa859(%rip), %rsi      # 0xdae1
leaq -0x708(%rbp), %rdi
callq 0x4edd
leaq 0xa856(%rip), %rdx      # 0xdaf1
leaq -0x30(%rbp), %rbx
pushq $0x1a
popq %rsi
movq %rbx, %rdi
callq 0x8168
movq (%rbx), %rax
cmpl $0x7, (%rax)
jne 0x32c0
leaq -0x808(%rbp), %rdi
callq 0x3699
jmp 0x32e5
leaq -0x608(%rbp), %rbx
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x78ba
leaq -0x808(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x54d7
leaq 0xa81f(%rip), %rdx      # 0xdb0b
leaq -0x30(%rbp), %rbx
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x8168
callq 0x49e0
movq %rax, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
leaq -0x264(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1100
leaq -0xa08(%rbp), %rdi
leaq -0x708(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1100
leaq -0x908(%rbp), %rdi
leaq -0x808(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1100
leaq -0x608(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x29f3
movq (%rbx), %rax
movq %rax, (%r15)
pushq $0x1
popq %r15
movl $0x390, %esi            # imm = 0x390
movq %r15, %rdi
callq 0x10d0
movq %rax, %rbx
movl $0x390, %edx            # imm = 0x390
movq %rax, %rdi
movq %r13, %rsi
callq 0x1100
movl $0x390, %esi            # imm = 0x390
movq %r15, %rdi
callq 0x10d0
movq %rax, %r15
movl $0x3, (%rax)
leaq 0x4(%rax), %rdi
leaq -0x278(%rbp), %rsi
movl $0x114, %edx            # imm = 0x114
callq 0x1100
leaq 0x118(%r15), %rdi
movl $0x100, %edx            # imm = 0x100
leaq -0xa08(%rbp), %rsi
callq 0x1100
leaq 0x218(%r15), %rdi
movl $0x100, %edx            # imm = 0x100
leaq -0x908(%rbp), %rsi
callq 0x1100
movq %rbx, 0x318(%r15)
movq -0x40(%rbp), %rax
movq %rax, 0x378(%r15)
movq -0x48(%rbp), %rax
movq %rax, 0x380(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a57
movaps -0x60(%rbp), %xmm0
movups %xmm0, (%r12)
movq -0x38(%rbp), %rbx
movq %rbx, %rax
addq $0x9e8, %rsp            # imm = 0x9E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq