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

```asm
<tile_to_linear_4x2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x44(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L18
L7:
  movl   $0x0,-0x20(%rbp)
  jmp    L79
L12:
  mov    -0x24(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x48(%rbp),%esi
  mov    -0x44(%rbp),%eax
  mov    %eax,%edi
  call   <tile_4x2_read@plt>
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L13
L66:
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  add    $0x10,%eax
  cmp    %eax,-0x18(%rbp)
  jbe    L73
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x3,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xc(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xb(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x3,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x9(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x4,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x5,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x6,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x7,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x4,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xc(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x5,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xb(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x6,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x7,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x9(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x8,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x9,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xa,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xb,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x8,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xc(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0x9,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xb(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0xa,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0xb,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x9(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xc,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xd,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xe,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  mov    -0x1c(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0xf,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0xc,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xc(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0xd,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xb(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0xe,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  add    $0xf,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x9(%rbp),%eax
  mov    %al,(%rdx)
  jmp    L22
L73:
  nop
L22:
  addl   $0x1,-0x1c(%rbp)
L13:
  cmpl   $0xf,-0x1c(%rbp)
  jbe    L66
  addl   $0x10,-0x20(%rbp)
L79:
  mov    -0x20(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jb     L12
  addl   $0x10,-0x24(%rbp)
L18:
  mov    -0x24(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jb     L7
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

assistant: ```c
void tile_to_linear_4x2(unsigned char *p_linear_addr, unsigned char *p_tiled_addr, unsigned int x_size, unsigned int y_size) {
  int trans_addr;
  unsigned int i, j, k, index;
  unsigned char data8[4];
  unsigned int max_index = x_size * y_size;
  for (i = 0; i < y_size; i = i + 16) {
    for (j = 0; j < x_size; j = j + 16) {
      trans_addr = tile_4x2_read(x_size, y_size, j, i);
      for (k = 0; k < 16; k++) {
        index = (i * x_size) + (x_size * k) + j;
        if (index + 16 >= max_index) {
          continue;
        }
        data8[0] = p_tiled_addr[trans_addr + 64 * k + 0];
        data8[1] = p_tiled_addr[trans_addr + 64 * k + 1];
        data8[2] = p_tiled_addr[trans_addr + 64 * k + 2];
        data8[3] = p_tiled_addr[trans_addr + 64 * k + 3];
        p_linear_addr[i * x_size + x_size * k + j] = data8[0];
        p_linear_addr[i * x_size + x_size * k + j + 1] = data8[1];
        p_linear_addr[i * x_size + x_size * k + j + 2] = data8[2];
        p_linear_addr[i * x_size + x_size * k + j + 3] = data8[3];
        data8[0] = p_tiled_addr[trans_addr + 64 * k + 4];
        data8[1] = p_tiled_addr[trans_addr + 64 * k + 5];
        data8[2] = p_tiled_addr[trans_addr + 64 * k + 6];
        data8[3] = p_tiled_addr[trans_addr + 64 * k + 7];
        p_linear_addr[i * x_size + x_size * k + j + 4] = data8[0];
        p_linear_addr[i * x_size + x_size * k + j + 5] = data8[1];
        p_linear_addr[i * x_size + x_size * k + j + 6] = data8[2];
        p_linear_addr[i * x_size + x_size * k + j + 7] = data8[3];
        data8[0] = p_tiled_addr[trans_addr + 64 * k + 8];
        data8[1] = p_tiled_addr[trans_addr + 64 * k + 9];
        data8[2] = p_tiled_addr[trans_addr + 64 * k + 10];
        data8[3] = p_tiled_addr[trans_addr + 64 * k + 11];
        p_linear_addr[i * x_size + x_size * k + j + 8] = data8[0];
        p_linear_addr[i * x_size + x_size * k + j + 9] = data8[1];
        p_linear_addr[i * x_size + x_size * k + j + 10] = data8[2];
        p_linear_addr[i * x_size + x_size * k + j + 11] = data8[3];
        data8[0] = p_tiled_addr[trans_addr + 64 * k + 12];
        data8[1] = p_tiled_addr[trans_addr + 64 * k + 13];
        data8[2] = p_tiled_addr[trans_addr + 64 * k + 14];
        data8[3] = p_tiled_addr[trans_addr + 64 * k + 15];
        p_linear_addr[i * x_size + x_size * k + j + 12] = data8[0];
        p_linear_addr[i * x_size + x_size * k + j + 13] = data8[1];
        p_linear_addr[i * x_size + x_size * k + j + 14] = data8[2];
        p_linear_addr[i * x_size + x_size * k + j + 15] = data8[3];
      }
    }
  }
}
```