user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  lea    D60(%rip),%rdi
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  call   <puts@plt>
  lea    D105(%rip),%rdi
  call   <puts@plt>
  lea    D63(%rip),%rdi
  call   <puts@plt>
  cmp    $0x1,%ebp
  jle    L50
L59:
  mov    $0x400,%edi
  call   <malloc@plt>
  mov    0x10(%rbx),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rsi
  lea    D79(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x400,%edi
  call   <malloc@plt>
  mov    %rbp,%rsi
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    D19(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x400,%edi
  call   <malloc@plt>
  mov    %rbp,%rsi
  mov    %rax,%r13
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    D74(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    %r13,%rsi
  lea    D110(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rbx),%r15
  lea    D103(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jne    L55
L122:
  mov    %rbp,%rdi
  call   <IsISOValid@plt>
  test   %eax,%eax
  je     L17
L47:
  xor    %eax,%eax
  call   <init_tables@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <Iso2Raw@plt>
  test   %eax,%eax
  je     L25
L96:
  test   %ebx,%ebx
  jne    L85
L46:
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <BuildCueFile@plt>
  test   %eax,%eax
  je     L110
L94:
  mov    %r13,%rsi
  lea    D118(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L55:
  mov    %r15,%rsi
  lea    D30(%rip),%rdi
  xor    %eax,%eax
  mov    %r15,%r14
  call   <printf@plt>
  mov    $0x1,%ebx
  jmp    L122
L110:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L94
L85:
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <PatchIso@plt>
  test   %eax,%eax
  jne    L46
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L46
L25:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L96
L17:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L47
L50:
  lea    D15(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L59
```

tool_calls: name: read_data
arguments: data_tag: D60
type_guessed: string
name: read_data
arguments: data_tag: D105
type_guessed: string
name: read_data
arguments: data_tag: D63
type_guessed: string
name: read_data
arguments: data_tag: D79
type_guessed: string
name: read_data
arguments: data_tag: D19
type_guessed: string
name: read_data
arguments: data_tag: D40
type_guessed: string
name: read_data
arguments: data_tag: D74
type_guessed: string
name: read_data
arguments: data_tag: D110
type_guessed: string
name: read_data
arguments: data_tag: D103
type_guessed: string
name: read_data
arguments: data_tag: D118
type_guessed: string
name: read_data
arguments: data_tag: D30
type_guessed: string
name: read_data
arguments: data_tag: D15
type_guessed: string

tool: D60: ---------------------------------

tool: D105: ISO9660 2048->2352 converter tool

tool: D63: ---------------------------------


tool: D79: Input file: %s


tool: D19: .bin

tool: D40: Output file: %s


tool: D74: .cue

tool: D110: Cue file: %s


tool: D103: nolicence

tool: D118: Done "%s".


tool: D30: Licence file: %s


tool: D15: Wrong number of argument.
	Usage: iso2raw licence isofile.iso
		If you don't want to merge a licence file, write nolicence

assistant: ```c
int main(int argc, char *argv[]) {
  char *licFile;
  char *isoFile;
  char *temp;
  char *infile;
  char *cueFile;
  char *rawFile;
  int licence = 1;
  printf("---------------------------------\n");
  printf("ISO9660 2048->2352 converter tool\n");
  printf("---------------------------------\n\n");
  if (argc < 2) {
    printf("Wrong number of argument.\n\tUsage: iso2raw licence isofile.iso\n\t\tIf you don't want to merge a licence file, write nolicence\n");
    exit(1);
  }
  infile = malloc(1024);
  strcpy(infile, argv[2]);
  printf("Input file: %s\n", infile);
  rawFile = malloc(1024);
  strcpy(rawFile, infile);
  strcat(rawFile, ".bin");
  printf("Output file: %s\n", rawFile);
  cueFile = malloc(1024);
  strcpy(cueFile, infile);
  strcat(cueFile, ".cue");
  printf("Cue file: %s\n", cueFile);
  if (!strcmp(argv[1], "nolicence"))
    licence = 0;
  else {
    licFile = argv[1];
    printf("Licence file: %s\n", licFile);
  }
  if (!IsISOValid(infile))
    exit(1);
  init_tables();
  if (!Iso2Raw(infile, rawFile))
    exit(1);
  if (licence)
    if (!PatchIso(licFile, rawFile))
      exit(1);
  if (!BuildCueFile(rawFile, cueFile))
    exit(1);
  printf("Done \"%s\".\n", cueFile);
}
```