user: 请从给定的汇编指令推导出C源代码：

```asm
<gds_write_float>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,%ebp
  movaps %xmm0,%xmm2
  movss  %xmm0,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x17(%rsp)
  pxor   %xmm0,%xmm0
  mov    $0x0,%ecx
  comiss %xmm2,%xmm0
  ja     L157
L115:
  movb   $0x0,0x16(%rsp)
  mov    $0x1,%eax
  movss  D107(%rip),%xmm1
  movss  D30(%rip),%xmm0
  movss  0xc(%rsp),%xmm6
  comiss %xmm0,%xmm6
  jb     L78
L124:
  movss  0xc(%rsp),%xmm3
  mulss  %xmm1,%xmm3
  movss  %xmm3,0xc(%rsp)
  mov    %eax,%edx
  add    $0x1,%eax
  comiss %xmm0,%xmm3
  jae    L124
  mov    %dl,0x16(%rsp)
L78:
  movss  0xc(%rsp),%xmm2
  ucomiss D75(%rip),%xmm2
  jp     L145
  jne    L145
L152:
  test   %ecx,%ecx
  je     L153
  movzbl 0x16(%rsp),%eax
  sub    $0x40,%eax
L62:
  mov    %al,0x16(%rsp)
  lea    0x16(%rsp),%rsi
  mov    $0x1,%edx
  mov    %ebp,%edi
  call   <write@plt>
  mov    $0x7,%ebx
  jmp    L130
L157:
  subss  %xmm2,%xmm0
  movss  %xmm0,0xc(%rsp)
  mov    $0x1,%ecx
  jmp    L115
L145:
  movzbl 0x16(%rsp),%eax
  sub    $0x1,%eax
  movss  D15(%rip),%xmm1
  movss  D107(%rip),%xmm0
  comiss 0xc(%rsp),%xmm0
  jbe    L152
L67:
  movss  0xc(%rsp),%xmm5
  mulss  %xmm1,%xmm5
  movss  %xmm5,0xc(%rsp)
  mov    %eax,%edx
  sub    $0x1,%eax
  comiss %xmm5,%xmm0
  ja     L67
  mov    %dl,0x16(%rsp)
  jmp    L152
L153:
  movzbl 0x16(%rsp),%eax
  add    $0x40,%eax
  jmp    L62
L68:
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D75(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  subss  D29(%rip),%xmm0
  cvttss2si %xmm0,%eax
L113:
  mov    %al,0x17(%rsp)
  lea    0x17(%rsp),%rsi
  mov    $0x1,%edx
  mov    %ebp,%edi
  call   <write@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D75(%rip),%xmm0
  movzbl 0x17(%rsp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  D86(%rip),%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm0,%xmm7
  movss  %xmm7,0xc(%rsp)
  sub    $0x1,%ebx
  je     L17
L130:
  movss  0xc(%rsp),%xmm4
  pxor   %xmm6,%xmm6
  comiss %xmm6,%xmm4
  jb     L68
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm4,%xmm0
  mulsd  D75(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  D29(%rip),%xmm0
  cvttss2si %xmm0,%eax
  jmp    L113
L17:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D107
data_type: f32
name: retrieve_data
arguments: data_label: D30
data_type: f32
name: retrieve_data
arguments: data_label: D75
data_type: f64
name: retrieve_data
arguments: data_label: D15
data_type: f32
name: retrieve_data
arguments: data_label: D29
data_type: f32
name: retrieve_data
arguments: data_label: D86
data_type: f64

tool: D107: 0.0625

tool: D30: 1

tool: D75: 256

tool: D15: 16

tool: D29: 1e-06

tool: D86: 0

assistant: ```c
void gds_write_float(int fd, float x) {
  int isNegative;
  int i;
  float real;
  unsigned char exponent, b;
  float G_epsilon;
  b = 0;
  G_epsilon = 0.000001;
  isNegative = 0;
  x = x;
  if (x < 0.0) {
    isNegative = 1;
    x = 0 - x;
  }
  exponent = 0;
  while (x >= 1.0) {
    exponent++;
    x = (x / 16.0);
  }
  if (x != 0) {
    while (x < 0.0625) {
      exponent--;
      x = (x * 16.0);
    }
  }
  if (isNegative) {
    exponent += 192;
  } else {
    exponent += 64;
  }
  write(fd, &exponent, 1);
  for (i = 1; i <= 7; i++) {
    if (x >= 0) {
      b = (int)(x * 256.0) + G_epsilon;
    } else {
      b = (int)(x * 256.0) - G_epsilon;
    }
    write(fd, &b, 1);
    x = x * 256.0 - (b + 0.0);
  }
}
```