void drawline_plane(int x2, int y2, int x1, int y1, unsigned char anchor) {
  int deltax = abs(x2 - x1);
  int deltay = abs(y2 - y1);
  int x = x1;
  int y = y1;
  int xinc1;
  int xinc2;
  int yinc1;
  int yinc2;
  int den;
  int num;
  int numadd;
  int numpixels;
  if (x2 >= x1) {
    xinc1 = 1;
    xinc2 = 1;
  } else {
    xinc1 = -1;
    xinc2 = -1;
  }
  if (y2 >= y1) {
    yinc1 = 1;
    yinc2 = 1;
  } else {
    yinc1 = -1;
    yinc2 = -1;
  }
  if (deltax >= deltay) {
    xinc1 = 0;
    yinc2 = 0;
    den = deltax;
    num = deltax / 2;
    numadd = deltay;
    numpixels = deltax;
  } else {
    xinc2 = 0;
    yinc1 = 0;
    den = deltay;
    num = deltay / 2;
    numadd = deltax;
    numpixels = deltay;
  }
  int curpixel;
  for (curpixel = 0; curpixel <= numpixels; curpixel++) {
    if (anchor == "z") {
      setvoxel(x, y, 3);
      setvoxel(x, y, 2);
      setvoxel(x, y, 1);
      setvoxel(x, y, 0);
    }
    if (anchor == "x") {
      setvoxel(x, 3, y);
      setvoxel(x, 2, y);
      setvoxel(x, 1, y);
      setvoxel(x, 0, y);
    }
    if (anchor == "y") {
      setvoxel(3, y, x);
      setvoxel(2, y, x);
      setvoxel(1, y, x);
      setvoxel(0, y, x);
    }
    num += numadd;
    if (num >= den) {
      num -= den;
      x += xinc1;
      y += yinc1;
    }
    x += xinc2;
    y += yinc2;
  }
}


