// File: /workspace/github_cpp_makefile_star2_O2/kram[P]kram/./src/parser/parser.cpp
// Function: Parser::keyword_fn()
Instruction* Parser::keyword_fn() {
	Instruction* ins = new Instruction(Ins::FUNCTION);

	this->advance();
	this->get_and_expect_token(lexer::Token::OPERATOR("("));

	// All parameters
	do {
		ins->left = this->read_until(std::vector<lexer::Token>{
			lexer::Token::OPERATOR(")"),
			lexer::Token::OPERATOR(","),
		}, ins->left, ON::FUNCTION_PARAMETER_LIST);
	} while (this->get_token()->sub == lexer::Type::OPERATOR_COMMA);

	this->advance();
	this->get_and_expect_token(lexer::Token::OPERATOR("{"));

	this->advance();
	ins->right = this->read_until(std::vector<lexer::Token>{
		lexer::Token::OPERATOR("}")
	});

	return ins;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbp
movl $0x80, %edi
callq 0x3230
movq %rax, %rbx
movl $0xa, (%rax)
addq $0x18, %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
andq $0x0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
movl $0x2, 0x30(%rbx)
cmpb $0x1, 0x20(%rbp)
jne 0xe5f0
incl 0x18(%rbp)
jmp 0xe5f4
movb $0x1, 0x20(%rbp)
leaq 0x2c4a(%rip), %rsi      # 0x11245
leaq 0xf0(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x30f0
leaq 0x138(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x63f2
leaq 0x138(%rsp), %rsi
movq %rbp, %rdi
callq 0xd9bc
movq %rbx, 0x8(%rsp)
leaq 0x38(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x3130
leaq 0xf0(%rsp), %rdi
callq 0x3130
leaq 0x40(%rsp), %r15
leaq 0x198(%rsp), %r14
movq %r14, %r12
movq %r14, %rdi
leaq 0x354f(%rip), %rsi      # 0x11bc3
leaq 0x6(%rsp), %rdx
callq 0x30f0
leaq 0x18(%rsp), %rdi
movq %r12, %r14
movq %r12, %rsi
callq 0x63f2
leaq 0x160(%rsp), %r12
movq %r12, %rdi
leaq 0x2be2(%rip), %rsi      # 0x11282
leaq 0x5(%rsp), %rdx
callq 0x30f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x63f2
leaq 0xc0(%rsp), %rdi
leaq 0x18(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0xf720
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x40b0
leaq 0xd8(%rsp), %r13
movq %r13, %rdi
movq %rbp, %r12
movq %rbp, %rsi
leaq 0xc0(%rsp), %rbp
movq %rbp, %rdx
movq %rbx, %rcx
pushq $0x4
popq %r8
callq 0xcb30
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x10148
movq %r13, %rdi
callq 0x42f2
movq %rbx, %rdi
callq 0x42f2
movq %rbp, %rdi
callq 0xf75a
pushq $0x30
popq %rbp
leaq (%rsp,%rbp), %rdi
addq $0x18, %rdi
callq 0x3130
addq $-0x28, %rbp
cmpq $-0x20, %rbp
jne 0xe734
leaq 0x160(%rsp), %rdi
callq 0x3130
movq %r14, %rdi
callq 0x3130
movq %r12, %rbp
movslq 0x18(%r12), %rax
movq (%r12), %rcx
movq (%rcx,%rax,8), %rcx
cmpl $0x12, 0x4(%rcx)
je 0xe667
cmpb $0x1, 0x20(%rbp)
jne 0xe787
incl %eax
movl %eax, 0x18(%rbp)
jmp 0xe78b
movb $0x1, 0x20(%rbp)
movq 0x8(%rsp), %r14
leaq 0x2b16(%rip), %rsi      # 0x112ad
leaq 0xa0(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x30f0
leaq 0x110(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x63f2
leaq 0x110(%rsp), %rsi
movq %rbp, %rdi
callq 0xd9bc
leaq 0x118(%rsp), %rdi
callq 0x3130
leaq 0xa0(%rsp), %rdi
callq 0x3130
cmpb $0x1, 0x20(%rbp)
jne 0xe7f3
incl 0x18(%rbp)
jmp 0xe7f7
movb $0x1, 0x20(%rbp)
leaq 0x2ab1(%rip), %rsi      # 0x112af
leaq 0x80(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x30f0
leaq 0x18(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x63f2
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x5(%rsp), %rcx
callq 0xf720
leaq 0xd8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
movq %rbp, %rsi
callq 0xca06
movq %r14, %rdi
addq $0x50, %rdi
leaq 0xd8(%rsp), %rbx
movq %rbx, %rsi
callq 0x10148
movq %rbx, %rdi
callq 0x42f2
leaq 0x68(%rsp), %rdi
callq 0xf75a
leaq 0x20(%rsp), %rdi
callq 0x3130
leaq 0x80(%rsp), %rdi
callq 0x3130
movq %r14, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xf75a
jmp 0xe8b5
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3130
jmp 0xe8c4
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0xe90e
jmp 0xe91a
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x3130
jmp 0xe8e5
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
jmp 0xe90e
jmp 0xe91a
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x3130
jmp 0xe906
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x3130
jmp 0xe9c8
jmp 0xe91a
movq %rax, %rbx
jmp 0xe9c8
movq %rax, %rbx
xorl %ebp, %ebp
leaq 0x18(%rsp), %r15
jmp 0xe98e
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0xe98e
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0xe981
movq %rax, %rbx
jmp 0xe963
movq %rax, %rbx
jmp 0xe956
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x42f2
leaq 0xc0(%rsp), %rdi
callq 0xf75a
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x18, %rdi
callq 0x3130
addq $-0x28, %r14
cmpq $-0x20, %r14
jne 0xe967
movb $0x1, %bpl
leaq 0x160(%rsp), %rdi
callq 0x3130
leaq 0x198(%rsp), %rdi
callq 0x3130
leaq 0x18(%rsp), %rax
cmpq %r15, %rax
sete %al
orb %bpl, %al
jne 0xe9c8
leaq 0x18(%rsp), %r14
leaq -0x28(%r15), %r12
addq $-0x20, %r15
movq %r15, %rdi
callq 0x3130
movq %r12, %r15
cmpq %r14, %r12
jne 0xe9b0
movq %rbx, %rdi
callq 0x3390