#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 */
typedef int /*<<< orphan*/ GLuint;
typedef int GLsizei;
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ GL_RGBA;
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ GL_UNSIGNED_BYTE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ glTexImage2D(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                int, int, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ *read_texture(char const *, int *, int *,
                                 int /*<<< orphan*/ *);
int roundup(int);
int /*<<< orphan*/ stderr;
void create_texture(const char *fname, GLsizei *w, GLsizei *h, GLsizei *padW,
                    GLsizei *padH, GLint *comps) {
  GLuint *img, *padImg = NULL;
  int y;
  img = read_texture(fname, w, h, comps);
  if (!img) {
    fprintf(stderr, "Could not open %s\n", fname);
    exit(1);
  }
  if (*w & (*w - 1)) {
    *padW = roundup(*w);
  } else {
    *padW = *w;
  }
  if (*h & (*h - 1)) {
    *padH = roundup(*h);
  } else {
    *padH = *h;
  }
  if (*padW != *w || *padH != *h) {
    printf("rounding %s up...\n", fname);
    padImg = (GLuint *)malloc(*padW * *padH * sizeof(GLuint));
    if (!padImg) {
      fprintf(stderr, "Malloc of %d bytes failed.\n",
              *padW * *padH * sizeof(GLuint));
      exit(1);
    }
    memset(padImg, 0, *padW * *padH * sizeof(GLuint));
    for (y = 0; y < *h; y++) {
      memcpy(&padImg[y * *padW], &img[y * *w], *w * sizeof(GLuint));
    }
  }
  printf("w = %d h = %d\n", *padW, *padH);
  glTexImage2D(GL_TEXTURE_2D, 0, 4, *padW, *padH, 0, GL_RGBA, GL_UNSIGNED_BYTE,
               img);
  free(img);
  if (padImg)
    free(padImg);
}


x86 assembly (clang, -O0):
<create_texture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   10b0 <read_texture@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1211 <create_texture+0x71>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe00(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1243 <create_texture+0xa3>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <roundup@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    124f <create_texture+0xaf>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1281 <create_texture+0xe1>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1040 <roundup@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
jmp    128d <create_texture+0xed>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jne    12b1 <create_texture+0x111>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
je     13aa <create_texture+0x20a>
mov    -0x8(%rbp),%rsi
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
imul   (%rcx),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1321 <create_texture+0x181>
mov    0x2cdd(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
imul   (%rcx),%eax
movslq %eax,%rdx
shl    $0x2,%rdx
lea    0xd16(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
imul   (%rcx),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1070 <memset@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    13a5 <create_texture+0x205>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%eax
mov    -0x20(%rbp),%rcx
imul   (%rcx),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x38(%rbp),%rsi
mov    -0x44(%rbp),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1090 <memcpy@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1348 <create_texture+0x1a8>
jmp    13aa <create_texture+0x20a>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c0d(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    (%rax),%r8d
mov    0x2c0f(%rip),%rax
mov    (%rax),%r11d
mov    0x2bdd(%rip),%rax
mov    (%rax),%r10d
mov    -0x38(%rbp),%rax
xor    %r9d,%r9d
mov    $0x4,%edx
mov    %r9d,%esi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1060 <glTexImage2D@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x40(%rbp)
je     142d <create_texture+0x28d>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_texture>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %rsi,%r13
mov    %rdi,%rbp
mov    %r9,%rcx
call   10b0 <read_texture@plt>
test   %rax,%rax
je     131f <create_texture+0x17f>
mov    %rax,%r15
mov    0x0(%r13),%eax
lea    -0x1(%rax),%ecx
test   %ecx,%eax
je     11e0 <create_texture+0x40>
mov    %eax,%edi
call   1040 <roundup@plt>
mov    %eax,(%r12)
mov    (%rbx),%eax
lea    -0x1(%rax),%ecx
test   %ecx,%eax
je     11f4 <create_texture+0x54>
mov    %eax,%edi
call   1040 <roundup@plt>
mov    %eax,(%r14)
mov    (%r12),%ecx
cmp    0x0(%r13),%ecx
jne    120c <create_texture+0x6c>
cmp    (%rbx),%eax
jne    120c <create_texture+0x6c>
xor    %ebp,%ebp
jmp    129b <create_texture+0xfb>
lea    0xe00(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12),%edi
imul   (%r14),%edi
shl    $0x2,%edi
call   10a0 <malloc@plt>
test   %rax,%rax
je     1334 <create_texture+0x194>
mov    %rax,%rbp
mov    (%r12),%edx
mov    %r14,(%rsp)
imul   (%r14),%edx
shl    $0x2,%edx
xor    %r14d,%r14d
mov    %rax,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
cmpl   $0x0,(%rbx)
jle    1297 <create_texture+0xf7>
nopw   0x0(%rax,%rax,1)
movslq (%r12),%rax
movslq %r14d,%r14
imul   %r14,%rax
lea    0x0(,%rax,4),%rdi
add    %rbp,%rdi
mov    0x0(%r13),%edx
mov    %edx,%eax
imul   %r14d,%eax
cltq
lea    (%r15,%rax,4),%rsi
shl    $0x2,%edx
call   1090 <memcpy@plt>
add    $0x1,%r14d
cmp    (%rbx),%r14d
jl     1260 <create_texture+0xc0>
mov    (%rsp),%r14
mov    (%r12),%esi
mov    (%r14),%edx
lea    0xd99(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d21(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%ecx
mov    (%r14),%r8d
mov    0x2d29(%rip),%rax
mov    (%rax),%eax
mov    0x2cf8(%rip),%rdx
mov    (%rdx),%ebx
sub    $0x8,%rsp
xor    %esi,%esi
mov    $0x4,%edx
xor    %r9d,%r9d
push   %r15
push   %rbx
push   %rax
call   1060 <glTexImage2D@plt>
add    $0x20,%rsp
mov    %r15,%rdi
call   1030 <free@plt>
test   %rbp,%rbp
je     1310 <create_texture+0x170>
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2caa(%rip),%rax
mov    (%rax),%edi
lea    0xcd1(%rip),%rsi
mov    %rbp,%rdx
jmp    1353 <create_texture+0x1b3>
mov    0x2c95(%rip),%rax
mov    (%rax),%edi
movslq (%r12),%rax
movslq (%r14),%rdx
imul   %rax,%rdx
shl    $0x2,%rdx
lea    0xcd3(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Could not open %s\0A\00"
@.str.1 = [19 x i8] c"rounding %s up...\0A\00"
@.str.2 = [28 x i8] c"Malloc of %d bytes failed.\0A\00"
@.str.3 = [15 x i8] c"w = %d h = %d\0A\00"
@GL_TEXTURE_2D = global i32 0
@GL_RGBA = global i32 0
@GL_UNSIGNED_BYTE = global i32 0
define void @create_texture(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32
store i8* %0, i8** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
store i32* null, i32** %14
%16 = load i8*, i8** %7
%17 = load i32*, i32** %8
%18 = load i32*, i32** %9
%19 = load i32*, i32** %12
%20 = call i32* @read_texture(i8* %16, i32* %17, i32* %18, i32* %19)
store i32* %20, i32** %13
%21 = load i32*, i32** %13
%22 = icmp ne i32* %21, null
br i1 %22, label %28, label %23
23: ; preds = %6
%24 = load i32, i32* @stderr
%25 = load i8*, i8** %7
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = call i32 @exit(i32 1)
unreachable
28: ; preds = %6
%29 = load i32*, i32** %8
%30 = load i32, i32* %29
%31 = load i32*, i32** %8
%32 = load i32, i32* %31
%33 = sub nsw i32 %32, 1
%34 = and i32 %30, %33
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %41
36: ; preds = %28
%37 = load i32*, i32** %8
%38 = load i32, i32* %37
%39 = call i32 @roundup(i32 %38)
%40 = load i32*, i32** %10
store i32 %39, i32* %40
br label %45
41: ; preds = %28
%42 = load i32*, i32** %8
%43 = load i32, i32* %42
%44 = load i32*, i32** %10
store i32 %43, i32* %44
br label %45
45: ; preds = %41, %36
%46 = load i32*, i32** %9
%47 = load i32, i32* %46
%48 = load i32*, i32** %9
%49 = load i32, i32* %48
%50 = sub nsw i32 %49, 1
%51 = and i32 %47, %50
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %58
53: ; preds = %45
%54 = load i32*, i32** %9
%55 = load i32, i32* %54
%56 = call i32 @roundup(i32 %55)
%57 = load i32*, i32** %11
store i32 %56, i32* %57
br label %62
58: ; preds = %45
%59 = load i32*, i32** %9
%60 = load i32, i32* %59
%61 = load i32*, i32** %11
store i32 %60, i32* %61
br label %62
62: ; preds = %58, %53
%63 = load i32*, i32** %10
%64 = load i32, i32* %63
%65 = load i32*, i32** %8
%66 = load i32, i32* %65
%67 = icmp ne i32 %64, %66
br i1 %67, label %74, label %68
68: ; preds = %62
%69 = load i32*, i32** %11
%70 = load i32, i32* %69
%71 = load i32*, i32** %9
%72 = load i32, i32* %71
%73 = icmp ne i32 %70, %72
br i1 %73, label %74, label %141
74: ; preds = %68, %62
%75 = load i8*, i8** %7
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %75)
%77 = load i32*, i32** %10
%78 = load i32, i32* %77
%79 = load i32*, i32** %11
%80 = load i32, i32* %79
%81 = mul nsw i32 %78, %80
%82 = sext i32 %81 to i64
%83 = mul i64 %82, 4
%84 = trunc i64 %83 to i32
%85 = call i64 @malloc(i32 %84)
%86 = inttoptr i64 %85 to i32*
store i32* %86, i32** %14
%87 = load i32*, i32** %14
%88 = icmp ne i32* %87, null
br i1 %88, label %100, label %89
89: ; preds = %74
%90 = load i32, i32* @stderr
%91 = load i32*, i32** %10
%92 = load i32, i32* %91
%93 = load i32*, i32** %11
%94 = load i32, i32* %93
%95 = mul nsw i32 %92, %94
%96 = sext i32 %95 to i64
%97 = mul i64 %96, 4
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 %97)
%99 = call i32 @exit(i32 1)
unreachable
100: ; preds = %74
%101 = load i32*, i32** %14
%102 = load i32*, i32** %10
%103 = load i32, i32* %102
%104 = load i32*, i32** %11
%105 = load i32, i32* %104
%106 = mul nsw i32 %103, %105
%107 = sext i32 %106 to i64
%108 = mul i64 %107, 4
%109 = trunc i64 %108 to i32
%110 = call i32 @memset(i32* %101, i32 0, i32 %109)
store i32 0, i32* %15
br label %111
111: ; preds = %137, %100
%112 = load i32, i32* %15
%113 = load i32*, i32** %9
%114 = load i32, i32* %113
%115 = icmp slt i32 %112, %114
br i1 %115, label %116, label %140
116: ; preds = %111
%117 = load i32*, i32** %14
%118 = load i32, i32* %15
%119 = load i32*, i32** %10
%120 = load i32, i32* %119
%121 = mul nsw i32 %118, %120
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i32, i32* %117, i64 %122
%124 = load i32*, i32** %13
%125 = load i32, i32* %15
%126 = load i32*, i32** %8
%127 = load i32, i32* %126
%128 = mul nsw i32 %125, %127
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i32, i32* %124, i64 %129
%131 = load i32*, i32** %8
%132 = load i32, i32* %131
%133 = sext i32 %132 to i64
%134 = mul i64 %133, 4
%135 = trunc i64 %134 to i32
%136 = call i32 @memcpy(i32* %123, i32* %130, i32 %135)
br label %137
137: ; preds = %116
%138 = load i32, i32* %15
%139 = add nsw i32 %138, 1
store i32 %139, i32* %15
br label %111
140: ; preds = %111
br label %141
141: ; preds = %140, %68
%142 = load i32*, i32** %10
%143 = load i32, i32* %142
%144 = load i32*, i32** %11
%145 = load i32, i32* %144
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %143, i32 %145)
%147 = load i32, i32* @GL_TEXTURE_2D
%148 = load i32*, i32** %10
%149 = load i32, i32* %148
%150 = load i32*, i32** %11
%151 = load i32, i32* %150
%152 = load i32, i32* @GL_RGBA
%153 = load i32, i32* @GL_UNSIGNED_BYTE
%154 = load i32*, i32** %13
%155 = call i32 @glTexImage2D(i32 %147, i32 0, i32 4, i32 %149, i32 %151, i32 0, i32 %152, i32 %153, i32* %154)
%156 = load i32*, i32** %13
%157 = call i32 @free(i32* %156)
%158 = load i32*, i32** %14
%159 = icmp ne i32* %158, null
br i1 %159, label %160, label %163
160: ; preds = %141
%161 = load i32*, i32** %14
%162 = call i32 @free(i32* %161)
br label %163
163: ; preds = %160, %141
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Could not open %s\0A\00"
@.str.1 = [19 x i8] c"rounding %s up...\0A\00"
@.str.2 = [28 x i8] c"Malloc of %d bytes failed.\0A\00"
@.str.3 = [15 x i8] c"w = %d h = %d\0A\00"
@GL_TEXTURE_2D = global i32 0
@GL_RGBA = global i32 0
@GL_UNSIGNED_BYTE = global i32 0
define void @create_texture(i8* %0, i32* %1, i32* %2, i32* nocapture %3, i32* nocapture %4, i32* %5) {
%7 = tail call i32* @read_texture(i8* %0, i32* %1, i32* %2, i32* %5)
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %6
%14 = load i32, i32* %1
%15 = tail call i32 @llvm.ctpop.i32(i32 %14)
%16 = icmp ult i32 %15, 2
br i1 %16, label %19, label %17
17: ; preds = %13
%18 = tail call i32 @roundup(i32 %14)
br label %19
19: ; preds = %13, %17
%20 = phi i32 [ %18, %17 ], [ %14, %13 ]
store i32 %20, i32* %3
%21 = load i32, i32* %2
%22 = tail call i32 @llvm.ctpop.i32(i32 %21)
%23 = icmp ult i32 %22, 2
br i1 %23, label %26, label %24
24: ; preds = %19
%25 = tail call i32 @roundup(i32 %21)
br label %26
26: ; preds = %19, %24
%27 = phi i32 [ %25, %24 ], [ %21, %19 ]
store i32 %27, i32* %4
%28 = load i32, i32* %3
%29 = load i32, i32* %1
%30 = icmp eq i32 %28, %29
br i1 %30, label %31, label %34
31: ; preds = %26
%32 = load i32, i32* %2
%33 = icmp eq i32 %27, %32
br i1 %33, label %75, label %34
34: ; preds = %31, %26
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%36 = load i32, i32* %3
%37 = load i32, i32* %4
%38 = shl i32 %36, 2
%39 = mul i32 %38, %37
%40 = tail call i64 @malloc(i32 %39)
%41 = inttoptr i64 %40 to i32*
%42 = icmp eq i64 %40, 0
br i1 %42, label %43, label %52
43: ; preds = %34
%44 = load i32, i32* @stderr
%45 = load i32, i32* %3
%46 = load i32, i32* %4
%47 = mul nsw i32 %46, %45
%48 = sext i32 %47 to i64
%49 = shl nsw i64 %48, 2
%50 = tail call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 %49)
%51 = tail call i32 @exit(i32 1)
unreachable
52: ; preds = %34
%53 = load i32, i32* %3
%54 = load i32, i32* %4
%55 = shl i32 %53, 2
%56 = mul i32 %55, %54
%57 = tail call i32 @memset(i32* %41, i32 0, i32 %56)
%58 = load i32, i32* %2
%59 = icmp sgt i32 %58, 0
br i1 %59, label %60, label %75
60: ; preds = %52, %60
%61 = phi i32 [ %72, %60 ], [ 0, %52 ]
%62 = load i32, i32* %3
%63 = mul nsw i32 %62, %61
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %41, i64 %64
%66 = load i32, i32* %1
%67 = mul nsw i32 %66, %61
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i32, i32* %7, i64 %68
%70 = shl i32 %66, 2
%71 = tail call i32 @memcpy(i32* %65, i32* %69, i32 %70)
%72 = add nuw nsw i32 %61, 1
%73 = load i32, i32* %2
%74 = icmp slt i32 %72, %73
br i1 %74, label %60, label %75
75: ; preds = %60, %52, %31
%76 = phi i32* [ null, %31 ], [ %41, %52 ], [ %41, %60 ]
%77 = load i32, i32* %3
%78 = load i32, i32* %4
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %77, i32 %78)
%80 = load i32, i32* @GL_TEXTURE_2D
%81 = load i32, i32* %3
%82 = load i32, i32* %4
%83 = load i32, i32* @GL_RGBA
%84 = load i32, i32* @GL_UNSIGNED_BYTE
%85 = tail call i32 @glTexImage2D(i32 %80, i32 0, i32 4, i32 %81, i32 %82, i32 0, i32 %83, i32 %84, i32* %7)
%86 = tail call i32 @free(i32* %7)
%87 = icmp eq i32* %76, null
br i1 %87, label %90, label %88
88: ; preds = %75
%89 = tail call i32 @free(i32* %76)
br label %90
90: ; preds = %88, %75
ret void
}