#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*/ assert(int);
int createPal(int);
int largestPrimeFactor(int);
int maxPalProd(int);
int pythTriplet(int);
int sumPrimes(int);
int sumSqrtDiff(int);
void DoTests() {
  assert(largestPrimeFactor(13195) == 29);
  assert(maxPalProd(2) == 9009);
  assert(sumSqrtDiff(10) == 2640);
  assert(createPal(12) == 1221);
  assert(createPal(1) == 11);
  assert(createPal(3221) == 32211223);
  assert(pythTriplet(12) == 60);
  assert(sumPrimes(10) == 17);
}


x86 assembly (clang, -O0):
<DoTests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x338b,%edi
call   1030 <largestPrimeFactor@plt>
cmp    $0x1d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x2,%edi
call   1070 <maxPalProd@plt>
cmp    $0x2331,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0xa,%edi
call   1090 <sumSqrtDiff@plt>
cmp    $0xa50,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0xc,%edi
call   1080 <createPal@plt>
cmp    $0x4c5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x1,%edi
call   1080 <createPal@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0xc95,%edi
call   1080 <createPal@plt>
cmp    $0x1eb8117,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0xc,%edi
call   1040 <pythTriplet@plt>
cmp    $0x3c,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0xa,%edi
call   1050 <sumPrimes@plt>
cmp    $0x11,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoTests>:
push   %rax
mov    $0x338b,%edi
call   1030 <largestPrimeFactor@plt>
xor    %edi,%edi
cmp    $0x1d,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0x2,%edi
call   1070 <maxPalProd@plt>
xor    %edi,%edi
cmp    $0x2331,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0xa,%edi
call   1090 <sumSqrtDiff@plt>
xor    %edi,%edi
cmp    $0xa50,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0xc,%edi
call   1080 <createPal@plt>
xor    %edi,%edi
cmp    $0x4c5,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0x1,%edi
call   1080 <createPal@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0xc95,%edi
call   1080 <createPal@plt>
xor    %edi,%edi
cmp    $0x1eb8117,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0xc,%edi
call   1040 <pythTriplet@plt>
xor    %edi,%edi
cmp    $0x3c,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0xa,%edi
call   1050 <sumPrimes@plt>
xor    %edi,%edi
cmp    $0x11,%eax
sete   %dil
pop    %rax
jmp    1060 <assert@plt>

LLVM IR (-O0):
define void @DoTests() {
%1 = call i32 @largestPrimeFactor(i32 13195)
%2 = icmp eq i32 %1, 29
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @maxPalProd(i32 2)
%6 = icmp eq i32 %5, 9009
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @sumSqrtDiff(i32 10)
%10 = icmp eq i32 %9, 2640
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @createPal(i32 12)
%14 = icmp eq i32 %13, 1221
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i32 @createPal(i32 1)
%18 = icmp eq i32 %17, 11
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = call i32 @createPal(i32 3221)
%22 = icmp eq i32 %21, 32211223
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = call i32 @pythTriplet(i32 12)
%26 = icmp eq i32 %25, 60
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = call i32 @sumPrimes(i32 10)
%30 = icmp eq i32 %29, 17
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
ret void
}

LLVM IR (-O2):
define void @DoTests() {
%1 = tail call i32 @largestPrimeFactor(i32 13195)
%2 = icmp eq i32 %1, 29
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @maxPalProd(i32 2)
%6 = icmp eq i32 %5, 9009
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @sumSqrtDiff(i32 10)
%10 = icmp eq i32 %9, 2640
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @createPal(i32 12)
%14 = icmp eq i32 %13, 1221
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @createPal(i32 1)
%18 = icmp eq i32 %17, 11
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @createPal(i32 3221)
%22 = icmp eq i32 %21, 32211223
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @pythTriplet(i32 12)
%26 = icmp eq i32 %25, 60
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @sumPrimes(i32 10)
%30 = icmp eq i32 %29, 17
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
ret void
}