// File: /workspace/github_cpp_makefile_star2_O2/acliusBackHome[P]kamaya/dist/IR.cpp
// Function: IR::relopEmit(ParseTree&, unsigned long, unsigned long, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
void IR::relopEmit(ParseTree &tree, size_t p0, size_t p1, size_t p3,
                   const string &relop, size_t node_id) {
  ParseNode &B = tree.node(p0);
  const ParseNode &E1 = tree.node(p1);
  const ParseNode &E2 = tree.node(p3);
  B.set_true_list(makelist(getNextinstr()));
  B.set_false_list(makelist(getNextinstr() + 1));
  string arg1, arg2;
  const ParseExpression &left = E1.get_expression();
  const ParseExpression &right = E2.get_expression();
  if (left.is_const()) {
    arg1 = getConstValueStr(left);
  } else {
    arg1 = address2pointer(left.get_address());
  }
  if (right.is_const()) {
    arg2 = getConstValueStr(right);
  } else {
    arg2 = address2pointer(right.get_address());
  }
  gen(relop, arg1, arg2, "_", node_id);
  gen("jmp", "_", "_", "_", node_id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, -0x78(%rbp)
movq %r8, %r15
movq %rcx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x15820
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x15820
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x15820
movq %rax, %r15
movq 0x8(%rbx), %rdx
leaq -0x70(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcb4c
movq %r13, %rdi
movq %r14, %rsi
callq 0x1944a
leaq -0x70(%rbp), %rdi
callq 0xd238
movq 0x8(%rbx), %rdx
incq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcb4c
movq %r13, %rdi
movq %r14, %rsi
callq 0x1945e
leaq -0x70(%rbp), %rdi
callq 0xd238
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movq %r12, %rdi
callq 0x18eec
movq %rax, %r12
movq %r15, %rdi
callq 0x18eec
movq %rax, %r15
movq %r12, %rdi
callq 0x24972
testb %al, %al
je 0x33afc
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x32b54
jmp 0x33b13
movq %r12, %rdi
callq 0x24c42
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xd2ea
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %r14
movq %r14, %rsi
callq 0x4340
movq %r14, %rdi
callq 0x4598
movq %r15, %rdi
callq 0x24972
testb %al, %al
je 0x33b45
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x32b54
jmp 0x33b5c
movq %r15, %rdi
callq 0x24c42
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xd2ea
leaq -0x98(%rbp), %rdi
movq %r14, %rsi
callq 0x4340
movq %r14, %rdi
callq 0x4598
leaq 0x6b28(%rip), %rsi      # 0x3a6a2
leaq -0x50(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0x4130
movq 0x10(%rbp), %r15
leaq -0x70(%rbp), %rdx
leaq -0x98(%rbp), %rcx
leaq -0x50(%rbp), %r8
movq %rbx, %rdi
movq -0x78(%rbp), %rsi
movq %r15, %r9
callq 0x32694
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq 0x4499(%rip), %rsi      # 0x38055
leaq -0x50(%rbp), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x4130
leaq 0x6ad2(%rip), %rsi      # 0x3a6a2
leaq -0xb8(%rbp), %rdi
leaq -0x2b(%rbp), %rdx
callq 0x4130
leaq 0x6abb(%rip), %rsi      # 0x3a6a2
leaq -0xf8(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4130
leaq 0x6aa4(%rip), %rsi      # 0x3a6a2
leaq -0xd8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4130
leaq -0x50(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
leaq -0xf8(%rbp), %rcx
leaq -0xd8(%rbp), %r8
movq %rbx, %rdi
movq %r15, %r9
callq 0x32694
leaq -0xd8(%rbp), %rdi
callq 0x4598
leaq -0xf8(%rbp), %rdi
callq 0x4598
leaq -0xb8(%rbp), %rdi
callq 0x4598
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x98(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x33ce7
jmp 0x33ce7
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x4598
jmp 0x33c9e
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x4598
jmp 0x33caf
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x4598
jmp 0x33cc4
jmp 0x33cc1
jmp 0x33ce7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4598
jmp 0x33cea
jmp 0x33ce7
jmp 0x33ce7
jmp 0x33ce7
jmp 0x33ce7
jmp 0x33cd9
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0xd238
jmp 0x33cff
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
movq %rbx, %rdi
callq 0x4500
nop