void max_pixels(float *p, const float *q0, const float *q1, const float *q2,
                const float *q3, int c) {
  switch (c) {
  case 4:
    p[3] = ((((((q0[3]) > (q1[3])) ? (q0[3]) : (q1[3]))) >
             ((((q2[3]) > (q3[3])) ? (q2[3]) : (q3[3]))))
                ? ((((q0[3]) > (q1[3])) ? (q0[3]) : (q1[3])))
                : ((((q2[3]) > (q3[3])) ? (q2[3]) : (q3[3]))));
  case 3:
    p[2] = ((((((q0[2]) > (q1[2])) ? (q0[2]) : (q1[2]))) >
             ((((q2[2]) > (q3[2])) ? (q2[2]) : (q3[2]))))
                ? ((((q0[2]) > (q1[2])) ? (q0[2]) : (q1[2])))
                : ((((q2[2]) > (q3[2])) ? (q2[2]) : (q3[2]))));
  case 2:
    p[1] = ((((((q0[1]) > (q1[1])) ? (q0[1]) : (q1[1]))) >
             ((((q2[1]) > (q3[1])) ? (q2[1]) : (q3[1]))))
                ? ((((q0[1]) > (q1[1])) ? (q0[1]) : (q1[1])))
                : ((((q2[1]) > (q3[1])) ? (q2[1]) : (q3[1]))));
  case 1:
    p[0] = ((((((q0[0]) > (q1[1])) ? (q0[0]) : (q1[1]))) >
             ((((q2[0]) > (q3[0])) ? (q2[0]) : (q3[0]))))
                ? ((((q0[0]) > (q1[1])) ? (q0[0]) : (q1[1])))
                : ((((q2[0]) > (q3[0])) ? (q2[0]) : (q3[0]))));
  }
}


