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

```asm
<idevicebackup>:
  endbr64
  push   %r13
  lea    D140(%rip),%rdi
  push   %r12
  push   %rbp
  sub    $0x4d0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x4c8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  call   <system@plt>
  lea    D24(%rip),%rdi
  call   <printf@plt>
  lea    D121(%rip),%rdi
  call   <printf@plt>
  mov    $0x14,%esi
  mov    %rbp,%rdi
  call   <fget@plt>
  lea    D197(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L14
  lea    D104(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L14
L120:
  lea    D3(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L117
  lea    D21(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L117
L48:
  mov    0x4c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L119
  add    $0x4d0,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L117:
  lea    D84(%rip),%rdi
  lea    0x20(%rsp),%rbp
  call   <printf@plt>
  mov    $0x14,%esi
  mov    %rbp,%rdi
  call   <fget@plt>
  lea    D120(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L75
L59:
  lea    0x40(%rsp),%r12
  lea    D55(%rip),%rdi
  call   <printf@plt>
  lea    0xc0(%rsp),%rbp
  mov    %r12,%rdi
  mov    $0x78,%esi
  call   <fget@plt>
  mov    %rbp,%rdi
  mov    %r12,%rdx
  lea    D105(%rip),%rsi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L14:
  lea    D84(%rip),%rdi
  lea    0x20(%rsp),%r12
  call   <printf@plt>
  mov    $0x14,%esi
  mov    %r12,%rdi
  call   <fget@plt>
  lea    D120(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L32
L127:
  lea    0x40(%rsp),%r13
  lea    D19(%rip),%rdi
  call   <printf@plt>
  lea    0xc0(%rsp),%r12
  mov    %r13,%rdi
  mov    $0x78,%esi
  call   <fget@plt>
  mov    %r12,%rdi
  mov    %r13,%rdx
  lea    D176(%rip),%rsi
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <system@plt>
  jmp    L120
  nop
L32:
  lea    D125(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L127
  lea    D104(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L127
  lea    0x40(%rsp),%r13
  lea    D19(%rip),%rdi
  call   <printf@plt>
  lea    0xc0(%rsp),%r12
  mov    %r13,%rdi
  mov    $0x78,%esi
  call   <fget@plt>
  mov    %r12,%rdi
  mov    %r13,%rdx
  lea    D4(%rip),%rsi
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <system@plt>
  jmp    L120
  nopl   (%rax)
L75:
  lea    D125(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L59
  lea    D104(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L59
  lea    0x40(%rsp),%r12
  lea    D55(%rip),%rdi
  call   <printf@plt>
  lea    0xc0(%rsp),%rbp
  mov    %r12,%rdi
  mov    $0x78,%esi
  call   <fget@plt>
  mov    %rbp,%rdi
  mov    %r12,%rdx
  lea    D36(%rip),%rsi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  jmp    L48
L119:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D140
datatype: string
name: unpack_data
arguments: label: D24
datatype: string
name: unpack_data
arguments: label: D121
datatype: string
name: unpack_data
arguments: label: D197
datatype: string
name: unpack_data
arguments: label: D104
datatype: string
name: unpack_data
arguments: label: D3
datatype: string
name: unpack_data
arguments: label: D21
datatype: string
name: unpack_data
arguments: label: D84
datatype: string
name: unpack_data
arguments: label: D120
datatype: string
name: unpack_data
arguments: label: D55
datatype: string
name: unpack_data
arguments: label: D105
datatype: string
name: unpack_data
arguments: label: D19
datatype: string
name: unpack_data
arguments: label: D176
datatype: string
name: unpack_data
arguments: label: D125
datatype: string
name: unpack_data
arguments: label: D4
datatype: string
name: unpack_data
arguments: label: D36
datatype: string

tool: D140: clear

tool: D24: 1) Backup


tool: D121: 2) Restore backup


tool: D197: backup

tool: D104: 1

tool: D3: restore

tool: D21: 2

tool: D84: Is your iOS version less than iOS 4 ?
1) YES
2) NO


tool: D120: yes

tool: D55: Enter the directory to the backup : 

tool: D105: idevicebackup restore %s

tool: D19: Enter the directory to copy the backup : 

tool: D176: idevicebackup backup %s

tool: D125: YES

tool: D4: idevicebackup2 backup %s

tool: D36: idevicebackup2 restore %s

assistant: ```c
int idevicebackup() {
  char choice[20];
  float version;
  char rep[20];
  char path[120];
  char buildCommand[1024];
  system("clear");
  printf("1) Backup\n");
  printf("2) Restore backup\n");
  fget(choice, 20);
  if (strcmp(choice, "backup") == 0 || strcmp(choice, "1") == 0) {
    printf("Is your iOS version less than iOS 4 ?\n1) YES\n2) NO\n");
    fget(rep, 20);
    if (strcmp(rep, "yes") == 0 || strcmp(rep, "YES") == 0 || strcmp(rep, "1") == 0) {
      printf("Enter the directory to copy the backup : ");
      fget(path, 120);
      sprintf(buildCommand, "idevicebackup backup %s", path);
      system(buildCommand);
    } else {
      printf("Enter the directory to copy the backup : ");
      fget(path, 120);
      sprintf(buildCommand, "idevicebackup2 backup %s", path);
      system(buildCommand);
    }
  }
  if (strcmp(choice, "restore") == 0 || strcmp(choice, "2") == 0) {
    printf("Is your iOS version less than iOS 4 ?\n1) YES\n2) NO\n");
    fget(rep, 20);
    if (strcmp(rep, "yes") == 0 || strcmp(rep, "YES") == 0 || strcmp(rep, "1") == 0) {
      printf("Enter the directory to the backup : ");
      fget(path, 120);
      sprintf(buildCommand, "idevicebackup restore %s", path);
      system(buildCommand);
    } else {
      printf("Enter the directory to the backup : ");
      fget(path, 120);
      sprintf(buildCommand, "idevicebackup2 restore %s", path);
      system(buildCommand);
    }
  }
}
```