user: Demonstrate the C code that generates the assembly output below:

```asm
<draw_logscale>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x14(%rsp)
  mov    %esi,%r12d
  cmp    $0x1,%edx
  sbb    %ecx,%ecx
  and    $0x2,%ecx
  sub    $0x1,%ecx
  mov    %ecx,0x1c(%rsp)
  lea    (%rcx,%rcx,1),%eax
  lea    (%rax,%rsi,1),%r15d
  add    %ecx,%eax
  lea    (%rax,%rsi,1),%r14d
  cmp    $0x1,%ecx
  sete   %al
  movzbl %al,%eax
  lea    -0x6(%r14,%rax,8),%eax
  mov    %eax,0x18(%rsp)
  movsd  D7(%rip),%xmm3
  movsd  %xmm3,0x8(%rsp)
  mov    $0x0,%ebx
  lea    D22(%rip),%r13
  jmp    L64
L128:
  test   $0x1,%bl
  jne    L96
  mov    %r12d,%ecx
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <drawline@plt>
  jmp    L96
L108:
  mov    %ebx,%eax
  mov    $0x5,%esi
  cltd
  idiv   %esi
  test   %edx,%edx
  jne    L96
  mov    %r12d,%ecx
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <drawline@plt>
  jmp    L96
L120:
  mov    0x1c(%rsp),%eax
  lea    (%rax,%r12,1),%ecx
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <drawline@plt>
  jmp    L18
L66:
  mov    %r15d,%ecx
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <drawline@plt>
  jmp    L115
L123:
  add    $0x1,%ebx
  movsd  D25(%rip),%xmm1
  addsd  0x8(%rsp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  cmp    $0x385,%ebx
  je     L85
L64:
  movsd  0x8(%rsp),%xmm0
  call   <log10@plt>
  imul   $0x1c0,%eax,%ebp
  mov    $0x1bf,%eax
  cmp    %eax,%ebp
  cmovg  %eax,%ebp
  add    0x14(%rsp),%ebp
  cmp    $0x63,%ebx
  jle    L128
  lea    -0x64(%rbx),%eax
  cmp    $0x12b,%eax
  jbe    L108
L96:
  movslq %ebx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ebx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  cmp    %eax,%ebx
  je     L120
L18:
  movslq %ebx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x24,%rax
  mov    %ebx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  imul   $0x32,%eax,%eax
  cmp    %eax,%ebx
  je     L66
L115:
  movslq %ebx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  mov    %ebx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  imul   $0x64,%eax,%eax
  cmp    %eax,%ebx
  jne    L123
  mov    %r14d,%ecx
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <drawline@plt>
  movslq %ebx,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  sar    $0x25,%rdx
  mov    %ebx,%eax
  sar    $0x1f,%eax
  sub    %eax,%edx
  add    $0x1,%edx
  lea    D11(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  lea    -0x1(%rbp),%edi
  cmp    $0x384,%ebx
  sete   %al
  movzbl %al,%eax
  add    %eax,%eax
  sub    %eax,%edi
  mov    %r13,%rdx
  mov    0x18(%rsp),%esi
  call   <drawtext@plt>
  jmp    L123
L85:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_tag: D7
data_type: f64
name: read_data
arguments: data_tag: D25
data_type: f64
name: read_data
arguments: data_tag: D11
data_type: string

tool: D7: 1

tool: D25: 0.01

tool: D11: %d

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);
    }
  }
}
```