user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<draw_logscale>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D2(%rip),%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x28,%rsp
  cmp    $0x1,%edx
  movsd  D4(%rip),%xmm3
  sbb    %ecx,%ecx
  and    $0x6,%ecx
  cmp    $0x1,%edx
  movsd  %xmm3,0x8(%rsp)
  sbb    %esi,%esi
  lea    -0x3(%rcx,%rbx,1),%r13d
  and    $0x4,%esi
  cmp    $0x1,%edx
  sbb    %eax,%eax
  xor    %edx,%edx
  lea    -0x2(%rsi,%rbx,1),%esi
  and    $0x2,%eax
  mov    %esi,0x14(%rsp)
  sub    $0x1,%eax
  cmp    $0x1,%eax
  sete   %dl
  add    %ebx,%eax
  xor    %r14d,%r14d
  lea    -0x6(%r13,%rdx,8),%ecx
  mov    %eax,0x1c(%rsp)
  mov    %ecx,0x18(%rsp)
  jmp    L95
  nop
L90:
  imul   $0xc28f5c29,%r14d,%eax
  ror    %eax
  cmp    $0x51eb851,%eax
  jbe    L81
L137:
  imul   $0xc28f5c29,%r14d,%eax
  ror    $0x2,%eax
  cmp    $0x28f5c28,%eax
  jbe    L114
L104:
  movsd  D12(%rip),%xmm1
  addsd  0x8(%rsp),%xmm1
  add    $0x1,%r14d
  movsd  %xmm1,0x8(%rsp)
  cmp    $0x385,%r14d
  je     L69
L95:
  movsd  0x8(%rsp),%xmm0
  call   <log10@plt>
  mov    $0x1bf,%edx
  imul   $0x1c0,%eax,%eax
  cmp    %edx,%eax
  cmovg  %edx,%eax
  lea    (%rax,%rbp,1),%r15d
  cmp    $0x63,%r14d
  jle    L119
  lea    -0x64(%r14),%eax
  cmp    $0x12b,%eax
  jbe    L86
L91:
  imul   $0xcccccccd,%r14d,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L90
  mov    0x1c(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  imul   $0xc28f5c29,%r14d,%eax
  ror    %eax
  cmp    $0x51eb851,%eax
  ja     L137
L81:
  mov    0x14(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L137
  nopl   (%rax)
L114:
  mov    %r13d,%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  mov    %r14d,%edx
  mov    %r12,%rdi
  lea    D25(%rip),%rsi
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x25,%rdx
  add    $0x1,%edx
  call   <sprintf@plt>
  xor    %eax,%eax
  lea    -0x1(%r15),%edi
  mov    0x18(%rsp),%esi
  cmp    $0x384,%r14d
  mov    %r12,%rdx
  sete   %al
  add    %eax,%eax
  sub    %eax,%edi
  call   <drawtext@plt>
  jmp    L104
  nopl   (%rax)
L119:
  test   $0x1,%r14b
  jne    L91
L51:
  mov    %ebx,%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L91
L69:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L86:
  mov    %r14d,%eax
  mov    $0x5,%ecx
  cltd
  idiv   %ecx
  test   %edx,%edx
  jne    L91
  jmp    L51
```

tool_calls: name: read_data
arguments: data_tag: D4
data_type: f64
name: read_data
arguments: data_tag: D12
data_type: f64
name: read_data
arguments: data_tag: D25
data_type: string

tool: D4: 1

tool: D12: 0.01

tool: D25: %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);
    }
  }
}
```