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

```asm
<Iso2Raw_generateCue>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x210,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %eax,%edx
  sub    $0x1,%edx
  js     L100
  movabs $0xffffdffffffff7fe,%rsi
  movslq %edx,%rdx
  jmp    L33
  nopl   0x0(%rax)
L65:
  sub    $0x1,%rdx
  test   %edx,%edx
  js     L100
L33:
  movzbl 0x0(%rbp,%rdx,1),%ecx
  mov    %edx,%eax
  sub    $0x2f,%ecx
  cmp    $0x2d,%cl
  ja     L65
  bt     %rcx,%rsi
  jb     L65
  add    $0x1,%eax
L100:
  movslq %eax,%rbx
  xor    %r12d,%r12d
  mov    %rsp,%r13
  jmp    L61
  nopl   0x0(%rax,%rax,1)
L30:
  movzbl 0x0(%rbp,%rbx,1),%eax
  add    $0x1,%rbx
  mov    %al,0x0(%r13,%r12,1)
  add    $0x1,%r12
L61:
  mov    %rbp,%rdi
  movslq %r12d,%r14
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L30
  movb   $0x0,(%rsp,%r14,1)
  xor    %ebx,%ebx
  lea    0x100(%rsp),%r14
  jmp    L77
  nopw   0x0(%rax,%rax,1)
L2:
  movzbl 0x0(%rbp,%rbx,1),%eax
  cmp    $0x2e,%al
  je     L11
  mov    %al,(%r14,%rbx,1)
  add    $0x1,%rbx
L77:
  mov    %rbp,%rdi
  movslq %ebx,%r12
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L2
L11:
  lea    D6(%rip),%rsi
  mov    %r14,%rdi
  movb   $0x0,0x100(%rsp,%r12,1)
  call   <strcat@plt>
  lea    D31(%rip),%rsi
  mov    %r14,%rdi
  call   <fopen@plt>
  mov    %r13,%rdx
  lea    D18(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %rbp,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D41(%rip),%rdi
  call   <fwrite@plt>
  lea    D33(%rip),%rdi
  mov    %rbp,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L106
  add    $0x210,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L106:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D6
type_guessed: string
name: retrieve_data
arguments: label: D31
type_guessed: string
name: retrieve_data
arguments: label: D18
type_guessed: string
name: retrieve_data
arguments: label: D41
type_guessed: string
name: retrieve_data
arguments: label: D33
type_guessed: string

tool: D6: .cue

tool: D31: wb

tool: D18: FILE "%s" BINARY


tool: D41: TRACK 01 MODE2/2352


tool: D33:     INDEX 01 00:00:00


assistant: ```c
void Iso2Raw_generateCue(char *binFileName) {
  int x, y;
  char binBaseName[256];
  char cueFileName[256];
  FILE *cue_file;
  for (x = (strlen(binFileName) - 1); x >= 0; x--) {
    if (binFileName[x] == '/' || binFileName[x] == '\\' || binFileName[x] == ':')
      break;
  }
  x++;
  y = 0;
  for (; x < strlen(binFileName); x++)
    binBaseName[y++] = binFileName[x];
  binBaseName[y] = 0;
  y = 0;
  for (x = 0; x < strlen(binFileName); x++) {
    if (binFileName[x] == '.')
      break;
    else
      cueFileName[y++] = binFileName[x];
  }
  cueFileName[y] = 0;
  strcat(cueFileName, ".cue");
  cue_file = fopen(cueFileName, "wb");
  fprintf(cue_file, "FILE \"%s\" BINARY\n", binBaseName);
  fprintf(cue_file, "TRACK 01 MODE2/2352\n");
  fprintf(cue_file, "    INDEX 01 00:00:00\n");
  fclose(cue_file);
}
```