user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  cmp    $0x4,%edi
  je     L78
  lea    D10(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L78:
  mov    %rsi,%rbp
  mov    0x8(%rsi),%rsi
  lea    0x10(%rsp),%r12
  mov    %r12,%rdi
  call   <strcpy@plt>
  mov    0x10(%rbp),%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,%ebx
  mov    0x18(%rbp),%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,%ebp
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <does_not_exist@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L133
  lea    0x10(%rsp),%rsi
  lea    D3(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L133:
  lea    0x8(%rsp),%rdx
  mov    %rsp,%rsi
  lea    0x10(%rsp),%r13
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <get_image_size@plt>
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <allocate_image_array@plt>
  movslq %eax,%r14
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <read_image_array@plt>
  lea    D4(%rip),%r13
  jmp    L97
L59:
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <show_screen@plt>
  jmp    L37
L129:
  mov    %r12d,%edx
L120:
  cmp    $0x4b,%al
  jne    L45
  sub    $0xf,%ebx
L138:
  cmp    $0x4c,%al
  jne    L28
  add    $0xb,%ebp
L28:
  test   %edx,%edx
  je     L122
L97:
  mov    0x8(%rsp),%rcx
  mov    (%rsp),%rdx
  mov    %ebp,%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <is_in_image@plt>
  test   %eax,%eax
  jne    L59
L37:
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x60(%rsp),%rdi
  mov    $0x0,%eax
  call   <gets@plt>
  movzbl 0x60(%rsp),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  je     L129
  cmp    $0x4a,%al
  jne    L79
  add    $0xf,%ebx
  mov    $0x1,%edx
L45:
  cmp    $0x48,%al
  jne    L138
  sub    $0xb,%ebp
  jmp    L28
L79:
  mov    $0x1,%edx
  jmp    L120
L122:
  mov    (%rsp),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <free_image_array@plt>
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L47
  mov    $0x0,%eax
  add    $0xc0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L47:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D10
data_type: string
name: unpack_data
arguments: data_label: D3
data_type: string
name: unpack_data
arguments: data_label: D4
data_type: string

tool: D10: 
usage: showi input-image il ie

tool: D3: 
ERROR input file %s does not exist

tool: D4: 

 x=quit j=down k=up h=left l=right
Enter choice and press Enter:  

assistant: ```c
int main(argc, argv)
int argc;
char *argv[];
{
  char in_name[80];
  char response[80];
  int ie, il, not_done, temp_ie, temp_il;
  long height, width;
  short **the_image;
  if (argc != 4) {
    printf("\nusage: showi input-image il ie\n");
    exit(0);
  }
  strcpy(in_name, argv[1]);
  il = atoi(argv[2]);
  ie = atoi(argv[3]);
  if (does_not_exist(in_name)) {
    printf("\nERROR input file %s does not exist", in_name);
    exit(0);
  }
  get_image_size(in_name, &height, &width);
  the_image = allocate_image_array(height, width);
  read_image_array(in_name, the_image);
  temp_il = il;
  temp_ie = ie;
  not_done = 1;
  while (not_done) {
    if (is_in_image(temp_il, temp_ie, height, width)) {
      il = temp_il;
      ie = temp_ie;
      show_screen(the_image, il, ie);
    }
    printf("\n\n x=quit j=down k=up h=left l=right"
           "\nEnter choice and press Enter:  ");
    gets(response);
    if (response[0] == 'x' || response[0] == 'X')
      not_done = 0;
    if (response[0] == 'j' || response[0] == 'J')
      temp_il = temp_il + ((3 * 20) / 4);
    if (response[0] == 'k' || response[0] == 'K')
      temp_il = temp_il - ((3 * 20) / 4);
    if (response[0] == 'h' || response[0] == 'H')
      temp_ie = temp_ie - ((3 * 15) / 4);
    if (response[0] == 'l' || response[0] == 'L')
      temp_ie = temp_ie + ((3 * 15) / 4);
  }
  free_image_array(the_image, height);
}
```