user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  cmp    $0x3,%edi
  jg     L35
  lea    D34(%rip),%rdi
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D38(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L35:
  mov    %rsi,%rbx
  mov    0x8(%rsi),%rsi
  lea    0x10(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    0x10(%rbx),%rsi
  lea    0x60(%rsp),%rdi
  call   <strcpy@plt>
  mov    0x18(%rbx),%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,%ebx
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <does_not_exist@plt>
  test   %eax,%eax
  je     L54
  mov    %rbp,%rsi
  lea    D39(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L54:
  lea    0x60(%rsp),%rdi
  mov    $0x0,%eax
  call   <does_not_exist@plt>
  test   %eax,%eax
  je     L73
  lea    0x60(%rsp),%rsi
  lea    D47(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L73:
  lea    0x60(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  mov    $0x0,%eax
  call   <are_not_same_size@plt>
  test   %eax,%eax
  je     L102
  lea    D8(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L102:
  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,%rbp
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <allocate_image_array@plt>
  movslq %eax,%r12
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <read_image_array@plt>
  lea    0x60(%rsp),%rdi
  mov    %r12,%rsi
  mov    $0x0,%eax
  call   <read_image_array@plt>
  mov    %rbp,%r10
  mov    %r12,%r9
  mov    $0x0,%r8d
  jmp    L66
L40:
  add    $0x1,%rax
  cmp    %rax,0x8(%rsp)
  jle    L14
L86:
  lea    (%rax,%rax,1),%rdx
  mov    (%rdi),%rcx
  cmpw   $0x0,(%rcx,%rax,2)
  je     L40
  mov    %rdx,%rcx
  add    (%rsi),%rcx
  add    %bx,(%rcx)
  add    (%rsi),%rdx
  cmpw   $0xff,(%rdx)
  jle    L40
  movw   $0xff,(%rdx)
  jmp    L40
L14:
  add    $0x1,%r8
  add    $0x8,%r10
  add    $0x8,%r9
L66:
  cmp    %r8,(%rsp)
  jle    L23
  cmpq   $0x0,0x8(%rsp)
  jle    L14
  mov    %r9,%rdi
  mov    %r10,%rsi
  mov    $0x0,%eax
  jmp    L86
L23:
  lea    0x10(%rsp),%rdi
  mov    %rbp,%rsi
  mov    $0x0,%eax
  call   <write_image_array@plt>
  mov    (%rsp),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <free_image_array@plt>
  mov    (%rsp),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <free_image_array@plt>
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L44
  mov    $0x0,%eax
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L44:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D34
type_infered: string
name: parse_data
arguments: label: D38
type_infered: string
name: parse_data
arguments: label: D39
type_infered: string
name: parse_data
arguments: label: D47
type_infered: string
name: parse_data
arguments: label: D8
type_infered: string

tool: D34: 

Not enough parameters:

tool: D38: 
   usage: hidet image-file text-file-image factor  

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

tool: D47: 
ERROR output file %s does not exist

tool: D8: 
ERROR images are not same size

assistant: ```c
int main(argc, argv)
int argc;
char *argv[];
{
  char image_name[80], water_name[80];
  int i, j;
  long length, width;
  short factor;
  short **the_image;
  short **out_image;
  if (argc < 4) {
    printf("\n\nNot enough parameters:");
    printf("\n");
    printf("\n   usage: hidet image-file text-file-image factor  ");
    exit(0);
  }
  strcpy(image_name, argv[1]);
  strcpy(water_name, argv[2]);
  factor = atoi(argv[3]);
  if (does_not_exist(image_name)) {
    printf("\nERROR input file %s does not exist", image_name);
    exit(0);
  }
  if (does_not_exist(water_name)) {
    printf("\nERROR output file %s does not exist", water_name);
    exit(0);
  }
  if (are_not_same_size(image_name, water_name)) {
    printf("\nERROR images are not same size");
    exit(0);
  }
  get_image_size(image_name, &length, &width);
  the_image = allocate_image_array(length, width);
  out_image = allocate_image_array(length, width);
  read_image_array(image_name, the_image);
  read_image_array(water_name, out_image);
  for (i = 0; i < length; i++) {
    for (j = 0; j < width; j++) {
      if (out_image[i][j] != 0) {
        the_image[i][j] = the_image[i][j] + factor;
        if (the_image[i][j] > 255)
          the_image[i][j] = 255;
      }
    }
  }
  write_image_array(image_name, the_image);
  free_image_array(the_image, length);
  free_image_array(out_image, length);
}
```