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

/* Variables and functions */
scalar_t__ mpz_cmp(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_set(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_ui_pow_ui(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int lower = 2;
  int upper = 100;
  mpz_t distinct[10000];
  int count = 0;
  for (int a = lower; a <= upper; a++) {
    for (int b = lower; b <= upper; b++) {
      mpz_t c;
      mpz_init(c);
      mpz_ui_pow_ui(c, a, b);
      bool found = false;
      for (int i = 0; i < count; i++) {
        if (mpz_cmp(distinct[i], c) == 0) {
          found = true;
          break;
        }
      }
      if (!found) {
        mpz_set(distinct[count], c);
        count++;
      }
    }
  }
  printf("%i", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movl   $0x64,-0x18(%rbp)
movl   $0x0,-0x9c64(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x9c68(%rbp)
mov    -0x9c68(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     12ab <main+0x15b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x9c6c(%rbp)
mov    -0x9c6c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1292 <main+0x142>
mov    -0x9c70(%rbp),%edi
call   1050 <mpz_init@plt>
mov    -0x9c70(%rbp),%edi
mov    -0x9c68(%rbp),%esi
mov    -0x9c6c(%rbp),%edx
call   1070 <mpz_ui_pow_ui@plt>
movl   $0x0,-0x9c74(%rbp)
movl   $0x0,-0x9c78(%rbp)
mov    -0x9c78(%rbp),%eax
cmp    -0x9c64(%rbp),%eax
jge    1244 <main+0xf4>
movslq -0x9c78(%rbp),%rax
mov    -0x9c60(%rbp,%rax,4),%edi
mov    -0x9c70(%rbp),%esi
call   1060 <mpz_cmp@plt>
cmp    $0x0,%rax
jne    122b <main+0xdb>
movl   $0x1,-0x9c74(%rbp)
jmp    1244 <main+0xf4>
jmp    1230 <main+0xe0>
mov    -0x9c78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c78(%rbp)
jmp    11e7 <main+0x97>
cmpl   $0x0,-0x9c74(%rbp)
jne    1279 <main+0x129>
movslq -0x9c64(%rbp),%rax
mov    -0x9c60(%rbp,%rax,4),%edi
mov    -0x9c70(%rbp),%esi
call   1030 <mpz_set@plt>
mov    -0x9c64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c64(%rbp)
jmp    127e <main+0x12e>
mov    -0x9c6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c6c(%rbp)
jmp    11a2 <main+0x52>
jmp    1297 <main+0x147>
mov    -0x9c68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c68(%rbp)
jmp    118a <main+0x3a>
mov    -0x9c64(%rbp),%esi
lea    0xd48(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x9c80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x9c40,%rsp
xor    %r15d,%r15d
mov    $0x2,%r14d
jmp    117a <main+0x2a>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14d
cmp    $0x65,%r14d
je     11e8 <main+0x98>
mov    $0x2,%r12d
jmp    11a9 <main+0x59>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %r15d,%rax
mov    (%rsp,%rax,4),%edi
call   1030 <mpz_set@plt>
add    $0x1,%r15d
add    $0x1,%r12d
cmp    $0x65,%r12d
je     1170 <main+0x20>
call   1050 <mpz_init@plt>
mov    %r14d,%esi
mov    %r12d,%edx
call   1070 <mpz_ui_pow_ui@plt>
test   %r15d,%r15d
jle    1190 <main+0x40>
mov    %r15d,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rsp,%rbp,4),%edi
call   1060 <mpz_cmp@plt>
test   %rax,%rax
je     119f <main+0x4f>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    11d0 <main+0x80>
jmp    1190 <main+0x40>
lea    0xe11(%rip),%rdi
mov    %r15d,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x9c40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [10000 x i32]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 2, i32* %6
store i32 100, i32* %7
store i32 0, i32* %9
%15 = load i32, i32* %6
store i32 %15, i32* %10
br label %16
16: ; preds = %67, %2
%17 = load i32, i32* %10
%18 = load i32, i32* %7
%19 = icmp sle i32 %17, %18
br i1 %19, label %20, label %70
20: ; preds = %16
%21 = load i32, i32* %6
store i32 %21, i32* %11
br label %22
22: ; preds = %63, %20
%23 = load i32, i32* %11
%24 = load i32, i32* %7
%25 = icmp sle i32 %23, %24
br i1 %25, label %26, label %66
26: ; preds = %22
%27 = load i32, i32* %12
%28 = call i32 @mpz_init(i32 %27)
%29 = load i32, i32* %12
%30 = load i32, i32* %10
%31 = load i32, i32* %11
%32 = call i32 @mpz_ui_pow_ui(i32 %29, i32 %30, i32 %31)
store i32 0, i32* %13
store i32 0, i32* %14
br label %33
33: ; preds = %47, %26
%34 = load i32, i32* %14
%35 = load i32, i32* %9
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %50
37: ; preds = %33
%38 = load i32, i32* %14
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [10000 x i32], [10000 x i32]* %8, i64 0, i64 %39
%41 = load i32, i32* %40
%42 = load i32, i32* %12
%43 = call i64 @mpz_cmp(i32 %41, i32 %42)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %37
store i32 1, i32* %13
br label %50
46: ; preds = %37
br label %47
47: ; preds = %46
%48 = load i32, i32* %14
%49 = add nsw i32 %48, 1
store i32 %49, i32* %14
br label %33
50: ; preds = %45, %33
%51 = load i32, i32* %13
%52 = icmp ne i32 %51, 0
br i1 %52, label %62, label %53
53: ; preds = %50
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [10000 x i32], [10000 x i32]* %8, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = load i32, i32* %12
%59 = call i32 @mpz_set(i32 %57, i32 %58)
%60 = load i32, i32* %9
%61 = add nsw i32 %60, 1
store i32 %61, i32* %9
br label %62
62: ; preds = %53, %50
br label %63
63: ; preds = %62
%64 = load i32, i32* %11
%65 = add nsw i32 %64, 1
store i32 %65, i32* %11
br label %22
66: ; preds = %22
br label %67
67: ; preds = %66
%68 = load i32, i32* %10
%69 = add nsw i32 %68, 1
store i32 %69, i32* %10
br label %16
70: ; preds = %16
%71 = load i32, i32* %9
%72 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %71)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10000 x i32]
%4 = bitcast [10000 x i32]* %3 to i8*
br label %5
5: ; preds = %2, %10
%6 = phi i32 [ 2, %2 ], [ %11, %10 ]
%7 = phi i32 [ 0, %2 ], [ %37, %10 ]
br label %13
8: ; preds = %10
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %37)
ret i32 0
10: ; preds = %36
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, 101
br i1 %12, label %8, label %5
13: ; preds = %5, %36
%14 = phi i32 [ 2, %5 ], [ %38, %36 ]
%15 = phi i32 [ %7, %5 ], [ %37, %36 ]
%16 = tail call i32 @mpz_init(i32 undef)
%17 = tail call i32 @mpz_ui_pow_ui(i32 undef, i32 %6, i32 %14)
%18 = icmp sgt i32 %15, 0
br i1 %18, label %19, label %30
19: ; preds = %13
%20 = zext i32 %15 to i64
br label %23
21: ; preds = %23
%22 = icmp eq i64 %29, %20
br i1 %22, label %30, label %23
23: ; preds = %19, %21
%24 = phi i64 [ 0, %19 ], [ %29, %21 ]
%25 = getelementptr inbounds [10000 x i32], [10000 x i32]* %3, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = tail call i64 @mpz_cmp(i32 %26, i32 undef)
%28 = icmp eq i64 %27, 0
%29 = add nuw nsw i64 %24, 1
br i1 %28, label %36, label %21
30: ; preds = %21, %13
%31 = sext i32 %15 to i64
%32 = getelementptr inbounds [10000 x i32], [10000 x i32]* %3, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = tail call i32 @mpz_set(i32 %33, i32 undef)
%35 = add nsw i32 %15, 1
br label %36
36: ; preds = %23, %30
%37 = phi i32 [ %35, %30 ], [ %15, %23 ]
%38 = add nuw nsw i32 %14, 1
%39 = icmp eq i32 %38, 101
br i1 %39, label %10, label %13
}