// File: Merulo[P]CompilerJFTT/src/IRs/FourthIR.cpp
// Function: FourthIR::handleRead(RegisterBlock&, Block&, Line&)
void FourthIR::handleRead(RegisterBlock& rb, Block& b, Line& l)
{   
    Register& r = rb.getRegister(l.one, b, {}, true, false);
    r.variableName = l.one;
    r.needToSafe = true;

    b.lines.push_back({"GET", r.name});    
    updateRegisterState(b, rb, r, l.one);
}

// Assembly:
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, 0x1d0(%rsp)
movq %rsi, 0x1c8(%rsp)
movq %rdx, 0x1c0(%rsp)
movq %rcx, 0x1b8(%rsp)
movq 0x1d0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x1c8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x1b8(%rsp), %rsi
addq $0x20, %rsi
leaq 0x190(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x4180
movq 0x1c0(%rsp), %rax
movq %rax, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x170(%rsp)
movq $0x0, 0x180(%rsp)
leaq 0x170(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x391c0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x7ac0
movq %rax, 0x60(%rsp)
jmp 0x33abe
leaq 0x170(%rsp), %rdi
callq 0xd9c0
leaq 0x190(%rsp), %rdi
callq 0x46e8
movq 0x60(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq 0x1b8(%rsp), %rsi
addq $0x20, %rsi
movq 0x1b0(%rsp), %rdi
addq $0x30, %rdi
callq 0x4050
movq 0x1b0(%rsp), %rax
movb $0x1, 0x50(%rax)
movq 0x1c0(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x28(%rsp)
leaq 0xd7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x4600
movq 0x30(%rsp), %rdx
leaq 0x1da2f(%rip), %rsi     # 0x5156c
leaq 0xd8(%rsp), %rdi
callq 0x4f10
jmp 0x33b4c
movq 0x1b0(%rsp), %rsi
addq $0x10, %rsi
leaq 0xb0(%rsp), %rdi
callq 0x4180
jmp 0x33b67
leaq 0x8f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4600
movq 0x20(%rsp), %rdx
leaq 0x1d596(%rip), %rsi     # 0x5111b
leaq 0x90(%rsp), %rdi
callq 0x4f10
jmp 0x33b94
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0xd3b0
jmp 0x33bbb
movq 0x28(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xd380
jmp 0x33bcf
leaq 0xf8(%rsp), %rdi
callq 0xd490
leaq 0x90(%rsp), %rdi
callq 0x46e8
leaq 0x8f(%rsp), %rdi
callq 0x43b0
leaq 0xb0(%rsp), %rdi
callq 0x46e8
leaq 0xd8(%rsp), %rdi
callq 0x46e8
leaq 0xd7(%rsp), %rdi
callq 0x43b0
movq 0x1c0(%rsp), %rax
movq %rax, (%rsp)
movq 0x1c8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x1b0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x1b8(%rsp), %rsi
addq $0x20, %rsi
leaq 0x68(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4180
movq 0x38(%rsp), %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
callq 0x37870
jmp 0x33c7d
leaq 0x68(%rsp), %rdi
callq 0x46e8
addq $0x1d8, %rsp            # imm = 0x1D8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0x170(%rsp), %rdi
callq 0xd9c0
leaq 0x190(%rsp), %rdi
callq 0x46e8
jmp 0x33d9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x33d72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x33d65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x33d4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x33d3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0xd490
leaq 0x90(%rsp), %rdi
callq 0x46e8
leaq 0x8f(%rsp), %rdi
callq 0x43b0
leaq 0xb0(%rsp), %rdi
callq 0x46e8
leaq 0xd8(%rsp), %rdi
callq 0x46e8
leaq 0xd7(%rsp), %rdi
callq 0x43b0
jmp 0x33d9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x46e8
movq 0x168(%rsp), %rdi
callq 0x45f0
nopl (%rax)