#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*/ adjust(double *, int, int, double, double, int, int, int,
                          int, int, int, unsigned int *);
void subdivide(double *base, signed int xres, signed int yres, double wx,
               double wy, signed int x1, signed int y1, signed int x2,
               signed int y2, unsigned int *rndval) {
  signed int x;
  signed int y;
  if (x2 + -x1 < 2) {
    if (y2 + -y1 < 2)
      return;
  }
  x = (x1 + x2) / 2;
  y = (y1 + y2) / 2;
  adjust(base, xres, yres, wx, wy, x1, y1, x, y1, x2, y1, rndval);
  adjust(base, xres, yres, wx, wy, x2, y1, x2, y, x2, y2, rndval);
  adjust(base, xres, yres, wx, wy, x1, y2, x, y2, x2, y2, rndval);
  adjust(base, xres, yres, wx, wy, x1, y1, x1, y, x1, y2, rndval);
  if ((*((signed long int)y * (signed long int)xres + base +
         (signed long int)x) == 0.000000))
    base[(signed long int)(x + xres * y)] =
        (base[(signed long int)(x1 + xres * y1)] +
         base[(signed long int)(x2 + xres * y1)] +
         base[(signed long int)(x2 + xres * y2)] +
         base[(signed long int)(x1 + xres * y2)]) /
        4.000000;
  subdivide(base, xres, yres, wx, wy, x1, y1, x, y, rndval);
  subdivide(base, xres, yres, wx, wy, x, y1, x2, y, rndval);
  subdivide(base, xres, yres, wx, wy, x, y, x2, y2, rndval);
  subdivide(base, xres, yres, wx, wy, x1, y, x, y2, rndval);
}


