#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 */
typedef struct TYPE_7__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ XPointer;
struct TYPE_7__ {
  unsigned long pixel;
  int flags;
};
typedef TYPE_1__ XColor;
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Colormap;
typedef int /*<<< orphan*/ Bool;

/* Variables and functions */
int DoBlue;
int DoGreen;
int DoRed;
int /*<<< orphan*/ XFree(int /*<<< orphan*/);
int /*<<< orphan*/ XQueryColor(int /*<<< orphan*/ *, int /*<<< orphan*/,
                               TYPE_1__ *);
int /*<<< orphan*/ XStoreColors(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                TYPE_1__ *, int);
scalar_t__ calloc(int, int);
unsigned long get_pixel_resource(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 char *, char *);
int i_exp(int, int);
int /*<<< orphan*/ permute_colors(TYPE_1__ *, TYPE_1__ *, int, unsigned long *,
                                  int /*<<< orphan*/);
void initialize_transparency_colormap(Display *dpy, Colormap cmap, int nplanes,
                                      unsigned long base_pixel,
                                      unsigned long *plane_masks,
                                      XColor *colors, Bool additive_p) {
  int i;
  int total_colors = i_exp(2, nplanes);
  XColor *all_colors = (XColor *)calloc(total_colors, sizeof(XColor));
  for (i = 0; i < nplanes; i++)
    colors[i].pixel = base_pixel | plane_masks[i];
  permute_colors(colors, all_colors, nplanes, plane_masks, additive_p);
  all_colors[total_colors - 1].pixel =
      get_pixel_resource(dpy, cmap, "background", "Background");
  XQueryColor(dpy, cmap, &all_colors[total_colors - 1]);
  all_colors[total_colors - 1].pixel = base_pixel;
  for (i = 0; i < total_colors; i++)
    all_colors[i].flags = DoRed | DoGreen | DoBlue;
  XStoreColors(dpy, cmap, all_colors, total_colors);
  XFree((XPointer)all_colors);
}


