// File: /workspace/github_cpp_makefile_star2_O1/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 0x10138
incl 0x18(%r14)
jmp 0x1013d
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 0x6d74
leaq 0x178(%rsp), %rsi
movq %r14, %rdi
callq 0xf232
leaq 0x190(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10192
callq 0x3230
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x101a4
callq 0x3230
movq %rbx, %rax
addq $0x38, %rax
movq %rax, 0x68(%rsp)
leaq 0x38(%rsp), %r13
leaq 0xc8(%rsp), %r15
leaq 0x88(%rsp), %r12
leaq 0x1a0(%rsp), %rbp
movq %r13, 0x28(%rsp)
movw $0x29, 0x38(%rsp)
movq $0x1, 0x30(%rsp)
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
callq 0x6d74
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movw $0x2c, 0x58(%rsp)
movq $0x1, 0x50(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x6d74
movl $0x2, %edx
movq %rbp, %rdi
movq %r12, %rsi
leaq 0xf(%rsp), %rcx
callq 0x11680
leaq 0x118(%rsp), %r13
movq %r13, %rdi
movq 0x68(%rsp), %rsi
callq 0x450e
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movl $0x4, %r8d
callq 0xdfa2
movq 0x38(%rbx), %rdi
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq %rdi, 0x10(%rsp)
movups 0x40(%rbx), %xmm1
movups %xmm0, 0x38(%rbx)
movq %rax, 0x48(%rbx)
movups %xmm1, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x1029d
callq 0x3230
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x102ac
callq 0x3230
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x102be
callq 0x3230
movq %rbp, %rdi
callq 0x116c2
xorl %r13d, %r13d
movq 0xb8(%rsp,%r13), %rdi
leaq (%r15,%r13), %rax
cmpq %rdi, %rax
je 0x102df
callq 0x3230
addq $-0x28, %r13
cmpq $-0x50, %r13
jne 0x102c9
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x102fd
callq 0x3230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r13
cmpq %r13, %rdi
je 0x10311
callq 0x3230
movslq 0x18(%r14), %rax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rcx
cmpl $0x12, 0x4(%rcx)
je 0x101cd
cmpb $0x1, 0x20(%r14)
jne 0x10335
incl %eax
movl %eax, 0x18(%r14)
jmp 0x1033a
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 0x6d74
leaq 0x150(%rsp), %rsi
movq %r14, %rdi
callq 0xf232
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1038f
callq 0x3230
movq 0xf8(%rsp), %rdi
cmpq %r15, %rdi
je 0x103a1
callq 0x3230
cmpb $0x1, 0x20(%r14)
jne 0x103ae
incl 0x18(%r14)
jmp 0x103b3
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 0x6d74
leaq 0x70(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x11680
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r14, %rsi
callq 0xde4a
movq 0x50(%rbx), %rdi
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq %rdi, 0x10(%rsp)
movups 0x58(%rbx), %xmm1
movups %xmm0, 0x50(%rbx)
movq %rax, 0x60(%rbx)
movups %xmm1, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x1044f
callq 0x3230
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1045e
callq 0x3230
leaq 0x70(%rsp), %rdi
callq 0x116c2
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1047e
callq 0x3230
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x10490
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 0x116c2
jmp 0x104b7
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x104d2
callq 0x3230
jmp 0x104d2
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
jmp 0x1052a
movq %rax, %rbx
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x104fa
callq 0x3230
jmp 0x104fa
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
jmp 0x1052a
movq %rax, %rbx
leaq 0x190(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10522
callq 0x3230
jmp 0x10522
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x10600
callq 0x3230
jmp 0x10600
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0x105ba
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0x10599
movq %rax, %rbx
jmp 0x10577
movq %rax, %rbx
jmp 0x1056a
movq %rax, %rbx
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x1056a
callq 0x3230
leaq 0x1a0(%rsp), %rdi
callq 0x116c2
movq $-0x50, %r14
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1058c
callq 0x3230
addq $-0x28, %r15
addq $0x28, %r14
jne 0x1057e
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x105ad
callq 0x3230
leaq 0xb0(%rsp), %r12
leaq 0x38(%rsp), %r13
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x105c9
callq 0x3230
leaq 0x88(%rsp), %r14
cmpq %r12, %r14
sete %al
orb %al, %bpl
jne 0x10600
addq $-0x10, %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x105ef
callq 0x3230
leaq -0x28(%r12), %rax
addq $-0x18, %r12
cmpq %r14, %r12
movq %rax, %r12
jne 0x105e0
movq %rbx, %rdi
callq 0x33c0