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

```asm
<draw_2logscale>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x10(%rsp)
  mov    %esi,%r13d
  cmp    $0x1,%edx
  sbb    %ecx,%ecx
  and    $0x2,%ecx
  sub    $0x1,%ecx
  mov    %ecx,0x18(%rsp)
  lea    (%rcx,%rcx,1),%eax
  lea    (%rax,%rsi,1),%esi
  mov    %esi,0x1c(%rsp)
  add    %ecx,%eax
  lea    (%rax,%r13,1),%r15d
  cmp    $0x1,%ecx
  sete   %al
  movzbl %al,%eax
  lea    -0x6(%r15,%rax,8),%eax
  mov    %eax,0x14(%rsp)
  mov    $0x14,%r12d
  movsd  D25(%rip),%xmm3
  movsd  %xmm3,0x8(%rsp)
  lea    D18(%rip),%r14
  jmp    L103
L243:
  cmp    $0x3b,%r12d
  jle    L92
  cmp    $0x77,%r12d
  jle    L182
  test   $0x3,%r12b
  je     L70
L48:
  movslq %ebp,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x23,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  shl    $0x2,%eax
  cmp    %eax,%ebp
  je     L193
  movslq %ebp,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x26,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  imul   $0xc8,%eax,%eax
  cmp    %eax,%ebp
  je     L193
  movsd  0x8(%rsp),%xmm2
  addsd  D42(%rip),%xmm2
  movsd  %xmm2,0x8(%rsp)
  jmp    L31
L92:
  mov    %r13d,%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
L182:
  test   $0x1,%r12b
  je     L137
L120:
  test   $0x3,%r12b
  je     L70
L180:
  movslq %ebp,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  cmp    %eax,%ebp
  jne    L48
  mov    0x1c(%rsp),%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  jmp    L48
L137:
  mov    0x18(%rsp),%eax
  lea    (%rax,%r13,1),%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  jmp    L120
L70:
  mov    0x18(%rsp),%eax
  lea    (%rax,%r13,1),%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  cmp    $0x77,%ebp
  jg     L48
  jmp    L180
L197:
  movslq %r12d,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %r12d,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  cmp    %eax,%r12d
  je     L104
L165:
  movslq %ebp,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x23,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  shl    $0x2,%eax
  cmp    %eax,%ebp
  je     L207
L14:
  movslq %ebp,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x24,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  shl    $0x3,%eax
  cmp    %eax,%ebp
  je     L277
L250:
  cmp    $0x4af,%ebp
  jg     L192
  movslq %ebp,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  imul   $0x64,%eax,%eax
  cmp    %eax,%ebp
  je     L148
L192:
  movslq %ebp,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x26,%rax
  mov    %ebp,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  imul   $0xc8,%eax,%eax
  cmp    %eax,%ebp
  jne    L63
L193:
  mov    %r15d,%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  movslq %ebp,%rdx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x23,%rdx
  mov    %ebp,%eax
  sar    $0x1f,%eax
  sub    %eax,%edx
  lea    D7(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  lea    -0x1(%rbx),%edi
  cmp    $0xc7,%ebp
  setg   %al
  movzbl %al,%eax
  add    %eax,%eax
  sub    %eax,%edi
  cmp    $0x7d0,%ebp
  sete   %al
  movzbl %al,%eax
  add    %eax,%eax
  sub    %eax,%edi
  mov    %r14,%rdx
  mov    0x14(%rsp),%esi
  call   <drawtext@plt>
L63:
  movsd  0x8(%rsp),%xmm1
  addsd  D42(%rip),%xmm1
  movsd  %xmm1,0x8(%rsp)
  lea    0x1(%r12),%eax
  cmp    $0x7d0,%eax
  jg     L110
L31:
  add    $0x1,%r12d
L103:
  mov    %r12d,%ebp
  movsd  0x8(%rsp),%xmm0
  call   <log10@plt>
  mov    %eax,%edx
  shr    $0x1f,%edx
  lea    (%rdx,%rax,1),%ebx
  sar    %ebx
  imul   $0x1c0,%ebx,%ebx
  mov    $0x1bf,%eax
  cmp    %eax,%ebx
  cmovg  %eax,%ebx
  add    0x10(%rsp),%ebx
  cmp    $0xc7,%r12d
  jle    L243
  cmp    $0x257,%r12d
  jle    L197
  cmp    $0x4af,%r12d
  jle    L165
  movslq %r12d,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x24,%rax
  mov    %r12d,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  shl    $0x3,%eax
  cmp    %eax,%r12d
  jne    L192
L277:
  mov    0x18(%rsp),%eax
  lea    (%rax,%r13,1),%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  jmp    L250
L104:
  mov    %r13d,%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  jmp    L165
L207:
  mov    0x18(%rsp),%eax
  lea    (%rax,%r13,1),%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  jmp    L14
L148:
  mov    0x1c(%rsp),%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <drawline@plt>
  jmp    L192
L110:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D25
data_type: f64
name: parse_data
arguments: data_tag: D42
data_type: f64
name: parse_data
arguments: data_tag: D7
data_type: string

tool: D25: 1

tool: D42: 0.05

tool: D7: %d

assistant: ```c
void draw_2logscale(int ox, int oy, int axes_point_up) {
  int f, x, orient;
  double a;
  orient = (axes_point_up ? -1 : 1);
  for (f = 20, a = 1.; f <= 100 * 20; f++, a += 0.05) {
    x = (int)(log10(a) / 2 * (480 - 4 * 8));
    if (x >= (480 - 4 * 8))
      x = (480 - 4 * 8) - 1;
    x += ox;
    if (f < 10 * 20) {
      if (f < 3 * 20)
        drawline(x, oy, x, oy + orient * (1 - 1));
      if (f < 6 * 20 && f % 2 == 0)
        drawline(x, oy, x, oy + orient * (2 - 1));
      if (f % 4 == 0)
        drawline(x, oy, x, oy + orient * (2 - 1));
      if (f < 6 * 20 && f % 10 == 0)
        drawline(x, oy, x, oy + orient * (3 - 1));
    } else {
      if (f < 30 * 20 && f % 10 == 0)
        drawline(x, oy, x, oy + orient * (1 - 1));
      if (f < 60 * 20 && f % 20 == 0)
        drawline(x, oy, x, oy + orient * (2 - 1));
      if (f % 40 == 0)
        drawline(x, oy, x, oy + orient * (2 - 1));
      if (f < 60 * 20 && f % 100 == 0)
        drawline(x, oy, x, oy + orient * (3 - 1));
    }
    if ((f < 10 * 20 && f % 20 == 0) || f % 200 == 0) {
      static char buf[10];
      drawline(x, oy, x, oy + orient * (4 - 1));
      sprintf(buf, "%d", f / 20);
      drawtext(x - 1 - 2 * (f >= 10 * 20) - 2 * (f == 100 * 20), oy + orient * (4 - 1) + (orient == 1 ? 2 : -6), buf);
    }
  }
}
```