x86 assembly (clang, -O0):
<initialize_transparency_colormap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x10(%rbp),%esi
mov    $0x2,%edi
call   1030 <i_exp@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    $0x10,%esi
call   1050 <calloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11f5 <initialize_transparency_colormap+0x85>
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rdx
or     (%rax,%rdx,8),%rcx
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11b9 <initialize_transparency_colormap+0x49>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x10(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8d
call   1070 <permute_colors@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xde5(%rip),%rdx
lea    0xde9(%rip),%rcx
call   1090 <get_pixel_resource@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x4,%rax
add    %rax,%rdx
call   1060 <XQueryColor@plt>
mov    -0x18(%rbp),%rcx
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    12c9 <initialize_transparency_colormap+0x159>
mov    0x2d53(%rip),%rax
mov    (%rax),%ecx
mov    0x2d32(%rip),%rax
or     (%rax),%ecx
mov    0x2d31(%rip),%rax
or     (%rax),%ecx
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,0x8(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1282 <initialize_transparency_colormap+0x112>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%ecx
call   1080 <XStoreColors@plt>
mov    -0x38(%rbp),%rax
mov    %eax,%edi
call   1040 <XFree@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_transparency_colormap>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%r14
mov    %r8,%rbx
mov    %rcx,%rbp
mov    %edx,%r15d
mov    %esi,0x4(%rsp)
mov    %rdi,0x8(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    $0x2,%edi
mov    %edx,%esi
call   1030 <i_exp@plt>
mov    %eax,%r12d
mov    %eax,%edi
mov    $0x10,%esi
call   1050 <calloc@plt>
mov    %rax,%r13
test   %r15d,%r15d
jle    1264 <initialize_transparency_colormap+0xf4>
mov    %r15d,%edx
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    11d8 <initialize_transparency_colormap+0x68>
xor    %ecx,%ecx
jmp    122b <initialize_transparency_colormap+0xbb>
and    $0xfffffffc,%edx
lea    0x30(%r14),%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%rcx,8),%rdi
or     %rbp,%rdi
mov    %rdi,-0x30(%rsi)
mov    0x8(%rbx,%rcx,8),%rdi
or     %rbp,%rdi
mov    %rdi,-0x20(%rsi)
mov    0x10(%rbx,%rcx,8),%rdi
or     %rbp,%rdi
mov    %rdi,-0x10(%rsi)
mov    0x18(%rbx,%rcx,8),%rdi
or     %rbp,%rdi
mov    %rdi,(%rsi)
add    $0x4,%rcx
add    $0x40,%rsi
cmp    %rcx,%rdx
jne    11f0 <initialize_transparency_colormap+0x80>
test   %rax,%rax
je     1264 <initialize_transparency_colormap+0xf4>
lea    (%rbx,%rcx,8),%rdx
shl    $0x4,%rcx
add    %r14,%rcx
shl    $0x3,%rax
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rdx,%rsi,1),%rdi
or     %rbp,%rdi
mov    %rdi,(%rcx,%rsi,2)
add    $0x8,%rsi
cmp    %rsi,%rax
jne    1250 <initialize_transparency_colormap+0xe0>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    %rbx,%rcx
mov    0x14(%rsp),%r8d
call   1070 <permute_colors@plt>
lea    0xd7f(%rip),%rdx
lea    0xd83(%rip),%rcx
mov    0x8(%rsp),%r15
mov    %r15,%rdi
mov    0x4(%rsp),%r14d
mov    %r14d,%esi
call   1090 <get_pixel_resource@plt>
movslq %r12d,%rbx
shl    $0x4,%rbx
lea    (%rbx,%r13,1),%rdx
add    $0xfffffffffffffff0,%rdx
mov    %rax,-0x10(%rbx,%r13,1)
mov    %r15,%rdi
mov    %r14d,%esi
call   1060 <XQueryColor@plt>
mov    %rbp,-0x10(%rbx,%r13,1)
test   %r12d,%r12d
jle    141b <initialize_transparency_colormap+0x2ab>
mov    %r12d,%eax
cmp    $0x4,%r12d
jae    12da <initialize_transparency_colormap+0x16a>
xor    %ecx,%ecx
jmp    13a1 <initialize_transparency_colormap+0x231>
lea    0x8(%r13),%rcx
mov    %rax,%rdx
shl    $0x4,%rdx
lea    (%rdx,%r13,1),%rsi
add    $0xfffffffffffffffc,%rsi
mov    0x2cf4(%rip),%rbp
lea    0x4(%rbp),%rdi
cmp    %rdi,%rcx
setb   %r14b
cmp    %rbp,%rsi
seta   %r15b
mov    0x2cc3(%rip),%r11
lea    0x4(%r11),%rbp
cmp    %rbp,%rcx
setb   %bl
cmp    %r11,%rsi
seta   %r9b
mov    0x2cb3(%rip),%rbp
lea    0x4(%rbp),%rdi
cmp    %rdi,%rcx
setb   %r8b
cmp    %rbp,%rsi
seta   %r10b
xor    %ecx,%ecx
test   %r15b,%r14b
jne    1397 <initialize_transparency_colormap+0x227>
and    %r9b,%bl
mov    0x4(%rsp),%r14d
mov    0x8(%rsp),%r15
jne    13a1 <initialize_transparency_colormap+0x231>
and    %r10b,%r8b
jne    13a1 <initialize_transparency_colormap+0x231>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
mov    (%r11),%edi
mov    0x2c87(%rip),%rsi
or     (%rsi),%edi
or     0x0(%rbp),%edi
and    $0xffffffffffffffc0,%rdx
xor    %esi,%esi
nopl   0x0(%rax)
mov    %edi,0x8(%r13,%rsi,1)
mov    %edi,0x18(%r13,%rsi,1)
mov    %edi,0x28(%r13,%rsi,1)
mov    %edi,0x38(%r13,%rsi,1)
add    $0x40,%rsi
cmp    %rsi,%rdx
jne    1370 <initialize_transparency_colormap+0x200>
cmp    %rax,%rcx
jne    13a1 <initialize_transparency_colormap+0x231>
jmp    141b <initialize_transparency_colormap+0x2ab>
mov    0x4(%rsp),%r14d
mov    0x8(%rsp),%r15
mov    %rcx,%rdx
not    %rdx
test   $0x1,%al
je     13d6 <initialize_transparency_colormap+0x266>
mov    0x2c36(%rip),%rsi
mov    0x2c17(%rip),%rdi
mov    (%rdi),%edi
or     (%rsi),%edi
mov    0x2c14(%rip),%rsi
or     (%rsi),%edi
mov    %rcx,%rsi
shl    $0x4,%rsi
mov    %edi,0x8(%r13,%rsi,1)
or     $0x1,%rcx
add    %rax,%rdx
je     141b <initialize_transparency_colormap+0x2ab>
sub    %rcx,%rax
shl    $0x4,%rcx
add    %r13,%rcx
add    $0x18,%rcx
mov    0x2bf8(%rip),%rdx
mov    0x2bd9(%rip),%rsi
mov    0x2bda(%rip),%rdi
xchg   %ax,%ax
mov    (%rsi),%ebp
or     (%rdx),%ebp
or     (%rdi),%ebp
mov    %ebp,-0x10(%rcx)
mov    (%rsi),%ebp
or     (%rdx),%ebp
or     (%rdi),%ebp
mov    %ebp,(%rcx)
add    $0x20,%rcx
add    $0xfffffffffffffffe,%rax
jne    1400 <initialize_transparency_colormap+0x290>
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
call   1080 <XStoreColors@plt>
mov    %r13d,%edi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <XFree@plt>

LLVM IR (-O0):
%struct.TYPE_7__ = type { i64, i32 }
@.str = [11 x i8] c"background\00"
@.str.1 = [11 x i8] c"Background\00"
@DoRed = global i32 0
@DoGreen = global i32 0
@DoBlue = global i32 0
define void @initialize_transparency_colormap(i32* %0, i32 %1, i32 %2, i64 %3, i64* %4, %struct.TYPE_7__* %5, i32 %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i64
%12 = alloca i64*
%13 = alloca %struct.TYPE_7__*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca %struct.TYPE_7__*
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i64 %3, i64* %11
store i64* %4, i64** %12
store %struct.TYPE_7__* %5, %struct.TYPE_7__** %13
store i32 %6, i32* %14
%18 = load i32, i32* %10
%19 = call i32 @i_exp(i32 2, i32 %18)
store i32 %19, i32* %16
%20 = load i32, i32* %16
%21 = call i64 @calloc(i32 %20, i32 16)
%22 = inttoptr i64 %21 to %struct.TYPE_7__*
store %struct.TYPE_7__* %22, %struct.TYPE_7__** %17
store i32 0, i32* %15
br label %23
23: ; preds = %40, %7
%24 = load i32, i32* %15
%25 = load i32, i32* %10
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %43
27: ; preds = %23
%28 = load i64, i64* %11
%29 = load i64*, i64** %12
%30 = load i32, i32* %15
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i64, i64* %29, i64 %31
%33 = load i64, i64* %32
%34 = or i64 %28, %33
%35 = load %struct.TYPE_7__*, %struct.TYPE_7__** %13
%36 = load i32, i32* %15
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %35, i64 %37
%39 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %38, i32 0, i32 0
store i64 %34, i64* %39
br label %40
40: ; preds = %27
%41 = load i32, i32* %15
%42 = add nsw i32 %41, 1
store i32 %42, i32* %15
br label %23
43: ; preds = %23
%44 = load %struct.TYPE_7__*, %struct.TYPE_7__** %13
%45 = load %struct.TYPE_7__*, %struct.TYPE_7__** %17
%46 = load i32, i32* %10
%47 = load i64*, i64** %12
%48 = load i32, i32* %14
%49 = call i32 @permute_colors(%struct.TYPE_7__* %44, %struct.TYPE_7__* %45, i32 %46, i64* %47, i32 %48)
%50 = load i32*, i32** %8
%51 = load i32, i32* %9
%52 = call i64 @get_pixel_resource(i32* %50, i32 %51, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%53 = load %struct.TYPE_7__*, %struct.TYPE_7__** %17
%54 = load i32, i32* %16
%55 = sub nsw i32 %54, 1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %53, i64 %56
%58 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %57, i32 0, i32 0
store i64 %52, i64* %58
%59 = load i32*, i32** %8
%60 = load i32, i32* %9
%61 = load %struct.TYPE_7__*, %struct.TYPE_7__** %17
%62 = load i32, i32* %16
%63 = sub nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %61, i64 %64
%66 = call i32 @XQueryColor(i32* %59, i32 %60, %struct.TYPE_7__* %65)
%67 = load i64, i64* %11
%68 = load %struct.TYPE_7__*, %struct.TYPE_7__** %17
%69 = load i32, i32* %16
%70 = sub nsw i32 %69, 1
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %68, i64 %71
%73 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %72, i32 0, i32 0
store i64 %67, i64* %73
store i32 0, i32* %15
br label %74
74: ; preds = %89, %43
%75 = load i32, i32* %15
%76 = load i32, i32* %16
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %92
78: ; preds = %74
%79 = load i32, i32* @DoRed
%80 = load i32, i32* @DoGreen
%81 = or i32 %79, %80
%82 = load i32, i32* @DoBlue
%83 = or i32 %81, %82
%84 = load %struct.TYPE_7__*, %struct.TYPE_7__** %17
%85 = load i32, i32* %15
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %84, i64 %86
%88 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %87, i32 0, i32 1
store i32 %83, i32* %88
br label %89
89: ; preds = %78
%90 = load i32, i32* %15
%91 = add nsw i32 %90, 1
store i32 %91, i32* %15
br label %74
92: ; preds = %74
%93 = load i32*, i32** %8
%94 = load i32, i32* %9
%95 = load %struct.TYPE_7__*, %struct.TYPE_7__** %17
%96 = load i32, i32* %16
%97 = call i32 @XStoreColors(i32* %93, i32 %94, %struct.TYPE_7__* %95, i32 %96)
%98 = load %struct.TYPE_7__*, %struct.TYPE_7__** %17
%99 = ptrtoint %struct.TYPE_7__* %98 to i32
%100 = call i32 @XFree(i32 %99)
ret void
}

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