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

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x1,%edi
  jg     L12
  lea    D115(%rip),%rdi
  call   <system@plt>
  mov    $0x0,%ecx
  mov    $0x1000,%edx
  lea    D97(%rip),%rbx
  mov    %rbx,%rsi
  lea    D71(%rip),%rdi
  call   <merge_flash@plt>
  mov    $0x0,%ecx
  mov    $0x8000,%edx
  mov    %rbx,%rsi
  lea    D83(%rip),%rdi
  call   <merge_flash@plt>
  mov    $0x0,%ecx
  mov    $0x10000,%edx
  mov    %rbx,%rsi
  lea    D18(%rip),%rdi
  call   <merge_flash@plt>
  jmp    L20
L12:
  mov    %rsi,%rbx
  mov    0x8(%rsi),%rdi
  lea    D138(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L39
L26:
  lea    D115(%rip),%rdi
  call   <system@plt>
  mov    $0x0,%ecx
  mov    $0x1000,%edx
  lea    D97(%rip),%rbp
  mov    %rbp,%rsi
  lea    D71(%rip),%rdi
  call   <merge_flash@plt>
  mov    $0x0,%ecx
  mov    $0x8000,%edx
  mov    %rbp,%rsi
  lea    D83(%rip),%rdi
  call   <merge_flash@plt>
  mov    0x8(%rbx),%rdi
  mov    $0x0,%ecx
  mov    $0x10000,%edx
  mov    %rbp,%rsi
  call   <merge_flash@plt>
L20:
  lea    D81(%rip),%rdi
  call   <system@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L39:
  lea    D45(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%ecx
  mov    $0x1000,%edx
  lea    D97(%rip),%rsi
  lea    D71(%rip),%rdi
  call   <merge_flash@plt>
  lea    D1(%rip),%rdi
  call   <system@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L26
```

tool_calls: name: parse_data
arguments: data_tag: D115
type_infered: string
name: parse_data
arguments: data_tag: D97
type_infered: string
name: parse_data
arguments: data_tag: D71
type_infered: string
name: parse_data
arguments: data_tag: D83
type_infered: string
name: parse_data
arguments: data_tag: D18
type_infered: string
name: parse_data
arguments: data_tag: D138
type_infered: string
name: parse_data
arguments: data_tag: D81
type_infered: string
name: parse_data
arguments: data_tag: D45
type_infered: string
name: parse_data
arguments: data_tag: D1
type_infered: string

tool: D115: dd if=/dev/zero bs=1M count=4  | tr "\000" "\377" >  esp32flash.bin

tool: D97: esp32flash.bin

tool: D71: build/bootloader/bootloader.bin

tool: D83: build/partition_table/partition-table.bin

tool: D18: build/app-template.bin

tool: D138: -bl

tool: D81: cp esp32flash.bin ~/qemu_esp32

tool: D45: Overwrite bootloader only 


tool: D1: cp esp32flash.bin ~/qemu_espressif

assistant: ```c
int main(int argc, char *argv[]) {
  if (argc > 1) {
    if (strcmp(argv[1], "-bl") == 0) {
      printf("Overwrite bootloader only \n");
      merge_flash("build/bootloader/bootloader.bin", "esp32flash.bin", 0x1000, 0);
      system("cp esp32flash.bin ~/qemu_espressif");
      exit(0);
    }
  }
  system("dd if=/dev/zero bs=1M count=4  | tr \"\\000\" \"\\377\" >  esp32flash.bin");
  merge_flash("build/bootloader/bootloader.bin", "esp32flash.bin", 0x1000, 0);
  merge_flash("build/partition_table/partition-table.bin", "esp32flash.bin", 0x8000, 0);
  if (argc > 1) {
    merge_flash(argv[1], "esp32flash.bin", 0x10000, 0);
  } else {
    merge_flash("build/app-template.bin", "esp32flash.bin", 0x10000, 0);
  }
  system("cp esp32flash.bin ~/qemu_esp32");
}
```