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

```asm
<idevicebackup>:
  endbr64
  push   %r13
  lea    D33(%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    D185(%rip),%rdi
  call   <printf@plt>
  lea    D91(%rip),%rdi
  call   <printf@plt>
  mov    $0x14,%esi
  mov    %rbp,%rdi
  call   <fget@plt>
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L50
  lea    D102(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L50
L108:
  lea    D159(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L126
  lea    D218(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L126
L13:
  mov    0x4c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L67
  add    $0x4d0,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L126:
  lea    D4(%rip),%rdi
  lea    0x20(%rsp),%rbp
  call   <printf@plt>
  mov    $0x14,%esi
  mov    %rbp,%rdi
  call   <fget@plt>
  lea    D183(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L79
L70:
  lea    0x40(%rsp),%r12
  lea    D87(%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    D71(%rip),%rsi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  jmp    L13
  nopl   0x0(%rax,%rax,1)
L50:
  lea    D4(%rip),%rdi
  lea    0x20(%rsp),%r12
  call   <printf@plt>
  mov    $0x14,%esi
  mov    %r12,%rdi
  call   <fget@plt>
  lea    D183(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L97
L26:
  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    D184(%rip),%rsi
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <system@plt>
  jmp    L108
  nop
L97:
  lea    D20(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L26
  lea    D102(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L26
  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    D50(%rip),%rsi
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <system@plt>
  jmp    L108
  nopl   (%rax)
L79:
  lea    D20(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L70
  lea    D102(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L70
  lea    0x40(%rsp),%r12
  lea    D87(%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    D2(%rip),%rsi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  jmp    L13
L67:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D33
type_infered: string
name: parse_data
arguments: tag: D185
type_infered: string
name: parse_data
arguments: tag: D91
type_infered: string
name: parse_data
arguments: tag: D0
type_infered: string
name: parse_data
arguments: tag: D102
type_infered: string
name: parse_data
arguments: tag: D159
type_infered: string
name: parse_data
arguments: tag: D218
type_infered: string
name: parse_data
arguments: tag: D4
type_infered: string
name: parse_data
arguments: tag: D183
type_infered: string
name: parse_data
arguments: tag: D87
type_infered: string
name: parse_data
arguments: tag: D71
type_infered: string
name: parse_data
arguments: tag: D19
type_infered: string
name: parse_data
arguments: tag: D184
type_infered: string
name: parse_data
arguments: tag: D20
type_infered: string
name: parse_data
arguments: tag: D50
type_infered: string
name: parse_data
arguments: tag: D2
type_infered: string

tool: D33: clear

tool: D185: 1) Backup


tool: D91: 2) Restore backup


tool: D0: backup

tool: D102: 1

tool: D159: restore

tool: D218: 2

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


tool: D183: yes

tool: D87: Enter the directory to the backup : 

tool: D71: idevicebackup restore %s

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

tool: D184: idevicebackup backup %s

tool: D20: YES

tool: D50: idevicebackup2 backup %s

tool: D2: 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);
    }
  }
}
```