user: Translate the below assembly code into C programming language:

```asm
<draw_2logscale>:
  endbr64
  push   %r15
  push   %r14
  mov    $0x14,%r14d
  push   %r13
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  lea    D3(%rip),%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x28,%rsp
  cmp    $0x1,%edx
  movsd  D13(%rip),%xmm5
  sbb    %ecx,%ecx
  and    $0x6,%ecx
  cmp    $0x1,%edx
  movsd  %xmm5,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,0x18(%rsp)
  sub    $0x1,%eax
  cmp    $0x1,%eax
  sete   %dl
  add    %ebx,%eax
  lea    -0x6(%r13,%rdx,8),%ecx
  mov    %eax,0x14(%rsp)
  mov    %ecx,0x10(%rsp)
  jmp    L97
  cs nopw 0x0(%rax,%rax,1)
L247:
  cmp    $0x4af,%r14d
  jg     L25
  imul   $0xc28f5c29,%r14d,%eax
  ror    $0x2,%eax
  cmp    $0x28f5c28,%eax
  jbe    L164
L25:
  imul   $0xc28f5c29,%r14d,%eax
  ror    $0x3,%eax
  cmp    $0x147ae14,%eax
  ja     L83
L160:
  mov    %r13d,%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  mov    $0xcccccccd,%eax
  mov    %r14d,%edx
  mov    %rbp,%rdi
  imul   %rax,%rdx
  lea    D25(%rip),%rsi
  shr    $0x24,%rdx
  call   <sprintf@plt>
  xor    %eax,%eax
  lea    -0x1(%r15),%edi
  mov    0x10(%rsp),%esi
  cmp    $0xc7,%r14d
  mov    %rbp,%rdx
  setg   %al
  add    %eax,%eax
  sub    %eax,%edi
  xor    %eax,%eax
  cmp    $0x7d0,%r14d
  sete   %al
  add    %eax,%eax
  sub    %eax,%edi
  call   <drawtext@plt>
L83:
  movsd  D49(%rip),%xmm1
  addsd  0x8(%rsp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  cmp    $0x7d0,%r14d
  je     L145
L28:
  add    $0x1,%r14d
L97:
  movsd  0x8(%rsp),%xmm0
  call   <log10@plt>
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  mov    $0x1bf,%edx
  sar    %eax
  imul   $0x1c0,%eax,%eax
  cmp    %edx,%eax
  cmovg  %edx,%eax
  lea    (%rax,%r12,1),%r15d
  cmp    $0xc7,%r14d
  jbe    L242
  cmp    $0x257,%r14d
  jle    L129
  cmp    $0x4af,%r14d
  jle    L169
L198:
  imul   $0xcccccccd,%r14d,%eax
  ror    $0x3,%eax
  cmp    $0x6666666,%eax
  ja     L247
  mov    0x14(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L247
  nopl   (%rax)
L129:
  imul   $0xcccccccd,%r14d,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  jbe    L16
L169:
  imul   $0xcccccccd,%r14d,%eax
  ror    $0x2,%eax
  cmp    $0xccccccc,%eax
  ja     L198
  mov    0x14(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L198
  nopl   0x0(%rax)
L16:
  mov    %ebx,%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L169
  nopl   0x0(%rax)
L164:
  mov    0x18(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L25
  xchg   %ax,%ax
L242:
  mov    %r14d,%r10d
  and    $0x3,%r10d
  cmp    $0x3b,%r14d
  jle    L229
  cmp    $0x77,%r14d
  jle    L248
  test   %r10d,%r10d
  je     L194
L1:
  imul   $0xcccccccd,%r14d,%eax
  ror    $0x2,%eax
  cmp    $0xccccccc,%eax
  jbe    L160
  movsd  D49(%rip),%xmm3
  addsd  0x8(%rsp),%xmm3
  movsd  %xmm3,0x8(%rsp)
  jmp    L28
L229:
  mov    %ebx,%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  mov    %r10d,0x1c(%rsp)
  call   <drawline@plt>
  mov    0x1c(%rsp),%r10d
L248:
  test   $0x1,%r14b
  je     L124
L162:
  test   %r10d,%r10d
  jne    L115
  nopw   0x0(%rax,%rax,1)
L194:
  mov    0x14(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  cmp    $0x77,%r14d
  jg     L1
L115:
  imul   $0xcccccccd,%r14d,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L1
  mov    0x18(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <drawline@plt>
  jmp    L1
L145:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L124:
  mov    0x14(%rsp),%ecx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  mov    %r10d,0x1c(%rsp)
  call   <drawline@plt>
  mov    0x1c(%rsp),%r10d
  jmp    L162
```

tool_calls: name: read_data
arguments: data_label: D13
type: f64
name: read_data
arguments: data_label: D25
type: string
name: read_data
arguments: data_label: D49
type: f64

tool: D13: 1

tool: D25: %d

tool: D49: 0.05

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