user: 请将以下的汇编代码转换成C语言代码：

```asm
<draw_logscale>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D10(%rip),%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x28,%rsp
  cmp    $0x1,%edx
  movsd  D34(%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    L106
  nop
L63:
  imul   $0xc28f5c29,%r14d,%eax
  ror    %eax
  cmp    $0x51eb851,%eax
  jbe    L54
L137:
  imul   $0xc28f5c29,%r14d,%eax
  ror    $0x2,%eax
  cmp    $0x28f5c28,%eax
  jbe    L18
L36:
  movsd  D35(%rip),%xmm1
  addsd  0x8(%rsp),%xmm1
  add    $0x1,%r14d
  movsd  %xmm1,0x8(%rsp)
  cmp    $0x385,%r14d
  je     L76
L106:
  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    L90
  lea    -0x64(%r14),%eax
  cmp    $0x12b,%eax
  jbe    L113
L28:
  imul   $0xcccccccd,%r14d,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L63
  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
L54:
  mov    0x14(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L137
  nopl   (%rax)
L18:
  mov    %r13d,%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  mov    %r14d,%edx
  mov    %r12,%rdi
  lea    D16(%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    L36
  nopl   (%rax)
L90:
  test   $0x1,%r14b
  jne    L28
L131:
  mov    %ebx,%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L28
L76:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L113:
  mov    %r14d,%eax
  mov    $0x5,%ecx
  cltd
  idiv   %ecx
  test   %edx,%edx
  jne    L28
  jmp    L131
```

tool_calls: name: extract_symbolic_data
arguments: tag: D34
data_type: f64
name: extract_symbolic_data
arguments: tag: D35
data_type: f64
name: extract_symbolic_data
arguments: tag: D16
data_type: string

tool: D34: 1

tool: D35: 0.01

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