user: What would the C source look like for the assembly code provided here:

```asm
<plot_hexagon>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    %r8d,-0x48(%rbp)
  mov    %r9d,-0x4c(%rbp)
  mov    -0x3c(%rbp),%eax
  sub    -0x44(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x40(%rbp),%eax
  sub    -0x44(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x44(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x2,-0xc(%rbp)
  jle    L33
  cmpl   $0x9,-0xc(%rbp)
  jle    L48
  cmpl   $0x0,-0x14(%rbp)
  jne    L33
L48:
  subl   $0x1,-0x24(%rbp)
L33:
  mov    -0x24(%rbp),%r9d
  mov    -0x4(%rbp),%r8d
  mov    -0x44(%rbp),%ecx
  mov    -0x40(%rbp),%edx
  mov    -0x3c(%rbp),%esi
  mov    -0x38(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x48(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <plot_hexline@plt>
  add    $0x10,%rsp
  movl   $0x0,-0x28(%rbp)
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L67
L65:
  movl   $0xffffffff,-0x20(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L223
L154:
  cmpl   $0xffffffff,-0x20(%rbp)
  je     L186
  mov    -0x3c(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movb   $0x31,(%rax)
  movl   $0x1,-0x28(%rbp)
  jmp    L23
L186:
  mov    -0x3c(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L23
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x20(%rbp)
L23:
  addl   $0x1,-0x2c(%rbp)
L223:
  mov    -0x44(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L154
  cmpl   $0x0,-0x28(%rbp)
  je     L214
  cmpl   $0xffffffff,-0x20(%rbp)
  jne    L214
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L211
L0:
  mov    -0x3c(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movb   $0x31,(%rax)
  addl   $0x1,-0x2c(%rbp)
L211:
  mov    -0x44(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L0
L214:
  addl   $0x1,-0x30(%rbp)
L67:
  mov    -0x48(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x30(%rbp)
  jl     L65
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L51
L194:
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L24
L14:
  mov    -0x3c(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L42
  mov    -0x3c(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  sub    -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  sub    -0x44(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movb   $0x31,(%rax)
L42:
  addl   $0x1,-0x2c(%rbp)
L24:
  mov    -0x44(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L14
  addl   $0x1,-0x30(%rbp)
L51:
  mov    -0x48(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x30(%rbp)
  jl     L194
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L218
L189:
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L139
L69:
  mov    -0x3c(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L208
  mov    -0x40(%rbp),%eax
  sub    0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  sub    -0x48(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movb   $0x31,(%rax)
L208:
  addl   $0x1,-0x2c(%rbp)
L139:
  mov    -0x2c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L69
  addl   $0x1,-0x30(%rbp)
L218:
  mov    -0x48(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x30(%rbp)
  jl     L189
  nop
  nop
  leave
  ret
```

assistant: ```c
void plot_hexagon(unsigned char *scaled_hexagon, const int hex_width, const int hex_height, const int hx_start, const int hy_start, const int hx_end, const int hy_end) {
  int line, i;
  int not_top;
  const int hx_width = hex_width - hx_start - hx_end;
  const int hy_height = hex_height - hx_start - hx_end;
  const int hx_width_odd = hx_width & 1;
  const int hy_height_odd = hy_height & 1;
  const int hx_radius = hx_width / 2;
  const int hy_radius = hy_height / 2;
  int start_y = hy_start + (hy_radius + 1) / 2;
  int end_x = hx_start + hx_radius;
  if (hx_radius > 2 && (hx_radius < 10 || !hx_width_odd)) {
    end_x--;
  }
  plot_hexline(scaled_hexagon, hex_width, hex_height, hx_start, start_y, end_x, hy_start);
  not_top = 0;
  for (line = hy_start; line < hy_start + hy_radius + hy_height_odd; line++) {
    int first = -1;
    for (i = hx_start; i < hx_start + hx_radius + hx_width_odd; i++) {
      if (first != -1) {
        scaled_hexagon[(hex_width * line) + i] = '1';
        not_top = 1;
      } else if (scaled_hexagon[(hex_width * line) + i] == '1') {
        first = i + 1;
      }
    }
    if (not_top && first == -1) {
      for (i = hx_start; i < hx_start + hx_radius + hx_width_odd; i++) {
        scaled_hexagon[(hex_width * line) + i] = '1';
      }
    }
  }
  for (line = hy_start; line < hy_start + hy_radius + hy_height_odd; line++) {
    for (i = hx_start; i < hx_start + hx_radius + hx_width_odd; i++) {
      if (scaled_hexagon[(hex_width * line) + i] == '1') {
        scaled_hexagon[(hex_width * line) + hex_width - hx_end - (i - hx_start + 1)] = '1';
      }
    }
  }
  for (line = hy_start; line < hy_start + hy_radius + hy_height_odd; line++) {
    for (i = hx_start; i < hex_width; i++) {
      if (scaled_hexagon[(hex_width * line) + i] == '1') {
        scaled_hexagon[(hex_width * (hex_height - hy_end - (line - hy_start + 1))) + i] = '1';
      }
    }
  }
}
```