user: What is the c source code of the assembly code below:

```asm
<regPrintPos>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  movsd  %xmm0,-0xa8(%rbp)
  mov    %edi,-0xac(%rbp)
  mov    %rsi,-0xb8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0xac(%rbp)
  je     L26
  pxor   %xmm0,%xmm0
  comisd -0xa8(%rbp),%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,-0x94(%rbp)
  movsd  -0xa8(%rbp),%xmm1
  movsd  D46(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  cmpl   $0x0,-0x94(%rbp)
  je     L0
  movsd  -0x88(%rbp),%xmm0
  movq   D0(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
L0:
  movsd  -0x88(%rbp),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x78(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdq -0x78(%rbp),%xmm1
  movsd  -0x88(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  comisd D4(%rip),%xmm0
  jbe    L31
  addq   $0x1,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  jmp    L29
L31:
  pxor   %xmm1,%xmm1
  cvtsi2sdq -0x78(%rbp),%xmm1
  movsd  -0x88(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
L29:
  mov    -0x78(%rbp),%rcx
  movabs $0x8888888888888889,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x5,%rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %rax,-0x70(%rbp)
  mov    -0x78(%rbp),%rcx
  movabs $0x8888888888888889,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x5,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %rdx,-0x78(%rbp)
  mov    -0x70(%rbp),%rcx
  movabs $0x8888888888888889,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x5,%rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x70(%rbp),%rcx
  movabs $0x8888888888888889,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x5,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %rdx,-0x70(%rbp)
  lea    -0x60(%rbp),%rdx
  mov    -0x80(%rbp),%rax
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   <regPrintVal@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,-0x90(%rbp)
  mov    -0x90(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L2
  addq   $0x1,-0x90(%rbp)
L2:
  cmpl   $0x0,-0x94(%rbp)
  je     L7
  mov    -0x90(%rbp),%rdi
  mov    -0x78(%rbp),%rsi
  mov    -0x70(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0xb8(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D21(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L33
L7:
  mov    -0x90(%rbp),%rdi
  mov    -0x78(%rbp),%rsi
  mov    -0x70(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0xb8(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D35(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L33
L26:
  mov    -0xb8(%rbp),%rdx
  mov    -0xa8(%rbp),%rax
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   <regPrintVal@plt>
L33:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L24
  call   <__stack_chk_fail@plt>
L24:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D46
datatype: f64
name: parse_data
arguments: data_tag: D0
datatype: byte[8]
name: parse_data
arguments: data_tag: D4
datatype: f64
name: parse_data
arguments: data_tag: D21
datatype: string
name: parse_data
arguments: data_tag: D35
datatype: string

tool: D46: 3600

tool: {"D0": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: D4: 0.9999

tool: D21: -%02ld:%02ld:%02ld%s

tool: D35: %02ld:%02ld:%02ld%s

assistant: ```c
void regPrintPos(double x, int world, char *buf) {
  char tmp[80];
  char *ptr;
  long h, m;
  double s;
  double fs;
  long is;
  int south;
  if (world) {
    south = x < 0;
    s = x * 3600.0;
    if (south)
      s = -s;
    is = (long)s;
    if (s - is > 0.9999) {
      is++;
      fs = 0;
    } else {
      fs = s - is;
    }
    m = is / 60;
    is = is % 60;
    h = m / 60;
    m = m % 60;
    regPrintVal(fs, tmp);
    ptr = tmp;
    if (*ptr == '0')
      ptr++;
    if (south)
      sprintf(buf, "-%02ld:%02ld:%02ld%s", h, m, is, ptr);
    else
      sprintf(buf, "%02ld:%02ld:%02ld%s", h, m, is, ptr);
  } else {
    regPrintVal(x, buf);
  }
}
```