#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ClearScreen(unsigned int);
int /*<<< orphan*/ ant();
int /*<<< orphan*/ execl(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, short);
int /*<<< orphan*/ gp2x_video_flip();
int /*<<< orphan*/ prim();
int /*<<< orphan*/ set_FCLK(short);
int /*<<< orphan*/ sprintf(unsigned char *, char *, short);
int /*<<< orphan*/ v_putcad(int, int, int, unsigned int, ...);
void speedtest(short test) {
  unsigned BACKGROUND;
  if (test == 0)
    BACKGROUND = 0xB00000;
  if (test == 1)
    BACKGROUND = 0xFFFFFF;
  short start = 240;
  short cpuspeed = start;
  unsigned char cad[256];
  FILE *speed;
  do {
    speed = fopen("/mnt/sd/speed.txt", "w");
    ClearScreen(BACKGROUND);
    if (test == 0)
      v_putcad(1, 1, 0x00ff00, BACKGROUND, "Prim-Speedtest");
    if (test == 1)
      v_putcad(1, 1, 0x006600, BACKGROUND, "Ant-Speedtest");
    v_putcad(1, 6, 0xffffff, BACKGROUND, "Testing Speed");
    if (cpuspeed > start) {
      sprintf(cad, "%uMhz checked", cpuspeed - 5);
      v_putcad(1, 9, 0xffffff, BACKGROUND, cad);
    }
    gp2x_video_flip();
    ClearScreen(BACKGROUND);
    if (test == 0)
      v_putcad(1, 1, 0x00ff00, BACKGROUND, "Prim-Speedtest");
    if (test == 1)
      v_putcad(1, 1, 0x006600, BACKGROUND, "Ant-Speedtest");
    v_putcad(1, 6, 0xffffff, BACKGROUND, "Testing Speed");
    if (cpuspeed > start) {
      sprintf(cad, "%uMhz checked", cpuspeed - 5);
      if (test == 0)
        v_putcad(1, 9, 0xffffff, BACKGROUND, cad);
      if (test == 1)
        v_putcad(1, 9, 0x000000, BACKGROUND, cad);
    }
    gp2x_video_flip();
    fprintf(speed, "set CPU-Frequency = %uMHz\r\n", cpuspeed);
    set_FCLK(cpuspeed);
    if (test == 0)
      prim();
    if (test == 1)
      ant();
    fprintf(speed, "%uMhz checked\n\n", cpuspeed);
    cpuspeed = cpuspeed + 5;
    fclose(speed);
    execl("sync", NULL);
  } while (1);
}


