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

```asm
<create_main>:
  endbr64
  push   %r15
  lea    D140(%rip),%rsi
  push   %r14
  push   %r13
  push   %r12
  lea    D58(%rip),%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
  lea    D74(%rip),%rdi
  call   <fopen@plt>
  mov    %r12,%rdi
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %rax,%rbp
  mov    %rax,%rcx
  call   <fwrite@plt>
  mov    %r12,%rdi
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D124(%rip),%r12
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D83(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D206(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0x21,%edx
  mov    $0x1,%esi
  lea    D136(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D122(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D78(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D188(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x12,%edx
  mov    $0x1,%esi
  lea    D224(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D48(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D171(%rip),%rdi
  call   <fwrite@plt>
  lea    D156(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  lea    D38(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  lea    D125(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %rbp,%rcx
  mov    $0x11,%edx
  mov    %r12,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
  test   %ebx,%ebx
  jle    L14
  xor    %ebx,%ebx
  lea    D155(%rip),%r15
  lea    D153(%rip),%r14
  lea    D157(%rip),%r13
  nopw   0x0(%rax,%rax,1)
L5:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %ebx,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %rbp,%rcx
  mov    $0x11,%edx
  mov    %r12,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %ebx,%edx
  lea    D60(%rip),%rsi
  xor    %eax,%eax
  mov    %rbp,%rdi
  add    $0x1,%ebx
  call   <fprintf@plt>
  cmp    %ebx,0xc(%rsp)
  jne    L5
L14:
  mov    %rbp,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D200(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D5(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D226(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D26(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D140
type_guessed: string
name: unpack_data
arguments: data_label: D58
type_guessed: string
name: unpack_data
arguments: data_label: D74
type_guessed: string
name: unpack_data
arguments: data_label: D124
type_guessed: string
name: unpack_data
arguments: data_label: D83
type_guessed: string
name: unpack_data
arguments: data_label: D206
type_guessed: string
name: unpack_data
arguments: data_label: D136
type_guessed: string
name: unpack_data
arguments: data_label: D122
type_guessed: string
name: unpack_data
arguments: data_label: D78
type_guessed: string
name: unpack_data
arguments: data_label: D188
type_guessed: string
name: unpack_data
arguments: data_label: D224
type_guessed: string
name: unpack_data
arguments: data_label: D48
type_guessed: string
name: unpack_data
arguments: data_label: D171
type_guessed: string
name: unpack_data
arguments: data_label: D156
type_guessed: string
name: unpack_data
arguments: data_label: D38
type_guessed: string
name: unpack_data
arguments: data_label: D125
type_guessed: string
name: unpack_data
arguments: data_label: D155
type_guessed: string
name: unpack_data
arguments: data_label: D153
type_guessed: string
name: unpack_data
arguments: data_label: D157
type_guessed: string
name: unpack_data
arguments: data_label: D60
type_guessed: string
name: unpack_data
arguments: data_label: D200
type_guessed: string
name: unpack_data
arguments: data_label: D5
type_guessed: string
name: unpack_data
arguments: data_label: D226
type_guessed: string
name: unpack_data
arguments: data_label: D26
type_guessed: string

tool: D140: w+

tool: D58: //


tool: D74: FOO_main.c

tool: D124: 	".align 16\n\t"


tool: D83: #include <stdio.h>


tool: D206: #include <stdlib.h>


tool: D136: int main(int argc, char* argv[])


tool: D122: {


tool: D78: 	long i=0;


tool: D188: 	long j,k;


tool: D224: 	j=atol(argv[1]);


tool: D48: 	for(k=0;k<j;k++){


tool: D171: 	__asm__( 


tool: D156: 	"xorq   %%rdx, %%rdx\n\t"


tool: D38: 	"xorq   %%rcx, %%rcx\n\t"


tool: D125: 	"inc   %%rcx\n\t"


tool: D155: 	"cmp   %%rdx, %%rcx\n\t"


tool: D153: 	"je LP_%06d\n\t"


tool: D157: 	"xorq   %%rdx, %%rcx\n\t"


tool: D60: 	"LP_%06d:\n\t"


tool: D200: 	);


tool: D5: 	}


tool: D226: 	return 0;


tool: D26: }


assistant: ```c
int create_main(int max_depth) {
  int i, j, k, rval;
  FILE *fp_main;
  char filename[100];
  fp_main = fopen("FOO_main.c", "w+");
  fprintf(fp_main, "//\n");
  fprintf(fp_main, "//\n");
  fprintf(fp_main, "#include <stdio.h>\n");
  fprintf(fp_main, "#include <stdlib.h>\n");
  fprintf(fp_main, "\n");
  fprintf(fp_main, "int main(int argc, char* argv[])\n");
  fprintf(fp_main, "{\n");
  fprintf(fp_main, "\tlong i=0;\n");
  fprintf(fp_main, "\tlong j,k;\n");
  fprintf(fp_main, "\tj=atol(argv[1]);\n");
  fprintf(fp_main, "\tfor(k=0;k<j;k++){\n");
  fprintf(fp_main, "\t__asm__( \n");
  fprintf(fp_main, "\t\"xorq   %%rdx, %%rdx\\n\\t\"\n");
  fprintf(fp_main, "\t\"xorq   %%rcx, %%rcx\\n\\t\"\n");
  fprintf(fp_main, "\t\"inc   %%rcx\\n\\t\"\n");
  fprintf(fp_main, "\t\".align 16\\n\\t\"\n");
  for (j = 0; j < max_depth; j++) {
    fprintf(fp_main, "\t\"cmp   %%rdx, %%rcx\\n\\t\"\n");
    fprintf(fp_main, "\t\"je LP_%06d\\n\\t\"\n", j);
    fprintf(fp_main, "\t\"xorq   %%rdx, %%rcx\\n\\t\"\n");
    fprintf(fp_main, "\t\".align 16\\n\\t\"\n");
    fprintf(fp_main, "\t\"LP_%06d:\\n\\t\"\n", j);
  }
  fprintf(fp_main, "\t);\n");
  fprintf(fp_main, "\t}\n");
  fprintf(fp_main, "\n");
  fprintf(fp_main, "\treturn 0;\n");
  fprintf(fp_main, "}\n");
  rval = fclose(fp_main);
  return 0;
}
```