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

```asm
<gen_run_length_table>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %edi,%edi
  jne    L18
  lea    D93(%rip),%rdi
  mov    %esi,%r13d
  xor    %eax,%eax
  mov    %rdx,%rsi
  call   <printf@plt>
  lea    D35(%rip),%rdi
  xor    %r12d,%r12d
  lea    D46(%rip),%r14
  call   <puts@plt>
  lea    D80(%rip),%rdi
  lea    D6(%rip),%r15
  call   <puts@plt>
L95:
  lea    D43(%rip),%rdi
  xor    %ebx,%ebx
  call   <puts@plt>
  jmp    L23
  nopw   0x0(%rax,%rax,1)
L36:
  mov    %r12d,%esi
  mov    %ebx,%edi
  mov    %r13d,%edx
  call   <count_run@plt>
  mov    %r14,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    $0xff,%ebx
  je     L107
  mov    $0x2c,%edi
  call   <putchar@plt>
  cmp    $0xf,%ebp
  je     L107
L104:
  mov    $0x20,%edi
  add    $0x1,%ebx
  call   <putchar@plt>
  cmp    $0x100,%ebx
  je     L74
L23:
  mov    %ebx,%ebp
  and    $0xf,%ebp
  jne    L36
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%esi
  mov    %ebx,%edi
  mov    %r13d,%edx
  call   <count_run@plt>
  mov    %r14,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    $0xff,%ebx
  je     L107
  mov    $0x2c,%edi
  call   <putchar@plt>
  jmp    L104
  nopl   0x0(%rax,%rax,1)
L107:
  mov    $0xa,%edi
  add    $0x1,%ebx
  call   <putchar@plt>
  cmp    $0x100,%ebx
  jne    L23
L74:
  xor    %eax,%eax
  lea    D105(%rip),%rdi
  call   <printf@plt>
  cmp    $0x7,%r12d
  je     L48
  mov    $0x2c,%edi
  add    $0x1,%r12d
  call   <putchar@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L95
L48:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D88(%rip),%rdi
L24:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <puts@plt>
L18:
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D93(%rip),%rdi
  mov    %rbp,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D97(%rip),%rdi
  jmp    L24
```

tool_calls: name: parse_data
arguments: label: D93
type_infered: string
name: parse_data
arguments: label: D35
type_infered: string
name: parse_data
arguments: label: D46
type_infered: string
name: parse_data
arguments: label: D80
type_infered: string
name: parse_data
arguments: label: D6
type_infered: string
name: parse_data
arguments: label: D43
type_infered: string
name: parse_data
arguments: label: D105
type_infered: string
name: parse_data
arguments: label: D88
type_infered: string
name: parse_data
arguments: label: D70
type_infered: string
name: parse_data
arguments: label: D97
type_infered: string

tool: D93: const uint8_t %s [8][256]

tool: D35:  =

tool: D46: %d

tool: D80: {

tool: D6:   

tool: D43:   {

tool: D105:   }

tool: D88: };

tool: D70: extern 

tool: D97: ;

assistant: ```c
void gen_run_length_table(bool header, int val, char *name) {
  int i, j;
  if (header)
    printf("extern ");
  printf("const uint8_t %s [8][256]", name);
  if (header) {
    printf(";\n");
    return;
  }
  printf(" =\n");
  printf("{\n");
  for (i = 0; i < 8; i++) {
    printf("  {\n");
    for (j = 0; j < 256; j++) {
      if ((j & 15) == 0)
        printf("  ");
      printf("%d", count_run(j, i, val));
      if (j != 0xff)
        printf(",");
      if ((j & 15) == 15)
        printf("\n");
      else
        printf(" ");
    }
    printf("  }");
    if (i != 7)
      printf(",");
    printf("\n");
  }
  printf("};\n");
}
```