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

```asm
<main>:
  endbr64
  push   %r13
  mov    %edi,%r8d
  pxor   %xmm0,%xmm0
  mov    $0x7e,%ecx
  push   %r12
  mov    $0x100000,%r13d
  mov    $0x1,%r12d
  push   %rbp
  sub    $0x410,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdi
  movaps %xmm0,(%rsp)
  rep stos %rax,%es:(%rdi)
  cmp    $0x2,%r8d
  je     L19
L13:
  xor    %eax,%eax
  mov    %rsp,%rbp
  call   <getpid@plt>
  lea    D16(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%edx
  call   <sprintf@plt>
  mov    $0x4,%esi
  lea    D38(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x4,%esi
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x8,%esi
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x8,%esi
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  lea    D10(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%esi
  lea    D58(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13d,%edx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  call   <write_a_file@plt>
  mov    %r12d,%esi
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13d,%edx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  call   <check_a_file@plt>
  mov    %rbp,%rdi
  call   <delete_file@plt>
  xor    %eax,%eax
  call   <exit_success@plt>
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x410,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L19:
  mov    0x8(%rsi),%rdi
  call   <atoi@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jle    L38
L2:
  mov    %r12d,%r13d
  shl    $0x14,%r13d
  jmp    L13
L38:
  lea    D67(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <exit_failure@plt>
  jmp    L2
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D16
type_infered: string
name: disassemble_data
arguments: data_tag: D38
type_infered: string
name: disassemble_data
arguments: data_tag: D28
type_infered: string
name: disassemble_data
arguments: data_tag: D1
type_infered: string
name: disassemble_data
arguments: data_tag: D37
type_infered: string
name: disassemble_data
arguments: data_tag: D10
type_infered: string
name: disassemble_data
arguments: data_tag: D58
type_infered: string
name: disassemble_data
arguments: data_tag: D40
type_infered: string
name: disassemble_data
arguments: data_tag: D67
type_infered: string

tool: D16: ./lfs-test.%u

tool: D38: sizeof int = %u


tool: D28: sizeof off_t = %u


tool: D1: sizeof long = %u


tool: D37: sizeof long long = %u


tool: D10: Creating/Using file: %s


tool: D58: Creating a %d gig file


tool: D40: Verifying the %d gig file


tool: D67: Please supply a natural number of gigs.

assistant: ```c
int main(int argc, char *argv[]) {
  int gigs = 1;
  char file[1024] = {'\0'};
  if (argc == 2) {
    gigs = atoi(argv[1]);
    if (gigs == 0 || gigs < 0) {
      printf("Please supply a natural number of gigs.\n");
      exit_failure();
    }
  }
  sprintf(file, "./lfs-test.%u", (unsigned int)getpid());
  printf("sizeof int = %u\n", (unsigned int)sizeof(int));
  printf("sizeof off_t = %u\n", (unsigned int)sizeof(off_t));
  printf("sizeof long = %u\n", (unsigned int)sizeof(long));
  printf("sizeof long long = %u\n", (unsigned int)sizeof(long long));
  printf("Creating/Using file: %s\n", file);
  printf("Creating a %d gig file\n", gigs);
  write_a_file(file, 1024, (1024 * 1024) * gigs);
  printf("Verifying the %d gig file\n", gigs);
  check_a_file(file, 1024, (1024 * 1024) * gigs);
  delete_file(file);
  exit_success();
  return 0;
}
```