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

```asm
<BSIM4RdsEndIso>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x8(%rbp)
  movsd  %xmm1,-0x10(%rbp)
  movsd  %xmm2,-0x18(%rbp)
  movsd  %xmm3,-0x20(%rbp)
  movsd  %xmm4,-0x28(%rbp)
  movsd  %xmm5,-0x30(%rbp)
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %rdx,-0x40(%rbp)
  cmpl   $0x1,-0x38(%rbp)
  jne    L155
  cmpl   $0x6,-0x34(%rbp)
  je     L225
  cmpl   $0x6,-0x34(%rbp)
  jg     L265
  cmpl   $0x5,-0x34(%rbp)
  je     L232
  cmpl   $0x5,-0x34(%rbp)
  jg     L265
  cmpl   $0x2,-0x34(%rbp)
  jg     L17
  cmpl   $0x0,-0x34(%rbp)
  jg     L232
  jmp    L265
L17:
  mov    -0x34(%rbp),%eax
  sub    $0x3,%eax
  cmp    $0x1,%eax
  ja     L265
  jmp    L225
L232:
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L257
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L257
  mov    -0x40(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L259
L257:
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  -0x8(%rbp),%xmm1
  mulsd  -0x30(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L259
L225:
  movsd  -0x18(%rbp),%xmm0
  addsd  -0x20(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L237
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L237
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L237:
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L248
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L248
  mov    -0x40(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L259
L248:
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm2
  movsd  D8(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  movsd  -0x18(%rbp),%xmm1
  addsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L259
L265:
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L259
L155:
  mov    -0x34(%rbp),%eax
  cmp    $0x8,%eax
  seta   %dl
  test   %dl,%dl
  jne    L100
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  mov    %rax,%rdx
  and    $0x114,%edx
  test   %rdx,%rdx
  setne  %dl
  test   %dl,%dl
  jne    L169
  and    $0x8a,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  je     L100
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L185
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L185
  mov    -0x40(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L259
L185:
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  -0x8(%rbp),%xmm1
  mulsd  -0x30(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L259
L169:
  movsd  -0x18(%rbp),%xmm0
  addsd  -0x20(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L136
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L136
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L136:
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L39
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L39
  mov    -0x40(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L259
L39:
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm2
  movsd  D8(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  movsd  -0x18(%rbp),%xmm1
  addsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L259
L100:
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L259:
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D20
type_guessed: string
name: read_data
arguments: label: D8
type_guessed: f64
name: read_data
arguments: label: D7
type_guessed: string

tool: D20: (DMCG + DMCI) can not be equal to zero

tool: D8: 3

tool: D7: Warning: Specified RGEO = %d not matched


assistant: ```c
int BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend)
double Weffcj, Rsh, DMCG, DMCI, DMDG;
int rgeo, Type;
double nuEnd, *Rend;
{
  if (Type == 1) {
    switch (rgeo) {
    case 1:
    case 2:
    case 5:
      if (nuEnd == 0.0)
        *Rend = 0.0;
      else
        *Rend = Rsh * DMCG / (Weffcj * nuEnd);
      break;
    case 3:
    case 4:
    case 6:
      if ((DMCG + DMCI) == 0.0)
        printf("(DMCG + DMCI) can not be equal to zero\n");
      if (nuEnd == 0.0)
        *Rend = 0.0;
      else
        *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI));
      break;
    default:
      printf("Warning: Specified RGEO = %d not matched\n", rgeo);
    }
  } else {
    switch (rgeo) {
    case 1:
    case 3:
    case 7:
      if (nuEnd == 0.0)
        *Rend = 0.0;
      else
        *Rend = Rsh * DMCG / (Weffcj * nuEnd);
      break;
    case 2:
    case 4:
    case 8:
      if ((DMCG + DMCI) == 0.0)
        printf("(DMCG + DMCI) can not be equal to zero\n");
      if (nuEnd == 0.0)
        *Rend = 0.0;
      else
        *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI));
      break;
    default:
      printf("Warning: Specified RGEO = %d not matched\n", rgeo);
    }
  }
  return 0;
}
```