// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
xorl %esi, %esi
callq *0x18(%rax)
leaq 0x318(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x586e
movl %eax, -0x2c(%rbp)
leaq 0x528(%rbx), %r15
movl 0x528(%rbx), %edx
leal 0x1(%rdx), %eax
movl %eax, 0x528(%rbx)
leaq -0x98(%rbp), %rdi
movq %r15, %rsi
callq 0xaf2c
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x18(%r14), %r12
subq 0x10(%r14), %r12
cmpq $0x18, %r12
movq %r12, -0x38(%rbp)
jne 0xa3cf
movl (%r15), %edx
leal 0x1(%rdx), %eax
movl %eax, (%r15)
leaq -0x78(%rbp), %rdi
movq %r15, %rsi
callq 0xaf2c
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %r15
movq %r15, %rsi
callq 0x32b0
movq %r15, %rdi
callq 0x3110
jmp 0xa3df
leaq -0x58(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x3160
leaq 0x328(%rbx), %r15
leaq 0xb204(%rip), %rsi      # 0x155f1
movq %r15, %rdi
callq 0x3230
movq %rax, %r12
leaq 0x500(%rbx), %r13
leaq -0x78(%rbp), %rdi
movq %r13, %rsi
movl -0x2c(%rbp), %edx
callq 0xab34
leaq -0x78(%rbp), %rsi
movq %r12, %rdi
callq 0x3220
leaq 0xb211(%rip), %rsi      # 0x15632
movq %rax, %rdi
callq 0x3230
leaq 0xb1c6(%rip), %rsi      # 0x155f6
movq %rax, %rdi
callq 0x3230
leaq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x3220
leaq 0xb098(%rip), %rsi      # 0x154e3
movq %rax, %rdi
callq 0x3230
leaq -0x78(%rbp), %rdi
callq 0x3110
movq %r13, %rdi
movl -0x2c(%rbp), %esi
callq 0xac12
movq (%r14), %rax
pushq $0x1
popq %rsi
movq %r14, %rdi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa56e
leaq 0xb085(%rip), %rsi      # 0x15515
movq %r15, %rdi
callq 0x3230
leaq -0x98(%rbp), %rsi
movq %rax, %rdi
callq 0x3220
leaq 0xb035(%rip), %rsi      # 0x154e3
movq %rax, %rdi
callq 0x3230
cmpq $0x18, -0x38(%rbp)
jne 0xa4fa
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x3220
leaq 0xafd4(%rip), %rsi      # 0x154a4
movq %rax, %rdi
callq 0x3230
movq (%r14), %rax
pushq $0x2
popq %rsi
movq %r14, %rdi
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
xorl %esi, %esi
callq *0x18(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa56e
leaq -0x98(%rbp), %rsi
movq %r15, %rdi
callq 0x3220
leaq 0xaf94(%rip), %rsi      # 0x154a4
movq %rax, %rdi
callq 0x3230
leaq -0x58(%rbp), %rdi
callq 0x3110
leaq -0x98(%rbp), %rdi
callq 0x3110
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa54e
jmp 0xa54e
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x3110
jmp 0xa551
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3110
leaq -0x98(%rbp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x3410