user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<dcs_pair_production_KKP>:
  endbr64
  push   %r14
  movapd %xmm4,%xmm7
  pxor   %xmm4,%xmm4
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  comisd %xmm0,%xmm4
  jae    L268
  comisd %xmm1,%xmm4
  jae    L268
  comisd %xmm2,%xmm4
  movapd %xmm2,%xmm5
  jae    L268
  comisd %xmm3,%xmm4
  jae    L268
  comisd %xmm7,%xmm4
  movsd  %xmm7,0x8(%rsp)
  jae    L268
  lea    0xf0(%rsp),%rsi
  lea    0xe8(%rsp),%rdi
  movapd %xmm3,%xmm2
  mov    $0x3,%eax
  movapd %xmm5,%xmm1
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm0,0xa0(%rsp)
  movsd  %xmm5,0x10(%rsp)
  call   <dcs_pair_production_range@plt>
  movsd  0x8(%rsp),%xmm7
  pxor   %xmm4,%xmm4
  movsd  0xe8(%rsp),%xmm0
  comisd %xmm7,%xmm0
  ja     L268
  comisd 0xf0(%rsp),%xmm7
  ja     L268
  movsd  0xa0(%rsp),%xmm0
  mov    $0x1,%eax
  call   <radiation_logarithm@plt>
  movsd  D207(%rip),%xmm1
  movsd  0xa0(%rsp),%xmm0
  mov    %eax,%ebx
  call   <pow@plt>
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm5
  pxor   %xmm4,%xmm4
  movsd  %xmm0,0x98(%rsp)
  movsd  0x8(%rsp),%xmm7
  movsd  D545(%rip),%xmm1
  movapd %xmm3,%xmm0
  movsd  D179(%rip),%xmm6
  movsd  D179(%rip),%xmm2
  divsd  %xmm5,%xmm0
  divsd  %xmm7,%xmm1
  addsd  %xmm0,%xmm6
  movsd  %xmm6,0xd0(%rsp)
  movapd %xmm6,%xmm0
  divsd  %xmm5,%xmm7
  subsd  %xmm1,%xmm2
  ucomisd %xmm2,%xmm4
  subsd  %xmm7,%xmm0
  movsd  D65(%rip),%xmm7
  mulsd  %xmm6,%xmm0
  movsd  D179(%rip),%xmm6
  divsd  %xmm0,%xmm7
  movapd %xmm2,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm7,%xmm0
  subsd  %xmm7,%xmm6
  addsd  %xmm0,%xmm1
  ja     L112
  sqrtsd %xmm2,%xmm2
