// File: /workspace/github_cpp_makefile_star2_O2/kram[P]kram/./src/parser/parser.cpp
// Function: Parser::call(Instruction*, ON)
Instruction* Parser::call(Instruction* prev, ON on) {
	Instruction* ins = new Instruction(Ins::CALL);
	ins->left = std::vector<Instruction*>{ prev };

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

	return this->lookahead(ins, ON::DEFAULT);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x80, %edi
callq 0x3230
movq %rax, %r12
movl $0x8, (%rax)
addq $0x18, %rax
movq %rax, 0x8(%r12)
andq $0x0, 0x10(%r12)
movb $0x0, 0x18(%r12)
leaq 0x38(%r12), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r12)
movups %xmm0, 0x48(%r12)
movups %xmm0, 0x58(%r12)
andq $0x0, 0x78(%r12)
movups %xmm0, 0x68(%r12)
movl $0x2, 0x30(%r12)
leaq 0xc0(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x38(%rsp), %rbx
pushq $0x1
popq %rdx
leaq 0xd(%rsp), %rcx
movq %rbx, %rdi
callq 0xf808
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10148
movq %rbx, %rdi
callq 0x42f2
leaq 0x60(%rsp), %r14
movq %r12, 0x18(%rsp)
addq $0x50, %r12
movq %r12, 0x10(%rsp)
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x4a5b(%rip), %rsi      # 0x11bc3
leaq 0xd(%rsp), %rdx
callq 0x30f0
leaq 0x38(%rsp), %rdi
movq %rbx, %r13
movq %rbx, %rsi
callq 0x63f2
leaq 0x88(%rsp), %rbp
movq %rbp, %rdi
leaq 0x40ee(%rip), %rsi      # 0x11282
leaq 0xf(%rsp), %rdx
callq 0x30f0
leaq 0xc0(%rsp), %rbx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x63f2
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0xe(%rsp), %rcx
callq 0xf720
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x40b0
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x20(%rsp), %rbp
movq %rbp, %rdx
movq %r12, %rcx
callq 0xccf2
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x10148
movq %rbx, %rdi
callq 0x42f2
movq %r12, %rdi
callq 0x42f2
movq %rbp, %rdi
callq 0xf75a
pushq $0x30
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x38, %rdi
callq 0x3130
addq $-0x28, %rbx
cmpq $-0x20, %rbx
jne 0xd21b
leaq 0x88(%rsp), %rdi
callq 0x3130
movq %r13, %rdi
callq 0x3130
movq %r13, %rbx
movslq 0x18(%r15), %rax
movq (%r15), %rcx
movq (%rcx,%rax,8), %rax
cmpl $0x12, 0x4(%rax)
je 0xd15e
movq %r15, %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0xce8c
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
xorl %ebp, %ebp
leaq 0x38(%rsp), %r14
jmp 0xd2e9
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0xd2e9
movq %rax, %rbx
xorl %ebp, %ebp
jmp 0xd2dc
movq %rax, %rbx
jmp 0xd2be
movq %rax, %rbx
jmp 0xd2b4
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x42f2
leaq 0x20(%rsp), %rdi
callq 0xf75a
pushq $0x30
popq %r15
leaq (%rsp,%r15), %rdi
addq $0x38, %rdi
callq 0x3130
addq $-0x28, %r15
cmpq $-0x20, %r15
jne 0xd2c2
movb $0x1, %bpl
leaq 0x88(%rsp), %rdi
callq 0x3130
leaq 0xd8(%rsp), %rdi
callq 0x3130
leaq 0x38(%rsp), %rax
cmpq %r14, %rax
sete %al
orb %bpl, %al
jne 0xd323
leaq 0x38(%rsp), %r15
leaq -0x28(%r14), %r12
addq $-0x20, %r14
movq %r14, %rdi
callq 0x3130
movq %r12, %r14
cmpq %r15, %r12
jne 0xd30b
movq %rbx, %rdi
callq 0x3390
nop