user: What is the c source code of the assembly code below?

```asm
<FITS_image_size>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x84(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x50(%rbp),%rax
  mov    $0x46,%edx
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x50(%rbp),%rdx
  mov    -0x90(%rbp),%rsi
  mov    -0x84(%rbp),%eax
  mov    %rdx,%rcx
  lea    D18(%rip),%rdx
  mov    %eax,%edi
  call   <get_FITS_key@plt>
  mov    %eax,-0x60(%rbp)
  cmpl   $0xffffffff,-0x60(%rbp)
  jne    L120
  lea    D93(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L12
L120:
  cmpl   $0x1,-0x60(%rbp)
  je     L115
  lea    D139(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L115:
  lea    -0x74(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %eax,%eax
  jg     L27
  lea    D111(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L12
L27:
  mov    -0x74(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0x5c(%rbp)
  lea    -0x58(%rbp),%rax
  lea    D29(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x50(%rbp),%rcx
  lea    -0x58(%rbp),%rdx
  mov    -0x90(%rbp),%rsi
  mov    -0x84(%rbp),%eax
  mov    %eax,%edi
  call   <get_FITS_key@plt>
  mov    %eax,-0x60(%rbp)
  cmpl   $0xffffffff,-0x60(%rbp)
  jne    L138
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L12
L138:
  cmpl   $0x2,-0x60(%rbp)
  je     L70
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L70:
  lea    -0x70(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %eax,%eax
  jg     L213
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L12
L213:
  mov    -0x70(%rbp),%eax
  test   %eax,%eax
  jne    L96
  mov    $0x0,%eax
  jmp    L12
L96:
  mov    -0x5c(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  movl   $0x1,-0x68(%rbp)
  jmp    L59
L164:
  lea    -0x58(%rbp),%rax
  add    $0x5,%rax
  mov    -0x68(%rbp),%edx
  mov    %edx,%ecx
  lea    D5(%rip),%rdx
  mov    $0x3,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  test   %eax,%eax
  jg     L172
  lea    -0x58(%rbp),%rax
  mov    %rax,%rsi
  lea    D145(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L12
L172:
  lea    -0x50(%rbp),%rcx
  lea    -0x58(%rbp),%rdx
  mov    -0x90(%rbp),%rsi
  mov    -0x84(%rbp),%eax
  mov    %eax,%edi
  call   <get_FITS_key@plt>
  mov    %eax,-0x60(%rbp)
  cmpl   $0xffffffff,-0x60(%rbp)
  jne    L39
  lea    -0x58(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L12
L39:
  mov    -0x68(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x60(%rbp)
  je     L0
  lea    -0x58(%rbp),%rax
  mov    %rax,%rsi
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L0:
  lea    -0x6c(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %eax,%eax
  jg     L198
  lea    -0x58(%rbp),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L12
L198:
  mov    -0x6c(%rbp),%eax
  mov    -0x64(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x64(%rbp)
  addl   $0x1,-0x68(%rbp)
L59:
  mov    -0x70(%rbp),%eax
  cmp    %eax,-0x68(%rbp)
  jle    L164
  mov    -0x64(%rbp),%eax
L12:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L174
  call   <__stack_chk_fail@plt>
L174:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D18
data_type: string
name: read_data
arguments: label: D93
data_type: string
name: read_data
arguments: label: D139
data_type: string
name: read_data
arguments: label: D5
data_type: string
name: read_data
arguments: label: D111
data_type: string
name: read_data
arguments: label: D29
data_type: string
name: read_data
arguments: label: D32
data_type: string
name: read_data
arguments: label: D49
data_type: string
name: read_data
arguments: label: D35
data_type: string
name: read_data
arguments: label: D145
data_type: string
name: read_data
arguments: label: D10
data_type: string
name: read_data
arguments: label: D72
data_type: string
name: read_data
arguments: label: D24
data_type: string

tool: D18: BITPIX

tool: D93: 
	ERROR! FITS_image_size(): BITPIX not found in the header

tool: D139: 
	WARNING! header does not conform to FITS standard (BITPIX)

tool: D5: %d

tool: D111: 
	ERROR! FITS_image_size(): reading BITPIX

tool: D29: NAXIS

tool: D32: 
	ERROR! FITS_image_size(): NAXIS not found in the header

tool: D49: 
	WARNING! header does not conform to FITS standard (NAXIS)

tool: D35: 
	ERROR! FITS_image_size(): reading NAXIS

tool: D145: 
	ERROR! FITS_image_size(): %s


tool: D10: 
	ERROR! FITS_image_size(): %s not found in the header


tool: D72: 
	WARNING! header does not conform to FITS standard (%s)


tool: D24: 
	ERROR! FITS_image_size(): reading %s


assistant: ```c
int FITS_image_size(const int ncards, char **header) {
  char val[70], keyword[8];
  int i, p, bitpix, bytepix, naxis, naxisn, size;
  memset(val, ' ', 70);
  if ((p = get_FITS_key(ncards, header, "BITPIX", val)) == -1) {
    printf("\n\tERROR! FITS_image_size(): BITPIX not found in the header\n");
    return (0);
  }
  if (p != 1)
    printf("\n\tWARNING! header does not conform to FITS standard (BITPIX)\n");
  if (sscanf(val, "%d", &bitpix) < 1) {
    printf("\n\tERROR! FITS_image_size(): reading BITPIX\n");
    return (0);
  }
  bytepix = abs(bitpix) / 8;
  strcpy(keyword, "NAXIS");
  if ((p = get_FITS_key(ncards, header, keyword, val)) == -1) {
    printf("\n\tERROR! FITS_image_size(): NAXIS not found in the header\n");
    return (0);
  }
  if (p != 2)
    printf("\n\tWARNING! header does not conform to FITS standard (NAXIS)\n");
  if (sscanf(val, "%d", &naxis) < 1) {
    printf("\n\tERROR! FITS_image_size(): reading NAXIS\n");
    return (0);
  }
  if (naxis == 0)
    return (0);
  size = bytepix;
  for (i = 1; i <= naxis; i++) {
    if (snprintf((keyword + 5), 8 - 5, "%d", i) < 1) {
      printf("\n\tERROR! FITS_image_size(): %s\n", keyword);
      return (0);
    }
    if ((p = get_FITS_key(ncards, header, keyword, val)) == -1) {
      printf("\n\tERROR! FITS_image_size(): %s not found in the header\n", keyword);
      return (0);
    }
    if (p != i + 2)
      printf("\n\tWARNING! header does not conform to FITS standard (%s)\n", keyword);
    if (sscanf(val, "%d", &naxisn) < 1) {
      printf("\n\tERROR! FITS_image_size(): reading %s\n", keyword);
      return (0);
    }
    size *= naxisn;
  }
  return (size);
}
```