// File: luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::LdrStr::EmitCode(std::ostream&)
void LdrStr::EmitCode(std::ostream& outfile) {
  std::string prefix = this->opkind_ == OpKind::LDR ? "ldr" : "str";
  prefix += CondToString(this->cond_) + " " + std::string(*(this->rd_)) + ", ";
  std::string offset = this->is_offset_imm_ ? "#" + std::to_string(offset_imm_) : std::string(*(this->offset_));
  switch (this->type_) {
    case Type::Norm: {
      prefix += "[" + std::string(*(this->rn_)) + ", " + offset + "]";
      break;
    }
    case Type::Pre: {
      prefix += "[" + std::string(*(this->rn_)) + ", " + offset + "]!";
      break;
    }
    case Type::Post: {
      prefix += "[" + std::string(*(this->rn_)) + "], " + offset;
      break;
    }
    default: {
      MyAssert(0);
      break;
    }
  }
  outfile << "\t" << prefix << std::endl;
}

// Assembly:
subq $0x348, %rsp            # imm = 0x348
movq %rdi, 0x340(%rsp)
movq %rsi, 0x338(%rsp)
movq 0x340(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpl $0x0, 0x14(%rax)
jne 0xb368
leaq 0xeee00(%rip), %rax     # 0xfa161
movq %rax, 0x48(%rsp)
jmp 0xb376
leaq 0xeedf6(%rip), %rax     # 0xfa165
movq %rax, 0x48(%rsp)
jmp 0xb376
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x317(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x8680
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x318(%rsp), %rdi
callq 0xc570
jmp 0xb3ab
leaq 0x317(%rsp), %rdi
callq 0x83c0
movq 0x50(%rsp), %rax
movl 0x10(%rax), %esi
leaq 0x280(%rsp), %rdi
callq 0x9ab0
jmp 0xb3cf
leaq 0xeef7f(%rip), %rdx     # 0xfa355
leaq 0x2a0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0xcbd0
jmp 0xb3ed
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rsi
leaq 0x260(%rsp), %rdi
callq 0xc8f0
jmp 0xb405
leaq 0x2c0(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
leaq 0x260(%rsp), %rdx
callq 0xc630
jmp 0xb424
leaq 0xeed44(%rip), %rdx     # 0xfa16f
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0xcbd0
jmp 0xb442
leaq 0x318(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x84b0
jmp 0xb459
leaq 0x2e0(%rsp), %rdi
callq 0x8728
leaq 0x2c0(%rsp), %rdi
callq 0x8728
leaq 0x260(%rsp), %rdi
callq 0x8728
leaq 0x2a0(%rsp), %rdi
callq 0x8728
leaq 0x280(%rsp), %rdi
callq 0x8728
movq 0x50(%rsp), %rax
movb 0x30(%rax), %al
movb $0x0, 0x21f(%rsp)
testb $0x1, %al
je 0xb4ed
movq 0x50(%rsp), %rax
movl 0x34(%rax), %esi
leaq 0x220(%rsp), %rdi
callq 0xc7b0
jmp 0xb4c5
movb $0x1, 0x21f(%rsp)
leaq 0xeecae(%rip), %rsi     # 0xfa182
leaq 0x240(%rsp), %rdi
leaq 0x220(%rsp), %rdx
callq 0xc970
jmp 0xb4eb
jmp 0xb507
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rsi
leaq 0x240(%rsp), %rdi
callq 0xa180
jmp 0xb505
jmp 0xb507
testb $0x1, 0x21f(%rsp)
jne 0xb513
jmp 0xb520
leaq 0x220(%rsp), %rdi
callq 0x8728
movq 0x50(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, 0x34(%rsp)
testl %eax, %eax
je 0xb839
jmp 0xb536
movl 0x34(%rsp), %eax
subl $0x1, %eax
je 0xb67d
jmp 0xb545
movl 0x34(%rsp), %eax
subl $0x2, %eax
je 0xb9dc
jmp 0xbb16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x317(%rsp), %rdi
callq 0x83c0
jmp 0xbc14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xbc07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb639
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb62c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb61f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb612
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0x8728
leaq 0x2c0(%rsp), %rdi
callq 0x8728
leaq 0x260(%rsp), %rdi
callq 0x8728
leaq 0x2a0(%rsp), %rdi
callq 0x8728
leaq 0x280(%rsp), %rdi
callq 0x8728
jmp 0xbc07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
testb $0x1, 0x21f(%rsp)
jne 0xb66b
jmp 0xb678
leaq 0x220(%rsp), %rdi
callq 0x8728
jmp 0xbc07
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rsi
leaq 0x178(%rsp), %rdi
callq 0xc8f0
jmp 0xb695
leaq 0xeeacd(%rip), %rsi     # 0xfa169
leaq 0x198(%rsp), %rdi
leaq 0x178(%rsp), %rdx
callq 0xc970
jmp 0xb6b3
leaq 0xeeab5(%rip), %rdx     # 0xfa16f
leaq 0x1b8(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0xcbd0
jmp 0xb6d1
leaq 0x1d8(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
leaq 0x240(%rsp), %rdx
callq 0xcc90
jmp 0xb6f0
leaq 0xefb61(%rip), %rdx     # 0xfb258
leaq 0x1f8(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0xcbd0
jmp 0xb70e
leaq 0x318(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x84b0
jmp 0xb725
leaq 0x1f8(%rsp), %rdi
callq 0x8728
leaq 0x1d8(%rsp), %rdi
callq 0x8728
leaq 0x1b8(%rsp), %rdi
callq 0x8728
leaq 0x198(%rsp), %rdi
callq 0x8728
leaq 0x178(%rsp), %rdi
callq 0x8728
jmp 0xbb93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xbbfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb827
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb81a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb80d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb800
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x8728
leaq 0x1d8(%rsp), %rdi
callq 0x8728
leaq 0x1b8(%rsp), %rdi
callq 0x8728
leaq 0x198(%rsp), %rdi
callq 0x8728
leaq 0x178(%rsp), %rdi
callq 0x8728
jmp 0xbbfa
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rsi
leaq 0xd8(%rsp), %rdi
callq 0xc8f0
jmp 0xb851
leaq 0xee911(%rip), %rsi     # 0xfa169
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0xc970
jmp 0xb86f
leaq 0xee8f9(%rip), %rdx     # 0xfa16f
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xcbd0
jmp 0xb88d
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x240(%rsp), %rdx
callq 0xcc90
jmp 0xb8ac
leaq 0xee8b8(%rip), %rdx     # 0xfa16b
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xcbd0
jmp 0xb8ca
leaq 0x318(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x84b0
jmp 0xb8e1
leaq 0x158(%rsp), %rdi
callq 0x8728
leaq 0x138(%rsp), %rdi
callq 0x8728
leaq 0x118(%rsp), %rdi
callq 0x8728
leaq 0xf8(%rsp), %rdi
callq 0x8728
leaq 0xd8(%rsp), %rdi
callq 0x8728
jmp 0xbb93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb9ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb9bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb9b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xb9a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x8728
leaq 0x138(%rsp), %rdi
callq 0x8728
leaq 0x118(%rsp), %rdi
callq 0x8728
leaq 0xf8(%rsp), %rdi
callq 0x8728
leaq 0xd8(%rsp), %rdi
callq 0x8728
jmp 0xbbfa
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rsi
leaq 0x58(%rsp), %rdi
callq 0xc8f0
jmp 0xb9f1
leaq 0xee771(%rip), %rsi     # 0xfa169
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xc970
jmp 0xba09
leaq 0xee75e(%rip), %rdx     # 0xfa16e
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xcbd0
jmp 0xba24
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x240(%rsp), %rdx
callq 0xcc90
jmp 0xba43
leaq 0x318(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x84b0
jmp 0xba5a
leaq 0xb8(%rsp), %rdi
callq 0x8728
leaq 0x98(%rsp), %rdi
callq 0x8728
leaq 0x78(%rsp), %rdi
callq 0x8728
leaq 0x58(%rsp), %rdi
callq 0x8728
jmp 0xbb93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xbb07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xbafd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0xbaf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x8728
leaq 0x98(%rsp), %rdi
callq 0x8728
leaq 0x78(%rsp), %rdi
callq 0x8728
leaq 0x58(%rsp), %rdi
callq 0x8728
jmp 0xbbfa
movq 0x1404cb(%rip), %rdi    # 0x14bfe8
leaq 0xee5d4(%rip), %rsi     # 0xfa0f8
callq 0x8330
movq %rax, 0x28(%rsp)
jmp 0xbb30
movq 0x28(%rsp), %rdi
leaq 0xee5c5(%rip), %rsi     # 0xfa101
callq 0x8330
movq %rax, 0x20(%rsp)
jmp 0xbb48
movq 0x20(%rsp), %rdi
leaq 0xef896(%rip), %rsi     # 0xfb3ea
callq 0x8330
movq %rax, 0x18(%rsp)
jmp 0xbb60
movq 0x18(%rsp), %rdi
movl $0xdd, %esi
callq 0x8650
movq %rax, 0x10(%rsp)
jmp 0xbb76
movq 0x10(%rsp), %rdi
movq 0x1403fe(%rip), %rsi    # 0x14bf80
callq 0x8380
jmp 0xbb89
movl $0xff, %edi
callq 0x8460
movq 0x338(%rsp), %rdi
leaq 0xee5b6(%rip), %rsi     # 0xfa158
callq 0x8330
movq %rax, 0x8(%rsp)
jmp 0xbbae
movq 0x8(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x8310
movq %rax, (%rsp)
jmp 0xbbc6
movq (%rsp), %rdi
movq 0x1403af(%rip), %rsi    # 0x14bf80
callq 0x8380
jmp 0xbbd8
leaq 0x240(%rsp), %rdi
callq 0x8728
leaq 0x318(%rsp), %rdi
callq 0x8728
addq $0x348, %rsp            # imm = 0x348
retq
leaq 0x240(%rsp), %rdi
callq 0x8728
leaq 0x318(%rsp), %rdi
callq 0x8728
movq 0x308(%rsp), %rdi
callq 0x8670
nopw %cs:(%rax,%rax)