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

```asm
<WriteCoord>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  movsd  %xmm0,-0x10(%rbp)
  movsd  D57(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L10
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D74(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L85
L10:
  movsd  D108(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L112
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D144(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L85
L112:
  movsd  D14(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L78
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D149(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L85
L78:
  movsd  D81(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L108
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L85
L108:
  movsd  D55(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L123
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D149(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L85
L123:
  movsd  D41(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L54
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D144(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L85
L54:
  movsd  D102(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L105
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D109(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L85
L105:
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D26(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
L85:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D57
data_type: byte[8]
name: parse_data
arguments: data_tag: D74
data_type: string
name: parse_data
arguments: data_tag: D108
data_type: byte[8]
name: parse_data
arguments: data_tag: D144
data_type: string
name: parse_data
arguments: data_tag: D14
data_type: byte[8]
name: parse_data
arguments: data_tag: D149
data_type: string
name: parse_data
arguments: data_tag: D81
data_type: f64
name: parse_data
arguments: data_tag: D2
data_type: string
name: parse_data
arguments: data_tag: D55
data_type: f64
name: parse_data
arguments: data_tag: D41
data_type: f64
name: parse_data
arguments: data_tag: D102
data_type: f64
name: parse_data
arguments: data_tag: D109
data_type: string
name: parse_data
arguments: data_tag: D26
data_type: string

tool: {"D57": [0xcd,0xcc,0xcc,0xfc,0xcf,0x12,0x63,0xc1]}

tool: D74: %10.2e

tool: {"D108": [0xae,0x47,0xe1,0xfa,0x7f,0x84,0x2e,0xc1]}

tool: D144: %10.2f

tool: {"D14": [0x8b,0x6c,0xe7,0xfb,0xff,0x69,0xf8,0xc0]}

tool: D149: %10.3f

tool: D81: 99999.9999

tool: D2: %10.4f

tool: D55: 999999.999

tool: D41: 9999999.99

tool: D102: 99999999.9

tool: D109: %10.1f

tool: D26: %10.3e

assistant: ```c
void WriteCoord(char *str, double x) {
  if (x < -9999999.9) {
    sprintf(str, "%10.2e", x);
  } else if (x < -999999.99) {
    sprintf(str, "%10.2f", x);
  } else if (x < -99999.999) {
    sprintf(str, "%10.3f", x);
  } else if (x < 99999.9999) {
    sprintf(str, "%10.4f", x);
  } else if (x < 999999.999) {
    sprintf(str, "%10.3f", x);
  } else if (x < 9999999.99) {
    sprintf(str, "%10.2f", x);
  } else if (x < 99999999.9) {
    sprintf(str, "%10.1f", x);
  } else {
    sprintf(str, "%10.3e", x);
  }
}
```