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

```asm
<fold_dotstream>:
  endbr64
  push   %r15
  mov    %esi,%r8d
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  sub    $0x28,%rsp
  and    $0x1,%edx
  mov    %rdi,0x10(%rsp)
  jne    L40
  movq   $0x0,0x8(%rsp)
  movslq %esi,%r12
  movl   $0x0,0x1c(%rsp)
  test   %esi,%esi
  jle    L129
  nopl   0x0(%rax)
L97:
  mov    0x8(%rsp),%rax
  xor    %r14d,%r14d
  mov    %eax,%r11d
  mov    %eax,%ebx
  lea    0x0(%r13,%rax,1),%r15
  test   %ebp,%ebp
  jg     L105
  jmp    L73
L75:
  add    $0x1,%r14d
  mov    %al,(%r15)
  add    %r12,%r15
  cmp    %r14d,%ebp
  je     L73
L105:
  lea    (%r14,%r11,1),%edx
  mov    $0x20,%eax
  and    $0x1,%edx
  jne    L75
  mov    %r8d,%edx
  mov    %ebp,%ecx
  mov    %r14d,%esi
  mov    %ebx,%edi
  mov    %r11d,0x18(%rsp)
  mov    %r8d,0x4(%rsp)
  call   <is_corner@plt>
  mov    0x4(%rsp),%r8d
  mov    0x18(%rsp),%r11d
  mov    %rax,%r9
  mov    $0x43,%eax
  test   %r9,%r9
  jne    L75
  movslq 0x1c(%rsp),%rax
  mov    0x10(%rsp),%rdi
  add    $0x1,%r14d
  mov    %rax,%rcx
  movzbl (%rdi,%rax,1),%eax
  lea    0x1(%rcx),%esi
  mov    %al,(%r15)
  add    %r12,%r15
  mov    %esi,0x1c(%rsp)
  cmp    %r14d,%ebp
  jne    L105
  nopl   0x0(%rax)
L73:
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    %rax,%r12
  jne    L97
  movslq 0x1c(%rsp),%r11
  mov    %r11,%rax
  add    0x10(%rsp),%r11
  lea    0x1(%rax),%edi
  lea    0x2(%rax),%edx
  lea    0x3(%rax),%esi
  lea    0x4(%rax),%ecx
  add    $0x5,%eax
  movslq %edi,%rdi
  movslq %edx,%rdx
  movslq %esi,%rsi
  movslq %ecx,%rcx
  cltq
L48:
  sub    $0x1,%ebp
  movzbl (%r11),%r11d
  mov    0x10(%rsp),%r10
  imul   %r8d,%ebp
  movslq %ebp,%rbx
  sub    %r8d,%ebp
  mov    %r11b,-0x1(%r13,%rbx,1)
  movzbl (%r10,%rdi,1),%r11d
  movslq %ebp,%rdi
  mov    %r11b,0x0(%r13,%rdi,1)
  movzbl (%r10,%rdx,1),%edi
  lea    0x0(%rbp,%r8,2),%edx
  movslq %edx,%rdx
  mov    %dil,-0x2(%r13,%rdx,1)
  movzbl (%r10,%rsi,1),%edx
  mov    %dl,0x1(%r13,%rbx,1)
  movzbl (%r10,%rcx,1),%edx
  mov    %dl,-0x1(%r13,%r12,1)
  movzbl (%r10,%rax,1),%eax
  mov    %al,0x0(%r13)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L40:
  test   %ebp,%ebp
  jle    L193
  lea    -0x1(%rbp),%r15d
  movl   $0x0,0x18(%rsp)
  xor    %r12d,%r12d
  imul   %esi,%r15d
  mov    %r15d,0x8(%rsp)
  xor    %r15d,%r15d
  nopl   0x0(%rax,%rax,1)
L71:
  mov    0x8(%rsp),%r14d
  xor    %ebx,%ebx
  test   %r8d,%r8d
  jg     L192
  jmp    L51
  cs nopw 0x0(%rax,%rax,1)
L165:
  movslq %r14d,%rax
  movb   $0x20,0x0(%r13,%rax,1)
L59:
  add    $0x1,%ebx
  add    $0x1,%r14d
  cmp    %ebx,%r8d
  je     L51
L192:
  lea    (%r15,%rbx,1),%eax
  test   $0x1,%al
  jne    L165
  mov    %r8d,%edx
  mov    %ebp,%ecx
  mov    %r15d,%esi
  mov    %ebx,%edi
  mov    %r8d,0x4(%rsp)
  call   <is_corner@plt>
  mov    0x4(%rsp),%r8d
  test   %rax,%rax
  je     L53
  mov    0x18(%rsp),%eax
  add    $0x1,%r14d
  add    %ebx,%eax
  add    $0x1,%ebx
  cltq
  movb   $0x43,0x0(%r13,%rax,1)
  cmp    %ebx,%r8d
  jne    L192
  nopl   0x0(%rax)
L51:
  add    $0x1,%r15d
  add    %r8d,0x18(%rsp)
  sub    %r8d,0x8(%rsp)
  cmp    %r15d,%ebp
  jne    L71
  lea    0x1(%r12),%edi
  lea    0x2(%r12),%eax
  movslq %r12d,%r10
  add    0x10(%rsp),%r10
  lea    0x3(%r12),%esi
  lea    0x4(%r12),%ecx
  movslq %edi,%rdi
  cltq
  lea    0x5(%r12),%edx
  movslq %esi,%rsi
  movslq %ecx,%rcx
  movslq %edx,%rdx
L16:
  movzbl (%r10),%r11d
  mov    0x10(%rsp),%rbx
  imul   %r8d,%ebp
  movslq %r8d,%r10
  mov    %r11b,-0x2(%r13,%r10,1)
  movzbl (%rbx,%rdi,1),%r10d
  movslq %ebp,%rdi
  sub    %r8d,%ebp
  mov    %r10b,-0x2(%r13,%rdi,1)
  movzbl (%rbx,%rax,1),%edi
  lea    (%r8,%r8,1),%eax
  cltq
  mov    %dil,-0x1(%r13,%rax,1)
  movzbl (%rbx,%rsi,1),%esi
  movslq %ebp,%rax
  mov    %sil,-0x1(%r13,%rax,1)
  movzbl (%rbx,%rcx,1),%ecx
  mov    %cl,0x0(%r13)
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x0(%r13,%rax,1)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L53:
  mov    0x10(%rsp),%rsi
  movslq %r12d,%rax
  add    $0x1,%r12d
  movzbl (%rsi,%rax,1),%edx
  movslq %r14d,%rax
  mov    %dl,0x0(%r13,%rax,1)
  jmp    L59
L129:
  mov    %rdi,%r11
  mov    $0x5,%eax
  mov    $0x4,%ecx
  mov    $0x3,%esi
  mov    $0x2,%edx
  mov    $0x1,%edi
  jmp    L48
L193:
  mov    %rdi,%r10
  mov    $0x5,%edx
  mov    $0x4,%ecx
  mov    $0x3,%esi
  mov    $0x2,%eax
  mov    $0x1,%edi
  jmp    L16
```

