user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  lea    D145(%rip),%rsi
  lea    D28(%rip),%rdi
  push   %r14
  lea    D65(%rip),%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <fopen@plt>
  mov    $0xc8,%ecx
  mov    $0xc8,%edx
  lea    D146(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r13
  xor    %eax,%eax
  call   <fprintf@plt>
  movl   $0x1,0xc(%rsp)
L3:
  pxor   %xmm0,%xmm0
  mov    $0x1,%ebp
  cvtsi2sdl 0xc(%rsp),%xmm0
  divsd  D56(%rip),%xmm0
  cvttsd2si %xmm0,%r12d
  xchg   %ax,%ax
L20:
  mov    %r12d,%edi
  call   <sin@plt>
  movq   %xmm0,%rbx
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  divsd  D56(%rip),%xmm0
  add    $0x1,%ebp
  cvttsd2si %xmm0,%edi
  call   <cos@plt>
  mov    %eax,%edi
  call   <floor@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  mulsd  D63(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  call   <fabs@plt>
  mov    %r12d,%edi
  mov    %rax,%rbx
  call   <cos@plt>
  mov    %r12d,%edi
  imul   %ebx,%eax
  mov    %eax,0x8(%rsp)
  call   <cos@plt>
  mov    0x8(%rsp),%r8d
  mov    %ebx,%edx
  mov    %r14,%rsi
  imul   %ebx,%eax
  mov    %r13,%rdi
  mov    %eax,%ecx
  xor    %eax,%eax
  call   <fprintf@plt>
  cmp    $0xc9,%ebp
  jne    L20
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    $0xc9,%eax
  jne    L3
  mov    %r13,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L14
L7:
  lea    D34(%rip),%rbp
  lea    D145(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    $0x2e,%edx
  mov    $0x1,%esi
  lea    D61(%rip),%rdi
  mov    %rax,%r12
  mov    %rax,%rcx
  call   <fwrite@plt>
  mov    %r12,%rdi
  lea    D16(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rdi
  lea    D138(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D68(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x33,%edx
  mov    $0x1,%esi
  lea    D49(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  lea    D85(%rip),%rdi
  call   <printf@plt>
  jmp    L7
```

tool_calls: name: unpack_data
arguments: tag: D145
type_guessed: string
name: unpack_data
arguments: tag: D28
type_guessed: string
name: unpack_data
arguments: tag: D65
type_guessed: string
name: unpack_data
arguments: tag: D146
type_guessed: string
name: unpack_data
arguments: tag: D56
type_guessed: f64
name: unpack_data
arguments: tag: D63
type_guessed: f64
name: unpack_data
arguments: tag: D34
type_guessed: string
name: unpack_data
arguments: tag: D61
type_guessed: string
name: unpack_data
arguments: tag: D16
type_guessed: string
name: unpack_data
arguments: tag: D138
type_guessed: string
name: unpack_data
arguments: tag: D68
type_guessed: string
name: unpack_data
arguments: tag: D49
type_guessed: string
name: unpack_data
arguments: tag: D85
type_guessed: string

tool: D145: w

tool: D28: ImageOutput3.ppm

tool: D65: %d
%d
%d


tool: D146: P3
%d %d
255


tool: D56: 10

tool: D63: 255

tool: D34: startGimp.bat

tool: D61: set DefaultGimp = C:\Program Files\GIMP 2\bin\

tool: D16: 
if not exist %%DefaultGimp%%gimp goto ERROR

tool: D138: 
set PATH =;%%PATH%%;%%DefaultGimp%%;

tool: D68: 
gimp ImageOutput3.ppm

tool: D49: 
:ERROR 
echo Something happened, exiting!
pause
cd

tool: D85: There was an error in closing the file.


assistant: ```c
int main() {
  int height = 200;
  int width = 200;
  int col = 0;
  int i, j, s;
  FILE *fout;
  fout = fopen("ImageOutput3.ppm", "w");
  fprintf(fout, "P3\n%d %d\n255\n", width, height);
  for (i = 1; i <= width; i++) {
    for (j = 1; j <= height; j++) {
      col = (int)fabs(255.0 * sin(i / 10.0) * floor(cos(j / 10.0)));
      fprintf(fout, "%d\n%d\n%d\n", (int)col, (int)col * cos(i / 10.0), (int)col * cos(i / 10.0));
    }
  }
  if (fclose(fout) != 0) {
    printf("There was an error in closing the file.\n");
  }
  fout = fopen("startGimp.bat", "w");
  fprintf(fout, "set DefaultGimp = C:\\Program Files\\GIMP 2\\bin\\");
  fprintf(fout, "\nif not exist %%DefaultGimp%%\gimp goto ERROR");
  fprintf(fout, "\nset PATH =;%%PATH%%;%%DefaultGimp%%;");
  fprintf(fout, "\ngimp ImageOutput3.ppm");
  fprintf(fout, "\n:ERROR \necho Something happened, exiting!\npause\ncd");
  s = system("startGimp.bat");
  return 0;
}
```