// File: /workspace/github_cpp_makefile_star2_O1/RuiDGPires[P]CrimLang/src/generator.cpp
// Function: gc_Tracker::if_(crl::Node*)
void _gc_Tracker::if_(crl::Node *node){
	u32 reg = this->expression_reg(node->get_child(0), stream_funcs);

	std::string	done_label = label_tracker.name(label_tracker.create());

	std::string false_label;

	bool has_else = node->children.size() == 3;
	if (has_else)
		false_label	= label_tracker.name(label_tracker.create());
	else
		false_label = done_label;
	
	stream_funcs <<
		"CMP " << reg_tracker.reg_name(reg) << " R0\n" <<
		"JMP.Z " << false_label << "\n";
		
	reg_tracker.free(reg);
	this->parse_node(node->get_child(1)->get_child(0));

	stream_funcs << "JMP " << done_label << "\n";

	if (has_else){
		stream_funcs <<
			false_label << ":\n";
		this->parse_node(node->get_child(2)->get_child(0));
	}
	stream_funcs <<
		done_label << ":\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
xorl %esi, %esi
callq *0x18(%rax)
leaq 0x318(%rbx), %r13
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x6344
movl %eax, -0x2c(%rbp)
leaq 0x528(%rbx), %r14
movl 0x528(%rbx), %edx
leal 0x1(%rdx), %eax
movl %eax, 0x528(%rbx)
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0xe412
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x18(%r15), %r12
subq 0x10(%r15), %r12
cmpq $0x18, %r12
movq %r12, -0x98(%rbp)
jne 0xd2d0
movl (%r14), %edx
leal 0x1(%rdx), %eax
movl %eax, (%r14)
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0xe412
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %r14
movq %r14, %rsi
callq 0x32b0
movq (%r14), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xd2e0
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0xd2e0
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3150
leaq 0x328(%rbx), %r12
leaq 0xe303(%rip), %rsi      # 0x1b5f1
movl $0x4, %edx
movq %r12, %rdi
callq 0x3280
movq %r13, -0xa0(%rbp)
leaq 0x500(%rbx), %r14
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
movl -0x2c(%rbp), %edx
callq 0xdde4
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %r12, %rdi
callq 0x3280
movq %rax, %r13
leaq 0xe300(%rip), %rsi      # 0x1b632
movl $0x4, %edx
movq %rax, %rdi
callq 0x3280
leaq 0xe2b0(%rip), %rsi      # 0x1b5f6
movl $0x6, %edx
movq %r13, %rdi
callq 0x3280
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r13, %rdi
callq 0x3280
leaq 0xe179(%rip), %rsi      # 0x1b4e3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3280
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq -0xa0(%rbp), %r13
je 0xd397
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3230
movl -0x2c(%rbp), %ecx
movslq %ecx, %rax
leaq 0x3f(%rax), %rdx
testq %rax, %rax
cmovnsq %rax, %rdx
sarq $0x6, %rdx
shlq $0x3, %rdx
addq (%r14), %rdx
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
leaq 0x3f(%rdi), %rsi
andq %rax, %rsi
xorl %eax, %eax
cmpq %rdi, %rsi
setbe %al
movq $-0x2, %rsi
rolq %cl, %rsi
andq %rsi, -0x8(%rdx,%rax,8)
movq (%r15), %rax
movq %r15, %rdi
movl $0x1, %esi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xaf60
leaq 0xe10c(%rip), %rsi      # 0x1b515
movl $0x4, %edx
movq %r12, %rdi
callq 0x3280
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %r12, %rdi
callq 0x3280
leaq 0xe0b0(%rip), %rsi      # 0x1b4e3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3280
cmpq $0x18, -0x98(%rbp)
jne 0xd495
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r12, %rdi
callq 0x3280
leaq 0xe043(%rip), %rsi      # 0x1b4a4
movl $0x2, %edx
movq %rax, %rdi
callq 0x3280
movq (%r15), %rax
movq %r15, %rdi
movl $0x2, %esi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xaf60
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %r12, %rdi
callq 0x3280
leaq 0xdff2(%rip), %rsi      # 0x1b4a4
movl $0x2, %edx
movq %rax, %rdi
callq 0x3280
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xd4d8
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3230
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd4f1
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3230
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd522
jmp 0xd522
movq %rax, %rbx
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd525
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0xd525
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xd53e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3230
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd557
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33f0
nop