L148:
  mulsd  %xmm2,%xmm6
  addsd  D179(%rip),%xmm6
  divsd  %xmm6,%xmm1
  comisd D179(%rip),%xmm1
  movapd %xmm1,%xmm0
  jae    L268
  comisd %xmm1,%xmm4
  jae    L268
  addsd  %xmm5,%xmm3
  movsd  D341(%rip),%xmm1
  divsd  D107(%rip),%xmm5
  movapd %xmm5,%xmm2
  movsd  D179(%rip),%xmm5
  movapd %xmm2,%xmm6
  movsd  %xmm2,0x18(%rsp)
  movsd  0x98(%rsp),%xmm7
  mulsd  %xmm2,%xmm6
  movsd  %xmm3,0xd8(%rsp)
  movapd %xmm3,%xmm4
  movsd  0x8(%rsp),%xmm3
  divsd  %xmm4,%xmm3
  movsd  %xmm6,0xb0(%rsp)
  mulsd  %xmm3,%xmm1
  subsd  %xmm3,%xmm5
  mulsd  %xmm3,%xmm1
  movapd %xmm1,%xmm4
  movsd  D341(%rip),%xmm1
  divsd  %xmm5,%xmm4
  mulsd  %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  %xmm4,%xmm1
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm1,0xb8(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebx,%xmm1
  xor    %ebx,%ebx
  divsd  %xmm7,%xmm1
  movsd  %xmm1,0xa8(%rsp)
  movapd %xmm1,%xmm3
  movsd  D338(%rip),%xmm1
  mulsd  D19(%rip),%xmm3
  mulsd  %xmm7,%xmm1
  movq   %xmm3,%r14
  mulsd  %xmm7,%xmm1
  divsd  %xmm6,%xmm1
  movsd  %xmm1,0xc0(%rsp)
  call   <log@plt>
  lea    0x100(%rsp),%rdx
  mov    $0xc,%edi
  xor    %eax,%eax
  lea    0xf8(%rsp),%rsi
  movsd  %xmm0,0x60(%rsp)
  call   <math_gauss_quad_coefficients@plt>
  movsd  0x10(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm2
  pxor   %xmm4,%xmm4
  mulsd  0xa8(%rsp),%xmm2
  mov    0xf8(%rsp),%r12
  movsd  %xmm4,0x58(%rsp)
  movapd %xmm5,%xmm3
  mov    0x100(%rsp),%rbp
  addsd  %xmm5,%xmm3
  movsd  %xmm2,0xc8(%rsp)
  movsd  %xmm3,0x20(%rsp)
  jmp    L221
  nopl   0x0(%rax)
L102:
  movsd  D179(%rip),%xmm7
  movsd  0x20(%rsp),%xmm0
  movsd  D424(%rip),%xmm5
  addsd  %xmm2,%xmm7
  subsd  %xmm2,%xmm5
  mulsd  %xmm7,%xmm0
  movsd  %xmm7,0x18(%rsp)
  addsd  %xmm5,%xmm0
  movsd  D341(%rip),%xmm5
  mulsd  %xmm6,%xmm5
  mulsd  %xmm5,%xmm0
  movsd  %xmm0,0x68(%rsp)
L154:
  movsd  D118(%rip),%xmm6
  movsd  D424(%rip),%xmm7
  movsd  %xmm3,0x40(%rsp)
  mulsd  0x10(%rsp),%xmm7
  movsd  D424(%rip),%xmm0
  movsd  %xmm2,0x30(%rsp)
  subsd  %xmm2,%xmm6
  addsd  0x50(%rsp),%xmm0
  movsd  %xmm6,0x38(%rsp)
  movsd  %xmm7,0x28(%rsp)
  call   <log@plt>
  movsd  0x30(%rsp),%xmm2
  movq   %r14,%xmm7
  movsd  D179(%rip),%xmm5
  addsd  0x28(%rsp),%xmm5
  movsd  D156(%rip),%xmm1
  divsd  0x48(%rsp),%xmm7
  movsd  %xmm7,0x30(%rsp)
  mulsd  0x10(%rsp),%xmm1
  movsd  0x40(%rsp),%xmm3
  mulsd  0x18(%rsp),%xmm1
  movsd  D179(%rip),%xmm4
  addsd  %xmm5,%xmm5
  addsd  0x38(%rsp),%xmm1
  addsd  %xmm3,%xmm4
  mulsd  %xmm5,%xmm0
  movsd  D346(%rip),%xmm5
  movsd  %xmm4,0x40(%rsp)
  subsd  %xmm2,%xmm5
  mulsd  0x20(%rsp),%xmm5
  subsd  %xmm2,%xmm0
  subsd  %xmm5,%xmm0
  divsd  %xmm0,%xmm1
  addsd  D179(%rip),%xmm1
  mulsd  %xmm4,%xmm1
  pxor   %xmm4,%xmm4
  ucomisd %xmm1,%xmm4
  ja     L171
  movapd %xmm1,%xmm0
  movapd %xmm7,%xmm5
  sqrtsd %xmm0,%xmm0
L250:
  mulsd  0xa8(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm6
  movsd  %xmm3,0x90(%rsp)
  movsd  %xmm2,0x88(%rsp)
  mulsd  %xmm1,%xmm5
  movsd  %xmm1,0x80(%rsp)
  mulsd  %xmm6,%xmm0
  addsd  %xmm6,%xmm5
  divsd  %xmm5,%xmm0
  call   <log@plt>
  movsd  0x80(%rsp),%xmm1
  mulsd  0xc0(%rsp),%xmm1
  movsd  %xmm0,0x78(%rsp)
  movsd  D179(%rip),%xmm0
  addsd  %xmm1,%xmm0
  call   <log@plt>
  movsd  0x78(%rsp),%xmm5
  movsd  0x68(%rsp),%xmm6
  pxor   %xmm4,%xmm4
  mulsd  D341(%rip),%xmm0
  movapd %xmm4,%xmm7
  movsd  0x90(%rsp),%xmm3
  movsd  0x88(%rsp),%xmm2
  subsd  %xmm0,%xmm5
  mulsd  %xmm5,%xmm6
  maxsd  %xmm6,%xmm7
  movapd %xmm7,%xmm6
  movsd  D621(%rip),%xmm7
  comisd %xmm3,%xmm7
  jb     L1
  movsd  D341(%rip),%xmm5
  movsd  D424(%rip),%xmm0
  mulsd  %xmm3,%xmm5
  addsd  %xmm2,%xmm0
  mulsd  0x10(%rsp),%xmm0
  addsd  0x38(%rsp),%xmm0
  mulsd  %xmm5,%xmm0
  movsd  %xmm0,0x38(%rsp)
L61:
  movsd  D424(%rip),%xmm0
  movsd  %xmm2,0x50(%rsp)
  movsd  %xmm6,0x48(%rsp)
  addsd  %xmm3,%xmm0
  call   <log@plt>
  movsd  0x18(%rsp),%xmm7
  movsd  0x50(%rsp),%xmm2
  movapd %xmm0,%xmm1
  movsd  0x28(%rsp),%xmm0
  movsd  D156(%rip),%xmm3
  movsd  0x8(%rsp),%xmm6
  mulsd  %xmm7,%xmm0
  addsd  %xmm2,%xmm3
  mulsd  D587(%rip),%xmm2
  addsd  %xmm3,%xmm0
  movsd  D587(%rip),%xmm3
  addsd  0x20(%rsp),%xmm3
  mulsd  %xmm7,%xmm3
  mulsd  %xmm1,%xmm3
  movsd  D587(%rip),%xmm1
  addsd  D179(%rip),%xmm3
  mulsd  0x98(%rsp),%xmm1
  subsd  %xmm2,%xmm3
  movsd  0xc8(%rsp),%xmm2
  mulsd  %xmm6,%xmm2
  divsd  %xmm3,%xmm0
  addsd  D179(%rip),%xmm0
  mulsd  0x40(%rsp),%xmm0
  mulsd  0x30(%rsp),%xmm0
  addsd  %xmm6,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  call   <log@plt>
  movsd  0x38(%rsp),%xmm1
  pxor   %xmm4,%xmm4
  movsd  0x48(%rsp),%xmm6
  movapd %xmm4,%xmm7
  mulsd  %xmm0,%xmm1
  movsd  D179(%rip),%xmm0
  subsd  0x70(%rsp),%xmm0
  maxsd  %xmm1,%xmm7
  movapd %xmm7,%xmm1
  movsd  0x58(%rsp),%xmm7
  divsd  0xb0(%rsp),%xmm1
  addsd  %xmm6,%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  0x0(%rbp,%rbx,1),%xmm0
  add    $0x8,%rbx
  mulsd  0x60(%rsp),%xmm0
  subsd  %xmm0,%xmm7
  movsd  %xmm7,0x58(%rsp)
  cmp    $0x60,%rbx
  je     L25
L221:
  movsd  0x60(%rsp),%xmm0
  mulsd  (%r12,%rbx,1),%xmm0
  call   <exp@plt>
  movsd  D346(%rip),%xmm1
  movsd  0xb8(%rsp),%xmm3
  movsd  D179(%rip),%xmm6
  movsd  D179(%rip),%xmm2
  subsd  %xmm0,%xmm1
  subsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm1
  movsd  %xmm2,0x70(%rsp)
  mulsd  %xmm2,%xmm2
  mulsd  %xmm1,%xmm3
  movsd  %xmm1,0x48(%rsp)
  comisd D272(%rip),%xmm3
  divsd  %xmm3,%xmm6
  movsd  %xmm6,0x50(%rsp)
  jae    L102
  movsd  D179(%rip),%xmm0
  addsd  0x50(%rsp),%xmm0
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm2,0x18(%rsp)
  call   <log@plt>
  movsd  0x18(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm7
  movsd  D179(%rip),%xmm1
  movsd  D346(%rip),%xmm5
  movsd  0x28(%rsp),%xmm3
  movsd  D179(%rip),%xmm6
  addsd  %xmm7,%xmm1
  addsd  %xmm2,%xmm5
  movsd  D179(%rip),%xmm4
  addsd  %xmm3,%xmm6
  addsd  %xmm2,%xmm4
  mulsd  %xmm1,%xmm5
  movsd  D424(%rip),%xmm1
  addsd  %xmm2,%xmm1
  movsd  %xmm4,0x18(%rsp)
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm5
  movsd  0x48(%rsp),%xmm1
  subsd  %xmm7,%xmm1
  mulsd  %xmm0,%xmm5
  divsd  %xmm6,%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm5,%xmm0
  subsd  D424(%rip),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,0x68(%rsp)
  jmp    L154
  nopl   (%rax)
L25:
  movsd  D25(%rip),%xmm0
  comisd 0xd0(%rsp),%xmm0
  jae    L64
  movsd  0xa0(%rsp),%xmm3
  ucomisd D179(%rip),%xmm3
  jp     L205
  je     L164
L205:
  mov    D234(%rip),%rbx
  movsd  D92(%rip),%xmm0
L187:
  movsd  0xd0(%rsp),%xmm4
  movsd  0x98(%rsp),%xmm7
  mulsd  %xmm4,%xmm0
  movapd %xmm4,%xmm1
  mulsd  %xmm7,%xmm0
  mulsd  %xmm7,%xmm0
  addsd  D179(%rip),%xmm0
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <log@plt>
  mulsd  D33(%rip),%xmm0
  pxor   %xmm4,%xmm4
  movapd %xmm0,%xmm1
  subsd  D555(%rip),%xmm1
  comisd %xmm1,%xmm4
  movsd  %xmm1,0x10(%rsp)
  jb     L140
L64:
  movapd %xmm4,%xmm1
L180:
  movsd  0xa0(%rsp),%xmm5
  movsd  D531(%rip),%xmm0
  movsd  0xd8(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm6
  mulsd  %xmm5,%xmm0
  addsd  %xmm5,%xmm1
  mulsd  %xmm1,%xmm0
  movapd %xmm3,%xmm1
  subsd  %xmm6,%xmm1
  mulsd  %xmm6,%xmm3
  mulsd  %xmm1,%xmm0
  mulsd  0x58(%rsp),%xmm0
  divsd  %xmm3,%xmm0
  comisd %xmm0,%xmm4
  jbe    L20
  xchg   %ax,%ax
L268:
  movapd %xmm4,%xmm0
L20:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r14
  ret
  nopl   0x0(%rax)
L1:
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm3,0x38(%rsp)
  movsd  %xmm2,0x78(%rsp)
  movsd  %xmm6,0x68(%rsp)
  call   <log@plt>
  movsd  D179(%rip),%xmm7
  addsd  0x20(%rsp),%xmm7
  movsd  0x50(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm3
  movapd %xmm0,%xmm1
  movsd  D587(%rip),%xmm5
  movsd  0x68(%rsp),%xmm6
  mulsd  %xmm7,%xmm2
  mulsd  %xmm3,%xmm5
  addsd  D179(%rip),%xmm5
  mulsd  0x18(%rsp),%xmm5
  movapd %xmm2,%xmm0
  movsd  0x48(%rsp),%xmm2
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm7
  subsd  %xmm0,%xmm5
  mulsd  %xmm5,%xmm1
  movapd %xmm2,%xmm5
  movsd  0x78(%rsp),%xmm2
  subsd  %xmm3,%xmm5
  movsd  0x38(%rsp),%xmm3
  mulsd  %xmm3,%xmm5
  divsd  0x40(%rsp),%xmm5
  addsd  %xmm5,%xmm1
  addsd  %xmm7,%xmm1
  movsd  %xmm1,0x38(%rsp)
  jmp    L61
L164:
  mov    D623(%rip),%rbx
  movsd  D440(%rip),%xmm0
  jmp    L187
L140:
  movsd  0xd0(%rsp),%xmm4
  movq   %rbx,%xmm2
  mulsd  %xmm4,%xmm2
  mulsd  0x98(%rsp),%xmm2
  addsd  D179(%rip),%xmm2
  divsd  %xmm2,%xmm4
  movapd %xmm4,%xmm0
  call   <log@plt>
  movsd  0x10(%rsp),%xmm1
  pxor   %xmm4,%xmm4
  mulsd  D379(%rip),%xmm0
  subsd  D261(%rip),%xmm0
  divsd  %xmm0,%xmm1
  jmp    L180
L12:
  call   <__stack_chk_fail@plt>
L171:
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x78(%rsp)
  movsd  %xmm3,0x88(%rsp)
  movsd  %xmm2,0x80(%rsp)
  call   <sqrt@plt>
  movsd  0x78(%rsp),%xmm1
  movsd  0x88(%rsp),%xmm3
  movsd  0x80(%rsp),%xmm2
  movsd  0x30(%rsp),%xmm5
  jmp    L250
L112:
  movapd %xmm2,%xmm0
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm3
  pxor   %xmm4,%xmm4
  movsd  0x20(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm1
  movapd %xmm0,%xmm2
  jmp    L148
```

tool_calls: name: disassemble_data
arguments: label: D207
data_type: byte[8]
name: disassemble_data
arguments: label: D545
data_type: byte[8]
name: disassemble_data
arguments: label: D179
data_type: f64[2]
name: disassemble_data
arguments: label: D65
data_type: f64
name: disassemble_data
arguments: label: D341
data_type: f64
name: disassemble_data
arguments: label: D107
data_type: byte[8]
name: disassemble_data
arguments: label: D338
data_type: f64
name: disassemble_data
arguments: label: D19
data_type: byte[8]
name: disassemble_data
arguments: label: D424
data_type: f64
name: disassemble_data
arguments: label: D118
data_type: f64
name: disassemble_data
arguments: label: D156
data_type: f64
name: disassemble_data
arguments: label: D346
data_type: f64
name: disassemble_data
arguments: label: D621
data_type: byte[8]
name: disassemble_data
arguments: label: D587
data_type: f64
name: disassemble_data
arguments: label: D272
data_type: f32[4]
name: disassemble_data
arguments: label: D25
data_type: f64
name: disassemble_data
arguments: label: D234
data_type: byte[8]
name: disassemble_data
arguments: label: D92
data_type: byte[8]
name: disassemble_data
arguments: label: D33
data_type: f64
name: disassemble_data
arguments: label: D555
data_type: f64
name: disassemble_data
arguments: label: D531
data_type: byte[8]
name: disassemble_data
arguments: label: D623
data_type: byte[8]
name: disassemble_data
arguments: label: D440
data_type: byte[8]
name: disassemble_data
arguments: label: D379
data_type: f64
name: disassemble_data
arguments: label: D261
data_type: f64

tool: {"D207": [0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x3f]}

tool: {"D545": [0xd6,0xb5,0xa9,0xcd,0x91,0xbe,0x60,0x3f]}

tool: {"D179": [1.0,0.00204399564]}

tool: D65: 6

tool: D341: 0.5

tool: {"D107": [0xd6,0xb5,0xa9,0xcd,0x91,0xbe,0x40,0x3f]}

tool: D338: 2.25

tool: {"D19": [0x3f,0xf3,0x32,0xbf,0x5b,0x9b,0x5b,0x3f]}

tool: D424: 3

tool: D118: 5

tool: D156: 4

tool: D346: 2

tool: {"D621": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f]}

tool: D587: 1.5

tool: {"D272": [0.0,4.4765625,0.0,2.125]}

tool: D25: 35

tool: {"D234": [0x72,0x51,0x2d,0x22,0x8a,0xc9,0x0b,0x3f]}

tool: {"D92": [0x84,0xb9,0xdd,0xcb,0x7d,0x72,0xf4,0x3e]}

tool: D33: 0.073

tool: D555: 0.26

tool: {"D531": [0x58,0x1f,0x43,0x0b,0xa8,0xd1,0xed,0x38]}

tool: {"D623": [0x54,0xe4,0x10,0x71,0x73,0x2a,0x09,0x3f]}

tool: {"D440": [0xa2,0x26,0xfa,0x7c,0x94,0x11,0x07,0x3f]}

tool: D379: 0.058

tool: D261: 0.14

assistant: ```c
double dcs_pair_production_KKP(double Z, double A_, double mass, double K, double q) {
  if ((Z <= 0) || (A_ <= 0) || (mass <= 0) || (K <= 0) || (q <= 0))
    return 0.;
  double qmin, qmax;
  dcs_pair_production_range(Z, mass, K, &qmin, &qmax);
  if ((q < qmin) || (q > qmax))
    return 0.;
  const double nu = q / (K + mass);
  const double r = mass / 0.510998910E-03;
  const double beta = 0.5 * nu * nu / (1. - nu);
  const double xi_factor = 0.5 * r * r * beta;
  const double A = radiation_logarithm(Z);
  const double Z13 = pow(Z, 1. / 3.);
  const double AZ13 = A / Z13;
  const double sqrte = 1.6487212707;
  const double cL = 2. * sqrte * 0.510998910E-03 * AZ13;
  const double cLe = 2.25 * Z13 * Z13 / (r * r);
  const double gamma = 1. + K / mass;
  const double x0 = 4. * 0.510998910E-03 / q;
  const double x1 = 6. / (gamma * (gamma - q / mass));
  const double argmin = (x0 + 2. * (1. - x0) * x1) / (1. + (1. - x1) * sqrt(1. - x0));
  if ((argmin >= 1.) || (argmin <= 0.))
    return 0.;
  const double tmin = log(argmin);
  const double *xGQ, *wGQ;
  math_gauss_quad_coefficients(12, &xGQ, &wGQ);
  double I = 0.;
  int i;
  for (i = 0; i < 12; i++) {
    const double eps = exp(xGQ[i] * tmin);
    const double rho = 1. - eps;
    const double rho2 = rho * rho;
    const double rho21 = eps * (2. - eps);
    const double xi = xi_factor * rho21;
    const double xi_i = 1. / xi;
    double Be;
    if (xi >= 1E+03)
      Be = 0.5 * xi_i * ((3 - rho2) + 2. * beta * (1. + rho2));
    else
      Be = ((2. + rho2) * (1. + beta) + xi * (3. + rho2)) * log(1. + xi_i) + (rho21 - beta) / (1. + xi) - 3. - rho2;
    const double Ye = (5. - rho2 + 4. * beta * (1. + rho2)) / (2. * (1. + 3. * beta) * log(3. + xi_i) - rho2 - 2. * beta * (2. - rho2));
    const double xe = (1. + xi) * (1. + Ye);
    const double cLi = cL / rho21;
    const double Le = log(AZ13 * sqrt(xe) * q / (q + cLi * xe)) - 0.5 * log(1. + cLe * xe);
    double Phi_e = Be * Le;
    if (Phi_e < 0.)
      Phi_e = 0.;
    double Bmu;
    if (xi <= 1E-03)
      Bmu = 0.5 * xi * (5. - rho2 + beta * (3. + rho2));
    else
      Bmu = ((1. + rho2) * (1. + 1.5 * beta) - xi_i * (1. + 2. * beta) * rho21) * log(1. + xi) + xi * (rho21 - beta) / (1. + xi) + (1. + 2. * beta) * rho21;
    const double Ymu = (4. + rho2 + 3. * beta * (1. + rho2)) / ((1. + rho2) * (1.5 + 2. * beta) * log(3. + xi) + 1. - 1.5 * rho2);
    const double xmu = (1. + xi) * (1. + Ymu);
    const double Lmu = log(r * AZ13 * q / (1.5 * Z13 * (q + cLi * xmu)));
    double Phi_mu = Bmu * Lmu;
    if (Phi_mu < 0.)
      Phi_mu = 0.;
    I -= (Phi_e + Phi_mu / (r * r)) * (1. - rho) * wGQ[i] * tmin;
  }
  double zeta;
  if (gamma <= 35.)
    zeta = 0.;
  else {
    double gamma1, gamma2;
    if (Z == 1.) {
      gamma1 = 4.4E-05;
      gamma2 = 4.8E-05;
    } else {
      gamma1 = 1.95E-05;
      gamma2 = 5.30E-05;
    }
    zeta = 0.073 * log(gamma / (1. + gamma1 * gamma * Z13 * Z13)) - 0.26;
    if (zeta <= 0.)
      zeta = 0.;
    else {
      zeta /= 0.058 * log(gamma / (1. + gamma2 * gamma * Z13)) - 0.14;
    }
  }
  const double E = K + mass;
  const double dcs = 1.794664E-34 * Z * (Z + zeta) * (E - q) * I / (q * E);
  return (dcs < 0.) ? 0. : dcs;
}
```