user: Please show me the C implementation that matches the assembly code listed below:

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

tool_calls: name: retrieve_data
arguments: tag: D11
type_guessed: string
name: retrieve_data
arguments: tag: D23
type_guessed: string
name: retrieve_data
arguments: tag: D6
type_guessed: string

tool: D11: Initialize Memory Controller (SDRAM)

tool: D23: /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: D6: 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);
}
```