user: 请将以下的汇编代码转换成C语言代码：

```asm
<s_init_ux_pi_t_box_mpc>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %r9,%r12
  push   %rbp
  push   %rbx
  lea    (%rcx,%rcx,1),%ebx
  sub    $0x28,%rsp
  cmpl   $0x1,0x78(%rsp)
  mov    %edi,0xc(%rsp)
  mov    %esi,0x18(%rsp)
  mov    0x70(%rsp),%rbp
  mov    %edx,0x8(%rsp)
  mov    %r8d,0x14(%rsp)
  je     L429
  xor    %eax,%eax
  xor    %r14d,%r14d
  test   %ebx,%ebx
  jle    L669
  mov    0x68(%rsp),%rax
  mov    (%r9),%rdi
  xor    %ecx,%ecx
  pxor   %xmm4,%xmm4
  mov    0x0(%rbp),%rdx
  movss  D158(%rip),%xmm1
  movss  D92(%rip),%xmm3
  mov    (%rax),%rax
  movss  D24(%rip),%xmm5
  jmp    L760
  nopl   (%rax)
L206:
  comiss %xmm0,%xmm1
  jbe    L825
  movss  (%rax),%xmm0
  subss  0x4(%rax),%xmm0
  mulss  %xmm5,%xmm0
  movss  %xmm0,(%rsi)
  subss  (%rax),%xmm0
  movss  %xmm0,(%rdx)
  movss  0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  (%rsi),%xmm0
  movss  %xmm0,0x4(%rdx)
L151:
  add    $0x2,%ecx
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %ebx,%ecx
  jge    L175
L760:
  mov    %ecx,%esi
  movaps %xmm4,%xmm2
  sar    %esi
  movslq %esi,%rsi
  lea    (%rdi,%rsi,4),%rsi
  movl   $0x0,(%rsi)
  subss  (%rax),%xmm2
  movss  %xmm2,(%rdx)
  movss  0x4(%rax),%xmm0
  comiss %xmm2,%xmm1
  xorps  %xmm3,%xmm0
  subss  (%rsi),%xmm0
  movss  %xmm0,0x4(%rdx)
  ja     L206
  comiss %xmm0,%xmm1
  jbe    L151
  movss  %xmm1,0x4(%rdx)
  add    $0x2,%ecx
  add    $0x8,%rax
  add    $0x8,%rdx
  movss  -0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,(%rsi)
  cmp    %ebx,%ecx
  jl     L760
L175:
  mov    %ebx,%eax
  mov    %ebx,%r14d
  sar    %eax
L669:
  cmp    %eax,0x8(%rsp)
  jle    L615
  mov    0x8(%rsp),%edi
  mov    (%r12),%rcx
  xor    %esi,%esi
  lea    -0x1(%rdi),%edx
  sub    %eax,%edx
  cltq
  lea    0x4(,%rdx,4),%rdx
  lea    (%rcx,%rax,4),%rdi
  call   <memset@plt>
L615:
  mov    0x14(%rsp),%eax
  lea    (%rax,%rax,1),%r15d
  cmp    %r15d,%r14d
  jge    L385
  mov    %r15d,%edi
  mov    0x0(%rbp),%rsi
  sub    %r14d,%edi
  lea    -0x1(%rdi),%eax
  cmp    $0x2,%eax
  jbe    L102
  movslq %r14d,%rax
  movaps D137(%rip),%xmm0
  lea    (%rsi,%rax,4),%rdx
  mov    %edi,%eax
  shr    $0x2,%eax
  lea    -0x1(%rax),%ecx
  lea    0x10(%rdx),%rax
  shl    $0x4,%rcx
  add    %rax,%rcx
  jmp    L272
  nopw   0x0(%rax,%rax,1)
L556:
  add    $0x10,%rax
L272:
  movups %xmm0,(%rdx)
  mov    %rax,%rdx
  cmp    %rcx,%rax
  jne    L556
  mov    %edi,%eax
  and    $0xfffffffc,%eax
  add    %eax,%r14d
  cmp    %edi,%eax
  je     L385
L102:
  movss  D137(%rip),%xmm0
  movslq %r14d,%rax
  lea    0x0(,%rax,4),%rdx
  movss  %xmm0,(%rsi,%rax,4)
  lea    0x1(%r14),%eax
  cmp    %r15d,%eax
  jge    L385
  add    $0x2,%r14d
  movss  %xmm0,0x4(%rsi,%rdx,1)
  cmp    %r14d,%r15d
  jle    L385
  movss  %xmm0,0x8(%rsi,%rdx,1)
L385:
  mov    0x8(%rsp),%r14d
  add    0x18(%rsp),%r14d
  cmpl   $0x1,0xc(%rsp)
  jle    L194
  mov    %r15d,%eax
  movslq 0xc(%rsp),%rdi
  mov    %rbp,0x70(%rsp)
  mov    $0x1,%r13d
  sar    %eax
  mov    %r12,%rbp
  mov    %ebx,0x1c(%rsp)
  movss  D158(%rip),%xmm1
  mov    %eax,0x10(%rsp)
  mov    0x70(%rsp),%r12
  mov    %r14d,%ebx
  movss  D92(%rip),%xmm3
  mov    %r13,%r14
  mov    %rdi,%r13
  nopl   0x0(%rax)
L202:
  xor    %eax,%eax
  test   %r15d,%r15d
  jle    L112
  mov    0x68(%rsp),%rax
  mov    0x0(%rbp,%r14,8),%r10
  xor    %esi,%esi
  pxor   %xmm4,%xmm4
  mov    (%r12,%r14,8),%rdx
  mov    (%rax,%r14,8),%rax
  jmp    L531
  nopl   (%rax)
L651:
  comiss %xmm0,%xmm1
  jbe    L625
  movss  (%rax),%xmm0
  subss  0x4(%rax),%xmm0
  mulss  D24(%rip),%xmm0
  movss  %xmm0,(%rcx)
  subss  (%rax),%xmm0
  movss  %xmm0,(%rdx)
  movss  0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  (%rcx),%xmm0
  movss  %xmm0,0x4(%rdx)
L664:
  add    $0x2,%esi
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %r15d,%esi
  jge    L543
L531:
  mov    %esi,%ecx
  movaps %xmm4,%xmm2
  sar    %ecx
  movslq %ecx,%rcx
  lea    (%r10,%rcx,4),%rcx
  movl   $0x0,(%rcx)
  subss  (%rax),%xmm2
  movss  %xmm2,(%rdx)
  movss  0x4(%rax),%xmm0
  comiss %xmm2,%xmm1
  xorps  %xmm3,%xmm0
  subss  (%rcx),%xmm0
  movss  %xmm0,0x4(%rdx)
  ja     L651
  comiss %xmm0,%xmm1
  jbe    L664
  movss  %xmm1,0x4(%rdx)
  add    $0x2,%esi
  add    $0x8,%rax
  add    $0x8,%rdx
  movss  -0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,(%rcx)
  cmp    %r15d,%esi
  jl     L531
L543:
  movslq 0x10(%rsp),%rax
L112:
  cmp    %ebx,%eax
  jge    L306
  mov    0x0(%rbp,%r14,8),%rsi
  lea    -0x1(%rbx),%edx
  sub    %eax,%edx
  lea    (%rsi,%rax,4),%rdi
  lea    0x4(,%rdx,4),%rdx
  xor    %esi,%esi
  call   <memset@plt>
  movss  D158(%rip),%xmm1
  movss  D92(%rip),%xmm3
L306:
  add    $0x1,%r14
  cmp    %r13,%r14
  jne    L202
  mov    %r12,%rax
  mov    %ebx,%r14d
  mov    0x1c(%rsp),%ebx
  mov    %rbp,%r12
  mov    %rax,%rbp
L194:
  test   %ebx,%ebx
  jle    L361
  movslq 0xc(%rsp),%rax
  mov    0x0(%rbp,%rax,8),%rcx
  lea    -0x1(%rbx),%eax
  cmp    $0x2,%eax
  jbe    L353
  mov    %ebx,%edx
  movaps D137(%rip),%xmm0
  mov    %rcx,%rax
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rcx,%rdx,1),%rdx
  nopl   0x0(%rax,%rax,1)
L872:
  movups %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L872
  mov    %ebx,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%bl
  je     L361
L85:
  movss  D137(%rip),%xmm0
  movslq %eax,%rdx
  lea    0x0(,%rdx,4),%rsi
  movss  %xmm0,(%rcx,%rdx,4)
  lea    0x1(%rax),%edx
  cmp    %ebx,%edx
  jge    L361
  add    $0x2,%eax
  movss  %xmm0,0x4(%rcx,%rsi,1)
  cmp    %ebx,%eax
  jge    L361
  movss  %xmm0,0x8(%rcx,%rsi,1)
L361:
  mov    0x8(%rsp),%eax
  lea    (%rax,%rax,1),%edx
  cmp    0x14(%rsp),%eax
  jge    L580
  movslq 0xc(%rsp),%rax
  mov    0x68(%rsp),%rbx
  movslq %edx,%rcx
  mov    %edx,%r8d
  shl    $0x2,%rcx
  movss  D158(%rip),%xmm1
  pxor   %xmm4,%xmm4
  movss  D24(%rip),%xmm5
  mov    (%rbx,%rax,8),%rdi
  mov    (%r12,%rax,8),%rsi
  movss  D92(%rip),%xmm3
  add    %rcx,%rdi
  add    0x0(%rbp,%rax,8),%rcx
  jmp    L78
  nopl   0x0(%rax,%rax,1)
L46:
  comiss %xmm0,%xmm1
  jbe    L809
  movss  (%rdi),%xmm0
  subss  0x4(%rdi),%xmm0
  mulss  %xmm5,%xmm0
  movss  %xmm0,(%rax)
  subss  (%rdi),%xmm0
  movss  %xmm0,(%rcx)
  movss  0x4(%rdi),%xmm0
  xorps  %xmm3,%xmm0
  subss  (%rax),%xmm0
  movss  %xmm0,0x4(%rcx)
L797:
  add    $0x2,%r8d
  add    $0x8,%rdi
  add    $0x8,%rcx
  cmp    %r15d,%r8d
  jge    L592
L78:
  mov    %r8d,%eax
  movaps %xmm4,%xmm2
  shr    $0x1f,%eax
  add    %r8d,%eax
  sar    %eax
  cltq
  lea    (%rsi,%rax,4),%rax
  movl   $0x0,(%rax)
  subss  (%rdi),%xmm2
  movss  %xmm2,(%rcx)
  movss  0x4(%rdi),%xmm0
  comiss %xmm2,%xmm1
  xorps  %xmm3,%xmm0
  subss  (%rax),%xmm0
  movss  %xmm0,0x4(%rcx)
  ja     L46
  comiss %xmm0,%xmm1
  jbe    L797
  movss  %xmm1,0x4(%rcx)
  movss  0x4(%rdi),%xmm0
  xorps  %xmm3,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  jmp    L797
  nopl   0x0(%rax)
L825:
  movss  %xmm1,(%rdx)
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rsi)
  jmp    L151
  nopl   (%rax)
L625:
  movss  %xmm1,(%rdx)
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rcx)
  jmp    L664
  nopl   (%rax)
L809:
  movss  %xmm1,(%rcx)
  movss  (%rdi),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  jmp    L797
  nopl   (%rax)
L592:
  sub    $0x1,%r15d
  mov    0x14(%rsp),%ebx
  xor    %eax,%eax
  sub    %edx,%r15d
  and    $0xfffffffe,%r15d
  cmp    %ebx,0x8(%rsp)
  cmovge %eax,%r15d
  lea    0x2(%rdx,%r15,1),%ebx
  sar    %ebx
  mov    %ebx,0x8(%rsp)
L580:
  cmp    %r14d,0x8(%rsp)
  jge    L169
  movslq 0xc(%rsp),%rax
  movslq 0x8(%rsp),%rbx
  lea    -0x1(%r14),%r10d
  xor    %esi,%esi
  mov    (%r12,%rax,8),%rax
  sub    %ebx,%r10d
  lea    0x4(,%r10,4),%rdx
  lea    (%rax,%rbx,4),%rdi
  call   <memset@plt>
L169:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  js     L290
  mov    0x18(%rsp),%edi
  test   %edi,%edi
  jle    L290
  mov    0x60(%rsp),%rbx
  movslq %eax,%r12
  movslq %edi,%rbp
  shl    $0x2,%rbp
  lea    0x8(%rbx,%r12,8),%r12
  nop
L627:
  mov    (%rbx),%rdi
  mov    %rbp,%rdx
  xor    %esi,%esi
  add    $0x8,%rbx
  call   <memset@plt>
  cmp    %rbx,%r12
  jne    L627
L290:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L429:
  test   %ebx,%ebx
  jle    L501
  mov    0x68(%rsp),%rax
  mov    (%r9),%rdi
  xor    %ecx,%ecx
  movss  D92(%rip),%xmm3
  mov    0x0(%rbp),%rdx
  movss  D158(%rip),%xmm1
  mov    (%rax),%rax
  movss  D24(%rip),%xmm4
  jmp    L249
  nopl   0x0(%rax,%rax,1)
L441:
  comiss %xmm0,%xmm1
  jbe    L702
  movss  (%rax),%xmm0
  subss  0x4(%rax),%xmm0
  mulss  %xmm4,%xmm0
  movss  %xmm0,(%rsi)
  subss  (%rax),%xmm0
  movss  %xmm0,(%rdx)
  movss  0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  (%rsi),%xmm0
  movss  %xmm0,0x4(%rdx)
L516:
  add    $0x2,%ecx
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %ebx,%ecx
  jge    L600
L249:
  mov    %ecx,%esi
  sar    %esi
  movslq %esi,%rsi
  lea    (%rdi,%rsi,4),%rsi
  movss  (%rsi),%xmm2
  subss  (%rax),%xmm2
  movss  %xmm2,(%rdx)
  movss  0x4(%rax),%xmm0
  comiss %xmm2,%xmm1
  xorps  %xmm3,%xmm0
  subss  (%rsi),%xmm0
  movss  %xmm0,0x4(%rdx)
  ja     L441
  comiss %xmm0,%xmm1
  jbe    L516
  movss  %xmm1,0x4(%rdx)
  add    $0x2,%ecx
  add    $0x8,%rax
  add    $0x8,%rdx
  movss  -0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,(%rsi)
  cmp    %ebx,%ecx
  jl     L249
L600:
  mov    %ebx,%esi
L801:
  mov    0x14(%rsp),%eax
  lea    (%rax,%rax,1),%edi
  cmp    %esi,%edi
  jle    L13
  mov    %edi,%r10d
  mov    0x0(%rbp),%r11
  sub    %esi,%r10d
  lea    -0x1(%r10),%eax
  cmp    $0x2,%eax
  jbe    L3
  movslq %esi,%rax
  movaps D137(%rip),%xmm0
  lea    (%r11,%rax,4),%rdx
  mov    %r10d,%eax
  shr    $0x2,%eax
  lea    -0x1(%rax),%ecx
  lea    0x10(%rdx),%rax
  shl    $0x4,%rcx
  add    %rax,%rcx
  jmp    L40
L58:
  add    $0x10,%rax
L40:
  movups %xmm0,(%rdx)
  mov    %rax,%rdx
  cmp    %rax,%rcx
  jne    L58
  mov    %r10d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%esi
  cmp    %eax,%r10d
  je     L242
L3:
  movss  D137(%rip),%xmm0
  movslq %esi,%rax
  lea    0x0(,%rax,4),%rdx
  movss  %xmm0,(%r11,%rax,4)
  lea    0x1(%rsi),%eax
  cmp    %edi,%eax
  jge    L242
  add    $0x2,%esi
  movss  %xmm0,0x4(%r11,%rdx,1)
  cmp    %edi,%esi
  jge    L242
  movss  %xmm0,0x8(%r11,%rdx,1)
L242:
  cmpl   $0x1,0xc(%rsp)
  jle    L259
L19:
  mov    0xc(%rsp),%r14d
  mov    0x68(%rsp),%r9
  mov    $0x1,%r11d
  movss  D92(%rip),%xmm3
  movss  D158(%rip),%xmm1
  movss  D24(%rip),%xmm4
  nopl   0x0(%rax)
L554:
  mov    (%r12,%r11,8),%r8
  mov    (%r9,%r11,8),%rax
  xor    %ecx,%ecx
  mov    0x0(%rbp,%r11,8),%rdx
  jmp    L533
  nopl   0x0(%rax)
L116:
  comiss %xmm0,%xmm1
  jbe    L527
  movss  (%rax),%xmm0
  subss  0x4(%rax),%xmm0
  mulss  %xmm4,%xmm0
  movss  %xmm0,(%rsi)
  subss  (%rax),%xmm0
  movss  %xmm0,(%rdx)
  movss  0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  (%rsi),%xmm0
  movss  %xmm0,0x4(%rdx)
L897:
  add    $0x2,%ecx
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %edi,%ecx
  jge    L571
L533:
  mov    %ecx,%esi
  sar    %esi
  movslq %esi,%rsi
  lea    (%r8,%rsi,4),%rsi
  movss  (%rsi),%xmm2
  subss  (%rax),%xmm2
  movss  %xmm2,(%rdx)
  movss  0x4(%rax),%xmm0
  comiss %xmm2,%xmm1
  xorps  %xmm3,%xmm0
  subss  (%rsi),%xmm0
  movss  %xmm0,0x4(%rdx)
  ja     L116
  comiss %xmm0,%xmm1
  jbe    L897
  movss  %xmm1,0x4(%rdx)
  add    $0x2,%ecx
  add    $0x8,%rax
  add    $0x8,%rdx
  movss  -0x4(%rax),%xmm0
  xorps  %xmm3,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,(%rsi)
  cmp    %edi,%ecx
  jl     L533
L571:
  add    $0x1,%r11
  cmp    %r11,%r14
  jne    L554
L259:
  test   %ebx,%ebx
  jle    L268
  movslq 0xc(%rsp),%rax
  mov    0x0(%rbp,%rax,8),%rcx
  lea    -0x1(%rbx),%eax
  cmp    $0x2,%eax
  jbe    L616
  mov    %ebx,%edx
  movaps D137(%rip),%xmm0
  mov    %rcx,%rax
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rcx,%rdx,1),%rdx
  nopw   0x0(%rax,%rax,1)
L152:
  movups %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L152
  mov    %ebx,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%bl
  je     L268
L478:
  movss  D137(%rip),%xmm0
  movslq %eax,%rdx
  lea    0x0(,%rdx,4),%rsi
  movss  %xmm0,(%rcx,%rdx,4)
  lea    0x1(%rax),%edx
  cmp    %ebx,%edx
  jge    L268
  add    $0x2,%eax
  movss  %xmm0,0x4(%rcx,%rsi,1)
  cmp    %ebx,%eax
  jge    L268
  movss  %xmm0,0x8(%rcx,%rsi,1)
L268:
  mov    0x8(%rsp),%eax
  lea    (%rax,%rax,1),%esi
  cmp    0x14(%rsp),%eax
  jge    L290
  movslq 0xc(%rsp),%rax
  mov    0x68(%rsp),%rbx
  movslq %esi,%rdx
  movss  D92(%rip),%xmm3
  shl    $0x2,%rdx
  movss  D158(%rip),%xmm1
  movss  D24(%rip),%xmm4
  mov    (%rbx,%rax,8),%rcx
  mov    (%r12,%rax,8),%r8
  add    %rdx,%rcx
  add    0x0(%rbp,%rax,8),%rdx
  jmp    L662
  nopl   0x0(%rax)
L503:
  comiss %xmm0,%xmm1
  jbe    L850
  movss  (%rcx),%xmm0
  subss  0x4(%rcx),%xmm0
  mulss  %xmm4,%xmm0
  movss  %xmm0,(%rax)
  subss  (%rcx),%xmm0
  movss  %xmm0,(%rdx)
  movss  0x4(%rcx),%xmm0
  xorps  %xmm3,%xmm0
  subss  (%rax),%xmm0
  movss  %xmm0,0x4(%rdx)
L416:
  add    $0x2,%esi
  add    $0x8,%rcx
  add    $0x8,%rdx
  cmp    %edi,%esi
  jge    L290
L662:
  mov    %esi,%eax
  shr    $0x1f,%eax
  add    %esi,%eax
  sar    %eax
  cltq
  lea    (%r8,%rax,4),%rax
  movss  (%rax),%xmm2
  subss  (%rcx),%xmm2
  movss  %xmm2,(%rdx)
  movss  0x4(%rcx),%xmm0
  comiss %xmm2,%xmm1
  xorps  %xmm3,%xmm0
  subss  (%rax),%xmm0
  movss  %xmm0,0x4(%rdx)
  ja     L503
  comiss %xmm0,%xmm1
  jbe    L416
  movss  %xmm1,0x4(%rdx)
  movss  0x4(%rcx),%xmm0
  xorps  %xmm3,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  jmp    L416
  nopl   0x0(%rax,%rax,1)
L702:
  movss  %xmm1,(%rdx)
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rsi)
  jmp    L516
  nopl   (%rax)
L527:
  movss  %xmm1,(%rdx)
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rsi)
  jmp    L897
  nopl   (%rax)
L850:
  movss  %xmm1,(%rdx)
  movss  (%rcx),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  jmp    L416
L353:
  xor    %eax,%eax
  jmp    L85
L501:
  xor    %esi,%esi
  jmp    L801
L13:
  cmpl   $0x1,0xc(%rsp)
  jle    L259
  test   %edi,%edi
  jle    L259
  jmp    L19
  nopl   0x0(%rax,%rax,1)
L616:
  xor    %eax,%eax
  jmp    L478
```

