#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ d_ip2_res_mpc_hard_work_space_size_bytes_libstr(int, int *, int *,
                                                           int *, int *);
int /*<<< orphan*/ d_part_cond_compute_problem_size_libstr(int, int *, int *,
                                                           int *, int **, int *,
                                                           int, int *, int *,
                                                           int *, int *);
scalar_t__ d_part_cond_memory_space_size_bytes_libstr(int, int *, int *, int *,
                                                      int **, int *, int, int *,
                                                      int *, int *, int *);
scalar_t__ d_part_cond_work_space_size_bytes_libstr(int, int *, int *, int *,
                                                    int **, int *, int, int *,
                                                    int *, int *, int *, int *);
scalar_t__ d_res_res_mpc_hard_work_space_size_bytes_libstr(int, int *, int *,
                                                           int *, int *);
scalar_t__ d_size_strmat(int, int);
int d_size_strvec(int);
int hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes(int N, int *nx, int *nu,
                                                 int *nb, int **hidxb, int *ng,
                                                 int N2) {
  int ii;
  int size = 0;
  for (ii = 0; ii < N; ii++) {
    size += d_size_strmat(nu[ii] + nx[ii] + 1, nx[ii + 1]);
    size += d_size_strmat(nu[ii] + nx[ii] + 1, nu[ii] + nx[ii]);
    size += d_size_strmat(nu[ii] + nx[ii] + 1, ng[ii]);
    size += 3 * d_size_strvec(nx[ii]);
    size += 3 * d_size_strvec(nu[ii] + nx[ii]);
    size += 5 * d_size_strvec(2 * nb[ii] + 2 * ng[ii]);
  }
  ii = N;
  size += d_size_strmat(nu[ii] + nx[ii] + 1, nu[ii] + nx[ii]);
  size += d_size_strmat(nu[ii] + nx[ii] + 1, ng[ii]);
  size += 3 * d_size_strvec(nx[ii]);
  size += 3 * d_size_strvec(nu[ii] + nx[ii]);
  size += 5 * d_size_strvec(2 * nb[ii] + 2 * ng[ii]);
  if (N2 < N) {
    int nx2[N2 + 1];
    int nu2[N2 + 1];
    int nb2[N2 + 1];
    int ng2[N2 + 1];
    int work_space_sizes[4];
    d_part_cond_compute_problem_size_libstr(N, nx, nu, nb, hidxb, ng, N2, nx2,
                                            nu2, nb2, ng2);
    size += d_part_cond_work_space_size_bytes_libstr(
        N, nx, nu, nb, hidxb, ng, N2, nx2, nu2, nb2, ng2, work_space_sizes);
    size += d_part_cond_memory_space_size_bytes_libstr(N, nx, nu, nb, hidxb, ng,
                                                       N2, nx2, nu2, nb2, ng2);
    size +=
        d_ip2_res_mpc_hard_work_space_size_bytes_libstr(N2, nx2, nu2, nb2, ng2);
    for (ii = 0; ii <= N2; ii++) {
      size += 1 * d_size_strvec(nx2[ii]);
      size += 1 * d_size_strvec(nu2[ii] + nx2[ii]);
      size += 2 * d_size_strvec(2 * nb2[ii] + 2 * ng2[ii]);
    }
    size += 2 * 64;
  } else {
    size += d_ip2_res_mpc_hard_work_space_size_bytes_libstr(N, nx, nu, nb, ng);
    size += 2 * 64;
  }
  size += d_res_res_mpc_hard_work_space_size_bytes_libstr(N, nx, nu, nb, ng);
  return size;
}


