user: 请将以下的汇编代码转换成C语言代码:

```asm
<init_mc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D170(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xf0000000,%esi
  mov    $0x93000000,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x98,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0xf0000000,%esi
  mov    $0x93000004,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x99,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x11009,%esi
  mov    $0x93000030,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x9a,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x1002009,%esi
  mov    $0x93000034,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x9b,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x40000000,%esi
  mov    $0x930000e8,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x9c,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x0,%esi
  mov    $0x93000080,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x9d,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0xffff0000,%esi
  mov    $0x93000084,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x9e,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0xbf0005,%esi
  mov    $0x930000a0,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0x9f,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6,%esi
  mov    $0x930000b0,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa0,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x2,%esi
  mov    $0x930000c8,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa1,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6,%esi
  mov    $0x930000b4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa2,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6,%esi
  mov    $0x930000c4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa3,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x1,%esi
  mov    $0x930000bc,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa4,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x0,%esi
  mov    $0x930000b8,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa5,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0xc0,%esi
  mov    $0x930000cc,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa6,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x5e000000,%esi
  mov    $0x930000e8,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa7,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x5e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa8,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e8,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xa9,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xaa,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xab,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xac,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xad,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xae,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xaf,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xb0,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x6e000000,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xb1,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x7e000033,%esi
  mov    $0x930000e8,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xb2,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0x7e000033,%esi
  mov    $0x930000e4,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xb3,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    $0xc0bf0005,%esi
  mov    $0x930000a0,%edi
  call   <dbg_wb_write32@plt>
  mov    %eax,%edx
  mov    $0xb4,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x930000a0,%edi
  call   <dbg_wb_read32@plt>
  mov    %eax,%edx
  mov    $0xb6,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <check@plt>
  mov    -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    $0xc0bf0005,%esi
  lea    D182(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D170
type: string
name: unpack_data
arguments: label: D47
type: string
name: unpack_data
arguments: label: D182
type: string

tool: D170: Initialize Memory Controller (SDRAM)

tool: D47: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c

tool: D182: expected %x, read %x


assistant: ```c
void init_mc(void) {
  uint32_t insn;
  printf("Initialize Memory Controller (SDRAM)\n");
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 152, (dbg_wb_write32(0x93000000 + 0x00, 0xf0000000 & 0xffff0000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 153, (dbg_wb_write32(0x93000000 + 0x04, 0xf0000000 & 0xffff0000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 154, (dbg_wb_write32(0x93000000 + 0x30, 0x00011009)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 155, (dbg_wb_write32(0x93000000 + 0x34, 0x01002009)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 156, (dbg_wb_write32(0x93000000 + 0xe8, 0x40000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 157, (dbg_wb_write32(0x93000000 + 0x80, 0x00000000 & 0xffff0000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 158, (dbg_wb_write32(0x93000000 + 0x84, (~(0x400 - 1)) & 0xffff0000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 159, (dbg_wb_write32(0x93000000 + 0xa0, 0x00bf0005)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 160, (dbg_wb_write32(0x93000000 + 0xb0, 0x00000006)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 161, (dbg_wb_write32(0x93000000 + 0xc8, 0x00000002)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 162, (dbg_wb_write32(0x93000000 + 0xb4, 0x00000006)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 163, (dbg_wb_write32(0x93000000 + 0xc4, 0x00000006)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 164, (dbg_wb_write32(0x93000000 + 0xbc, 0x00000001)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 165, (dbg_wb_write32(0x93000000 + 0xb8, 0x00000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 166, (dbg_wb_write32(0x93000000 + 0xcc, 0x000000C0)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 167, (dbg_wb_write32(0x93000000 + 0xe8, 0x5e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 168, (dbg_wb_write32(0x93000000 + 0xe4, 0x5e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 169, (dbg_wb_write32(0x93000000 + 0xe8, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 170, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 171, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 172, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 173, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 174, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 175, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 176, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 177, (dbg_wb_write32(0x93000000 + 0xe4, 0x6e000000)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 178, (dbg_wb_write32(0x93000000 + 0xe8, 0x7e000033)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 179, (dbg_wb_write32(0x93000000 + 0xe4, 0x7e000033)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 180, (dbg_wb_write32(0x93000000 + 0xa0, 0xc0bf0005)));
  check("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/csturton/wirepatch/refs/heads/master/ddr2/cores/adv_debug_sys/Software/adv_jtag_bridge/or32_selftest.c", 182, (dbg_wb_read32(0x93000000 + 0xa0, &insn)));
  printf("expected %x, read %x\n", 0xc0bf0005, insn);
}
```