tool_calls: name: read_data
arguments: data_label: D158
datatype: byte[4]
name: read_data
arguments: data_label: D92
datatype: byte[4]
name: read_data
arguments: data_label: D24
datatype: f32
name: read_data
arguments: data_label: D137
datatype: f32[4]

tool: {"D158": [0x6f,0x12,0x83,0x3a]}

tool: {"D92": [0x00,0x00,0x00,0x80]}

tool: D24: 0.5

tool: {"D137": [1.0,1.0,1.0,1.0]}

assistant: ```c
void s_init_ux_pi_t_box_mpc(int N, int nx, int nu, int nbu, int nb, float **ux, float **pi, float **db, float **t, int warm_start) {
  int jj, ll, ii;
  float thr0 = 1e-3;
  if (warm_start == 1) {
    for (ll = 0; ll < 2 * nbu; ll += 2) {
      t[0][ll + 0] = ux[0][ll / 2] - db[0][ll + 0];
      t[0][ll + 1] = -db[0][ll + 1] - ux[0][ll / 2];
      if (t[0][ll + 0] < thr0) {
        if (t[0][ll + 1] < thr0) {
          ux[0][ll / 2] = (-db[0][ll + 1] + db[0][ll + 0]) * 0.5;
          t[0][ll + 0] = ux[0][ll / 2] - db[0][ll + 0];
          t[0][ll + 1] = -db[0][ll + 1] - ux[0][ll / 2];
        } else {
          t[0][ll + 0] = thr0;
          ux[0][ll / 2] = db[0][ll + 0] + thr0;
        }
      } else if (t[0][ll + 1] < thr0) {
        t[0][ll + 1] = thr0;
        ux[0][ll / 2] = -db[0][ll + 1] - thr0;
      }
    }
    for (; ll < 2 * nb; ll++)
      t[0][ll] = 1.0;
    for (jj = 1; jj < N; jj++) {
      for (ll = 0; ll < 2 * nb; ll += 2) {
        t[jj][ll + 0] = ux[jj][ll / 2] - db[jj][ll + 0];
        t[jj][ll + 1] = -db[jj][ll + 1] - ux[jj][ll / 2];
        if (t[jj][ll + 0] < thr0) {
          if (t[jj][ll + 1] < thr0) {
            ux[jj][ll / 2] = (-db[jj][ll + 1] + db[jj][ll + 0]) * 0.5;
            t[jj][ll + 0] = ux[jj][ll / 2] - db[jj][ll + 0];
            t[jj][ll + 1] = -db[jj][ll + 1] - ux[jj][ll / 2];
          } else {
            t[jj][ll + 0] = thr0;
            ux[jj][ll / 2] = db[jj][ll + 0] + thr0;
          }
        } else if (t[jj][ll + 1] < thr0) {
          t[jj][ll + 1] = thr0;
          ux[jj][ll / 2] = -db[jj][ll + 1] - thr0;
        }
      }
    }
    for (ll = 0; ll < 2 * nbu; ll++)
      t[N][ll] = 1;
    for (ll = 2 * nu; ll < 2 * nb; ll += 2) {
      t[N][ll + 0] = ux[N][ll / 2] - db[N][ll + 0];
      t[N][ll + 1] = -db[N][ll + 1] - ux[N][ll / 2];
      if (t[N][ll + 0] < thr0) {
        if (t[N][ll + 1] < thr0) {
          ux[N][ll / 2] = (-db[N][ll + 1] + db[N][ll + 0]) * 0.5;
          t[N][ll + 0] = ux[N][ll / 2] - db[N][ll + 0];
          t[N][ll + 1] = -db[N][ll + 1] - ux[N][ll / 2];
        } else {
          t[N][ll + 0] = thr0;
          ux[N][ll / 2] = db[N][ll + 0] + thr0;
        }
      } else if (t[N][ll + 1] < thr0) {
        t[N][ll + 1] = thr0;
        ux[N][ll / 2] = -db[N][ll + 1] - thr0;
      }
    }
  } else {
    for (ll = 0; ll < 2 * nbu; ll += 2) {
      ux[0][ll / 2] = 0.0;
      t[0][ll + 0] = ux[0][ll / 2] - db[0][ll + 0];
      t[0][ll + 1] = -db[0][ll + 1] - ux[0][ll / 2];
      if (t[0][ll + 0] < thr0) {
        if (t[0][ll + 1] < thr0) {
          ux[0][ll / 2] = (-db[0][ll + 1] + db[0][ll + 0]) * 0.5;
          t[0][ll + 0] = ux[0][ll / 2] - db[0][ll + 0];
          t[0][ll + 1] = -db[0][ll + 1] - ux[0][ll / 2];
        } else {
          t[0][ll + 0] = thr0;
          ux[0][ll / 2] = db[0][ll + 0] + thr0;
        }
      } else if (t[0][ll + 1] < thr0) {
        t[0][ll + 1] = thr0;
        ux[0][ll / 2] = -db[0][ll + 1] - thr0;
      }
    }
    for (ii = ll / 2; ii < nu; ii++)
      ux[0][ii] = 0.0;
    for (; ll < 2 * nb; ll++)
      t[0][ll] = 1.0;
    for (jj = 1; jj < N; jj++) {
      for (ll = 0; ll < 2 * nb; ll += 2) {
        ux[jj][ll / 2] = 0.0;
        t[jj][ll + 0] = ux[jj][ll / 2] - db[jj][ll + 0];
        t[jj][ll + 1] = -db[jj][ll + 1] - ux[jj][ll / 2];
        if (t[jj][ll + 0] < thr0) {
          if (t[jj][ll + 1] < thr0) {
            ux[jj][ll / 2] = (-db[jj][ll + 1] + db[jj][ll + 0]) * 0.5;
            t[jj][ll + 0] = ux[jj][ll / 2] - db[jj][ll + 0];
            t[jj][ll + 1] = -db[jj][ll + 1] - ux[jj][ll / 2];
          } else {
            t[jj][ll + 0] = thr0;
            ux[jj][ll / 2] = db[jj][ll + 0] + thr0;
          }
        } else if (t[jj][ll + 1] < thr0) {
          t[jj][ll + 1] = thr0;
          ux[jj][ll / 2] = -db[jj][ll + 1] - thr0;
        }
      }
      for (ii = ll / 2; ii < nx + nu; ii++)
        ux[jj][ii] = 0.0;
    }
    for (ll = 0; ll < 2 * nbu; ll++)
      t[N][ll] = 1.0;
    for (ll = 2 * nu; ll < 2 * nb; ll += 2) {
      ux[N][ll / 2] = 0.0;
      t[N][ll + 0] = ux[N][ll / 2] - db[N][ll + 0];
      t[N][ll + 1] = -db[N][ll + 1] - ux[N][ll / 2];
      if (t[N][ll + 0] < thr0) {
        if (t[N][ll + 1] < thr0) {
          ux[N][ll / 2] = (-db[N][ll + 1] + db[N][ll + 0]) * 0.5;
          t[N][ll + 0] = ux[N][ll / 2] - db[N][ll + 0];
          t[N][ll + 1] = -db[N][ll + 1] - ux[N][ll / 2];
        } else {
          t[N][ll + 0] = thr0;
          ux[N][ll / 2] = db[N][ll + 0] + thr0;
        }
      } else if (t[N][ll + 1] < thr0) {
        t[N][ll + 1] = thr0;
        ux[N][ll / 2] = -db[N][ll + 1] - thr0;
      }
    }
    for (ii = ll / 2; ii < nx + nu; ii++)
      ux[N][ii] = 0.0;
    for (jj = 0; jj <= N; jj++)
      for (ll = 0; ll < nx; ll++)
        pi[jj][ll] = 0.0;
  }
}
```