x86 assembly (clang, -O0):
<hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x98,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x1c(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12dd <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x16d>
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
add    $0x1,%edi
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
call   1080 <d_size_strmat@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
add    $0x1,%edi
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%esi
call   1080 <d_size_strmat@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
add    $0x1,%edi
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1080 <d_size_strmat@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1090 <d_size_strvec@plt>
imul   $0x3,%eax,%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
call   1090 <d_size_strvec@plt>
imul   $0x3,%eax,%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
shl    $0x1,%edi
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
shl    $0x1,%eax
add    %eax,%edi
call   1090 <d_size_strvec@plt>
imul   $0x5,%eax,%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11a8 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x38>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
add    $0x1,%edi
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%esi
call   1080 <d_size_strmat@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
add    $0x1,%edi
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1080 <d_size_strmat@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1090 <d_size_strvec@plt>
imul   $0x3,%eax,%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
call   1090 <d_size_strvec@plt>
imul   $0x3,%eax,%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
shl    $0x1,%edi
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
shl    $0x1,%eax
add    %eax,%edi
call   1090 <d_size_strvec@plt>
imul   $0x5,%eax,%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    165e <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x4ee>
mov    0x10(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x58(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rbx
sub    %rcx,%rbx
mov    %rbx,-0xb0(%rbp)
mov    %rbx,%rsp
mov    %rax,-0x60(%rbp)
mov    0x10(%rbp),%eax
add    $0x1,%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r14
sub    %rcx,%r14
mov    %r14,-0xa8(%rbp)
mov    %r14,%rsp
mov    %rax,-0x68(%rbp)
mov    0x10(%rbp),%eax
add    $0x1,%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r10
sub    %rcx,%r10
mov    %r10,-0xa0(%rbp)
mov    %r10,%rsp
mov    %rax,-0x70(%rbp)
mov    0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,-0x98(%rbp)
mov    %rax,%rsp
mov    %rcx,-0x78(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%r11d
sub    $0x30,%rsp
mov    %r11d,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1060 <d_part_cond_compute_problem_size_libstr@plt>
mov    -0xa0(%rbp),%r11
mov    -0x98(%rbp),%r10
add    $0x30,%rsp
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%r15d
lea    -0x90(%rbp),%rax
sub    $0x30,%rsp
mov    %r15d,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1030 <d_part_cond_work_space_size_bytes_libstr@plt>
mov    -0xa8(%rbp),%r11
mov    -0xa0(%rbp),%r10
add    $0x30,%rsp
mov    %rax,%rdx
mov    -0x98(%rbp),%rax
movslq -0x50(%rbp),%rcx
add    %rdx,%rcx
mov    %ecx,-0x50(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    0x10(%rbp),%r14d
sub    $0x30,%rsp
mov    %r14d,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1070 <d_part_cond_memory_space_size_bytes_libstr@plt>
mov    -0xb0(%rbp),%rsi
mov    -0xa8(%rbp),%rdx
mov    -0xa0(%rbp),%rcx
mov    -0x98(%rbp),%r8
add    $0x30,%rsp
mov    %rax,%rdi
movslq -0x50(%rbp),%rax
add    %rdi,%rax
mov    %eax,-0x50(%rbp)
mov    0x10(%rbp),%edi
call   1050 <d_ip2_res_mpc_hard_work_space_size_bytes_libstr@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1647 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x4d7>
mov    -0xb0(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1090 <d_size_strvec@plt>
mov    -0xa8(%rbp),%rcx
mov    %eax,%edx
mov    -0xb0(%rbp),%rax
shl    $0x0,%edx
add    -0x50(%rbp),%edx
mov    %edx,-0x50(%rbp)
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,4),%edi
movslq -0x4c(%rbp),%rcx
add    (%rax,%rcx,4),%edi
call   1090 <d_size_strvec@plt>
mov    -0xa0(%rbp),%rcx
mov    %eax,%edx
mov    -0x98(%rbp),%rax
shl    $0x0,%edx
add    -0x50(%rbp),%edx
mov    %edx,-0x50(%rbp)
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,4),%edi
shl    $0x1,%edi
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
shl    $0x1,%eax
add    %eax,%edi
call   1090 <d_size_strvec@plt>
shl    $0x1,%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    15b1 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x441>
mov    -0x50(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x50(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,%rsp
jmp    168e <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x51e>
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%r8
call   1050 <d_ip2_res_mpc_hard_work_space_size_bytes_libstr@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x50(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%r8
call   1040 <d_res_res_mpc_hard_work_space_size_bytes_libstr@plt>
mov    %rax,%rcx
movslq -0x50(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
test   %edi,%edi
mov    %rcx,-0x48(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %edi,-0x4c(%rbp)
mov    %r8,-0x58(%rbp)
mov    %r9,-0x38(%rbp)
jle    127c <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x10c>
mov    %edi,%eax
mov    %rax,-0x60(%rbp)
xor    %r12d,%r12d
xor    %ebx,%ebx
mov    -0x30(%rbp),%r15
nop
mov    -0x40(%rbp),%rcx
mov    (%rcx,%r12,4),%eax
mov    %rcx,%r14
mov    (%r15,%r12,4),%ecx
mov    0x4(%r15,%r12,4),%esi
lea    (%rax,%rcx,1),%edi
add    $0x1,%edi
lea    0x1(%r12),%rax
mov    %rax,-0x68(%rbp)
call   1080 <d_size_strmat@plt>
add    %eax,%ebx
mov    (%r14,%r12,4),%eax
mov    (%r15,%r12,4),%ecx
lea    (%rcx,%rax,1),%esi
lea    (%rcx,%rax,1),%edi
add    $0x1,%edi
call   1080 <d_size_strmat@plt>
mov    %rax,%r13
add    %ebx,%r13d
mov    (%r14,%r12,4),%eax
mov    %r14,%rbx
mov    (%r15,%r12,4),%ecx
lea    (%rax,%rcx,1),%edi
add    $0x1,%edi
mov    -0x38(%rbp),%rax
mov    (%rax,%r12,4),%esi
call   1080 <d_size_strmat@plt>
mov    %rax,%r14
add    %r13d,%r14d
mov    (%r15,%r12,4),%edi
call   1090 <d_size_strvec@plt>
mov    %eax,%r13d
mov    (%r15,%r12,4),%edi
add    (%rbx,%r12,4),%edi
call   1090 <d_size_strvec@plt>
mov    %eax,%ebx
mov    -0x38(%rbp),%rax
mov    (%rax,%r12,4),%edi
mov    -0x48(%rbp),%rax
add    (%rax,%r12,4),%edi
add    %edi,%edi
call   1090 <d_size_strvec@plt>
lea    (%rax,%rax,4),%eax
add    %r13d,%ebx
lea    (%rbx,%rbx,2),%ebx
add    %r14d,%ebx
add    %eax,%ebx
mov    -0x68(%rbp),%rax
mov    %rax,%r12
cmp    %rax,-0x60(%rbp)
jne    11b0 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x40>
mov    -0x30(%rbp),%r13
mov    -0x40(%rbp),%r12
mov    %ebx,%r15d
mov    -0x38(%rbp),%r14
jmp    1288 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x118>
mov    %r9,%r14
mov    %rsi,%r13
mov    %rdx,%r12
xor    %r15d,%r15d
movslq -0x4c(%rbp),%rbx
mov    (%r12,%rbx,4),%eax
mov    0x0(%r13,%rbx,4),%ecx
lea    (%rcx,%rax,1),%esi
lea    (%rcx,%rax,1),%edi
add    $0x1,%edi
call   1080 <d_size_strmat@plt>
add    %eax,%r15d
mov    (%r12,%rbx,4),%eax
mov    0x0(%r13,%rbx,4),%ecx
lea    (%rax,%rcx,1),%edi
add    $0x1,%edi
mov    (%r14,%rbx,4),%esi
call   1080 <d_size_strmat@plt>
add    %r15d,%eax
mov    %rax,-0x68(%rbp)
mov    0x0(%r13,%rbx,4),%edi
call   1090 <d_size_strvec@plt>
mov    %eax,-0x60(%rbp)
mov    0x0(%r13,%rbx,4),%edi
add    (%r12,%rbx,4),%edi
call   1090 <d_size_strvec@plt>
mov    %eax,%r15d
mov    (%r14,%rbx,4),%edi
mov    -0x48(%rbp),%rax
add    (%rax,%rbx,4),%edi
add    %edi,%edi
call   1090 <d_size_strvec@plt>
lea    (%rax,%rax,4),%eax
add    -0x60(%rbp),%r15d
lea    (%r15,%r15,2),%r13d
mov    -0x4c(%rbp),%r14d
add    -0x68(%rbp),%r13d
add    %eax,%r13d
mov    0x10(%rbp),%r15d
mov    %r15,%rcx
cmp    %r14d,%ecx
jge    14a0 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x330>
mov    %rsp,-0x80(%rbp)
lea    0x1(%rcx),%eax
mov    %rsp,%rdx
mov    %rax,-0x68(%rbp)
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdx
mov    %rdx,%rsp
mov    %rdx,%r10
mov    %rdx,-0x70(%rbp)
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
sub    $0x8,%rsp
mov    %rcx,%rax
mov    %r14d,%edi
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%r8
mov    -0x38(%rbp),%r9
push   %r12
push   %rbx
push   %r15
push   %r10
push   %rax
call   1060 <d_part_cond_compute_problem_size_libstr@plt>
add    $0x30,%rsp
lea    -0x90(%rbp),%rax
mov    %r14d,%edi
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%r8
mov    -0x38(%rbp),%r9
push   %rax
push   %r12
push   %rbx
push   %r15
push   -0x70(%rbp)
mov    0x10(%rbp),%eax
push   %rax
call   1030 <d_part_cond_work_space_size_bytes_libstr@plt>
add    $0x30,%rsp
add    %eax,%r13d
sub    $0x8,%rsp
mov    %r14d,%edi
mov    %r12,-0x78(%rbp)
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    %rbx,%r14
push   %r12
push   %rbx
push   %r15
mov    -0x70(%rbp),%r12
push   %r12
mov    0x10(%rbp),%eax
push   %rax
call   1070 <d_part_cond_memory_space_size_bytes_libstr@plt>
add    $0x30,%rsp
mov    %rax,%rbx
add    %r13d,%ebx
mov    0x10(%rbp),%edi
mov    %r12,%rsi
mov    -0x78(%rbp),%r12
mov    %r15,-0x60(%rbp)
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r12,%r8
call   1050 <d_ip2_res_mpc_hard_work_space_size_bytes_libstr@plt>
mov    %rax,%r13
add    %ebx,%r13d
mov    0x10(%rbp),%eax
test   %eax,%eax
js     1486 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x316>
xor    %ebx,%ebx
mov    %r14,-0x58(%rbp)
mov    -0x70(%rbp),%r14
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edi
call   1090 <d_size_strvec@plt>
mov    %eax,%r15d
add    %r13d,%r15d
mov    (%r14,%rbx,4),%edi
mov    -0x60(%rbp),%rax
add    (%rax,%rbx,4),%edi
call   1090 <d_size_strvec@plt>
mov    %eax,%r13d
add    %r15d,%r13d
mov    (%r12,%rbx,4),%edi
mov    -0x58(%rbp),%rax
add    (%rax,%rbx,4),%edi
add    %edi,%edi
call   1090 <d_size_strvec@plt>
lea    0x0(%r13,%rax,2),%r13d
add    $0x1,%rbx
cmp    %rbx,-0x68(%rbp)
jne    1440 <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x2d0>
mov    -0x80(%rbp),%rsp
mov    -0x48(%rbp),%rcx
mov    -0x40(%rbp),%rbx
mov    -0x30(%rbp),%rsi
mov    -0x4c(%rbp),%r14d
mov    -0x38(%rbp),%r8
jmp    14ce <hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes+0x35e>
mov    %r14d,%edi
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rbx
mov    %rbx,%rdx
mov    -0x48(%rbp),%r12
mov    %r12,%rcx
mov    -0x38(%rbp),%r15
mov    %r15,%r8
call   1050 <d_ip2_res_mpc_hard_work_space_size_bytes_libstr@plt>
add    %eax,%r13d
mov    %r12,%rcx
mov    -0x30(%rbp),%rsi
mov    %r15,%r8
mov    %r14d,%edi
mov    %rbx,%rdx
call   1040 <d_res_res_mpc_hard_work_space_size_bytes_libstr@plt>
add    %r13d,%eax
add    $0x80,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes(i32 %0, i32* %1, i32* %2, i32* %3, i32** %4, i32* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32**
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca [4 x i32]
store i32 %0, i32* %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32** %4, i32*** %12
store i32* %5, i32** %13
store i32 %6, i32* %14
store i32 0, i32* %16
store i32 0, i32* %15
br label %23
23: ; preds = %142, %7
%24 = load i32, i32* %15
%25 = load i32, i32* %8
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %145
27: ; preds = %23
%28 = load i32*, i32** %10
%29 = load i32, i32* %15
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
%32 = load i32, i32* %31
%33 = load i32*, i32** %9
%34 = load i32, i32* %15
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* %33, i64 %35
%37 = load i32, i32* %36
%38 = add nsw i32 %32, %37
%39 = add nsw i32 %38, 1
%40 = load i32*, i32** %9
%41 = load i32, i32* %15
%42 = add nsw i32 %41, 1
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %40, i64 %43
%45 = load i32, i32* %44
%46 = call i64 @d_size_strmat(i32 %39, i32 %45)
%47 = load i32, i32* %16
%48 = sext i32 %47 to i64
%49 = add nsw i64 %48, %46
%50 = trunc i64 %49 to i32
store i32 %50, i32* %16
%51 = load i32*, i32** %10
%52 = load i32, i32* %15
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i32, i32* %51, i64 %53
%55 = load i32, i32* %54
%56 = load i32*, i32** %9
%57 = load i32, i32* %15
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %56, i64 %58
%60 = load i32, i32* %59
%61 = add nsw i32 %55, %60
%62 = add nsw i32 %61, 1
%63 = load i32*, i32** %10
%64 = load i32, i32* %15
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i32, i32* %63, i64 %65
%67 = load i32, i32* %66
%68 = load i32*, i32** %9
%69 = load i32, i32* %15
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i32, i32* %68, i64 %70
%72 = load i32, i32* %71
%73 = add nsw i32 %67, %72
%74 = call i64 @d_size_strmat(i32 %62, i32 %73)
%75 = load i32, i32* %16
%76 = sext i32 %75 to i64
%77 = add nsw i64 %76, %74
%78 = trunc i64 %77 to i32
store i32 %78, i32* %16
%79 = load i32*, i32** %10
%80 = load i32, i32* %15
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i32, i32* %79, i64 %81
%83 = load i32, i32* %82
%84 = load i32*, i32** %9
%85 = load i32, i32* %15
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i32, i32* %84, i64 %86
%88 = load i32, i32* %87
%89 = add nsw i32 %83, %88
%90 = add nsw i32 %89, 1
%91 = load i32*, i32** %13
%92 = load i32, i32* %15
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i32, i32* %91, i64 %93
%95 = load i32, i32* %94
%96 = call i64 @d_size_strmat(i32 %90, i32 %95)
%97 = load i32, i32* %16
%98 = sext i32 %97 to i64
%99 = add nsw i64 %98, %96
%100 = trunc i64 %99 to i32
store i32 %100, i32* %16
%101 = load i32*, i32** %9
%102 = load i32, i32* %15
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i32, i32* %101, i64 %103
%105 = load i32, i32* %104
%106 = call i32 @d_size_strvec(i32 %105)
%107 = mul nsw i32 3, %106
%108 = load i32, i32* %16
%109 = add nsw i32 %108, %107
store i32 %109, i32* %16
%110 = load i32*, i32** %10
%111 = load i32, i32* %15
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i32, i32* %110, i64 %112
%114 = load i32, i32* %113
%115 = load i32*, i32** %9
%116 = load i32, i32* %15
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i32, i32* %115, i64 %117
%119 = load i32, i32* %118
%120 = add nsw i32 %114, %119
%121 = call i32 @d_size_strvec(i32 %120)
%122 = mul nsw i32 3, %121
%123 = load i32, i32* %16
%124 = add nsw i32 %123, %122
store i32 %124, i32* %16
%125 = load i32*, i32** %11
%126 = load i32, i32* %15
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i32, i32* %125, i64 %127
%129 = load i32, i32* %128
%130 = mul nsw i32 2, %129
%131 = load i32*, i32** %13
%132 = load i32, i32* %15
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i32, i32* %131, i64 %133
%135 = load i32, i32* %134
%136 = mul nsw i32 2, %135
%137 = add nsw i32 %130, %136
%138 = call i32 @d_size_strvec(i32 %137)
%139 = mul nsw i32 5, %138
%140 = load i32, i32* %16
%141 = add nsw i32 %140, %139
store i32 %141, i32* %16
br label %142
142: ; preds = %27
%143 = load i32, i32* %15
%144 = add nsw i32 %143, 1
store i32 %144, i32* %15
br label %23
145: ; preds = %23
%146 = load i32, i32* %8
store i32 %146, i32* %15
%147 = load i32*, i32** %10
%148 = load i32, i32* %15
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds i32, i32* %147, i64 %149
%151 = load i32, i32* %150
%152 = load i32*, i32** %9
%153 = load i32, i32* %15
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i32, i32* %152, i64 %154
%156 = load i32, i32* %155
%157 = add nsw i32 %151, %156
%158 = add nsw i32 %157, 1
%159 = load i32*, i32** %10
%160 = load i32, i32* %15
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds i32, i32* %159, i64 %161
%163 = load i32, i32* %162
%164 = load i32*, i32** %9
%165 = load i32, i32* %15
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds i32, i32* %164, i64 %166
%168 = load i32, i32* %167
%169 = add nsw i32 %163, %168
%170 = call i64 @d_size_strmat(i32 %158, i32 %169)
%171 = load i32, i32* %16
%172 = sext i32 %171 to i64
%173 = add nsw i64 %172, %170
%174 = trunc i64 %173 to i32
store i32 %174, i32* %16
%175 = load i32*, i32** %10
%176 = load i32, i32* %15
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds i32, i32* %175, i64 %177
%179 = load i32, i32* %178
%180 = load i32*, i32** %9
%181 = load i32, i32* %15
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i32, i32* %180, i64 %182
%184 = load i32, i32* %183
%185 = add nsw i32 %179, %184
%186 = add nsw i32 %185, 1
%187 = load i32*, i32** %13
%188 = load i32, i32* %15
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i32, i32* %187, i64 %189
%191 = load i32, i32* %190
%192 = call i64 @d_size_strmat(i32 %186, i32 %191)
%193 = load i32, i32* %16
%194 = sext i32 %193 to i64
%195 = add nsw i64 %194, %192
%196 = trunc i64 %195 to i32
store i32 %196, i32* %16
%197 = load i32*, i32** %9
%198 = load i32, i32* %15
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds i32, i32* %197, i64 %199
%201 = load i32, i32* %200
%202 = call i32 @d_size_strvec(i32 %201)
%203 = mul nsw i32 3, %202
%204 = load i32, i32* %16
%205 = add nsw i32 %204, %203
store i32 %205, i32* %16
%206 = load i32*, i32** %10
%207 = load i32, i32* %15
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i32, i32* %206, i64 %208
%210 = load i32, i32* %209
%211 = load i32*, i32** %9
%212 = load i32, i32* %15
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds i32, i32* %211, i64 %213
%215 = load i32, i32* %214
%216 = add nsw i32 %210, %215
%217 = call i32 @d_size_strvec(i32 %216)
%218 = mul nsw i32 3, %217
%219 = load i32, i32* %16
%220 = add nsw i32 %219, %218
store i32 %220, i32* %16
%221 = load i32*, i32** %11
%222 = load i32, i32* %15
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds i32, i32* %221, i64 %223
%225 = load i32, i32* %224
%226 = mul nsw i32 2, %225
%227 = load i32*, i32** %13
%228 = load i32, i32* %15
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds i32, i32* %227, i64 %229
%231 = load i32, i32* %230
%232 = mul nsw i32 2, %231
%233 = add nsw i32 %226, %232
%234 = call i32 @d_size_strvec(i32 %233)
%235 = mul nsw i32 5, %234
%236 = load i32, i32* %16
%237 = add nsw i32 %236, %235
store i32 %237, i32* %16
%238 = load i32, i32* %14
%239 = load i32, i32* %8
%240 = icmp slt i32 %238, %239
br i1 %240, label %241, label %346
241: ; preds = %145
%242 = load i32, i32* %14
%243 = add nsw i32 %242, 1
%244 = zext i32 %243 to i64
%245 = call i8* @llvm.stacksave()
store i8* %245, i8** %17
%246 = alloca i32, i64 %244
store i64 %244, i64* %18
%247 = load i32, i32* %14
%248 = add nsw i32 %247, 1
%249 = zext i32 %248 to i64
%250 = alloca i32, i64 %249
store i64 %249, i64* %19
%251 = load i32, i32* %14
%252 = add nsw i32 %251, 1
%253 = zext i32 %252 to i64
%254 = alloca i32, i64 %253
store i64 %253, i64* %20
%255 = load i32, i32* %14
%256 = add nsw i32 %255, 1
%257 = zext i32 %256 to i64
%258 = alloca i32, i64 %257
store i64 %257, i64* %21
%259 = load i32, i32* %8
%260 = load i32*, i32** %9
%261 = load i32*, i32** %10
%262 = load i32*, i32** %11
%263 = load i32**, i32*** %12
%264 = load i32*, i32** %13
%265 = load i32, i32* %14
%266 = call i32 @d_part_cond_compute_problem_size_libstr(i32 %259, i32* %260, i32* %261, i32* %262, i32** %263, i32* %264, i32 %265, i32* %246, i32* %250, i32* %254, i32* %258)
%267 = load i32, i32* %8
%268 = load i32*, i32** %9
%269 = load i32*, i32** %10
%270 = load i32*, i32** %11
%271 = load i32**, i32*** %12
%272 = load i32*, i32** %13
%273 = load i32, i32* %14
%274 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 0
%275 = call i64 @d_part_cond_work_space_size_bytes_libstr(i32 %267, i32* %268, i32* %269, i32* %270, i32** %271, i32* %272, i32 %273, i32* %246, i32* %250, i32* %254, i32* %258, i32* %274)
%276 = load i32, i32* %16
%277 = sext i32 %276 to i64
%278 = add nsw i64 %277, %275
%279 = trunc i64 %278 to i32
store i32 %279, i32* %16
%280 = load i32, i32* %8
%281 = load i32*, i32** %9
%282 = load i32*, i32** %10
%283 = load i32*, i32** %11
%284 = load i32**, i32*** %12
%285 = load i32*, i32** %13
%286 = load i32, i32* %14
%287 = call i64 @d_part_cond_memory_space_size_bytes_libstr(i32 %280, i32* %281, i32* %282, i32* %283, i32** %284, i32* %285, i32 %286, i32* %246, i32* %250, i32* %254, i32* %258)
%288 = load i32, i32* %16
%289 = sext i32 %288 to i64
%290 = add nsw i64 %289, %287
%291 = trunc i64 %290 to i32
store i32 %291, i32* %16
%292 = load i32, i32* %14
%293 = call i64 @d_ip2_res_mpc_hard_work_space_size_bytes_libstr(i32 %292, i32* %246, i32* %250, i32* %254, i32* %258)
%294 = load i32, i32* %16
%295 = sext i32 %294 to i64
%296 = add nsw i64 %295, %293
%297 = trunc i64 %296 to i32
store i32 %297, i32* %16
store i32 0, i32* %15
br label %298
298: ; preds = %339, %241
%299 = load i32, i32* %15
%300 = load i32, i32* %14
%301 = icmp sle i32 %299, %300
br i1 %301, label %302, label %342
302: ; preds = %298
%303 = load i32, i32* %15
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds i32, i32* %246, i64 %304
%306 = load i32, i32* %305
%307 = call i32 @d_size_strvec(i32 %306)
%308 = mul nsw i32 1, %307
%309 = load i32, i32* %16
%310 = add nsw i32 %309, %308
store i32 %310, i32* %16
%311 = load i32, i32* %15
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds i32, i32* %250, i64 %312
%314 = load i32, i32* %313
%315 = load i32, i32* %15
%316 = sext i32 %315 to i64
%317 = getelementptr inbounds i32, i32* %246, i64 %316
%318 = load i32, i32* %317
%319 = add nsw i32 %314, %318
%320 = call i32 @d_size_strvec(i32 %319)
%321 = mul nsw i32 1, %320
%322 = load i32, i32* %16
%323 = add nsw i32 %322, %321
store i32 %323, i32* %16
%324 = load i32, i32* %15
%325 = sext i32 %324 to i64
%326 = getelementptr inbounds i32, i32* %254, i64 %325
%327 = load i32, i32* %326
%328 = mul nsw i32 2, %327
%329 = load i32, i32* %15
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds i32, i32* %258, i64 %330
%332 = load i32, i32* %331
%333 = mul nsw i32 2, %332
%334 = add nsw i32 %328, %333
%335 = call i32 @d_size_strvec(i32 %334)
%336 = mul nsw i32 2, %335
%337 = load i32, i32* %16
%338 = add nsw i32 %337, %336
store i32 %338, i32* %16
br label %339
339: ; preds = %302
%340 = load i32, i32* %15
%341 = add nsw i32 %340, 1
store i32 %341, i32* %15
br label %298
342: ; preds = %298
%343 = load i32, i32* %16
%344 = add nsw i32 %343, 128
store i32 %344, i32* %16
%345 = load i8*, i8** %17
br label %359
346: ; preds = %145
%347 = load i32, i32* %8
%348 = load i32*, i32** %9
%349 = load i32*, i32** %10
%350 = load i32*, i32** %11
%351 = load i32*, i32** %13
%352 = call i64 @d_ip2_res_mpc_hard_work_space_size_bytes_libstr(i32 %347, i32* %348, i32* %349, i32* %350, i32* %351)
%353 = load i32, i32* %16
%354 = sext i32 %353 to i64
%355 = add nsw i64 %354, %352
%356 = trunc i64 %355 to i32
store i32 %356, i32* %16
%357 = load i32, i32* %16
%358 = add nsw i32 %357, 128
store i32 %358, i32* %16
br label %359
359: ; preds = %346, %342
%360 = load i32, i32* %8
%361 = load i32*, i32** %9
%362 = load i32*, i32** %10
%363 = load i32*, i32** %11
%364 = load i32*, i32** %13
%365 = call i64 @d_res_res_mpc_hard_work_space_size_bytes_libstr(i32 %360, i32* %361, i32* %362, i32* %363, i32* %364)
%366 = load i32, i32* %16
%367 = sext i32 %366 to i64
%368 = add nsw i64 %367, %365
%369 = trunc i64 %368 to i32
store i32 %369, i32* %16
%370 = load i32, i32* %16
ret i32 %370
}

LLVM IR (-O2):
define i32 @hpmpc_d_ip_ocp_hard_tv_work_space_size_bytes(i32 %0, i32* %1, i32* %2, i32* %3, i32** %4, i32* %5, i32 %6) {
%8 = alloca [4 x i32]
%9 = icmp sgt i32 %0, 0
br i1 %9, label %10, label %62
10: ; preds = %7
%11 = zext i32 %0 to i64
br label %12
12: ; preds = %10, %12
%13 = phi i64 [ 0, %10 ], [ %21, %12 ]
%14 = phi i64 [ 0, %10 ], [ %58, %12 ]
%15 = getelementptr inbounds i32, i32* %2, i64 %13
%16 = load i32, i32* %15
%17 = getelementptr inbounds i32, i32* %1, i64 %13
%18 = load i32, i32* %17
%19 = add i32 %16, 1
%20 = add i32 %19, %18
%21 = add nuw nsw i64 %13, 1
%22 = getelementptr inbounds i32, i32* %1, i64 %21
%23 = load i32, i32* %22
%24 = tail call i64 @d_size_strmat(i32 %20, i32 %23)
%25 = add i64 %24, %14
%26 = load i32, i32* %15
%27 = load i32, i32* %17
%28 = add nsw i32 %27, %26
%29 = add nsw i32 %28, 1
%30 = tail call i64 @d_size_strmat(i32 %29, i32 %28)
%31 = add i64 %25, %30
%32 = load i32, i32* %15
%33 = load i32, i32* %17
%34 = add i32 %32, 1
%35 = add i32 %34, %33
%36 = getelementptr inbounds i32, i32* %5, i64 %13
%37 = load i32, i32* %36
%38 = tail call i64 @d_size_strmat(i32 %35, i32 %37)
%39 = add i64 %31, %38
%40 = trunc i64 %39 to i32
%41 = load i32, i32* %17
%42 = tail call i32 @d_size_strvec(i32 %41)
%43 = load i32, i32* %15
%44 = load i32, i32* %17
%45 = add nsw i32 %44, %43
%46 = tail call i32 @d_size_strvec(i32 %45)
%47 = getelementptr inbounds i32, i32* %3, i64 %13
%48 = load i32, i32* %47
%49 = load i32, i32* %36
%50 = add i32 %49, %48
%51 = shl i32 %50, 1
%52 = tail call i32 @d_size_strvec(i32 %51)
%53 = mul nsw i32 %52, 5
%54 = add i32 %46, %42
%55 = mul i32 %54, 3
%56 = add i32 %55, %40
%57 = add i32 %56, %53
%58 = zext i32 %57 to i64
%59 = icmp eq i64 %21, %11
br i1 %59, label %60, label %12
60: ; preds = %12
%61 = zext i32 %57 to i64
br label %62
62: ; preds = %60, %7
%63 = phi i64 [ 0, %7 ], [ %61, %60 ]
%64 = sext i32 %0 to i64
%65 = getelementptr inbounds i32, i32* %2, i64 %64
%66 = load i32, i32* %65
%67 = getelementptr inbounds i32, i32* %1, i64 %64
%68 = load i32, i32* %67
%69 = add nsw i32 %68, %66
%70 = add nsw i32 %69, 1
%71 = tail call i64 @d_size_strmat(i32 %70, i32 %69)
%72 = add i64 %71, %63
%73 = load i32, i32* %65
%74 = load i32, i32* %67
%75 = add i32 %73, 1
%76 = add i32 %75, %74
%77 = getelementptr inbounds i32, i32* %5, i64 %64
%78 = load i32, i32* %77
%79 = tail call i64 @d_size_strmat(i32 %76, i32 %78)
%80 = add i64 %72, %79
%81 = trunc i64 %80 to i32
%82 = load i32, i32* %67
%83 = tail call i32 @d_size_strvec(i32 %82)
%84 = load i32, i32* %65
%85 = load i32, i32* %67
%86 = add nsw i32 %85, %84
%87 = tail call i32 @d_size_strvec(i32 %86)
%88 = getelementptr inbounds i32, i32* %3, i64 %64
%89 = load i32, i32* %88
%90 = load i32, i32* %77
%91 = add i32 %90, %89
%92 = shl i32 %91, 1
%93 = tail call i32 @d_size_strvec(i32 %92)
%94 = mul nsw i32 %93, 5
%95 = add i32 %87, %83
%96 = mul i32 %95, 3
%97 = add i32 %96, %81
%98 = add i32 %97, %94
%99 = icmp slt i32 %6, %0
br i1 %99, label %100, label %147
100: ; preds = %62
%101 = add nsw i32 %6, 1
%102 = zext i32 %101 to i64
%103 = tail call i8* @llvm.stacksave()
%104 = alloca i32, i64 %102
%105 = alloca i32, i64 %102
%106 = alloca i32, i64 %102
%107 = alloca i32, i64 %102
%108 = bitcast [4 x i32]* %8 to i8*
%109 = call i32 @d_part_cond_compute_problem_size_libstr(i32 %0, i32* %1, i32* %2, i32* %3, i32** %4, i32* %5, i32 %6, i32* %104, i32* %105, i32* %106, i32* %107)
%110 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 0
%111 = call i64 @d_part_cond_work_space_size_bytes_libstr(i32 %0, i32* %1, i32* %2, i32* %3, i32** %4, i32* %5, i32 %6, i32* %104, i32* %105, i32* %106, i32* %107, i32* %110)
%112 = trunc i64 %111 to i32
%113 = add i32 %98, %112
%114 = call i64 @d_part_cond_memory_space_size_bytes_libstr(i32 %0, i32* %1, i32* %2, i32* %3, i32** %4, i32* %5, i32 %6, i32* %104, i32* %105, i32* %106, i32* %107)
%115 = trunc i64 %114 to i32
%116 = add i32 %113, %115
%117 = call i64 @d_ip2_res_mpc_hard_work_space_size_bytes_libstr(i32 %6, i32* %104, i32* %105, i32* %106, i32* %107)
%118 = trunc i64 %117 to i32
%119 = add i32 %116, %118
%120 = icmp slt i32 %6, 0
br i1 %120, label %145, label %121
121: ; preds = %100, %121
%122 = phi i64 [ %143, %121 ], [ 0, %100 ]
%123 = phi i32 [ %142, %121 ], [ %119, %100 ]
%124 = getelementptr inbounds i32, i32* %104, i64 %122
%125 = load i32, i32* %124
%126 = call i32 @d_size_strvec(i32 %125)
%127 = add nsw i32 %126, %123
%128 = getelementptr inbounds i32, i32* %105, i64 %122
%129 = load i32, i32* %128
%130 = load i32, i32* %124
%131 = add nsw i32 %130, %129
%132 = call i32 @d_size_strvec(i32 %131)
%133 = add nsw i32 %127, %132
%134 = getelementptr inbounds i32, i32* %106, i64 %122
%135 = load i32, i32* %134
%136 = getelementptr inbounds i32, i32* %107, i64 %122
%137 = load i32, i32* %136
%138 = add i32 %137, %135
%139 = shl i32 %138, 1
%140 = call i32 @d_size_strvec(i32 %139)
%141 = shl nsw i32 %140, 1
%142 = add nsw i32 %133, %141
%143 = add nuw nsw i64 %122, 1
%144 = icmp eq i64 %143, %102
br i1 %144, label %145, label %121
145: ; preds = %121, %100
%146 = phi i32 [ %119, %100 ], [ %142, %121 ]
br label %151
147: ; preds = %62
%148 = tail call i64 @d_ip2_res_mpc_hard_work_space_size_bytes_libstr(i32 %0, i32* %1, i32* %2, i32* %3, i32* %5)
%149 = trunc i64 %148 to i32
%150 = add i32 %98, %149
br label %151
151: ; preds = %147, %145
%152 = phi i32 [ %146, %145 ], [ %150, %147 ]
%153 = add nsw i32 %152, 128
%154 = call i64 @d_res_res_mpc_hard_work_space_size_bytes_libstr(i32 %0, i32* %1, i32* %2, i32* %3, i32* %5)
%155 = trunc i64 %154 to i32
%156 = add i32 %153, %155
ret i32 %156
}