#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 */
int /*<<< orphan*/ ddm_block(int, int, int, int, int,
                             int (*)(int, char, int, double, double **,
                                     double *, double *, double *, double *),
                             char, double, double, double **, double **,
                             double *, double *, double *);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
double vec_vec_mult(int, double *, double *);
int ddm(int node_fine, int parallel_size, int ddm_steps, int relax_steps,
        int relax(int n, char resolution, int max_step, double step_size,
                  double **A, double *b, double *x_next, double *delta_l2,
                  double *time),
        char resolution, double step_size, double kh, double **b_fine,
        double **u_next, double *delta_l2, double *relax_time,
        double *setup_time) {
  int blocks = (node_fine - 2) / parallel_size;
  double dummy_delta;
  for (int ddm_step = 0; ddm_step < ddm_steps; ddm_step++) {
    int leftover = node_fine - 2 - blocks * parallel_size;
    for (int block_row = 0; block_row < blocks; block_row++) {
      for (int block_col = 0; block_col < blocks; block_col++) {
        ddm_block(block_row * parallel_size + 1, block_col * parallel_size + 1,
                  parallel_size, parallel_size, relax_steps, relax, resolution,
                  step_size, kh, b_fine, u_next, &dummy_delta, relax_time,
                  setup_time);
      }
      ddm_block(block_row * parallel_size + 1, blocks * parallel_size + 1,
                parallel_size, leftover, relax_steps, relax, resolution,
                step_size, kh, b_fine, u_next, &dummy_delta, relax_time,
                setup_time);
    }
    for (int block_col = 0; block_col < blocks; block_col++) {
      ddm_block(blocks * parallel_size + 1, block_col * parallel_size + 1,
                leftover, parallel_size, relax_steps, relax, resolution,
                step_size, kh, b_fine, u_next, &dummy_delta, relax_time,
                setup_time);
    }
    ddm_block(blocks * parallel_size + 1, blocks * parallel_size + 1, leftover,
              leftover, relax_steps, relax, resolution, step_size, kh, b_fine,
              u_next, &dummy_delta, relax_time, setup_time);
  }
  double *residual = (double *)malloc(node_fine * node_fine * sizeof(double));
  for (int row = 0; row < node_fine; row++) {
    for (int col = 0; col < node_fine; col++) {
      residual[row * node_fine + col] = 0.0;
    }
  }
  for (int row = 1; row < node_fine - 1; row++) {
    for (int col = 1; col < node_fine - 1; col++) {
      residual[row * node_fine + col] = b_fine[row][col];
      residual[row * node_fine + col] -= (4.0 - kh * kh) * u_next[row][col];
      residual[row * node_fine + col] -= -1.0 * u_next[row + 1][col];
      residual[row * node_fine + col] -= -1.0 * u_next[row - 1][col];
      residual[row * node_fine + col] -= -1.0 * u_next[row][col + 1];
      residual[row * node_fine + col] -= -1.0 * u_next[row][col - 1];
    }
  }
  *delta_l2 = vec_vec_mult(node_fine * node_fine, residual, residual);
  free(residual);
  return 0;
}


