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

```asm
<draw_logscale>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %edx,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  je     L83
  mov    $0xffffffff,%eax
  jmp    L20
L83:
  mov    $0x1,%eax
L20:
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  movsd  D28(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L169
L66:
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <log10@plt>
  imul   $0x1c0,%eax,%eax
  mov    %eax,-0x10(%rbp)
  cmpl   $0x1bf,-0x10(%rbp)
  jle    L13
  movl   $0x1bf,-0x10(%rbp)
L13:
  mov    -0x24(%rbp),%eax
  add    %eax,-0x10(%rbp)
  cmpl   $0x63,-0x14(%rbp)
  jg     L54
  mov    -0x14(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L54
  mov    -0x28(%rbp),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <drawline@plt>
L54:
  cmpl   $0x63,-0x14(%rbp)
  jle    L41
  cmpl   $0x18f,-0x14(%rbp)
  jg     L41
  mov    -0x14(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x2,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L41
  mov    -0x28(%rbp),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <drawline@plt>
L41:
  mov    -0x14(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  test   %edx,%edx
  jne    L102
  mov    -0x28(%rbp),%edx
  mov    -0xc(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <drawline@plt>
L102:
  mov    -0x14(%rbp),%edx
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  sar    $0x4,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x32,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L139
  mov    -0xc(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x28(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <drawline@plt>
L139:
  mov    -0x14(%rbp),%edx
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  sar    $0x5,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x64,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L130
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <drawline@plt>
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    $0x1,%eax
  mov    %eax,%edx
  lea    D29(%rip),%rax
  mov    %rax,%rsi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cmpl   $0x1,-0xc(%rbp)
  jne    L51
  mov    $0x2,%edx
  jmp    L136
L51:
  mov    $0xfffffffa,%edx
L136:
  lea    (%rdx,%rax,1),%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  cmpl   $0x384,-0x14(%rbp)
  jne    L12
  mov    $0x2,%edx
  jmp    L133
L12:
  mov    $0x0,%edx
L133:
  sub    %edx,%eax
  lea    D26(%rip),%rdx
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <drawtext@plt>
L130:
  addl   $0x1,-0x14(%rbp)
  movsd  -0x8(%rbp),%xmm1
  movsd  D16(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L169:
  cmpl   $0x384,-0x14(%rbp)
  jle    L66
  nop
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D28
type_infered: f64
name: parse_data
arguments: label: D29
type_infered: string
name: parse_data
arguments: label: D16
type_infered: f64

tool: D28: 1

tool: D29: %d

tool: D16: 0.01

assistant: ```c
void draw_logscale(int ox, int oy, int axes_point_up) {
  int f, x, orient;
  double a;
  orient = (axes_point_up ? -1 : 1);
  for (f = 0, a = 1.; f <= 900; f++, a += 0.01) {
    x = (int)(log10(a) * (480 - 4 * 8));
    if (x >= (480 - 4 * 8))
      x = (480 - 4 * 8) - 1;
    x += ox;
    if (f < 100 && f % 2 == 0)
      drawline(x, oy, x, oy + orient * (1 - 1));
    if (f >= 100 && f < 4 * 100 && f % 5 == 0)
      drawline(x, oy, x, oy + orient * (1 - 1));
    if (f % 10 == 0)
      drawline(x, oy, x, oy + orient * (2 - 1));
    if (f % 50 == 0)
      drawline(x, oy, x, oy + orient * (3 - 1));
    if (f % 100 == 0) {
      static char buf[10];
      drawline(x, oy, x, oy + orient * (4 - 1));
      sprintf(buf, "%d", 1 + f / 100);
      drawtext(x - 1 - 2 * (f == 900), oy + orient * (4 - 1) + (orient == 1 ? 2 : -6), buf);
    }
  }
}
```