x86 assembly (clang, -O0):
<speedtest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    11d6 <speedtest+0x26>
movl   $0xb00000,-0x8(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    11ea <speedtest+0x3a>
movl   $0xffffff,-0x8(%rbp)
movw   $0xf0,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %ax,-0xc(%rbp)
lea    0xe01(%rip),%rdi
lea    0xe0c(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x118(%rbp)
mov    -0x8(%rbp),%edi
call   1080 <ClearScreen@plt>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    1244 <speedtest+0x94>
mov    -0x8(%rbp),%ecx
mov    $0x1,%esi
mov    $0xff00,%edx
lea    0xdd9(%rip),%r8
mov    %esi,%edi
mov    $0x0,%al
call   1030 <v_putcad@plt>
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    126e <speedtest+0xbe>
mov    -0x8(%rbp),%ecx
mov    $0x1,%esi
mov    $0x6600,%edx
lea    0xdbe(%rip),%r8
mov    %esi,%edi
mov    $0x0,%al
call   1030 <v_putcad@plt>
mov    -0x8(%rbp),%ecx
mov    $0x1,%edi
mov    $0x6,%esi
mov    $0xffffff,%edx
lea    0xdaa(%rip),%r8
mov    $0x0,%al
call   1030 <v_putcad@plt>
movswl -0xc(%rbp),%eax
movswl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jle    12db <speedtest+0x12b>
lea    -0x110(%rbp),%rdi
movswl -0xc(%rbp),%eax
sub    $0x5,%eax
lea    0xd8c(%rip),%rsi
movswl %ax,%edx
call   10c0 <sprintf@plt>
mov    -0x8(%rbp),%ecx
lea    -0x110(%rbp),%r8
mov    $0x1,%edi
mov    $0x9,%esi
mov    $0xffffff,%edx
mov    $0x0,%al
call   1030 <v_putcad@plt>
mov    $0x0,%al
call   10a0 <gp2x_video_flip@plt>
mov    -0x8(%rbp),%edi
call   1080 <ClearScreen@plt>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    1314 <speedtest+0x164>
mov    -0x8(%rbp),%ecx
mov    $0x1,%esi
mov    $0xff00,%edx
lea    0xd09(%rip),%r8
mov    %esi,%edi
mov    $0x0,%al
call   1030 <v_putcad@plt>
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    133e <speedtest+0x18e>
mov    -0x8(%rbp),%ecx
mov    $0x1,%esi
mov    $0x6600,%edx
lea    0xcee(%rip),%r8
mov    %esi,%edi
mov    $0x0,%al
call   1030 <v_putcad@plt>
mov    -0x8(%rbp),%ecx
mov    $0x1,%edi
mov    $0x6,%esi
mov    $0xffffff,%edx
lea    0xcda(%rip),%r8
mov    $0x0,%al
call   1030 <v_putcad@plt>
movswl -0xc(%rbp),%eax
movswl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jle    13e7 <speedtest+0x237>
lea    -0x110(%rbp),%rdi
movswl -0xc(%rbp),%eax
sub    $0x5,%eax
lea    0xcbc(%rip),%rsi
movswl %ax,%edx
call   10c0 <sprintf@plt>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    13b8 <speedtest+0x208>
mov    -0x8(%rbp),%ecx
lea    -0x110(%rbp),%r8
mov    $0x1,%edi
mov    $0x9,%esi
mov    $0xffffff,%edx
mov    $0x0,%al
call   1030 <v_putcad@plt>
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    13e2 <speedtest+0x232>
mov    -0x8(%rbp),%ecx
lea    -0x110(%rbp),%r8
mov    $0x1,%edi
mov    $0x9,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <v_putcad@plt>
jmp    13e7 <speedtest+0x237>
mov    $0x0,%al
call   10a0 <gp2x_video_flip@plt>
mov    -0x118(%rbp),%rdi
lea    0xc51(%rip),%rsi
movswl -0xc(%rbp),%edx
call   1070 <fprintf@plt>
movswl -0xc(%rbp),%edi
call   1090 <set_FCLK@plt>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    1422 <speedtest+0x272>
mov    $0x0,%al
call   1040 <prim@plt>
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    1436 <speedtest+0x286>
mov    $0x0,%al
call   1060 <ant@plt>
mov    -0x118(%rbp),%rdi
lea    0xc25(%rip),%rsi
movswl -0xc(%rbp),%edx
call   1070 <fprintf@plt>
movswl -0xc(%rbp),%eax
add    $0x5,%eax
mov    %ax,-0xc(%rbp)
mov    -0x118(%rbp),%rdi
call   1050 <fclose@plt>
lea    0xc0e(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10d0 <execl@plt>
mov    $0x1,%al
test   $0x1,%al
jne    11f8 <speedtest+0x48>
jmp    1483 <speedtest+0x2d3>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speedtest>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %edi,%r14d
cmp    $0x1,%r14w
mov    $0xffffff,%eax
mov    $0xb00000,%r12d
cmove  %eax,%r12d
mov    $0xeb,%bp
jmp    120b <speedtest+0x5b>
xchg   %ax,%ax
mov    %rbx,%rdi
lea    0xe7f(%rip),%rsi
mov    %r13d,%edx
call   1070 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0xe78(%rip),%rdi
xor    %esi,%esi
call   10d0 <execl@plt>
add    $0x5,%ebp
lea    0xdee(%rip),%rdi
lea    0xdf9(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,(%rsp)
mov    %r12d,%edi
call   1080 <ClearScreen@plt>
test   %r14w,%r14w
jne    1250 <speedtest+0xa0>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0xff00,%edx
mov    %r12d,%ecx
lea    0xdcb(%rip),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
lea    0x5(%rbp),%ebx
cmp    $0x1,%r14w
jne    127a <speedtest+0xca>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x6600,%edx
mov    %r12d,%ecx
lea    0xdb0(%rip),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
mov    $0x1,%edi
mov    $0x6,%esi
mov    $0xffffff,%edx
mov    %r12d,%ecx
lea    0xd9e(%rip),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
movswl %bx,%r13d
mov    %rbp,0x8(%rsp)
movswl %bp,%r15d
cmp    $0xf1,%r13d
jl     12e3 <speedtest+0x133>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd80(%rip),%rsi
mov    %r15d,%edx
call   10c0 <sprintf@plt>
mov    $0x1,%edi
mov    $0x9,%esi
mov    $0xffffff,%edx
mov    %r12d,%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
xor    %eax,%eax
call   10a0 <gp2x_video_flip@plt>
mov    %r12d,%edi
call   1080 <ClearScreen@plt>
test   %r14w,%r14w
jne    1318 <speedtest+0x168>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0xff00,%edx
mov    %r12d,%ecx
lea    0xd03(%rip),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
cmp    $0x1,%r14w
mov    (%rsp),%rbx
jne    1343 <speedtest+0x193>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x6600,%edx
mov    %r12d,%ecx
lea    0xce7(%rip),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
mov    $0x1,%edi
mov    $0x6,%esi
mov    $0xffffff,%edx
mov    %r12d,%ecx
lea    0xcd5(%rip),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
cmp    $0xf1,%r13d
jl     13a8 <speedtest+0x1f8>
lea    0x10(%rsp),%rdi
lea    0xcc7(%rip),%rsi
mov    %r15d,%edx
call   10c0 <sprintf@plt>
test   %r14w,%r14w
je     13f2 <speedtest+0x242>
cmp    $0x1,%r14w
jne    13a8 <speedtest+0x1f8>
mov    $0x1,%edi
mov    $0x9,%esi
xor    %edx,%edx
mov    %r12d,%ecx
lea    0x10(%rsp),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
xor    %eax,%eax
call   10a0 <gp2x_video_flip@plt>
mov    %rbx,%rdi
lea    0xc94(%rip),%rsi
mov    %r13d,%edx
call   1070 <fprintf@plt>
mov    %r13d,%edi
call   1090 <set_FCLK@plt>
test   %r14w,%r14w
jne    13d6 <speedtest+0x226>
xor    %eax,%eax
call   1040 <prim@plt>
cmp    $0x1,%r14w
mov    0x8(%rsp),%rbp
jne    11e0 <speedtest+0x30>
xor    %eax,%eax
call   1060 <ant@plt>
jmp    11e0 <speedtest+0x30>
mov    $0x1,%edi
mov    $0x9,%esi
mov    $0xffffff,%edx
mov    %r12d,%ecx
lea    0x10(%rsp),%r8
xor    %eax,%eax
call   1030 <v_putcad@plt>
cmp    $0x1,%r14w
je     138d <speedtest+0x1dd>
jmp    13a8 <speedtest+0x1f8>

LLVM IR (-O0):
@.str = [18 x i8] c"/mnt/sd/speed.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [15 x i8] c"Prim-Speedtest\00"
@.str.3 = [14 x i8] c"Ant-Speedtest\00"
@.str.4 = [14 x i8] c"Testing Speed\00"
@.str.5 = [14 x i8] c"%uMhz checked\00"
@.str.6 = [28 x i8] c"set CPU-Frequency = %uMHz\0D\0A\00"
@.str.7 = [16 x i8] c"%uMhz checked\0A\0A\00"
@.str.8 = [5 x i8] c"sync\00"
define void @speedtest(i16 signext %0) {
%2 = alloca i16
%3 = alloca i32
%4 = alloca i16
%5 = alloca i16
%6 = alloca [256 x i8]
%7 = alloca i32*
store i16 %0, i16* %2
%8 = load i16, i16* %2
%9 = sext i16 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 11534336, i32* %3
br label %12
12: ; preds = %11, %1
%13 = load i16, i16* %2
%14 = sext i16 %13 to i32
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 16777215, i32* %3
br label %17
17: ; preds = %16, %12
store i16 240, i16* %4
%18 = load i16, i16* %4
store i16 %18, i16* %5
br label %19
19: ; preds = %131, %17
%20 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %20, i32** %7
%21 = load i32, i32* %3
%22 = call i32 @ClearScreen(i32 %21)
%23 = load i16, i16* %2
%24 = sext i16 %23 to i32
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %19
%27 = load i32, i32* %3
%28 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 65280, i32 %27, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %26, %19
%30 = load i16, i16* %2
%31 = sext i16 %30 to i32
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %36
33: ; preds = %29
%34 = load i32, i32* %3
%35 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 26112, i32 %34, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %33, %29
%37 = load i32, i32* %3
%38 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 6, i32 16777215, i32 %37, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%39 = load i16, i16* %5
%40 = sext i16 %39 to i32
%41 = load i16, i16* %4
%42 = sext i16 %41 to i32
%43 = icmp sgt i32 %40, %42
br i1 %43, label %44, label %54
44: ; preds = %36
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%46 = load i16, i16* %5
%47 = sext i16 %46 to i32
%48 = sub nsw i32 %47, 5
%49 = trunc i32 %48 to i16
%50 = call i32 @sprintf(i8* %45, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i16 signext %49)
%51 = load i32, i32* %3
%52 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%53 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 9, i32 16777215, i32 %51, i8* %52)
br label %54
54: ; preds = %44, %36
%55 = call i32 (...) @gp2x_video_flip()
%56 = load i32, i32* %3
%57 = call i32 @ClearScreen(i32 %56)
%58 = load i16, i16* %2
%59 = sext i16 %58 to i32
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %54
%62 = load i32, i32* %3
%63 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 65280, i32 %62, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %64
64: ; preds = %61, %54
%65 = load i16, i16* %2
%66 = sext i16 %65 to i32
%67 = icmp eq i32 %66, 1
br i1 %67, label %68, label %71
68: ; preds = %64
%69 = load i32, i32* %3
%70 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 26112, i32 %69, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %71
71: ; preds = %68, %64
%72 = load i32, i32* %3
%73 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 6, i32 16777215, i32 %72, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%74 = load i16, i16* %5
%75 = sext i16 %74 to i32
%76 = load i16, i16* %4
%77 = sext i16 %76 to i32
%78 = icmp sgt i32 %75, %77
br i1 %78, label %79, label %102
79: ; preds = %71
%80 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%81 = load i16, i16* %5
%82 = sext i16 %81 to i32
%83 = sub nsw i32 %82, 5
%84 = trunc i32 %83 to i16
%85 = call i32 @sprintf(i8* %80, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i16 signext %84)
%86 = load i16, i16* %2
%87 = sext i16 %86 to i32
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %93
89: ; preds = %79
%90 = load i32, i32* %3
%91 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%92 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 9, i32 16777215, i32 %90, i8* %91)
br label %93
93: ; preds = %89, %79
%94 = load i16, i16* %2
%95 = sext i16 %94 to i32
%96 = icmp eq i32 %95, 1
br i1 %96, label %97, label %101
97: ; preds = %93
%98 = load i32, i32* %3
%99 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%100 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 9, i32 0, i32 %98, i8* %99)
br label %101
101: ; preds = %97, %93
br label %102
102: ; preds = %101, %71
%103 = call i32 (...) @gp2x_video_flip()
%104 = load i32*, i32** %7
%105 = load i16, i16* %5
%106 = call i32 @fprintf(i32* %104, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i16 signext %105)
%107 = load i16, i16* %5
%108 = call i32 @set_FCLK(i16 signext %107)
%109 = load i16, i16* %2
%110 = sext i16 %109 to i32
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %102
%113 = call i32 (...) @prim()
br label %114
114: ; preds = %112, %102
%115 = load i16, i16* %2
%116 = sext i16 %115 to i32
%117 = icmp eq i32 %116, 1
br i1 %117, label %118, label %120
118: ; preds = %114
%119 = call i32 (...) @ant()
br label %120
120: ; preds = %118, %114
%121 = load i32*, i32** %7
%122 = load i16, i16* %5
%123 = call i32 @fprintf(i32* %121, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i16 signext %122)
%124 = load i16, i16* %5
%125 = sext i16 %124 to i32
%126 = add nsw i32 %125, 5
%127 = trunc i32 %126 to i16
store i16 %127, i16* %5
%128 = load i32*, i32** %7
%129 = call i32 @fclose(i32* %128)
%130 = call i32 @execl(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32* null)
br label %131
131: ; preds = %120
br i1 true, label %19, label %132
132: ; preds = %131
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"/mnt/sd/speed.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [15 x i8] c"Prim-Speedtest\00"
@.str.3 = [14 x i8] c"Ant-Speedtest\00"
@.str.4 = [14 x i8] c"Testing Speed\00"
@.str.5 = [14 x i8] c"%uMhz checked\00"
@.str.6 = [28 x i8] c"set CPU-Frequency = %uMHz\0D\0A\00"
@.str.7 = [16 x i8] c"%uMhz checked\0A\0A\00"
@.str.8 = [5 x i8] c"sync\00"
define void @speedtest(i16 signext %0) {
%2 = alloca [256 x i8]
%3 = icmp eq i16 %0, 0
%4 = icmp eq i16 %0, 1
%5 = select i1 %4, i32 16777215, i32 11534336
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
br label %7
7: ; preds = %50, %1
%8 = phi i16 [ 240, %1 ], [ %52, %50 ]
%9 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @ClearScreen(i32 %5)
br i1 %3, label %11, label %13
11: ; preds = %7
%12 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 65280, i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %7
br i1 %4, label %14, label %16
14: ; preds = %13
%15 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 26112, i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %14, %13
%17 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 6, i32 16777215, i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%18 = icmp sgt i16 %8, 240
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = add nsw i16 %8, -5
%21 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i16 signext %20)
%22 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 9, i32 16777215, i32 %5, i8* %6)
br label %23
23: ; preds = %19, %16
%24 = call i32 (...) @gp2x_video_flip()
%25 = call i32 @ClearScreen(i32 %5)
br i1 %3, label %26, label %28
26: ; preds = %23
%27 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 65280, i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %26, %23
br i1 %4, label %29, label %31
29: ; preds = %28
%30 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 1, i32 26112, i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %31
31: ; preds = %29, %28
%32 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 6, i32 16777215, i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br i1 %18, label %33, label %41
33: ; preds = %31
%34 = add nsw i16 %8, -5
%35 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i16 signext %34)
br i1 %3, label %36, label %38
36: ; preds = %33
%37 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 9, i32 16777215, i32 %5, i8* %6)
br label %38
38: ; preds = %36, %33
br i1 %4, label %39, label %41
39: ; preds = %38
%40 = call i32 (i32, i32, i32, i32, ...) @v_putcad(i32 1, i32 9, i32 0, i32 %5, i8* %6)
br label %41
41: ; preds = %38, %39, %31
%42 = call i32 (...) @gp2x_video_flip()
%43 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i16 signext %8)
%44 = call i32 @set_FCLK(i16 signext %8)
br i1 %3, label %45, label %47
45: ; preds = %41
%46 = call i32 (...) @prim()
br label %47
47: ; preds = %45, %41
br i1 %4, label %48, label %50
48: ; preds = %47
%49 = call i32 (...) @ant()
br label %50
50: ; preds = %48, %47
%51 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i16 signext %8)
%52 = add i16 %8, 5
%53 = call i32 @fclose(i32* %9)
%54 = call i32 @execl(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32* null)
br label %7
}