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

```asm
<create_main>:
  endbr64
  push   %r15
  lea    D229(%rip),%rsi
  push   %r14
  push   %r13
  push   %r12
  lea    D160(%rip),%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
  lea    D63(%rip),%rdi
  call   <fopen@plt>
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r12,%rdi
  mov    %rax,%rbp
  mov    %rax,%rcx
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    %r12,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D128(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D205(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0x21,%edx
  mov    $0x1,%esi
  lea    D19(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D101(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D98(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D197(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x12,%edx
  mov    $0x1,%esi
  lea    D110(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D65(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D208(%rip),%rdi
  call   <fwrite@plt>
  lea    D13(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  lea    D122(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %rbp,%rcx
  mov    $0x11,%edx
  mov    $0x1,%esi
  lea    D72(%rip),%rdi
  call   <fwrite@plt>
  test   %ebx,%ebx
  jle    L10
  xor    %ebx,%ebx
  lea    D138(%rip),%r15
  lea    D213(%rip),%r14
  lea    D29(%rip),%r13
  lea    D16(%rip),%r12
  nopw   0x0(%rax,%rax,1)
L14:
  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    %ebx,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <fprintf@plt>
  cmp    %ebx,0xc(%rsp)
  jne    L14
L10:
  mov    %rbp,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D80(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D11(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D118(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D25(%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: disassemble_data
arguments: data_label: D229
type_guessed: string
name: disassemble_data
arguments: data_label: D160
type_guessed: string
name: disassemble_data
arguments: data_label: D63
type_guessed: string
name: disassemble_data
arguments: data_label: D128
type_guessed: string
name: disassemble_data
arguments: data_label: D205
type_guessed: string
name: disassemble_data
arguments: data_label: D19
type_guessed: string
name: disassemble_data
arguments: data_label: D101
type_guessed: string
name: disassemble_data
arguments: data_label: D98
type_guessed: string
name: disassemble_data
arguments: data_label: D197
type_guessed: string
name: disassemble_data
arguments: data_label: D110
type_guessed: string
name: disassemble_data
arguments: data_label: D65
type_guessed: string
name: disassemble_data
arguments: data_label: D208
type_guessed: string
name: disassemble_data
arguments: data_label: D13
type_guessed: string
name: disassemble_data
arguments: data_label: D122
type_guessed: string
name: disassemble_data
arguments: data_label: D72
type_guessed: string
name: disassemble_data
arguments: data_label: D138
type_guessed: string
name: disassemble_data
arguments: data_label: D213
type_guessed: string
name: disassemble_data
arguments: data_label: D29
type_guessed: string
name: disassemble_data
arguments: data_label: D16
type_guessed: string
name: disassemble_data
arguments: data_label: D80
type_guessed: string
name: disassemble_data
arguments: data_label: D11
type_guessed: string
name: disassemble_data
arguments: data_label: D118
type_guessed: string
name: disassemble_data
arguments: data_label: D25
type_guessed: string

tool: D229: w+

tool: D160: //


tool: D63: FOO_main.c

tool: D128: #include <stdio.h>


tool: D205: #include <stdlib.h>


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


tool: D101: {


tool: D98: 	long i=0;


tool: D197: 	long j,k;


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


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


tool: D208: 	__asm__( 


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


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


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


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


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


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


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


tool: D80: 	);


tool: D11: 	}


tool: D118: 	return 0;


tool: D25: }


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\".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\"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;
}
```