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

/* Variables and functions */
int /*<<< orphan*/ PowTest(char *, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  printf("*** POW TESTS ***\n");
  int i;
  for (i = 0; i <= 10; ++i)
    PowTest("-11111111", i);
  PowTest("FFFFFFFF", 0xFFF);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jg     1170 <main+0x50>
mov    -0x14(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1040 <PowTest@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1149 <main+0x29>
lea    0xea6(%rip),%rdi
mov    $0xfff,%esi
call   1040 <PowTest@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1040 <PowTest@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <PowTest@plt>
lea    0xe43(%rip),%rdi
mov    $0xfff,%esi
call   1040 <PowTest@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"*** POW TESTS ***\0A\00"
@.str.1 = [10 x i8] c"-11111111\00"
@.str.2 = [9 x i8] c"FFFFFFFF\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %10
10: ; preds = %16, %2
%11 = load i32, i32* %6
%12 = icmp sle i32 %11, 10
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = load i32, i32* %6
%15 = call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %10
19: ; preds = %10
%20 = call i32 @PowTest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 4095)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"-11111111\00"
@.str.2 = [9 x i8] c"FFFFFFFF\00"
@str = [18 x i8] c"*** POW TESTS ***\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0)
%5 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2)
%7 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 3)
%8 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 4)
%9 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 5)
%10 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 6)
%11 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 7)
%12 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 8)
%13 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%14 = tail call i32 @PowTest(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 10)
%15 = tail call i32 @PowTest(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 4095)
ret i32 0
}