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

```asm
<c_sgbco>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  movslq %edx,%rsi
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    0xe0(%rsp),%rax
  mov    %rdi,0x8(%rsp)
  lea    0x1(%rcx),%edi
  mov    %ecx,0x44(%rsp)
  mov    0xe8(%rsp),%r12
  mov    %r9,0x20(%rsp)
  mov    %rax,0x70(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  mov    %ecx,%eax
  mov    %rsi,0x78(%rsp)
  shl    $0x3,%rsi
  lea    (%rdi,%r8,1),%ecx
  mov    %edi,0x30(%rsp)
  mov    %rsi,0x68(%rsp)
  test   %ebp,%ebp
  jle    L203
  mov    %ebp,%esi
  mov    %r8d,0x28(%rsp)
  xor    %ebx,%ebx
  mov    $0x1,%r15d
  sub    %eax,%esi
  mov    %ebp,0x18(%rsp)
  mov    %ebx,%ebp
  mov    %ecx,%ebx
  mov    %esi,0x38(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    %r12,0x48(%rsp)
  mov    %edi,%r12d
  nopl   0x0(%rax,%rax,1)
L263:
  lea    -0x1(%rbx),%r14d
  mov    0x8(%rsp),%rcx
  mov    %r12d,%edi
  lea    0x0(%rbp,%r14,1),%eax
  cltq
  lea    (%rcx,%rax,8),%rsi
  xor    %eax,%eax
  call   <c_sasum@plt>
  pxor   %xmm0,%xmm0
  cmp    0x30(%rsp),%ebx
  movsd  0x10(%rsp),%xmm7
  cvtsi2sd %eax,%xmm0
  cmovg  %r14d,%ebx
  xor    %eax,%eax
  cmp    %r15d,0x28(%rsp)
  setge  %al
  add    %eax,%r12d
  xor    %eax,%eax
  cmp    0x38(%rsp),%r15d
  setge  %al
  add    $0x1,%r15d
  add    %r13d,%ebp
  maxsd  %xmm0,%xmm7
  sub    %eax,%r12d
  movsd  %xmm7,0x10(%rsp)
  cmp    %r15d,0x18(%rsp)
  jge    L263
  mov    0x28(%rsp),%r14d
  mov    0x18(%rsp),%ebp
  sub    $0x8,%rsp
  mov    %r13d,%esi
  mov    0x50(%rsp),%r12
  lea    0x9c(%rsp),%rax
  push   %rax
  mov    0x54(%rsp),%ebx
  mov    %r14d,%r8d
  mov    %ebp,%edx
  mov    0x18(%rsp),%r15
  mov    0x30(%rsp),%r9
  xor    %eax,%eax
  mov    %ebx,%ecx
  mov    %r15,%rdi
  call   <c_sgbfa@plt>
  mov    0x78(%rsp),%rdx
  mov    %r12,%rdi
  xor    %esi,%esi
  call   <memset@plt>
  movslq %r13d,%rax
  lea    (%rbx,%r14,1),%ecx
  mov    %r13d,%r10d
  lea    0x0(,%rax,8),%rbx
  lea    -0x8(,%rax,8),%r9
  mov    D252(%rip),%rax
  mov    %ecx,0x94(%rsp)
  lea    0x1(%rcx),%esi
  movslq %ecx,%rcx
  mov    %rbx,0x28(%rsp)
  movq   D264(%rip),%xmm2
  movq   %rax,%xmm7
  movslq %esi,%rax
  lea    (%r15,%rcx,8),%r8
  mov    %esi,0x90(%rsp)
  sub    $0x2,%rax
  mov    %r12,%rsi
  mov    $0x1,%r15d
  xor    %ebx,%ebx
  mov    %rcx,0x98(%rsp)
  pop    %rcx
  mov    $0x1,%ecx
  pop    %rdi
  mov    %rax,0x58(%rsp)
  lea    0x8(%r12),%rax
  mov    %ebp,%r12d
  mov    %r8,%rbp
  mov    %rax,0x60(%rsp)
  mov    %r13d,%r8d
  mov    %r9,%r13
  mov    %r14d,%r9d
  mov    %ecx,%r14d
  jmp    L112
  nopl   0x0(%rax)
L305:
  divsd  %xmm1,%xmm4
  movapd %xmm3,%xmm8
  divsd  %xmm1,%xmm8
L268:
  mov    0x20(%rsp),%rcx
  add    $0x1,%r14d
  mov    -0x4(%rcx,%r15,4),%eax
  add    %r9d,%eax
  cmp    %ebx,%eax
  cmovl  %ebx,%eax
  cmp    %r12d,%eax
  cmovg  %r12d,%eax
  mov    %eax,%ebx
  cmp    %eax,%r14d
  jle    L210
L146:
  movsd  %xmm4,-0x8(%rsi,%r15,8)
  add    %r8d,%r10d
  add    $0x1,%r15
  add    0x18(%rsp),%rbp
  cmp    %r14d,%r12d
  jl     L196
L112:
  movsd  -0x8(%rsi,%r15,8),%xmm0
  pxor   %xmm6,%xmm6
  ucomisd %xmm6,%xmm0
  jp     L165
  je     L304
L165:
  pxor   %xmm5,%xmm5
  andpd  %xmm2,%xmm7
  comisd %xmm0,%xmm5
  jae    L304
  xorpd  D172(%rip),%xmm7
L304:
  movapd %xmm7,%xmm4
  movsd  0x0(%rbp),%xmm1
  subsd  %xmm0,%xmm4
  movapd %xmm1,%xmm3
  andpd  %xmm2,%xmm3
  movapd %xmm4,%xmm5
  andpd  %xmm2,%xmm5
  comisd %xmm3,%xmm5
  ja     L349
L288:
  pxor   %xmm6,%xmm6
  movapd %xmm7,%xmm3
  xorpd  D172(%rip),%xmm3
  ucomisd %xmm6,%xmm1
  subsd  %xmm0,%xmm3
  jp     L305
  jne    L305
  mov    D252(%rip),%rax
  movq   %rax,%xmm8
  movq   %rax,%xmm4
  jmp    L268
  nopl   0x0(%rax,%rax,1)
L349:
  divsd  %xmm5,%xmm3
  mov    %r12d,%edi
  mov    $0x1,%eax
  mov    %r9d,0x54(%rsp)
  mov    %r8d,0x50(%rsp)
  mov    %r10d,0x48(%rsp)
  mov    %rsi,0x30(%rsp)
  movsd  %xmm7,0x38(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x28(%rsp)
  call   <c_sscal@plt>
  movsd  0x28(%rsp),%xmm3
  movsd  0x38(%rsp),%xmm7
  mov    0x30(%rsp),%rsi
  movq   D264(%rip),%xmm2
  mulsd  %xmm3,%xmm7
  movsd  0x0(%rbp),%xmm1
  mov    0x54(%rsp),%r9d
  movsd  -0x8(%rsi,%r15,8),%xmm0
  mov    0x50(%rsp),%r8d
  mov    0x48(%rsp),%r10d
  movapd %xmm7,%xmm4
  subsd  %xmm0,%xmm4
  movapd %xmm4,%xmm5
  andpd  %xmm2,%xmm5
  jmp    L288
  nopw   0x0(%rax,%rax,1)
L210:
  mov    0x8(%rsp),%rdi
  movslq %r14d,%rax
  mov    0x60(%rsp),%rdx
  andpd  %xmm2,%xmm3
  lea    -0x8(%rsi,%rax,8),%rcx
  movslq %r10d,%rax
  add    0x58(%rsp),%rax
  lea    (%rdi,%rax,8),%r11
  mov    %ebx,%eax
  sub    %r15d,%eax
  sub    $0x1,%eax
  add    %r15,%rax
  lea    (%rdx,%rax,8),%rdi
  mov    %r11,%rdx
  mov    %rcx,%rax
  nop
L120:
  movsd  (%rdx),%xmm0
  movsd  (%rax),%xmm6
  add    $0x8,%rax
  add    %r13,%rdx
  movapd %xmm0,%xmm1
  mulsd  %xmm8,%xmm1
  mulsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm1
  addsd  %xmm6,%xmm0
  andpd  %xmm2,%xmm1
  movsd  %xmm0,-0x8(%rax)
  andpd  %xmm2,%xmm0
  addsd  %xmm1,%xmm3
  addsd  %xmm0,%xmm5
  cmp    %rdi,%rax
  jne    L120
  comisd %xmm5,%xmm3
  jbe    L146
  movapd %xmm8,%xmm1
  subsd  %xmm4,%xmm1
  nopl   0x0(%rax)
L281:
  movsd  (%r11),%xmm0
  add    $0x8,%rcx
  add    %r13,%r11
  mulsd  %xmm1,%xmm0
  addsd  -0x8(%rcx),%xmm0
  movsd  %xmm0,-0x8(%rcx)
  cmp    %rdi,%rcx
  jne    L281
  movapd %xmm8,%xmm4
  jmp    L146
  nopl   0x0(%rax)
L196:
  mov    %r12d,%ebp
  xor    %eax,%eax
  mov    %r8d,%r13d
  mov    %rsi,%r12
  mov    %ebp,%edi
  xor    %r15d,%r15d
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  call   <c_sscal@plt>
  mov    0x20(%rsp),%rax
  mov    0x78(%rsp),%rcx
  mov    %r13d,0x28(%rsp)
  mov    0x84(%rsp),%esi
  movq   D264(%rip),%xmm2
  lea    -0x4(%rax,%rcx,4),%rcx
  mov    0x68(%rsp),%rax
  lea    -0x8(%r12,%rax,1),%rbx
  lea    -0x1(%rbp),%eax
  mov    %eax,0x38(%rsp)
  imul   %r13d,%eax
  mov    %rbx,%r14
  mov    %r12,%r13
  mov    %rbx,0x48(%rsp)
  mov    %r15,%r12
  mov    %ebp,%r15d
  lea    0x1(%rsi,%rax,1),%r8d
  lea    0x1(%rbp),%eax
  mov    %rcx,%rbp
  mov    %eax,0x30(%rsp)
  mov    %r8d,%ebx
  jmp    L296
  nopl   (%rax)
L35:
  movsd  (%r14),%xmm0
  movapd %xmm0,%xmm1
  andpd  %xmm2,%xmm1
  comisd D252(%rip),%xmm1
  jbe    L214
  movsd  D252(%rip),%xmm0
  mov    %r13,%rsi
  mov    %r15d,%edi
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  call   <c_sscal@plt>
  movsd  (%r14),%xmm0
  movq   D264(%rip),%xmm2
L214:
  movslq 0x0(%rbp),%rax
  add    $0x1,%r12
  sub    $0x4,%rbp
  sub    $0x8,%r14
  sub    0x28(%rsp),%ebx
  lea    -0x8(%r13,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm0,(%rax)
  lea    0x1(%r12),%eax
  movsd  %xmm1,0x8(%r14)
  cmp    %eax,%r15d
  jl     L138
L296:
  mov    %r15d,%eax
  sub    %r12d,%eax
  cmp    %eax,%r15d
  jle    L35
  mov    0x30(%rsp),%eax
  mov    0x8(%rsp),%rcx
  sub    %r12d,%eax
  cltq
  lea    -0x8(%r13,%rax,8),%rdx
  movslq %ebx,%rax
  lea    (%rcx,%rax,8),%rsi
  mov    0x44(%rsp),%ecx
  mov    %r12d,%eax
  cmp    %r12d,%ecx
  cmovle %ecx,%eax
  mov    %eax,%edi
  xor    %eax,%eax
  call   <c_sdot@plt>
  pxor   %xmm0,%xmm0
  movq   D264(%rip),%xmm2
  cvtsi2sd %eax,%xmm0
  addsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  jmp    L35
  nopl   0x0(%rax,%rax,1)
L138:
  mov    %r13,%r12
  mov    %r15d,%edi
  xor    %eax,%eax
  mov    0x48(%rsp),%rbx
  mov    %r12,%rsi
  mov    0x28(%rsp),%r13d
  mov    %r15d,%ebp
  mov    $0x1,%r14d
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %r15d,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  call   <c_sscal@plt>
  mov    D252(%rip),%rax
  mov    0x80(%rsp),%r15d
  mov    %rbx,0x30(%rsp)
  movq   D264(%rip),%xmm2
  mov    %r12,%rbx
  mov    %rax,0x28(%rsp)
  mov    %r15d,%r12d
  mov    0x20(%rsp),%r15
  nopl   0x0(%rax,%rax,1)
L202:
  movslq -0x4(%r15,%r14,4),%rax
  movsd  -0x8(%rbx,%r14,8),%xmm1
  lea    -0x8(%rbx,%rax,8),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm1,(%rax)
  movsd  %xmm0,-0x8(%rbx,%r14,8)
  cmp    %r14d,%ebp
  jle    L287
  mov    0x8(%rsp),%rcx
  movslq %r12d,%rax
  mov    %ebp,%edi
  lea    (%rbx,%r14,8),%rdx
  sub    %r14d,%edi
  lea    (%rcx,%rax,8),%rsi
  mov    0x44(%rsp),%eax
  cmp    %eax,%edi
  cmovg  %eax,%edi
  mov    $0x1,%eax
  call   <c_saxpy@plt>
  movsd  -0x8(%rbx,%r14,8),%xmm0
  movq   D264(%rip),%xmm2
L287:
  andpd  %xmm2,%xmm0
  comisd D252(%rip),%xmm0
  jbe    L64
  movsd  D252(%rip),%xmm1
  mov    %rbx,%rsi
  mov    %ebp,%edi
  mov    $0x1,%eax
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <c_sscal@plt>
  movsd  0x20(%rsp),%xmm1
  mulsd  0x28(%rsp),%xmm1
  movq   D264(%rip),%xmm2
  movsd  %xmm1,0x28(%rsp)
L64:
  add    $0x1,%r14
  add    %r13d,%r12d
  cmp    %r14d,%ebp
  jge    L202
  mov    %rbx,%r12
  mov    %ebp,%edi
  xor    %eax,%eax
  mov    0x30(%rsp),%rbx
  mov    %r12,%rsi
  xor    %r14d,%r14d
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x20(%rsp)
  call   <c_sscal@plt>
  mov    0x38(%rsp),%ecx
  movsd  0x20(%rsp),%xmm0
  mov    %r12,0x20(%rsp)
  mulsd  0x28(%rsp),%xmm0
  mov    0x8(%rsp),%rsi
  mov    %r13d,0x28(%rsp)
  mov    %r14d,%r12d
  imul   %r13d,%ecx
  movq   D264(%rip),%xmm2
  movslq %ecx,%rax
  add    0x88(%rsp),%rax
  mov    %ecx,%r14d
  lea    (%rsi,%rax,8),%r15
  movsd  %xmm0,0x30(%rsp)
  mov    %r15,%r13
  mov    %rbx,%r15
  mov    0x80(%rsp),%ebx
  jmp    L191
  nopl   0x0(%rax)
L218:
  movsd  (%r15),%xmm0
  divsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  xorpd  D172(%rip),%xmm1
L17:
  cmp    %edx,%ebx
  mov    %edx,%edi
  mov    0x20(%rsp),%rax
  mov    0x8(%rsp),%rcx
  cmovle %ebx,%edi
  movsd  %xmm0,(%r15)
  movapd %xmm1,%xmm0
  sub    $0x8,%r15
  sub    $0x1,%edi
  sub    %edi,%edx
  movslq %edx,%rdx
  lea    -0x8(%rax,%rdx,8),%rdx
  mov    %ebx,%eax
  sub    %edi,%eax
  lea    -0x1(%r14,%rax,1),%eax
  cltq
  lea    (%rcx,%rax,8),%rsi
  mov    $0x1,%eax
  call   <c_saxpy@plt>
  lea    0x2(%r12),%r8d
  sub    0x18(%rsp),%r13
  sub    0x28(%rsp),%r14d
  cmp    %r8d,%ebp
  movq   D264(%rip),%xmm2
  lea    0x1(%r12),%eax
  jl     L311
  mov    %eax,%r12d
L191:
  movsd  0x0(%r13),%xmm1
  movsd  (%r15),%xmm0
  mov    %ebp,%edx
  sub    %r12d,%edx
  movapd %xmm1,%xmm3
  andpd  %xmm2,%xmm0
  andpd  %xmm2,%xmm3
  comisd %xmm3,%xmm0
  ja     L324
L109:
  pxor   %xmm7,%xmm7
  ucomisd %xmm7,%xmm1
  jp     L218
  jne    L218
  mov    D117(%rip),%rax
  movq   %rax,%xmm1
  mov    D252(%rip),%rax
  movq   %rax,%xmm0
  jmp    L17
  nopl   0x0(%rax)
L324:
  divsd  %xmm0,%xmm3
  mov    0x20(%rsp),%rsi
  mov    %ebp,%edi
  mov    $0x1,%eax
  mov    %edx,0x44(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x38(%rsp)
  call   <c_sscal@plt>
  movsd  0x38(%rsp),%xmm3
  mulsd  0x30(%rsp),%xmm3
  movsd  0x0(%r13),%xmm1
  mov    0x44(%rsp),%edx
  movsd  %xmm3,0x30(%rsp)
  jmp    L109
  nopl   0x0(%rax)
L311:
  mov    0x20(%rsp),%r12
  mov    %ebp,%edi
  xor    %eax,%eax
  mov    %r12,%rsi
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <c_sscal@plt>
  movsd  0x10(%rsp),%xmm5
  pxor   %xmm6,%xmm6
  movsd  0x8(%rsp),%xmm0
  ucomisd %xmm6,%xmm5
  jp     L204
  pxor   %xmm1,%xmm1
  je     L144
L204:
  mulsd  0x30(%rsp),%xmm0
  movapd %xmm0,%xmm1
  divsd  0x10(%rsp),%xmm1
L144:
  mov    0x70(%rsp),%rax
  movsd  %xmm1,(%rax)
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L306
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L203:
  sub    $0x8,%rsp
  mov    %ebp,%edx
  mov    %r13d,%esi
  lea    0x9c(%rsp),%rax
  push   %rax
  mov    0x30(%rsp),%r9
  xor    %eax,%eax
  mov    0x54(%rsp),%ecx
  mov    0x18(%rsp),%rdi
  call   <c_sgbfa@plt>
  mov    0x78(%rsp),%rdx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  call   <c_sscal@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  call   <c_sscal@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  call   <c_sscal@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <c_sasum@plt>
  pxor   %xmm1,%xmm1
  mov    %r12,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm1
  movsd  D252(%rip),%xmm0
  mov    $0x1,%eax
  divsd  %xmm1,%xmm0
  call   <c_sscal@plt>
  pop    %rax
  pxor   %xmm1,%xmm1
  pop    %rdx
  jmp    L144
L306:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D252
type_guessed: f64[2]
name: disassemble_data
arguments: tag: D264
type_guessed: qword
name: disassemble_data
arguments: tag: D172
type_guessed: f32[4]
name: disassemble_data
arguments: tag: D117
type_guessed: f32[2]

tool: {"D252": [1.0,-1.0]}

tool: D264: 9223372036854775807

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

tool: {"D117": [0.0,-1.875]}

assistant: ```c
void c_sgbco(double *abd, int lda, int n, int ml, int mu, int *ipvt, double *rcond, double *z) {
  int info;
  register int is, j, ju, k, kb, kp1, l, la, lm, lz, m, mm;
  double anorm, ek, s, sm, t, wk, wkm, ynorm;
  anorm = 0.;
  l = ml + 1;
  is = l + mu;
  for (j = 1; j <= n; j++) {
    anorm = ({
      const double _x = (double)(anorm);
      const double _y = (double)(c_sasum(l, &abd[is - 1 + (j - 1) * lda]));
      _x > _y ? _x : _y;
    });
    if (is > ml + 1) {
      is--;
    }
    if (j <= mu) {
      l++;
    }
    if (j >= n - ml) {
      l--;
    }
  }
  c_sgbfa(abd, lda, n, ml, mu, ipvt, &info);
  ek = 1.;
  memset(z, 0, n * sizeof(double));
  m = ml + mu + 1;
  ju = 0;
  for (k = 1; k <= n; k++) {
    if (z[k - 1] != 0.) {
      ek = ((-z[k - 1]) >= 0. ? fabs(ek) : -fabs(ek));
    }
    if (fabs(ek - z[k - 1]) > fabs(abd[m - 1 + (k - 1) * lda])) {
      s = fabs(abd[m - 1 + (k - 1) * lda]) / fabs(ek - z[k - 1]);
      c_sscal(n, s, z);
      ek *= s;
    }
    wk = ek - z[k - 1];
    wkm = -ek - z[k - 1];
    s = fabs(wk);
    sm = fabs(wkm);
    if (abd[m - 1 + (k - 1) * lda] != 0.) {
      wk /= abd[m - 1 + (k - 1) * lda];
      wkm /= abd[m - 1 + (k - 1) * lda];
    } else {
      wk = 1.;
      wkm = 1.;
    }
    kp1 = k + 1;
    ju = ({
      const int _i = (int)(({
        const int _i = (int)(ju);
        const int _j = (int)(mu + ipvt[k - 1]);
        _i > _j ? _i : _j;
      }));
      const int _j = (int)(n);
      _i < _j ? _i : _j;
    });
    mm = m;
    if (kp1 <= ju) {
      for (j = kp1; j <= ju; j++) {
        mm--;
        sm += fabs(z[j - 1] + wkm * abd[mm - 1 + (j - 1) * lda]);
        z[j - 1] += wk * abd[mm - 1 + (j - 1) * lda];
        s += fabs(z[j - 1]);
      }
      if (s < sm) {
        t = wkm - wk;
        wk = wkm;
        mm = m;
        for (j = kp1; j <= ju; j++) {
          mm--;
          z[j - 1] += t * abd[mm - 1 + (j - 1) * lda];
        }
      }
    }
    z[k - 1] = wk;
  }
  s = 1. / c_sasum(n, z);
  c_sscal(n, s, z);
  for (kb = 1; kb <= n; kb++) {
    k = n + 1 - kb;
    lm = ({
      const int _i = (int)(ml);
      const int _j = (int)(n - k);
      _i < _j ? _i : _j;
    });
    if (k < n) {
      z[k - 1] += c_sdot(lm, &abd[m + 1 - 1 + (k - 1) * lda], &z[k + 1 - 1]);
    }
    if (fabs(z[k - 1]) > 1.) {
      s = 1. / fabs(z[k - 1]);
      c_sscal(n, s, z);
    }
    l = ipvt[k - 1];
    t = z[l - 1];
    z[l - 1] = z[k - 1];
    z[k - 1] = t;
  }
  s = 1. / c_sasum(n, z);
  c_sscal(n, s, z);
  ynorm = 1.;
  for (k = 1; k <= n; k++) {
    l = ipvt[k - 1];
    t = z[l - 1];
    z[l - 1] = z[k - 1];
    z[k - 1] = t;
    lm = ({
      const int _i = (int)(ml);
      const int _j = (int)(n - k);
      _i < _j ? _i : _j;
    });
    if (k < n) {
      c_saxpy(lm, t, &abd[m + 1 - 1 + (k - 1) * lda], &z[k + 1 - 1]);
    }
    if (fabs(z[k - 1]) > 1.) {
      s = 1. / fabs(z[k - 1]);
      c_sscal(n, s, z);
      ynorm *= s;
    }
  }
  s = 1. / c_sasum(n, z);
  c_sscal(n, s, z);
  ynorm *= s;
  for (kb = 1; kb <= n; kb++) {
    k = n + 1 - kb;
    if (fabs(z[k - 1]) > fabs(abd[m - 1 + (k - 1) * lda])) {
      s = fabs(abd[m - 1 + (k - 1) * lda]) / fabs(z[k - 1]);
      c_sscal(n, s, z);
      ynorm *= s;
    }
    if (abd[m - 1 + (k - 1) * lda] != 0.) {
      z[k - 1] /= abd[m - 1 + (k - 1) * lda];
    } else {
      z[k - 1] = 1.;
    }
    lm = ({
           const int _i = (int)(k);
           const int _j = (int)(m);
           _i < _j ? _i : _j;
         }) -
         1;
    la = m - lm;
    lz = k - lm;
    t = -z[k - 1];
    c_saxpy(lm, t, &abd[la - 1 + (k - 1) * lda], &z[lz - 1]);
  }
  s = 1. / c_sasum(n, z);
  c_sscal(n, s, z);
  ynorm *= s;
  if (anorm != 0.) {
    *rcond = ynorm / anorm;
  } else {
    *rcond = 0.;
  }
  return;
}
```