#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*/ gt_power_for_small_exponents(unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *, unsigned int, int /*<<< orphan*/);
void gt_out_power_for_small_exponents(void) {
  unsigned int exponent;
  for (exponent = 1U; exponent < 64U; exponent++) {
    printf("pow(2UL,%u)=%lu\n", exponent,
           gt_power_for_small_exponents(2U, exponent));
  }
  for (exponent = 1U; exponent < 32U; exponent++) {
    printf("pow(4UL,%u)=%lu\n", exponent,
           gt_power_for_small_exponents(4U, exponent));
  }
  for (exponent = 1U; exponent < 16U; exponent++) {
    printf("pow(8UL,%u)=%lu\n", exponent,
           gt_power_for_small_exponents(8U, exponent));
  }
  for (exponent = 1U; exponent < 32U; exponent++) {
    printf("pow(3UL,%u)=%lu\n", exponent,
           gt_power_for_small_exponents(3U, exponent));
  }
}


x86 assembly (clang, -O0):
<gt_out_power_for_small_exponents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jae    116b <gt_out_power_for_small_exponents+0x4b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1040 <gt_power_for_small_exponents@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <gt_out_power_for_small_exponents+0xf>
movl   $0x1,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jae    11ae <gt_out_power_for_small_exponents+0x8e>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x4,%edi
call   1040 <gt_power_for_small_exponents@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <gt_out_power_for_small_exponents+0x52>
movl   $0x1,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jae    11f1 <gt_out_power_for_small_exponents+0xd1>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x8,%edi
call   1040 <gt_power_for_small_exponents@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11b5 <gt_out_power_for_small_exponents+0x95>
movl   $0x1,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jae    1234 <gt_out_power_for_small_exponents+0x114>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x3,%edi
call   1040 <gt_power_for_small_exponents@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11f8 <gt_out_power_for_small_exponents+0xd8>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_out_power_for_small_exponents>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xed0(%rip),%r14
mov    $0x2,%edi
mov    %ebx,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x40,%ebx
jne    1130 <gt_out_power_for_small_exponents+0x10>
mov    $0x1,%ebx
lea    0xeb5(%rip),%r14
nopl   0x0(%rax)
mov    $0x4,%edi
mov    %ebx,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x20,%ebx
jne    1160 <gt_out_power_for_small_exponents+0x40>
mov    $0x1,%ebx
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <gt_power_for_small_exponents@plt>
lea    0xe87(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x2,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x3,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x4,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x5,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x6,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x6,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x7,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x7,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x8,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x9,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0x9,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0xa,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0xa,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0xb,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0xb,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0xc,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0xc,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0xd,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0xd,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0xe,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0xe,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0xf,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    $0xf,%esi
mov    %eax,%edx
call   1030 <printf@plt>
lea    0xcde(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x3,%edi
mov    %ebx,%esi
call   1040 <gt_power_for_small_exponents@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x20,%ebx
jne    1360 <gt_out_power_for_small_exponents+0x240>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"pow(2UL,%u)=%lu\0A\00"
@.str.1 = [17 x i8] c"pow(4UL,%u)=%lu\0A\00"
@.str.2 = [17 x i8] c"pow(8UL,%u)=%lu\0A\00"
@.str.3 = [17 x i8] c"pow(3UL,%u)=%lu\0A\00"
define void @gt_out_power_for_small_exponents() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp ult i32 %3, 64
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @gt_power_for_small_exponents(i32 2, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %2
store i32 1, i32* %1
br label %14
14: ; preds = %22, %13
%15 = load i32, i32* %1
%16 = icmp ult i32 %15, 32
br i1 %16, label %17, label %25
17: ; preds = %14
%18 = load i32, i32* %1
%19 = load i32, i32* %1
%20 = call i32 @gt_power_for_small_exponents(i32 4, i32 %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %20)
br label %22
22: ; preds = %17
%23 = load i32, i32* %1
%24 = add i32 %23, 1
store i32 %24, i32* %1
br label %14
25: ; preds = %14
store i32 1, i32* %1
br label %26
26: ; preds = %34, %25
%27 = load i32, i32* %1
%28 = icmp ult i32 %27, 16
br i1 %28, label %29, label %37
29: ; preds = %26
%30 = load i32, i32* %1
%31 = load i32, i32* %1
%32 = call i32 @gt_power_for_small_exponents(i32 8, i32 %31)
%33 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 %32)
br label %34
34: ; preds = %29
%35 = load i32, i32* %1
%36 = add i32 %35, 1
store i32 %36, i32* %1
br label %26
37: ; preds = %26
store i32 1, i32* %1
br label %38
38: ; preds = %46, %37
%39 = load i32, i32* %1
%40 = icmp ult i32 %39, 32
br i1 %40, label %41, label %49
41: ; preds = %38
%42 = load i32, i32* %1
%43 = load i32, i32* %1
%44 = call i32 @gt_power_for_small_exponents(i32 3, i32 %43)
%45 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %42, i32 %44)
br label %46
46: ; preds = %41
%47 = load i32, i32* %1
%48 = add i32 %47, 1
store i32 %48, i32* %1
br label %38
49: ; preds = %38
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"pow(2UL,%u)=%lu\0A\00"
@.str.1 = [17 x i8] c"pow(4UL,%u)=%lu\0A\00"
@.str.2 = [17 x i8] c"pow(8UL,%u)=%lu\0A\00"
@.str.3 = [17 x i8] c"pow(3UL,%u)=%lu\0A\00"
define void @gt_out_power_for_small_exponents() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %5, %1 ]
%3 = tail call i32 @gt_power_for_small_exponents(i32 2, i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 64
br i1 %6, label %7, label %1
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ 1, %1 ]
%9 = tail call i32 @gt_power_for_small_exponents(i32 4, i32 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 32
br i1 %12, label %13, label %7
13: ; preds = %7
%14 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 1)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 %14)
%16 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 2)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 %16)
%18 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 3)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 %18)
%20 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 4)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 %20)
%22 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 5)
%23 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 5, i32 %22)
%24 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 6)
%25 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 6, i32 %24)
%26 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 7)
%27 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 7, i32 %26)
%28 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 8)
%29 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 8, i32 %28)
%30 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 9)
%31 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 9, i32 %30)
%32 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 10)
%33 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 %32)
%34 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 11)
%35 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 11, i32 %34)
%36 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 12)
%37 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 %36)
%38 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 13)
%39 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 13, i32 %38)
%40 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 14)
%41 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 14, i32 %40)
%42 = tail call i32 @gt_power_for_small_exponents(i32 8, i32 15)
%43 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 15, i32 %42)
br label %44
44: ; preds = %13, %44
%45 = phi i32 [ %48, %44 ], [ 1, %13 ]
%46 = tail call i32 @gt_power_for_small_exponents(i32 3, i32 %45)
%47 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %45, i32 %46)
%48 = add nuw nsw i32 %45, 1
%49 = icmp eq i32 %48, 32
br i1 %49, label %50, label %44
50: ; preds = %44
ret void
}