x86 assembly (clang, -O0):
<drawline_plane>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %r8b,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1181 <drawline_plane+0x61>
movl   $0x1,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
jmp    118f <drawline_plane+0x6f>
movl   $0xffffffff,-0x28(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     11ae <drawline_plane+0x8e>
movl   $0x1,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
jmp    11bc <drawline_plane+0x9c>
movl   $0xffffffff,-0x30(%rbp)
movl   $0xffffffff,-0x34(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     11fb <drawline_plane+0xdb>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    1229 <drawline_plane+0x109>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     1399 <drawline_plane+0x279>
movzbl -0x11(%rbp),%eax
lea    0xdb9(%rip),%rcx
cmp    %rcx,%rax
jne    1295 <drawline_plane+0x175>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    $0x2,%edx
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <setvoxel@plt>
movzbl -0x11(%rbp),%eax
lea    0xd62(%rip),%rcx
cmp    %rcx,%rax
jne    12ee <drawline_plane+0x1ce>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%edx
mov    $0x3,%esi
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%edx
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%edx
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%edx
xor    %esi,%esi
mov    $0x0,%al
call   1040 <setvoxel@plt>
movzbl -0x11(%rbp),%eax
lea    0xd0b(%rip),%rcx
cmp    %rcx,%rax
jne    1347 <drawline_plane+0x227>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x3,%edi
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x2,%edi
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
xor    %edi,%edi
mov    $0x0,%al
call   1040 <setvoxel@plt>
mov    -0x40(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jl     1379 <drawline_plane+0x259>
mov    -0x38(%rbp),%ecx
mov    -0x3c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x30(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x2c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x34(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1230 <drawline_plane+0x110>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawline_plane>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%ebx
mov    %edx,%ebp
xor    %ecx,%ecx
sub    %ebx,%esi
setge  %cl
xor    %edx,%edx
sub    %ebp,%edi
setge  %dl
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %esi,%r14d
neg    %r14d
cmovs  %esi,%r14d
add    %edx,%edx
add    $0xffffffff,%edx
add    %ecx,%ecx
add    $0xffffffff,%ecx
cmp    %r14d,%eax
jae    116e <drawline_plane+0x5e>
mov    %ecx,0x10(%rsp)
movl   $0x0,0x8(%rsp)
mov    %edx,0xc(%rsp)
movl   $0x0,0x14(%rsp)
mov    %eax,0x4(%rsp)
jmp    1191 <drawline_plane+0x81>
mov    %edx,0x14(%rsp)
movl   $0x0,0xc(%rsp)
mov    %ecx,0x8(%rsp)
movl   $0x0,0x10(%rsp)
mov    %r14d,%ecx
mov    %r14d,0x4(%rsp)
mov    %eax,%r14d
mov    %r14d,%r13d
shr    %r13d
movzbl %r8b,%r15d
lea    0x1(%r14),%r12d
jmp    11ea <drawline_plane+0xda>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    0x4(%rsp),%r13d
cmp    %r14d,%r13d
mov    0xc(%rsp),%eax
mov    $0x0,%esi
cmovl  %esi,%eax
mov    0x8(%rsp),%ecx
cmovl  %esi,%ecx
mov    %r14d,%edx
cmovl  %esi,%edx
sub    %edx,%r13d
add    0x14(%rsp),%ebp
add    %eax,%ebp
add    0x10(%rsp),%ebx
add    %ecx,%ebx
add    $0xffffffff,%r12d
je     12ce <drawline_plane+0x1be>
lea    0xe0f(%rip),%rax
cmp    %rax,%r15
jne    1233 <drawline_plane+0x123>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
lea    0xdc8(%rip),%rax
cmp    %rax,%r15
jne    127c <drawline_plane+0x16c>
mov    %ebp,%edi
mov    $0x3,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    %ebp,%edi
mov    $0x2,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    %ebp,%edi
mov    $0x1,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
lea    0xd81(%rip),%rax
cmp    %rax,%r15
jne    11b0 <drawline_plane+0xa0>
mov    $0x3,%edi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    $0x2,%edi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
mov    $0x1,%edi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
xor    %edi,%edi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <setvoxel@plt>
jmp    11b0 <drawline_plane+0xa0>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"z\00"
@.str.1 = [2 x i8] c"x\00"
@.str.2 = [2 x i8] c"y\00"
define void @drawline_plane(i32 %0, i32 %1, i32 %2, i32 %3, i8 zeroext %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8 %4, i8* %10
%24 = load i32, i32* %6
%25 = load i32, i32* %8
%26 = sub nsw i32 %24, %25
%27 = call i32 @abs(i32 %26)
store i32 %27, i32* %11
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = sub nsw i32 %28, %29
%31 = call i32 @abs(i32 %30)
store i32 %31, i32* %12
%32 = load i32, i32* %8
store i32 %32, i32* %13
%33 = load i32, i32* %9
store i32 %33, i32* %14
%34 = load i32, i32* %6
%35 = load i32, i32* %8
%36 = icmp sge i32 %34, %35
br i1 %36, label %37, label %38
37: ; preds = %5
store i32 1, i32* %15
store i32 1, i32* %16
br label %39
38: ; preds = %5
store i32 -1, i32* %15
store i32 -1, i32* %16
br label %39
39: ; preds = %38, %37
%40 = load i32, i32* %7
%41 = load i32, i32* %9
%42 = icmp sge i32 %40, %41
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 1, i32* %17
store i32 1, i32* %18
br label %45
44: ; preds = %39
store i32 -1, i32* %17
store i32 -1, i32* %18
br label %45
45: ; preds = %44, %43
%46 = load i32, i32* %11
%47 = load i32, i32* %12
%48 = icmp sge i32 %46, %47
br i1 %48, label %49, label %55
49: ; preds = %45
store i32 0, i32* %15
store i32 0, i32* %18
%50 = load i32, i32* %11
store i32 %50, i32* %19
%51 = load i32, i32* %11
%52 = sdiv i32 %51, 2
store i32 %52, i32* %20
%53 = load i32, i32* %12
store i32 %53, i32* %21
%54 = load i32, i32* %11
store i32 %54, i32* %22
br label %61
55: ; preds = %45
store i32 0, i32* %16
store i32 0, i32* %17
%56 = load i32, i32* %12
store i32 %56, i32* %19
%57 = load i32, i32* %12
%58 = sdiv i32 %57, 2
store i32 %58, i32* %20
%59 = load i32, i32* %11
store i32 %59, i32* %21
%60 = load i32, i32* %12
store i32 %60, i32* %22
br label %61
61: ; preds = %55, %49
store i32 0, i32* %23
br label %62
62: ; preds = %144, %61
%63 = load i32, i32* %23
%64 = load i32, i32* %22
%65 = icmp sle i32 %63, %64
br i1 %65, label %66, label %147
66: ; preds = %62
%67 = load i8, i8* %10
%68 = zext i8 %67 to i64
%69 = inttoptr i64 %68 to i8*
%70 = icmp eq i8* %69, getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
br i1 %70, label %71, label %84
71: ; preds = %66
%72 = load i32, i32* %13
%73 = load i32, i32* %14
%74 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %72, i32 %73, i32 3)
%75 = load i32, i32* %13
%76 = load i32, i32* %14
%77 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %75, i32 %76, i32 2)
%78 = load i32, i32* %13
%79 = load i32, i32* %14
%80 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %78, i32 %79, i32 1)
%81 = load i32, i32* %13
%82 = load i32, i32* %14
%83 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %81, i32 %82, i32 0)
br label %84
84: ; preds = %71, %66
%85 = load i8, i8* %10
%86 = zext i8 %85 to i64
%87 = inttoptr i64 %86 to i8*
%88 = icmp eq i8* %87, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
br i1 %88, label %89, label %102
89: ; preds = %84
%90 = load i32, i32* %13
%91 = load i32, i32* %14
%92 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %90, i32 3, i32 %91)
%93 = load i32, i32* %13
%94 = load i32, i32* %14
%95 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %93, i32 2, i32 %94)
%96 = load i32, i32* %13
%97 = load i32, i32* %14
%98 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %96, i32 1, i32 %97)
%99 = load i32, i32* %13
%100 = load i32, i32* %14
%101 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %99, i32 0, i32 %100)
br label %102
102: ; preds = %89, %84
%103 = load i8, i8* %10
%104 = zext i8 %103 to i64
%105 = inttoptr i64 %104 to i8*
%106 = icmp eq i8* %105, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
br i1 %106, label %107, label %120
107: ; preds = %102
%108 = load i32, i32* %14
%109 = load i32, i32* %13
%110 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 3, i32 %108, i32 %109)
%111 = load i32, i32* %14
%112 = load i32, i32* %13
%113 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 2, i32 %111, i32 %112)
%114 = load i32, i32* %14
%115 = load i32, i32* %13
%116 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 1, i32 %114, i32 %115)
%117 = load i32, i32* %14
%118 = load i32, i32* %13
%119 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 0, i32 %117, i32 %118)
br label %120
120: ; preds = %107, %102
%121 = load i32, i32* %21
%122 = load i32, i32* %20
%123 = add nsw i32 %122, %121
store i32 %123, i32* %20
%124 = load i32, i32* %20
%125 = load i32, i32* %19
%126 = icmp sge i32 %124, %125
br i1 %126, label %127, label %137
127: ; preds = %120
%128 = load i32, i32* %19
%129 = load i32, i32* %20
%130 = sub nsw i32 %129, %128
store i32 %130, i32* %20
%131 = load i32, i32* %15
%132 = load i32, i32* %13
%133 = add nsw i32 %132, %131
store i32 %133, i32* %13
%134 = load i32, i32* %17
%135 = load i32, i32* %14
%136 = add nsw i32 %135, %134
store i32 %136, i32* %14
br label %137
137: ; preds = %127, %120
%138 = load i32, i32* %16
%139 = load i32, i32* %13
%140 = add nsw i32 %139, %138
store i32 %140, i32* %13
%141 = load i32, i32* %18
%142 = load i32, i32* %14
%143 = add nsw i32 %142, %141
store i32 %143, i32* %14
br label %144
144: ; preds = %137
%145 = load i32, i32* %23
%146 = add nsw i32 %145, 1
store i32 %146, i32* %23
br label %62
147: ; preds = %62
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"z\00"
@.str.1 = [2 x i8] c"x\00"
@.str.2 = [2 x i8] c"y\00"
define void @drawline_plane(i32 %0, i32 %1, i32 %2, i32 %3, i8 zeroext %4) {
%6 = sub nsw i32 %0, %2
%7 = tail call i32 @llvm.abs.i32(i32 %6, i1 true)
%8 = sub nsw i32 %1, %3
%9 = tail call i32 @llvm.abs.i32(i32 %8, i1 true)
%10 = icmp slt i32 %0, %2
%11 = select i1 %10, i32 -1, i32 1
%12 = icmp slt i32 %1, %3
%13 = select i1 %12, i32 -1, i32 1
%14 = icmp ult i32 %7, %9
br i1 %14, label %15, label %16
15: ; preds = %5
br label %16
16: ; preds = %5, %15
%17 = phi i32 [ %11, %15 ], [ 0, %5 ]
%18 = phi i32 [ 0, %15 ], [ %11, %5 ]
%19 = phi i32 [ 0, %15 ], [ %13, %5 ]
%20 = phi i32 [ %13, %15 ], [ 0, %5 ]
%21 = phi i32 [ %7, %15 ], [ %9, %5 ]
%22 = phi i32 [ %9, %15 ], [ %7, %5 ]
%23 = lshr i32 %22, 1
%24 = zext i8 %4 to i64
%25 = inttoptr i64 %24 to i8*
%26 = icmp eq i8* %25, getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%27 = icmp eq i8* %25, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%28 = icmp eq i8* %25, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
br label %29
29: ; preds = %16, %51
%30 = phi i32 [ 0, %16 ], [ %62, %51 ]
%31 = phi i32 [ %23, %16 ], [ %57, %51 ]
%32 = phi i32 [ %3, %16 ], [ %61, %51 ]
%33 = phi i32 [ %2, %16 ], [ %59, %51 ]
br i1 %26, label %34, label %39
34: ; preds = %29
%35 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 %32, i32 3)
%36 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 %32, i32 2)
%37 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 %32, i32 1)
%38 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 %32, i32 0)
br label %39
39: ; preds = %34, %29
br i1 %27, label %40, label %45
40: ; preds = %39
%41 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 3, i32 %32)
%42 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 2, i32 %32)
%43 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 1, i32 %32)
%44 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 %33, i32 0, i32 %32)
br label %45
45: ; preds = %40, %39
br i1 %28, label %46, label %51
46: ; preds = %45
%47 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 3, i32 %32, i32 %33)
%48 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 2, i32 %32, i32 %33)
%49 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 1, i32 %32, i32 %33)
%50 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @setvoxel to i32 (i32, i32, i32, ...)*)(i32 0, i32 %32, i32 %33)
br label %51
51: ; preds = %46, %45
%52 = add nsw i32 %31, %21
%53 = icmp slt i32 %52, %22
%54 = select i1 %53, i32 0, i32 %17
%55 = select i1 %53, i32 0, i32 %19
%56 = select i1 %53, i32 0, i32 %22
%57 = sub nsw i32 %52, %56
%58 = add i32 %33, %18
%59 = add i32 %58, %54
%60 = add i32 %32, %20
%61 = add i32 %60, %55
%62 = add nuw i32 %30, 1
%63 = icmp eq i32 %30, %22
br i1 %63, label %64, label %29
64: ; preds = %51
ret void
}