x86 assembly (clang, -O0):
<ddm>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xa8,%rsp
mov    %r9b,%al
mov    0x30(%rbp),%r9
mov    0x28(%rbp),%r9
mov    0x20(%rbp),%r9
mov    0x18(%rbp),%r9
mov    0x10(%rbp),%r9
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
mov    %ecx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %al,-0x31(%rbp)
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x48(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
cltd
idivl  -0x20(%rbp)
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13cf <ddm+0x28f>
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
mov    -0x4c(%rbp),%ecx
imul   -0x20(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    12cc <ddm+0x18c>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    1254 <ddm+0x114>
mov    -0x64(%rbp),%edi
imul   -0x20(%rbp),%edi
add    $0x1,%edi
mov    -0x68(%rbp),%esi
imul   -0x20(%rbp),%esi
add    $0x1,%esi
mov    -0x20(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    -0x31(%rbp),%r15b
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mov    0x10(%rbp),%r14
mov    0x18(%rbp),%rbx
mov    0x28(%rbp),%r10
mov    0x30(%rbp),%rax
lea    -0x58(%rbp),%r11
movsbl %r15b,%r15d
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1040 <ddm_block@plt>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    11d0 <ddm+0x90>
mov    -0x64(%rbp),%edi
imul   -0x20(%rbp),%edi
add    $0x1,%edi
mov    -0x4c(%rbp),%esi
imul   -0x20(%rbp),%esi
add    $0x1,%esi
mov    -0x20(%rbp),%edx
mov    -0x60(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    -0x31(%rbp),%r15b
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mov    0x10(%rbp),%r14
mov    0x18(%rbp),%rbx
mov    0x28(%rbp),%r10
mov    0x30(%rbp),%rax
lea    -0x58(%rbp),%r11
movsbl %r15b,%r15d
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1040 <ddm_block@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11bd <ddm+0x7d>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    1357 <ddm+0x217>
mov    -0x4c(%rbp),%edi
imul   -0x20(%rbp),%edi
add    $0x1,%edi
mov    -0x6c(%rbp),%esi
imul   -0x20(%rbp),%esi
add    $0x1,%esi
mov    -0x60(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    -0x31(%rbp),%r15b
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mov    0x10(%rbp),%r14
mov    0x18(%rbp),%rbx
mov    0x28(%rbp),%r10
mov    0x30(%rbp),%rax
lea    -0x58(%rbp),%r11
movsbl %r15b,%r15d
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1040 <ddm_block@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    12d3 <ddm+0x193>
mov    -0x4c(%rbp),%edi
imul   -0x20(%rbp),%edi
add    $0x1,%edi
mov    -0x4c(%rbp),%esi
imul   -0x20(%rbp),%esi
add    $0x1,%esi
mov    -0x60(%rbp),%edx
mov    -0x60(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    -0x31(%rbp),%r15b
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mov    0x10(%rbp),%r14
mov    0x18(%rbp),%rbx
mov    0x28(%rbp),%r10
mov    0x30(%rbp),%rax
lea    -0x58(%rbp),%r11
movsbl %r15b,%r15d
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1040 <ddm_block@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1198 <ddm+0x58>
mov    -0x1c(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1447 <ddm+0x307>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1434 <ddm+0x2f4>
mov    -0x78(%rbp),%rax
mov    -0x7c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x80(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1401 <ddm+0x2c1>
jmp    1439 <ddm+0x2f9>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    13ee <ddm+0x2ae>
movl   $0x1,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1687 <ddm+0x547>
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    166e <ddm+0x52e>
mov    0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x84(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x88(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xb19(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x78(%rbp),%rax
mov    -0x84(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x88(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
mov    -0x84(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x84(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x88(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
mov    -0x84(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x84(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x88(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x84(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x88(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x88(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x84(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x88(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    146f <ddm+0x32f>
jmp    1673 <ddm+0x533>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1451 <ddm+0x311>
mov    -0x1c(%rbp),%edi
imul   -0x1c(%rbp),%edi
mov    -0x78(%rbp),%rsi
mov    -0x78(%rbp),%rdx
call   1060 <vec_vec_mult@plt>
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<ddm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
movsd  %xmm1,0x28(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %r9d,0x60(%rsp)
mov    %r8,%r9
mov    %edx,%r8d
mov    0xb8(%rsp),%r13
mov    0xb0(%rsp),%r11
mov    %rdi,0x50(%rsp)
lea    -0x2(%rdi),%eax
cltd
mov    %esi,0x38(%rsp)
idiv   %esi
mov    %r8d,0x58(%rsp)
test   %r8d,%r8d
jle    1429 <ddm+0x2d9>
mov    %edx,%r14d
mov    %eax,%r12d
imul   0x38(%rsp),%r12d
add    $0x1,%r12d
xor    %ebx,%ebx
lea    0x48(%rsp),%rsi
mov    %r9,0x20(%rsp)
mov    %ecx,0x34(%rsp)
mov    %edx,0x18(%rsp)
mov    %eax,0x14(%rsp)
mov    %r12d,0x4(%rsp)
jmp    123c <ddm+0xec>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edi,%esi
mov    %ebp,%r14d
mov    %ebp,%edx
mov    %ebp,%ecx
mov    %r8d,%r12d
mov    %r9,%rbp
mov    0xd0(%rsp),%rbx
push   %rbx
mov    0xd0(%rsp),%rbx
push   %rbx
push   %rax
push   %r13
push   %r11
push   %r10
mov    %r11,%rbx
call   1040 <ddm_block@plt>
mov    %rbx,%r11
mov    %rbp,%r9
add    $0x30,%rsp
mov    0x68(%rsp),%ebx
add    $0x1,%ebx
cmp    0x58(%rsp),%ebx
mov    %r12d,%ecx
mov    0x14(%rsp),%eax
mov    0x4(%rsp),%r12d
lea    0x48(%rsp),%rsi
je     1429 <ddm+0x2d9>
mov    %ebx,0x68(%rsp)
movsbl 0x60(%rsp),%r10d
test   %eax,%eax
movsd  0x28(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
mov    %r14d,%ebp
mov    %ecx,%r8d
mov    %r12d,%edi
mov    0x38(%rsp),%ebx
mov    %rsi,%rax
jle    11e0 <ddm+0x90>
xor    %r15d,%r15d
mov    0x14(%rsp),%r13d
mov    %ebx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15d,0x40(%rsp)
imul   %ecx,%r15d
add    $0x1,%r15d
mov    %ecx,%ebp
mov    $0x1,%r14d
mov    0x34(%rsp),%r12d
nopw   0x0(%rax,%rax,1)
mov    %r15d,%edi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %ebp,%ecx
mov    %r12d,%r8d
mov    0x20(%rsp),%r9
movsd  0x8(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
push   0xd0(%rsp)
push   0xd0(%rsp)
lea    0x58(%rsp),%rax
push   %rax
push   0xd0(%rsp)
push   0xd0(%rsp)
push   %r10
mov    %r10,%rbx
call   1040 <ddm_block@plt>
mov    %rbx,%r10
add    $0x30,%rsp
add    %ebp,%r14d
add    $0xffffffff,%r13d
jne    12a0 <ddm+0x150>
mov    %r15d,%edi
mov    0x4(%rsp),%esi
mov    %ebp,%edx
mov    0x18(%rsp),%ecx
mov    %r12d,%r8d
mov    0x20(%rsp),%r9
movsd  0x8(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
push   0xd0(%rsp)
push   0xd0(%rsp)
lea    0x58(%rsp),%rax
push   %rax
mov    0xd0(%rsp),%r14
push   %r14
push   0xd0(%rsp)
push   %r10
call   1040 <ddm_block@plt>
mov    %rbx,%r10
add    $0x30,%rsp
mov    0x40(%rsp),%r15d
add    $0x1,%r15d
mov    0x14(%rsp),%r13d
cmp    %r13d,%r15d
mov    %ebp,%ecx
jne    1280 <ddm+0x130>
test   %r13d,%r13d
mov    0xb0(%rsp),%r11
movsd  0x28(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
mov    0x20(%rsp),%r9
mov    0x34(%rsp),%r8d
mov    %r14,%r13
mov    0x18(%rsp),%ebp
mov    0x4(%rsp),%edi
lea    0x48(%rsp),%rax
jle    11e0 <ddm+0x90>
mov    $0x1,%r14d
mov    0x14(%rsp),%r15d
nopl   0x0(%rax)
mov    %r14d,%esi
mov    0x18(%rsp),%edx
mov    0x38(%rsp),%ecx
mov    %r8d,%ebp
mov    0x20(%rsp),%r9
movsd  0x8(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
push   0xd0(%rsp)
push   0xd0(%rsp)
push   %rax
push   %r13
push   %r11
push   %r10
mov    %r11,%r12
call   1040 <ddm_block@plt>
mov    0x68(%rsp),%ecx
movsd  0x38(%rsp),%xmm0
movsd  0x58(%rsp),%xmm1
mov    0x34(%rsp),%edi
mov    %ebp,%r8d
mov    0x48(%rsp),%ebp
mov    %r12,%r11
lea    0x78(%rsp),%rax
mov    0x50(%rsp),%r9
mov    %rbx,%r10
add    $0x30,%rsp
add    %ecx,%r14d
add    $0xffffffff,%r15d
jne    13b0 <ddm+0x260>
jmp    11e0 <ddm+0x90>
mov    0x50(%rsp),%r14
mov    %r14d,%eax
imul   %eax,%eax
mov    %rax,0x70(%rsp)
lea    0x0(,%rax,8),%edi
call   1060 <malloc@plt>
mov    %rax,0x8(%rsp)
test   %r14d,%r14d
jle    1832 <ddm+0x6e2>
mov    %r14d,%ecx
lea    0x0(,%rcx,8),%r15
lea    -0x1(%rcx),%rax
mov    %ecx,%r12d
and    $0x3,%r12d
xor    %ebx,%ebx
cmp    $0x3,%rax
mov    %rcx,0x20(%rsp)
jae    1482 <ddm+0x332>
xor    %ebp,%ebp
mov    0x8(%rsp),%r13
jmp    152e <ddm+0x3de>
and    $0xfffffffc,%ecx
mov    %rcx,0x18(%rsp)
lea    (%r14,%r14,1),%eax
mov    %rax,0x40(%rsp)
lea    0x0(,%r14,4),%eax
mov    %eax,0x4(%rsp)
lea    (%r14,%r14,2),%eax
mov    %rax,0x38(%rsp)
xor    %ebp,%ebp
mov    0x8(%rsp),%r13
nop
movslq %ebx,%rbx
lea    0x0(,%rbx,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
lea    (%r14,%rbx,1),%eax
cltq
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    0x40(%rsp),%rax
add    %ebx,%eax
cltq
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
mov    0x38(%rsp),%rax
add    %ebx,%eax
cltq
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
add    $0x4,%rbp
add    0x4(%rsp),%ebx
cmp    %rbp,0x18(%rsp)
jne    14b0 <ddm+0x360>
test   %r12,%r12
je     1561 <ddm+0x411>
imul   %r14d,%ebp
nopw   0x0(%rax,%rax,1)
movslq %ebp,%rbp
lea    0x0(,%rbp,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1050 <memset@plt>
add    %r14d,%ebp
add    $0xffffffffffffffff,%r12
jne    1540 <ddm+0x3f0>
cmp    $0x3,%r14d
mov    0xb0(%rsp),%rcx
jl     1832 <ddm+0x6e2>
movsd  0x28(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  0xa7b(%rip),%xmm0
subsd  %xmm1,%xmm0
xorpd  0xa7f(%rip),%xmm0
add    $0xffffffff,%r14d
mov    0x20(%rsp),%r12
lea    0x1(%r12),%rax
mov    %rax,0x68(%rsp)
lea    (%r12,%r14,1),%rax
mov    %rax,0x60(%rsp)
lea    0x1(%r14),%rax
mov    %rax,0x58(%rsp)
lea    -0x1(%r14),%rax
mov    %rax,%r13
and    $0xfffffffffffffffe,%r13
mov    %rax,0x18(%rsp)
or     $0x1,%rax
mov    %rax,0x50(%rsp)
pshufd $0x44,%xmm0,%xmm1
mov    0x8(%rsp),%rax
lea    (%rax,%r12,8),%r10
add    $0x8,%r10
lea    0x0(,%r12,8),%rax
mov    %rax,0x40(%rsp)
mov    $0x1,%eax
xor    %r11d,%r11d
jmp    1624 <ddm+0x4d4>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r11
add    0x40(%rsp),%r10
add    0x20(%rsp),%r12
mov    0x28(%rsp),%rax
cmp    %r14,%rax
mov    0xb0(%rsp),%rcx
je     1832 <ddm+0x6e2>
mov    (%rcx,%rax,8),%rbx
mov    0xb8(%rsp),%rcx
mov    -0x8(%rcx,%rax,8),%r8
mov    (%rcx,%rax,8),%r15
mov    0x8(%rcx,%rax,8),%r9
add    $0x1,%rax
mov    %rax,0x28(%rsp)
mov    $0x1,%ebp
cmpq   $0x2,0x18(%rsp)
jae    16e0 <ddm+0x590>
lea    (%r12,%rbp,1),%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rsi
lea    (%r8,%rbp,8),%rax
lea    (%r9,%rbp,8),%rcx
lea    (%r15,%rbp,8),%rdx
lea    (%rbx,%rbp,8),%rbx
mov    %r14,%rdi
sub    %rbp,%rdi
xor    %ebp,%ebp
nopl   (%rax)
movsd  (%rbx,%rbp,8),%xmm2
movsd  %xmm2,(%rsi,%rbp,8)
movsd  (%rdx,%rbp,8),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,(%rsi,%rbp,8)
addsd  (%rcx,%rbp,8),%xmm3
movsd  %xmm3,(%rsi,%rbp,8)
addsd  (%rax,%rbp,8),%xmm3
movsd  %xmm3,(%rsi,%rbp,8)
addsd  0x8(%rdx,%rbp,8),%xmm3
movsd  %xmm3,(%rsi,%rbp,8)
addsd  -0x8(%rdx,%rbp,8),%xmm3
movsd  %xmm3,(%rsi,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rdi
jne    1680 <ddm+0x530>
jmp    1600 <ddm+0x4b0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r11,%rax
imul   0x20(%rsp),%rax
mov    0x68(%rsp),%rcx
add    %rax,%rcx
add    0x60(%rsp),%rax
mov    0x8(%rsp),%rdx
lea    (%rdx,%rcx,8),%rbp
mov    %r14,%rcx
lea    (%rdx,%rax,8),%r14
lea    0x8(%rbx),%rax
lea    (%rbx,%rcx,8),%rsi
mov    0x58(%rsp),%rdx
lea    (%r15,%rdx,8),%rdx
lea    0x8(%r9),%rdi
cmp    %rsi,%rbp
setb   0x4(%rsp)
cmp    %r14,%rax
lea    (%r9,%rcx,8),%rax
setb   0x38(%rsp)
cmp    %rdx,%rbp
setb   %dl
cmp    %r14,%r15
setb   0x14(%rsp)
cmp    %rax,%rbp
setb   %sil
cmp    %r14,%rdi
lea    (%r8,%rcx,8),%rax
setb   %dil
cmp    %rax,%rbp
lea    0x8(%r8),%rbp
setb   %al
cmp    %r14,%rbp
setb   0x34(%rsp)
mov    $0x1,%ebp
mov    0x38(%rsp),%r14b
test   %r14b,0x4(%rsp)
mov    %rcx,%r14
jne    1658 <ddm+0x508>
mov    $0x1,%ebp
and    0x14(%rsp),%dl
jne    1658 <ddm+0x508>
mov    $0x1,%ebp
and    %dil,%sil
jne    1658 <ddm+0x508>
mov    $0x1,%ebp
and    0x34(%rsp),%al
jne    1658 <ddm+0x508>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movupd 0x8(%rbx,%rax,8),%xmm2
movupd %xmm2,(%r10,%rax,8)
movupd 0x8(%r15,%rax,8),%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,(%r10,%rax,8)
movupd 0x8(%r9,%rax,8),%xmm2
addpd  %xmm3,%xmm2
movupd %xmm2,(%r10,%rax,8)
movupd 0x8(%r8,%rax,8),%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,(%r10,%rax,8)
movupd 0x10(%r15,%rax,8),%xmm2
addpd  %xmm3,%xmm2
movupd %xmm2,(%r10,%rax,8)
movupd (%r15,%rax,8),%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,(%r10,%rax,8)
add    $0x2,%rax
cmp    %rax,%r13
jne    17b0 <ddm+0x660>
mov    0x50(%rsp),%rbp
cmp    %r13,0x18(%rsp)
je     1600 <ddm+0x4b0>
jmp    1658 <ddm+0x508>
mov    0x70(%rsp),%rdi
mov    0x8(%rsp),%rbx
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1070 <vec_vec_mult@plt>
mov    0xc0(%rsp),%rax
movsd  %xmm0,(%rax)
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ddm(i32 %0, i32 %1, i32 %2, i32 %3, i32 (i32, i8, i32, double, double**, double*, double*, double*, double*)* %4, i8 signext %5, double %6, double %7, double** %8, double** %9, double* nocapture writeonly %10, double* %11, double* %12) {
%14 = alloca double
%15 = add nsw i32 %0, -2
%16 = sdiv i32 %15, %1
%17 = srem i32 %15, %1
%18 = bitcast double* %14 to i8*
%19 = icmp sgt i32 %2, 0
br i1 %19, label %20, label %24
20: ; preds = %13
%21 = mul nsw i32 %16, %1
%22 = icmp sgt i32 %16, 0
%23 = add nsw i32 %21, 1
br label %38
24: ; preds = %56, %13
%25 = mul nsw i32 %0, %0
%26 = shl i32 %25, 3
%27 = call i64 @malloc(i32 %26)
%28 = inttoptr i64 %27 to double*
%29 = icmp sgt i32 %0, 0
br i1 %29, label %30, label %211
30: ; preds = %24
%31 = zext i32 %0 to i64
%32 = shl nuw nsw i64 %31, 3
%33 = add nsw i64 %31, -1
%34 = and i64 %31, 3
%35 = icmp ult i64 %33, 3
br i1 %35, label %67, label %36
36: ; preds = %30
%37 = and i64 %31, 4294967292
br label %100
38: ; preds = %20, %56
%39 = phi i32 [ 0, %20 ], [ %58, %56 ]
br i1 %22, label %41, label %56
40: ; preds = %45
br i1 %22, label %60, label %56
41: ; preds = %38, %45
%42 = phi i32 [ %47, %45 ], [ 0, %38 ]
%43 = mul nsw i32 %42, %1
%44 = add nsw i32 %43, 1
br label %49
45: ; preds = %49
%46 = call i32 @ddm_block(i32 %44, i32 %23, i32 %1, i32 %17, i32 %3, i32 (i32, i8, i32, double, double**, double*, double*, double*, double*)* %4, i8 signext %5, double %6, double %7, double** %8, double** %9, double* %14, double* %11, double* %12)
%47 = add nuw nsw i32 %42, 1
%48 = icmp eq i32 %47, %16
br i1 %48, label %40, label %41
49: ; preds = %41, %49
%50 = phi i32 [ 0, %41 ], [ %54, %49 ]
%51 = mul nsw i32 %50, %1
%52 = add nsw i32 %51, 1
%53 = call i32 @ddm_block(i32 %44, i32 %52, i32 %1, i32 %1, i32 %3, i32 (i32, i8, i32, double, double**, double*, double*, double*, double*)* %4, i8 signext %5, double %6, double %7, double** %8, double** %9, double* %14, double* %11, double* %12)
%54 = add nuw nsw i32 %50, 1
%55 = icmp eq i32 %54, %16
br i1 %55, label %45, label %49
56: ; preds = %60, %38, %40
%57 = call i32 @ddm_block(i32 %23, i32 %23, i32 %17, i32 %17, i32 %3, i32 (i32, i8, i32, double, double**, double*, double*, double*, double*)* %4, i8 signext %5, double %6, double %7, double** %8, double** %9, double* %14, double* %11, double* %12)
%58 = add nuw nsw i32 %39, 1
%59 = icmp eq i32 %58, %2
br i1 %59, label %24, label %38
60: ; preds = %40, %60
%61 = phi i32 [ %65, %60 ], [ 0, %40 ]
%62 = mul nsw i32 %61, %1
%63 = add nsw i32 %62, 1
%64 = call i32 @ddm_block(i32 %23, i32 %63, i32 %17, i32 %1, i32 %3, i32 (i32, i8, i32, double, double**, double*, double*, double*, double*)* %4, i8 signext %5, double %6, double %7, double** %8, double** %9, double* %14, double* %11, double* %12)
%65 = add nuw nsw i32 %61, 1
%66 = icmp eq i32 %65, %16
br i1 %66, label %56, label %60
67: ; preds = %100, %30
%68 = phi i64 [ 0, %30 ], [ %126, %100 ]
%69 = icmp eq i64 %34, 0
br i1 %69, label %81, label %70
70: ; preds = %67, %70
%71 = phi i64 [ %78, %70 ], [ %68, %67 ]
%72 = phi i64 [ %79, %70 ], [ 0, %67 ]
%73 = trunc i64 %71 to i32
%74 = mul i32 %73, %0
%75 = sext i32 %74 to i64
%76 = getelementptr double, double* %28, i64 %75
%77 = bitcast double* %76 to i8*
%78 = add nuw nsw i64 %71, 1
%79 = add i64 %72, 1
%80 = icmp eq i64 %79, %34
br i1 %80, label %81, label %70
81: ; preds = %70, %67
%82 = icmp sgt i32 %0, 2
br i1 %82, label %83, label %211
83: ; preds = %81
%84 = add nsw i32 %0, -1
%85 = fneg double %7
%86 = call double @llvm.fmuladd.f64(double %85, double %7, double 4.000000e+00)
%87 = fneg double %86
%88 = zext i32 %0 to i64
%89 = zext i32 %84 to i64
%90 = add nuw nsw i64 %31, 1
%91 = add nuw nsw i64 %31, %89
%92 = add nuw nsw i64 %89, 1
%93 = add nsw i64 %89, -1
%94 = icmp ult i64 %93, 2
%95 = and i64 %93, -2
%96 = or i64 %93, 1
%97 = insertelement <2 x double> poison, double %87, i64 0
%98 = shufflevector <2 x double> %97, <2 x double> poison, <2 x i32> zeroinitializer
%99 = icmp eq i64 %93, %95
br label %129
100: ; preds = %100, %36
%101 = phi i64 [ 0, %36 ], [ %126, %100 ]
%102 = phi i64 [ 0, %36 ], [ %127, %100 ]
%103 = trunc i64 %101 to i32
%104 = mul i32 %103, %0
%105 = sext i32 %104 to i64
%106 = getelementptr double, double* %28, i64 %105
%107 = bitcast double* %106 to i8*
%108 = trunc i64 %101 to i32
%109 = or i32 %108, 1
%110 = mul i32 %109, %0
%111 = sext i32 %110 to i64
%112 = getelementptr double, double* %28, i64 %111
%113 = bitcast double* %112 to i8*
%114 = trunc i64 %101 to i32
%115 = or i32 %114, 2
%116 = mul i32 %115, %0
%117 = sext i32 %116 to i64
%118 = getelementptr double, double* %28, i64 %117
%119 = bitcast double* %118 to i8*
%120 = trunc i64 %101 to i32
%121 = or i32 %120, 3
%122 = mul i32 %121, %0
%123 = sext i32 %122 to i64
%124 = getelementptr double, double* %28, i64 %123
%125 = bitcast double* %124 to i8*
%126 = add nuw nsw i64 %101, 4
%127 = add i64 %102, 4
%128 = icmp eq i64 %127, %37
br i1 %128, label %67, label %100
129: ; preds = %214, %83
%130 = phi i64 [ %216, %214 ], [ 0, %83 ]
%131 = phi i64 [ %142, %214 ], [ 1, %83 ]
%132 = mul i64 %130, %31
%133 = add i64 %90, %132
%134 = getelementptr double, double* %28, i64 %133
%135 = add i64 %91, %132
%136 = getelementptr double, double* %28, i64 %135
%137 = getelementptr inbounds double*, double** %8, i64 %131
%138 = load double*, double** %137
%139 = mul nsw i64 %131, %88
%140 = getelementptr inbounds double*, double** %9, i64 %131
%141 = load double*, double** %140
%142 = add nuw nsw i64 %131, 1
%143 = getelementptr inbounds double*, double** %9, i64 %142
%144 = load double*, double** %143
%145 = add nsw i64 %131, -1
%146 = getelementptr inbounds double*, double** %9, i64 %145
%147 = load double*, double** %146
br i1 %94, label %209, label %148
148: ; preds = %129
%149 = getelementptr double, double* %138, i64 1
%150 = getelementptr double, double* %138, i64 %89
%151 = getelementptr double, double* %141, i64 %92
%152 = getelementptr double, double* %144, i64 1
%153 = getelementptr double, double* %144, i64 %89
%154 = getelementptr double, double* %147, i64 1
%155 = getelementptr double, double* %147, i64 %89
%156 = icmp ult double* %134, %150
%157 = icmp ult double* %149, %136
%158 = and i1 %156, %157
%159 = icmp ult double* %134, %151
%160 = icmp ult double* %141, %136
%161 = and i1 %159, %160
%162 = or i1 %158, %161
%163 = icmp ult double* %134, %153
%164 = icmp ult double* %152, %136
%165 = and i1 %163, %164
%166 = or i1 %162, %165
%167 = icmp ult double* %134, %155
%168 = icmp ult double* %154, %136
%169 = and i1 %167, %168
%170 = or i1 %166, %169
br i1 %170, label %209, label %171
171: ; preds = %148, %171
%172 = phi i64 [ %206, %171 ], [ 0, %148 ]
%173 = or i64 %172, 1
%174 = getelementptr inbounds double, double* %138, i64 %173
%175 = bitcast double* %174 to <2 x double>*
%176 = load <2 x double>, <2 x double>* %175
%177 = add nuw nsw i64 %173, %139
%178 = getelementptr inbounds double, double* %28, i64 %177
%179 = bitcast double* %178 to <2 x double>*
store <2 x double> %176, <2 x double>* %179
%180 = getelementptr inbounds double, double* %141, i64 %173
%181 = bitcast double* %180 to <2 x double>*
%182 = load <2 x double>, <2 x double>* %181
%183 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %98, <2 x double> %182, <2 x double> %176)
%184 = bitcast double* %178 to <2 x double>*
store <2 x double> %183, <2 x double>* %184
%185 = getelementptr inbounds double, double* %144, i64 %173
%186 = bitcast double* %185 to <2 x double>*
%187 = load <2 x double>, <2 x double>* %186
%188 = fadd <2 x double> %183, %187
%189 = bitcast double* %178 to <2 x double>*
store <2 x double> %188, <2 x double>* %189
%190 = getelementptr inbounds double, double* %147, i64 %173
%191 = bitcast double* %190 to <2 x double>*
%192 = load <2 x double>, <2 x double>* %191
%193 = fadd <2 x double> %188, %192
%194 = bitcast double* %178 to <2 x double>*
store <2 x double> %193, <2 x double>* %194
%195 = add i64 %172, 2
%196 = getelementptr inbounds double, double* %141, i64 %195
%197 = bitcast double* %196 to <2 x double>*
%198 = load <2 x double>, <2 x double>* %197
%199 = fadd <2 x double> %193, %198
%200 = bitcast double* %178 to <2 x double>*
store <2 x double> %199, <2 x double>* %200
%201 = getelementptr inbounds double, double* %141, i64 %172
%202 = bitcast double* %201 to <2 x double>*
%203 = load <2 x double>, <2 x double>* %202
%204 = fadd <2 x double> %199, %203
%205 = bitcast double* %178 to <2 x double>*
store <2 x double> %204, <2 x double>* %205
%206 = add nuw i64 %172, 2
%207 = icmp eq i64 %206, %95
br i1 %207, label %208, label %171
208: ; preds = %171
br i1 %99, label %214, label %209
209: ; preds = %148, %129, %208
%210 = phi i64 [ 1, %148 ], [ 1, %129 ], [ %96, %208 ]
br label %217
211: ; preds = %214, %24, %81
%212 = call double @vec_vec_mult(i32 %25, double* %28, double* %28)
store double %212, double* %10
%213 = call i32 @free(double* %28)
ret i32 0
214: ; preds = %217, %208
%215 = icmp eq i64 %142, %89
%216 = add i64 %130, 1
br i1 %215, label %211, label %129
217: ; preds = %209, %217
%218 = phi i64 [ %232, %217 ], [ %210, %209 ]
%219 = getelementptr inbounds double, double* %138, i64 %218
%220 = load double, double* %219
%221 = add nuw nsw i64 %218, %139
%222 = getelementptr inbounds double, double* %28, i64 %221
store double %220, double* %222
%223 = getelementptr inbounds double, double* %141, i64 %218
%224 = load double, double* %223
%225 = call double @llvm.fmuladd.f64(double %87, double %224, double %220)
store double %225, double* %222
%226 = getelementptr inbounds double, double* %144, i64 %218
%227 = load double, double* %226
%228 = fadd double %225, %227
store double %228, double* %222
%229 = getelementptr inbounds double, double* %147, i64 %218
%230 = load double, double* %229
%231 = fadd double %228, %230
store double %231, double* %222
%232 = add nuw nsw i64 %218, 1
%233 = getelementptr inbounds double, double* %141, i64 %232
%234 = load double, double* %233
%235 = fadd double %231, %234
store double %235, double* %222
%236 = add nsw i64 %218, -1
%237 = getelementptr inbounds double, double* %141, i64 %236
%238 = load double, double* %237
%239 = fadd double %235, %238
store double %239, double* %222
%240 = icmp eq i64 %232, %89
br i1 %240, label %214, label %217
}