user: Converte this assembly snippet into its equivalent C code:

```asm
<carry_put>:
  endbr64
  push   %rbx
  sub    $0x40,%rsp
  ucomisd %xmm0,%xmm0
  movsd  %xmm0,0x20(%rsp)
  movsd  %xmm1,0x28(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm3,0x30(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm5,0x18(%rsp)
  jp     L104
  comisd D114(%rip),%xmm0
  movapd %xmm0,%xmm4
  jae    L69
L104:
  xor    %edi,%edi
L42:
  xor    %eax,%eax
  call   <assert@plt>
  movsd  0x28(%rsp),%xmm7
  ucomisd %xmm7,%xmm7
  jp     L18
  comisd D114(%rip),%xmm7
  jae    L165
L18:
  xor    %edi,%edi
L59:
  xor    %eax,%eax
  call   <assert@plt>
  movsd  0x8(%rsp),%xmm2
  ucomisd %xmm2,%xmm2
  jp     L194
  comisd D0(%rip),%xmm2
  jae    L40
L194:
  xor    %edi,%edi
L126:
  xor    %eax,%eax
  call   <assert@plt>
  movsd  0x30(%rsp),%xmm5
  ucomisd %xmm5,%xmm5
  jp     L199
  pxor   %xmm2,%xmm2
  xor    %edi,%edi
  comisd %xmm2,%xmm5
  movsd  %xmm2,0x38(%rsp)
  jb     L12
  movsd  D88(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm5,%xmm0
  setae  %dil
L12:
  xor    %eax,%eax
  call   <assert@plt>
  movsd  0x10(%rsp),%xmm3
  ucomisd %xmm3,%xmm3
  jp     L87
  comisd D98(%rip),%xmm3
  jae    L127
L87:
  xor    %edi,%edi
L55:
  xor    %eax,%eax
  call   <assert@plt>
  movsd  0x18(%rsp),%xmm4
  ucomisd %xmm4,%xmm4
  jp     L151
  comisd D62(%rip),%xmm4
  jae    L66
L151:
  xor    %edi,%edi
L36:
  xor    %eax,%eax
  call   <assert@plt>
  movsd  0x20(%rsp),%xmm0
  divsd  0x28(%rsp),%xmm0
  call   <log@plt>
  movsd  0x18(%rsp),%xmm7
  movsd  0x8(%rsp),%xmm6
  movapd %xmm0,%xmm1
  movsd  0x38(%rsp),%xmm5
  movapd %xmm7,%xmm0
  mulsd  %xmm7,%xmm0
  ucomisd %xmm6,%xmm5
  mulsd  D9(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  %xmm6,%xmm0
  addsd  %xmm1,%xmm0
  movq   %xmm0,%rbx
  ja     L41
  sqrtsd %xmm6,%xmm6
  movsd  %xmm6,0x28(%rsp)
L75:
  movsd  0x10(%rsp),%xmm0
  subsd  0x30(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  movq   %rbx,%xmm3
  mov    $0x1,%eax
  movq   D124(%rip),%xmm2
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  xorpd  %xmm2,%xmm0
  mulsd  0x20(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  0x18(%rsp),%xmm1
  mulsd  0x28(%rsp),%xmm1
  movsd  %xmm0,0x8(%rsp)
  divsd  %xmm1,%xmm3
  movapd %xmm3,%xmm0
  xorpd  %xmm2,%xmm0
  call   <cnd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  add    $0x40,%rsp
  pop    %rbx
  ret
  nopl   0x0(%rax,%rax,1)
L199:
  pxor   %xmm1,%xmm1
  xor    %edi,%edi
  movsd  %xmm1,0x38(%rsp)
  jmp    L12
  nopl   0x0(%rax)
L40:
  movsd  D36(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm2,%xmm0
  setae  %dil
  jmp    L126
  nop
L165:
  movsd  D29(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm7,%xmm0
  setae  %dil
  jmp    L59
  nopw   0x0(%rax,%rax,1)
L69:
  movsd  D29(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm4,%xmm0
  setae  %dil
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L66:
  movsd  D28(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm4,%xmm0
  setae  %dil
  jmp    L36
  nopw   0x0(%rax,%rax,1)
L127:
  movsd  D88(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm3,%xmm0
  setae  %dil
  jmp    L55
L41:
  movsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,0x28(%rsp)
  jmp    L75
```

tool_calls: name: read_data
arguments: data_label: D114
data_type: f64[2]
name: read_data
arguments: data_label: D0
data_type: byte[16]
name: read_data
arguments: data_label: D88
data_type: f64
name: read_data
arguments: data_label: D98
data_type: f32[4]
name: read_data
arguments: data_label: D62
data_type: f64[2]
name: read_data
arguments: data_label: D9
data_type: f32[2]
name: read_data
arguments: data_label: D124
data_type: f32[2]
name: read_data
arguments: data_label: D36
data_type: f64
name: read_data
arguments: data_label: D29
data_type: f64
name: read_data
arguments: data_label: D28
data_type: f64

tool: {"D114": [1e-6,1000000000000.0]}

tool: {"D0": [0xce,0xd2,0x29,0x9c,0x17,0x96,0x25,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x40]}

tool: D88: 1000

tool: {"D98": [0.0,-4.4765625,-7.803815971229722e-23,0.2449643909931183]}

tool: {"D62": [1e-7,100.99999]}

tool: {"D9": [0.0,1.75]}

tool: {"D124": [0.0,-0.0]}

tool: D36: 20

tool: D29: 1000000000000

tool: D28: 100.99999

assistant: ```c
extern double carry_put(double S, double X, double T, double r, double b, double v) {
  double d1;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((X) == (X)) && (X) >= 0.000001 && (X) <= 1000000000000.0);
  assert(((T) == (T)) && (T) >= (1.0 / (253.0 * 24.0)) && (T) <= (20.0));
  assert(((r) == (r)) && (r) >= 0.0 && (r) <= 1000.0);
  assert(((b) == (b)) && (b) >= -1000.0 && (b) <= 1000.0);
  assert(((v) == (v)) && (v) >= 0.0000001 && v <= 100.99999);
  d1 = (log(S / X) + (b + ((v) * (v)) / 2.0) * T) / (v * sqrt(T));
  return -T * S * exp((b - r) * T) * cnd(-d1);
}
```