assistant: ```c
void fold_dotstream(char dot_stream[], int width, int height, char dot_array[]) {
  int column, row;
  int input_position = 0;
  if (height % 2) {
    for (row = 0; row < height; row++) {
      for (column = 0; column < width; column++) {
        if (!((column + row) % 2)) {
          if (is_corner(column, row, width, height)) {
            dot_array[(row * width) + column] = 'C';
          } else {
            dot_array[((height - row - 1) * width) + column] = dot_stream[input_position];
            input_position++;
          }
        } else {
          dot_array[((height - row - 1) * width) + column] = ' ';
        }
      }
    }
    dot_array[width - 2] = dot_stream[input_position];
    input_position++;
    dot_array[(height * width) - 2] = dot_stream[input_position];
    input_position++;
    dot_array[(width * 2) - 1] = dot_stream[input_position];
    input_position++;
    dot_array[((height - 1) * width) - 1] = dot_stream[input_position];
    input_position++;
    dot_array[0] = dot_stream[input_position];
    input_position++;
    dot_array[(height - 1) * width] = dot_stream[input_position];
  } else {
    for (column = 0; column < width; column++) {
      for (row = 0; row < height; row++) {
        if (!((column + row) % 2)) {
          if (is_corner(column, row, width, height)) {
            dot_array[(row * width) + column] = 'C';
          } else {
            dot_array[(row * width) + column] = dot_stream[input_position];
            input_position++;
          }
        } else {
          dot_array[(row * width) + column] = ' ';
        }
      }
    }
    dot_array[((height - 1) * width) - 1] = dot_stream[input_position];
    input_position++;
    dot_array[(height - 2) * width] = dot_stream[input_position];
    input_position++;
    dot_array[(height * width) - 2] = dot_stream[input_position];
    input_position++;
    dot_array[((height - 1) * width) + 1] = dot_stream[input_position];
    input_position++;
    dot_array[width - 1] = dot_stream[input_position];
    input_position++;
    dot_array[0] = dot_stream[input_position];
  }
}
```