// File: Merulo[P]CompilerJFTT/src/IRs/FirstIR.cpp
// Function: FirstIR::handleConditionOperation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void FirstIR::handleConditionOperation(cStrRef operation, cStrRef one, cStrRef two)
{
    _conditionBlocks.push(_currentBlock.top());
    addNewCode(operation, one, two);
    _blocks.push_back(_currentBlock.top());
    _currentBlock.pop();

    //creates blockIfFalse
    Block b2 = generateConditionBlock();
    std::string name = b2.blockName;
    b2.blockName+= "_ifFalse";
    _currentBlock.push(b2);
    _blocks.back().blockIfFalse = _currentBlock.top().blockName;

    //creates blockIfTrue
    Block b3;
    b3.blockName = name + "_ifTrue";
    _currentBlock.push(b3);
    _blocks.back().blockIfTrue = _currentBlock.top().blockName;    

}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, 0x1f0(%rsp)
movq %rsi, 0x1e8(%rsp)
movq %rdx, 0x1e0(%rsp)
movq %rcx, 0x1d8(%rsp)
movq 0x1f0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movq %rdi, %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, 0x20(%rsp)
addq $0x28, %rdi
movq %rdi, 0x30(%rsp)
callq 0x297d0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x298d0
movq 0x38(%rsp), %rdi
movq 0x1e8(%rsp), %rsi
movq 0x1e0(%rsp), %rdx
movq 0x1d8(%rsp), %rcx
callq 0x26fc0
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
callq 0x297d0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x29850
movq 0x30(%rsp), %rdi
callq 0x29900
movq 0x38(%rsp), %rsi
leaq 0x138(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x3d5b0
movq 0x40(%rsp), %rsi
leaq 0x118(%rsp), %rdi
callq 0x4180
jmp 0x27bd9
leaq 0x298e4(%rip), %rsi     # 0x514c4
leaq 0x138(%rsp), %rdi
callq 0x4310
jmp 0x27bef
movq 0x38(%rsp), %rdi
addq $0x28, %rdi
leaq 0x138(%rsp), %rsi
callq 0x298d0
jmp 0x27c07
movq 0x38(%rsp), %rdi
addq $0x28, %rdi
callq 0x297d0
movq %rax, 0x18(%rsp)
jmp 0x27c1c
movq 0x38(%rsp), %rdi
addq $0x10, %rdi
callq 0x29910
movq 0x18(%rsp), %rsi
movq %rax, %rdi
addq $0x58, %rdi
callq 0x4050
jmp 0x27c3d
leaq 0x68(%rsp), %rdi
callq 0x29950
leaq 0x2987f(%rip), %rdx     # 0x514cd
leaq 0x48(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x299c0
jmp 0x27c62
leaq 0x68(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x48(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x4440
movq 0x8(%rsp), %rdi
callq 0x46e8
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x28, %rdi
callq 0x298d0
jmp 0x27c9a
movq 0x38(%rsp), %rdi
addq $0x28, %rdi
callq 0x297d0
movq %rax, (%rsp)
jmp 0x27cae
movq 0x38(%rsp), %rdi
addq $0x10, %rdi
callq 0x29910
movq (%rsp), %rsi
movq %rax, %rdi
addq $0x38, %rdi
callq 0x4050
jmp 0x27cce
leaq 0x68(%rsp), %rdi
callq 0x29a50
leaq 0x118(%rsp), %rdi
callq 0x46e8
leaq 0x138(%rsp), %rdi
callq 0x29a50
addq $0x1f8, %rsp            # imm = 0x1F8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x27d51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x27d44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x29a50
leaq 0x118(%rsp), %rdi
callq 0x46e8
leaq 0x138(%rsp), %rdi
callq 0x29a50
movq 0x110(%rsp), %rdi
callq 0x45f0
nopl (%rax,%rax)