x86 assembly (clang, -O0):
<subdivide>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
mov    %r8d,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
mov    -0x34(%rbp),%eax
xor    %ecx,%ecx
sub    -0x2c(%rbp),%ecx
add    %ecx,%eax
cmp    $0x2,%eax
jge    117f <subdivide+0x5f>
mov    0x10(%rbp),%eax
xor    %ecx,%ecx
sub    -0x30(%rbp),%ecx
add    %ecx,%eax
cmp    $0x2,%eax
jge    117a <subdivide+0x5a>
jmp    143d <subdivide+0x31d>
jmp    117f <subdivide+0x5f>
mov    -0x2c(%rbp),%eax
add    -0x34(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
add    0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x2c(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x30(%rbp),%ebx
mov    -0x34(%rbp),%r11d
mov    -0x30(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <adjust@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    -0x3c(%rbp),%ebx
mov    -0x34(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <adjust@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x2c(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    0x10(%rbp),%ebx
mov    -0x34(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <adjust@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x2c(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
mov    -0x3c(%rbp),%ebx
mov    -0x2c(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <adjust@plt>
movslq -0x3c(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   %rcx,%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1369 <subdivide+0x249>
jp     1369 <subdivide+0x249>
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   0x10(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   0x10(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xcb3(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x3c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x2c(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x3c(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <subdivide@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x38(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    -0x3c(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <subdivide@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x38(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <subdivide@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x2c(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <subdivide@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<subdivide>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9d,%ebp
mov    %rcx,0x8(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %edx,0x2c(%rsp)
mov    %esi,0x28(%rsp)
mov    %rdi,0x50(%rsp)
mov    0x90(%rsp),%eax
sub    %r8d,%eax
cmp    $0x1,%eax
jg     116d <subdivide+0x4d>
mov    %ebp,%eax
sub    0x8(%rsp),%eax
cmp    $0x2,%eax
jl     1424 <subdivide+0x304>
mov    0x28(%rsp),%eax
movslq %eax,%rcx
mov    %rcx,0x48(%rsp)
mov    0x90(%rsp),%ecx
imul   %eax,%ecx
mov    0x8(%rsp),%rax
mov    %rcx,%rdx
mov    %rcx,0x40(%rsp)
add    %ecx,%eax
cltq
mov    %rax,0x38(%rsp)
nopl   0x0(%rax)
mov    %r8,0x20(%rsp)
mov    0x8(%rsp),%rax
add    %ebp,%eax
mov    %eax,%r12d
shr    $0x1f,%r12d
add    %eax,%r12d
sar    %r12d
mov    0x90(%rsp),%eax
add    %r8d,%eax
mov    %eax,%r14d
shr    $0x1f,%r14d
add    %eax,%r14d
sar    %r14d
mov    0x50(%rsp),%rbx
mov    %rbx,%rdi
mov    0x48(%rsp),%r13
mov    %r13d,%esi
mov    0x2c(%rsp),%r15d
mov    %r15d,%edx
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    0x8(%rsp),%rcx
mov    0x20(%rsp),%r8
mov    %r12d,%r9d
mov    0x98(%rsp),%rax
push   %rax
push   0x28(%rsp)
push   %rbp
push   0x38(%rsp)
call   1040 <adjust@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r15d,%edx
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    %ebp,%ecx
mov    0x20(%rsp),%r8
mov    %ebp,%r9d
push   0x98(%rsp)
mov    0x98(%rsp),%eax
push   %rax
push   %rbp
push   %r14
call   1040 <adjust@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r15d,%edx
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    0x8(%rsp),%rcx
mov    0x90(%rsp),%r8d
mov    %r12d,%r9d
push   0x98(%rsp)
push   %r8
mov    %rbp,0x40(%rsp)
push   %rbp
push   %r8
call   1040 <adjust@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r15d,%edx
mov    0x8(%rsp),%rcx
mov    %rbx,%r15
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    0x20(%rsp),%r8
mov    %ecx,%r9d
push   0x98(%rsp)
mov    0x98(%rsp),%eax
push   %rax
push   %rcx
push   %r14
call   1040 <adjust@plt>
add    $0x20,%rsp
movslq %r14d,%rax
imul   %r13,%rax
mov    0x20(%rsp),%rbx
lea    (%r15,%rax,8),%rax
movslq %r12d,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd 0xd13(%rip),%xmm0
mov    0x28(%rsp),%r13d
jne    1357 <subdivide+0x237>
jp     1357 <subdivide+0x237>
mov    %ebx,%eax
imul   %r13d,%eax
mov    0x8(%rsp),%rcx
add    %eax,%ecx
movslq %ecx,%rcx
movsd  (%r15,%rcx,8),%xmm0
mov    0x30(%rsp),%rcx
add    %ecx,%eax
cltq
addsd  (%r15,%rax,8),%xmm0
mov    0x40(%rsp),%rax
add    %ecx,%eax
cltq
addsd  (%r15,%rax,8),%xmm0
mov    0x38(%rsp),%rax
addsd  (%r15,%rax,8),%xmm0
mulsd  0xcbb(%rip),%xmm0
mov    %r14d,%eax
imul   %r13d,%eax
add    %r12d,%eax
cltq
movsd  %xmm0,(%r15,%rax,8)
mov    %r15,%rdi
mov    %r13d,%esi
mov    0x2c(%rsp),%ebp
mov    %ebp,%edx
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    0x8(%rsp),%rcx
mov    %ebx,%r8d
mov    %r12d,%r9d
mov    0x98(%rsp),%rax
push   %rax
push   %r14
call   1030 <subdivide@plt>
add    $0x10,%rsp
mov    %r15,%rdi
mov    %r13d,%esi
mov    %ebp,%edx
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    %r12d,%ecx
mov    %ebx,%r8d
mov    0x30(%rsp),%rbx
mov    %ebx,%r9d
push   0x98(%rsp)
push   %r14
call   1030 <subdivide@plt>
add    $0x10,%rsp
mov    %r15,%rdi
mov    %r13d,%esi
mov    %ebp,%edx
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    %r12d,%ecx
mov    %r14d,%r8d
mov    %ebx,%r9d
push   0x98(%rsp)
mov    0x98(%rsp),%eax
mov    %rax,%rbx
push   %rax
call   1030 <subdivide@plt>
add    $0x10,%rsp
mov    %r12d,%eax
sub    0x8(%rsp),%eax
mov    %ebx,%ecx
sub    %r14d,%ecx
mov    %r12d,%ebp
mov    %r14d,%r8d
cmp    $0x1,%ecx
jg     11a0 <subdivide+0x80>
mov    %r12d,%ebp
mov    %r14d,%r8d
cmp    $0x1,%eax
jg     11a0 <subdivide+0x80>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @subdivide(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %5, i32 %6, i32 %7, i32 %8, i32* %9) {
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32*
%21 = alloca i32
%22 = alloca i32
store double* %0, double** %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store double %3, double* %14
store double %4, double* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32* %9, i32** %20
%23 = load i32, i32* %18
%24 = load i32, i32* %16
%25 = sub nsw i32 0, %24
%26 = add nsw i32 %23, %25
%27 = icmp slt i32 %26, 2
br i1 %27, label %28, label %36
28: ; preds = %10
%29 = load i32, i32* %19
%30 = load i32, i32* %17
%31 = sub nsw i32 0, %30
%32 = add nsw i32 %29, %31
%33 = icmp slt i32 %32, 2
br i1 %33, label %34, label %35
34: ; preds = %28
br label %199
35: ; preds = %28
br label %36
36: ; preds = %35, %10
%37 = load i32, i32* %16
%38 = load i32, i32* %18
%39 = add nsw i32 %37, %38
%40 = sdiv i32 %39, 2
store i32 %40, i32* %21
%41 = load i32, i32* %17
%42 = load i32, i32* %19
%43 = add nsw i32 %41, %42
%44 = sdiv i32 %43, 2
store i32 %44, i32* %22
%45 = load double*, double** %11
%46 = load i32, i32* %12
%47 = load i32, i32* %13
%48 = load double, double* %14
%49 = load double, double* %15
%50 = load i32, i32* %16
%51 = load i32, i32* %17
%52 = load i32, i32* %21
%53 = load i32, i32* %17
%54 = load i32, i32* %18
%55 = load i32, i32* %17
%56 = load i32*, i32** %20
%57 = call i32 @adjust(double* %45, i32 %46, i32 %47, double %48, double %49, i32 %50, i32 %51, i32 %52, i32 %53, i32 %54, i32 %55, i32* %56)
%58 = load double*, double** %11
%59 = load i32, i32* %12
%60 = load i32, i32* %13
%61 = load double, double* %14
%62 = load double, double* %15
%63 = load i32, i32* %18
%64 = load i32, i32* %17
%65 = load i32, i32* %18
%66 = load i32, i32* %22
%67 = load i32, i32* %18
%68 = load i32, i32* %19
%69 = load i32*, i32** %20
%70 = call i32 @adjust(double* %58, i32 %59, i32 %60, double %61, double %62, i32 %63, i32 %64, i32 %65, i32 %66, i32 %67, i32 %68, i32* %69)
%71 = load double*, double** %11
%72 = load i32, i32* %12
%73 = load i32, i32* %13
%74 = load double, double* %14
%75 = load double, double* %15
%76 = load i32, i32* %16
%77 = load i32, i32* %19
%78 = load i32, i32* %21
%79 = load i32, i32* %19
%80 = load i32, i32* %18
%81 = load i32, i32* %19
%82 = load i32*, i32** %20
%83 = call i32 @adjust(double* %71, i32 %72, i32 %73, double %74, double %75, i32 %76, i32 %77, i32 %78, i32 %79, i32 %80, i32 %81, i32* %82)
%84 = load double*, double** %11
%85 = load i32, i32* %12
%86 = load i32, i32* %13
%87 = load double, double* %14
%88 = load double, double* %15
%89 = load i32, i32* %16
%90 = load i32, i32* %17
%91 = load i32, i32* %16
%92 = load i32, i32* %22
%93 = load i32, i32* %16
%94 = load i32, i32* %19
%95 = load i32*, i32** %20
%96 = call i32 @adjust(double* %84, i32 %85, i32 %86, double %87, double %88, i32 %89, i32 %90, i32 %91, i32 %92, i32 %93, i32 %94, i32* %95)
%97 = load i32, i32* %22
%98 = sext i32 %97 to i64
%99 = load i32, i32* %12
%100 = sext i32 %99 to i64
%101 = mul nsw i64 %98, %100
%102 = load double*, double** %11
%103 = getelementptr inbounds double, double* %102, i64 %101
%104 = load i32, i32* %21
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
%107 = load double, double* %106
%108 = fcmp oeq double %107, 0.000000e+00
br i1 %108, label %109, label %158
109: ; preds = %36
%110 = load double*, double** %11
%111 = load i32, i32* %16
%112 = load i32, i32* %12
%113 = load i32, i32* %17
%114 = mul nsw i32 %112, %113
%115 = add nsw i32 %111, %114
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds double, double* %110, i64 %116
%118 = load double, double* %117
%119 = load double*, double** %11
%120 = load i32, i32* %18
%121 = load i32, i32* %12
%122 = load i32, i32* %17
%123 = mul nsw i32 %121, %122
%124 = add nsw i32 %120, %123
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %119, i64 %125
%127 = load double, double* %126
%128 = fadd double %118, %127
%129 = load double*, double** %11
%130 = load i32, i32* %18
%131 = load i32, i32* %12
%132 = load i32, i32* %19
%133 = mul nsw i32 %131, %132
%134 = add nsw i32 %130, %133
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %129, i64 %135
%137 = load double, double* %136
%138 = fadd double %128, %137
%139 = load double*, double** %11
%140 = load i32, i32* %16
%141 = load i32, i32* %12
%142 = load i32, i32* %19
%143 = mul nsw i32 %141, %142
%144 = add nsw i32 %140, %143
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %139, i64 %145
%147 = load double, double* %146
%148 = fadd double %138, %147
%149 = fdiv double %148, 4.000000e+00
%150 = load double*, double** %11
%151 = load i32, i32* %21
%152 = load i32, i32* %12
%153 = load i32, i32* %22
%154 = mul nsw i32 %152, %153
%155 = add nsw i32 %151, %154
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds double, double* %150, i64 %156
store double %149, double* %157
br label %158
158: ; preds = %109, %36
%159 = load double*, double** %11
%160 = load i32, i32* %12
%161 = load i32, i32* %13
%162 = load double, double* %14
%163 = load double, double* %15
%164 = load i32, i32* %16
%165 = load i32, i32* %17
%166 = load i32, i32* %21
%167 = load i32, i32* %22
%168 = load i32*, i32** %20
%169 = load double*, double** %11
%170 = load i32, i32* %12
%171 = load i32, i32* %13
%172 = load double, double* %14
%173 = load double, double* %15
%174 = load i32, i32* %21
%175 = load i32, i32* %17
%176 = load i32, i32* %18
%177 = load i32, i32* %22
%178 = load i32*, i32** %20
%179 = load double*, double** %11
%180 = load i32, i32* %12
%181 = load i32, i32* %13
%182 = load double, double* %14
%183 = load double, double* %15
%184 = load i32, i32* %21
%185 = load i32, i32* %22
%186 = load i32, i32* %18
%187 = load i32, i32* %19
%188 = load i32*, i32** %20
%189 = load double*, double** %11
%190 = load i32, i32* %12
%191 = load i32, i32* %13
%192 = load double, double* %14
%193 = load double, double* %15
%194 = load i32, i32* %16
%195 = load i32, i32* %22
%196 = load i32, i32* %21
%197 = load i32, i32* %19
%198 = load i32*, i32** %20
br label %199
199: ; preds = %158, %34
ret void
}

LLVM IR (-O2):
define void @subdivide(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %5, i32 %6, i32 %7, i32 %8, i32* %9) {
%11 = sub i32 %7, %5
%12 = icmp slt i32 %11, 2
%13 = sub i32 %8, %6
%14 = icmp slt i32 %13, 2
%15 = and i1 %14, %12
br i1 %15, label %69, label %16
16: ; preds = %10
%17 = sext i32 %1 to i64
%18 = mul nsw i32 %8, %1
%19 = add nsw i32 %18, %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %0, i64 %20
br label %22
22: ; preds = %16, %63
%23 = phi i32 [ %7, %16 ], [ %26, %63 ]
%24 = phi i32 [ %6, %16 ], [ %28, %63 ]
%25 = add nsw i32 %23, %5
%26 = sdiv i32 %25, 2
%27 = add nsw i32 %24, %8
%28 = sdiv i32 %27, 2
%29 = tail call i32 @adjust(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %5, i32 %24, i32 %26, i32 %24, i32 %23, i32 %24, i32* %9)
%30 = tail call i32 @adjust(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %23, i32 %24, i32 %23, i32 %28, i32 %23, i32 %8, i32* %9)
%31 = tail call i32 @adjust(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %5, i32 %8, i32 %26, i32 %8, i32 %23, i32 %8, i32* %9)
%32 = tail call i32 @adjust(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %5, i32 %24, i32 %5, i32 %28, i32 %5, i32 %8, i32* %9)
%33 = sext i32 %28 to i64
%34 = mul nsw i64 %33, %17
%35 = getelementptr inbounds double, double* %0, i64 %34
%36 = sext i32 %26 to i64
%37 = getelementptr inbounds double, double* %35, i64 %36
%38 = load double, double* %37
%39 = fcmp oeq double %38, 0.000000e+00
br i1 %39, label %40, label %63
40: ; preds = %22
%41 = mul nsw i32 %24, %1
%42 = add nsw i32 %41, %5
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %0, i64 %43
%45 = load double, double* %44
%46 = add nsw i32 %41, %23
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %0, i64 %47
%49 = load double, double* %48
%50 = fadd double %45, %49
%51 = add nsw i32 %23, %18
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %0, i64 %52
%54 = load double, double* %53
%55 = fadd double %50, %54
%56 = load double, double* %21
%57 = fadd double %55, %56
%58 = fmul double %57, 2.500000e-01
%59 = mul nsw i32 %28, %1
%60 = add nsw i32 %26, %59
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %0, i64 %61
store double %58, double* %62
br label %63
63: ; preds = %40, %22
tail call void @subdivide(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %5, i32 %24, i32 %26, i32 %28, i32* %9)
tail call void @subdivide(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %26, i32 %24, i32 %23, i32 %28, i32* %9)
tail call void @subdivide(double* %0, i32 %1, i32 %2, double %3, double %4, i32 %26, i32 %28, i32 %23, i32 %8, i32* %9)
%64 = sub i32 %26, %5
%65 = icmp slt i32 %64, 2
%66 = sub i32 %8, %28
%67 = icmp slt i32 %66, 2
%68 = and i1 %67, %65
br i1 %68, label %69, label %22
69: ; preds = %63, %10
ret void
}