// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
movl $0x80, %edi
callq 0x3260
movq %rax, %rbx
movl $0xa, (%rax)
addq $0x18, %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rax, 0x78(%rbx)
movl $0x2, 0x30(%rbx)
cmpb $0x1, 0x20(%r14)
jne 0xfdc8
incl 0x18(%r14)
jmp 0xfdcd
movb $0x1, 0x20(%r14)
leaq 0x140(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x28, (%r15)
movq $0x1, -0x8(%r15)
leaq 0x178(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x6d4c
leaq 0x178(%rsp), %rsi
movq %r14, %rdi
callq 0xef56
leaq 0x190(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xfe22
callq 0x3230
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0xfe34
callq 0x3230
movq %rbx, %rax
addq $0x38, %rax
movq %rax, 0x68(%rsp)
leaq 0x20(%rsp), %r13
leaq 0xc8(%rsp), %r15
leaq 0x88(%rsp), %r12
leaq 0x1a0(%rsp), %rbp
movq %r13, 0x10(%rsp)
movw $0x29, 0x20(%rsp)
movq $0x1, 0x18(%rsp)
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x6d4c
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movw $0x2c, 0x40(%rsp)
movq $0x1, 0x38(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6d4c
movl $0x2, %edx
movq %rbp, %rdi
movq %r12, %rsi
leaq 0xf(%rsp), %rcx
callq 0x111aa
leaq 0x118(%rsp), %r13
movq %r13, %rdi
movq 0x68(%rsp), %rsi
callq 0x450e
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movl $0x4, %r8d
callq 0xde28
movq 0x38(%rbx), %rdi
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x38(%rbx)
movq 0x60(%rsp), %rax
movq %rax, 0x48(%rbx)
testq %rdi, %rdi
je 0xff0e
callq 0x3230
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0xff20
callq 0x3230
movq %rbp, %rdi
callq 0x111ec
xorl %r13d, %r13d
movq 0xb8(%rsp,%r13), %rdi
leaq (%r15,%r13), %rax
cmpq %rdi, %rax
je 0xff41
callq 0x3230
addq $-0x28, %r13
cmpq $-0x50, %r13
jne 0xff2b
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xff5f
callq 0x3230
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %r13
cmpq %r13, %rdi
je 0xff73
callq 0x3230
movslq 0x18(%r14), %rax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rcx
cmpl $0x12, 0x4(%rcx)
je 0xfe5d
cmpb $0x1, 0x20(%r14)
jne 0xff97
incl %eax
movl %eax, 0x18(%r14)
jmp 0xff9c
movb $0x1, 0x20(%r14)
leaq 0x108(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x7b, (%r15)
movq $0x1, -0x8(%r15)
leaq 0x150(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x6d4c
leaq 0x150(%rsp), %rsi
movq %r14, %rdi
callq 0xef56
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xfff1
callq 0x3230
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x10003
callq 0x3230
cmpb $0x1, 0x20(%r14)
jne 0x10010
incl 0x18(%r14)
jmp 0x10015
movb $0x1, 0x20(%r14)
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x7d, (%r15)
movq $0x1, -0x8(%r15)
leaq 0x88(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x6d4c
leaq 0x70(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x111aa
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r14, %rsi
callq 0xdcd2
movq 0x50(%rbx), %rdi
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x50(%rbx)
movq 0x60(%rsp), %rax
movq %rax, 0x60(%rbx)
testq %rdi, %rdi
je 0x10092
callq 0x3230
leaq 0x70(%rsp), %rdi
callq 0x111ec
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x100b2
callq 0x3230
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x100c4
callq 0x3230
movq %rbx, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x111ec
jmp 0x100eb
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10106
callq 0x3230
jmp 0x10106
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
jmp 0x1015e
movq %rax, %rbx
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1012e
callq 0x3230
jmp 0x1012e
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
jmp 0x1015e
movq %rax, %rbx
leaq 0x190(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10156
callq 0x3230
jmp 0x10156
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x10234
callq 0x3230
jmp 0x10234
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0x101ee
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0x101cd
movq %rax, %rbx
jmp 0x101ab
movq %rax, %rbx
jmp 0x1019e
movq %rax, %rbx
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x1019e
callq 0x3230
leaq 0x1a0(%rsp), %rdi
callq 0x111ec
movq $-0x50, %r14
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x101c0
callq 0x3230
addq $-0x28, %r15
addq $0x28, %r14
jne 0x101b2
movb $0x1, %bpl
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x101e1
callq 0x3230
leaq 0xb0(%rsp), %r12
leaq 0x20(%rsp), %r13
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x101fd
callq 0x3230
leaq 0x88(%rsp), %r14
cmpq %r12, %r14
sete %al
orb %al, %bpl
jne 0x10234
addq $-0x10, %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x10223
callq 0x3230
leaq -0x28(%r12), %rax
addq $-0x18, %r12
cmpq %r14, %r12
movq %rax, %r12
jne 0x10214
movq %rbx, %rdi
callq 0x33c0