x86 assembly (clang, -O0):
<max_pixels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x18,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x3,%eax
ja     15ff <max_pixels+0x4ff>
mov    -0x38(%rbp),%rax
lea    0xec0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0xc(%rax),%xmm0
jbe    1173 <max_pixels+0x73>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
jmp    1181 <max_pixels+0x81>
mov    -0x18(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss 0xc(%rax),%xmm0
jbe    11b5 <max_pixels+0xb5>
mov    -0x20(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    11c3 <max_pixels+0xc3>
mov    -0x28(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x44(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jbe    121d <max_pixels+0x11d>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0xc(%rax),%xmm0
jbe    1200 <max_pixels+0x100>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x48(%rbp)
jmp    120e <max_pixels+0x10e>
mov    -0x18(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
jmp    125f <max_pixels+0x15f>
mov    -0x20(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss 0xc(%rax),%xmm0
jbe    1247 <max_pixels+0x147>
mov    -0x20(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
jmp    1255 <max_pixels+0x155>
mov    -0x28(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x4c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0x8(%rax),%xmm0
jbe    1297 <max_pixels+0x197>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x54(%rbp)
jmp    12a5 <max_pixels+0x1a5>
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss 0x8(%rax),%xmm0
jbe    12d9 <max_pixels+0x1d9>
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x5c(%rbp)
jmp    12e7 <max_pixels+0x1e7>
mov    -0x28(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x58(%rbp),%xmm0
movss  -0x5c(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jbe    1341 <max_pixels+0x241>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0x8(%rax),%xmm0
jbe    1324 <max_pixels+0x224>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x60(%rbp)
jmp    1332 <max_pixels+0x232>
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
jmp    1383 <max_pixels+0x283>
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss 0x8(%rax),%xmm0
jbe    136b <max_pixels+0x26b>
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x68(%rbp)
jmp    1379 <max_pixels+0x279>
mov    -0x28(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x64(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0x4(%rax),%xmm0
jbe    13bb <max_pixels+0x2bb>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x6c(%rbp)
jmp    13c9 <max_pixels+0x2c9>
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss 0x4(%rax),%xmm0
jbe    13fd <max_pixels+0x2fd>
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x74(%rbp)
jmp    140b <max_pixels+0x30b>
mov    -0x28(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x70(%rbp),%xmm0
movss  -0x74(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jbe    1465 <max_pixels+0x365>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0x4(%rax),%xmm0
jbe    1448 <max_pixels+0x348>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x78(%rbp)
jmp    1456 <max_pixels+0x356>
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x78(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
jmp    14a7 <max_pixels+0x3a7>
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss 0x4(%rax),%xmm0
jbe    148f <max_pixels+0x38f>
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x80(%rbp)
jmp    149d <max_pixels+0x39d>
mov    -0x28(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x80(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x7c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0x4(%rax),%xmm0
jbe    14e0 <max_pixels+0x3e0>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
jmp    14f1 <max_pixels+0x3f1>
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x84(%rbp),%xmm0
ff
movss  %xmm0,-0x88(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    152b <max_pixels+0x42b>
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
jmp    153b <max_pixels+0x43b>
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x88(%rbp),%xmm0
ff
movss  -0x8c(%rbp),%xmm1
ff
ucomiss %xmm1,%xmm0
jbe    15a5 <max_pixels+0x4a5>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss 0x4(%rax),%xmm0
jbe    157f <max_pixels+0x47f>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
jmp    1590 <max_pixels+0x490>
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  -0x90(%rbp),%xmm0
ff
movss  %xmm0,-0x94(%rbp)
ff
jmp    15ef <max_pixels+0x4ef>
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    15cf <max_pixels+0x4cf>
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x98(%rbp)
ff
jmp    15df <max_pixels+0x4df>
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movss  -0x98(%rbp),%xmm0
ff
movss  %xmm0,-0x94(%rbp)
ff
movss  -0x94(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x18,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_pixels>:
add    $0xffffffff,%r9d
cmp    $0x3,%r9d
ja     1192 <max_pixels+0x92>
lea    0xeeb(%rip),%r10
movslq (%r10,%r9,4),%rax
add    %r10,%rax
jmp    *%rax
movss  0xc(%rsi),%xmm0
maxss  0xc(%rdx),%xmm0
movss  0xc(%rcx),%xmm1
maxss  0xc(%r8),%xmm1
maxss  %xmm1,%xmm0
movss  %xmm0,0xc(%rdi)
movss  0x8(%rsi),%xmm0
maxss  0x8(%rdx),%xmm0
movss  0x8(%rcx),%xmm1
maxss  0x8(%r8),%xmm1
maxss  %xmm1,%xmm0
movss  %xmm0,0x8(%rdi)
movss  0x4(%rsi),%xmm0
maxss  0x4(%rdx),%xmm0
movss  0x4(%rcx),%xmm1
maxss  0x4(%r8),%xmm1
maxss  %xmm1,%xmm0
movss  %xmm0,0x4(%rdi)
movss  (%rsi),%xmm0
maxss  0x4(%rdx),%xmm0
movss  (%rcx),%xmm1
maxss  (%r8),%xmm1
maxss  %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @max_pixels(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4, i32 %5) {
switch i32 %5, label %67 [
i32 4, label %7
i32 3, label %23
i32 2, label %39
i32 1, label %55
]
7: ; preds = %6
%8 = getelementptr inbounds float, float* %1, i64 3
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %2, i64 3
%11 = load float, float* %10
%12 = fcmp ogt float %9, %11
%13 = select i1 %12, float %9, float %11
%14 = getelementptr inbounds float, float* %3, i64 3
%15 = load float, float* %14
%16 = getelementptr inbounds float, float* %4, i64 3
%17 = load float, float* %16
%18 = fcmp ogt float %15, %17
%19 = select i1 %18, float %15, float %17
%20 = fcmp ogt float %13, %19
%21 = select i1 %20, float %13, float %19
%22 = getelementptr inbounds float, float* %0, i64 3
store float %21, float* %22
br label %23
23: ; preds = %6, %7
%24 = getelementptr inbounds float, float* %1, i64 2
%25 = load float, float* %24
%26 = getelementptr inbounds float, float* %2, i64 2
%27 = load float, float* %26
%28 = fcmp ogt float %25, %27
%29 = select i1 %28, float %25, float %27
%30 = getelementptr inbounds float, float* %3, i64 2
%31 = load float, float* %30
%32 = getelementptr inbounds float, float* %4, i64 2
%33 = load float, float* %32
%34 = fcmp ogt float %31, %33
%35 = select i1 %34, float %31, float %33
%36 = fcmp ogt float %29, %35
%37 = select i1 %36, float %29, float %35
%38 = getelementptr inbounds float, float* %0, i64 2
store float %37, float* %38
br label %39
39: ; preds = %6, %23
%40 = getelementptr inbounds float, float* %1, i64 1
%41 = load float, float* %40
%42 = getelementptr inbounds float, float* %2, i64 1
%43 = load float, float* %42
%44 = fcmp ogt float %41, %43
%45 = select i1 %44, float %41, float %43
%46 = getelementptr inbounds float, float* %3, i64 1
%47 = load float, float* %46
%48 = getelementptr inbounds float, float* %4, i64 1
%49 = load float, float* %48
%50 = fcmp ogt float %47, %49
%51 = select i1 %50, float %47, float %49
%52 = fcmp ogt float %45, %51
%53 = select i1 %52, float %45, float %51
%54 = getelementptr inbounds float, float* %0, i64 1
store float %53, float* %54
br label %55
55: ; preds = %6, %39
%56 = load float, float* %1
%57 = getelementptr inbounds float, float* %2, i64 1
%58 = load float, float* %57
%59 = fcmp ogt float %56, %58
%60 = select i1 %59, float %56, float %58
%61 = load float, float* %3
%62 = load float, float* %4
%63 = fcmp ogt float %61, %62
%64 = select i1 %63, float %61, float %62
%65 = fcmp ogt float %60, %64
%66 = select i1 %65, float %60, float %64
store float %66, float* %0
br label %67
67: ; preds = %55, %6
ret void
}