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

```asm
<main>:
  endbr64
  push   %r15
  lea    D17(%rip),%rdi
  lea    D55(%rip),%r15
  push   %r14
  lea    D49(%rip),%r14
  push   %r13
  lea    D48(%rip),%r13
  push   %r12
  mov    $0x12,%r12d
  push   %rbp
  lea    D59(%rip),%rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x18,%rsp
  call   <puts@plt>
  jmp    L6
  nopw   0x0(%rax,%rax,1)
L22:
  lea    -0x3(%rbx),%r8d
  mov    $0x1,%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %r8d,%esi
  mov    %r8d,0xc(%rsp)
  shr    $0x1f,%esi
  add    %r8d,%esi
  sar    %esi
  call   <printf@plt>
  mov    $0x2c,%edi
  call   <putchar@plt>
  mov    0xc(%rsp),%esi
  mov    $0x2,%edx
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    $0x2c,%edi
  call   <putchar@plt>
  mov    $0xc,%eax
  mov    $0x3,%edx
  mov    %rbp,%rdi
  sub    %r12d,%eax
  mov    %eax,%esi
  shr    $0x1f,%esi
  add    %eax,%esi
  xor    %eax,%eax
  sar    %esi
  call   <printf@plt>
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rdi
  call   <puts@plt>
L27:
  add    $0x1,%ebx
  sub    $0x3,%r12d
L6:
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x1(%rbx),%eax
  cmp    $0x4,%eax
  jbe    L22
  xor    %edx,%edx
  mov    $0x1,%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x2c,%edi
  call   <putchar@plt>
  mov    $0x7,%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  sub    %ebx,%edx
  mov    $0x2,%esi
  call   <printf@plt>
  mov    $0x2c,%edi
  call   <putchar@plt>
  mov    %r12d,%edx
  mov    $0x3,%esi
  mov    %rbp,%rdi
  shr    $0x1f,%edx
  xor    %eax,%eax
  add    %r12d,%edx
  sar    %edx
  call   <printf@plt>
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  cmp    $0x8,%ebx
  jne    L27
  lea    D23(%rip),%rdi
  call   <puts@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: D17
data_type: string
name: disassemble_data
arguments: data_label: D55
data_type: string
name: disassemble_data
arguments: data_label: D49
data_type: string
name: disassemble_data
arguments: data_label: D48
data_type: string
name: disassemble_data
arguments: data_label: D59
data_type: string
name: disassemble_data
arguments: data_label: D23
data_type: string

tool: D17: int direction_offsets_table[8][3] = {

tool: D55:   {

tool: D49:  }

tool: D48: ,

tool: D59: %2i*OD_FILT_BSTRIDE + %2i

tool: D23: 
};

assistant: ```c
int main(int argc, char **argv) {
  printf("int direction_offsets_table[8][3] = {\n");
  int offset[3];
  for (int dir = 0; dir < 8; dir++) {
    int k;
    int f;
    printf("  {");
    if (dir <= 4) {
      f = dir - 2;
      for (int k = 1; k <= 3; k++) {
        printf("%2i*OD_FILT_BSTRIDE + %2i", f * k / 2, k);
        if (k < 3) {
          printf(",");
        }
      }
    } else {
      f = 6 - dir;
      for (int k = 1; k <= 3; k++) {
        printf("%2i*OD_FILT_BSTRIDE + %2i", k, f * k / 2);
        if (k < 3) {
          printf(",");
        }
      }
    }
    printf(" }");
    if (dir < 15) {
      printf(",\n");
    }
  }
  printf("\n};\n");
}
```