#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 */
scalar_t__ checkIfNumberIsMultiple(unsigned int);
scalar_t__ isNumPalindrome(unsigned int);
int /*<<< orphan*/ isPrimeNumber(unsigned int);
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  unsigned int maxNumberValue = 999 * 999;
  for (; maxNumberValue > 0; maxNumberValue--) {
    printf("Checking number %d \n", maxNumberValue);
    if (isNumPalindrome(maxNumberValue)) {
      if (!isPrimeNumber(maxNumberValue)) {
        if (checkIfNumberIsMultiple(maxNumberValue)) {
          printf(" Number found %d \n", maxNumberValue);
          return 0;
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xf3a71,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    11dc <main+0x9c>
mov    -0x8(%rbp),%esi
lea    0xe96(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <isNumPalindrome@plt>
cmp    $0x0,%rax
je     11c9 <main+0x89>
mov    -0x8(%rbp),%edi
call   1050 <isPrimeNumber@plt>
cmp    $0x0,%eax
jne    11c4 <main+0x84>
mov    -0x8(%rbp),%edi
call   1030 <checkIfNumberIsMultiple@plt>
cmp    $0x0,%rax
je     11bf <main+0x7f>
mov    -0x8(%rbp),%esi
lea    0xe67(%rip),%rdi
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11e3 <main+0xa3>
jmp    11c4 <main+0x84>
jmp    11c9 <main+0x89>
jmp    11ce <main+0x8e>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xf3a71,%ebx
lea    0xeb0(%rip),%r14
jmp    1165 <main+0x25>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0xffffffff,%ebx
je     11a0 <main+0x60>
mov    %r14,%rdi
mov    %ebx,%esi
call   1060 <printf@plt>
mov    %ebx,%edi
call   1040 <isNumPalindrome@plt>
test   %rax,%rax
je     1160 <main+0x20>
mov    %ebx,%edi
call   1050 <isPrimeNumber@plt>
test   %eax,%eax
jne    1160 <main+0x20>
mov    %ebx,%edi
call   1030 <checkIfNumberIsMultiple@plt>
test   %rax,%rax
je     1160 <main+0x20>
lea    0xe7c(%rip),%rdi
mov    %ebx,%esi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Checking number %d \0A\00"
@.str.1 = [19 x i8] c" Number found %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 998001, i32* %2
br label %3
3: ; preds = %26, %0
%4 = load i32, i32* %2
%5 = icmp ugt i32 %4, 0
br i1 %5, label %6, label %29
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = call i64 @isNumPalindrome(i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %25
12: ; preds = %6
%13 = load i32, i32* %2
%14 = call i32 @isPrimeNumber(i32 %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %24, label %16
16: ; preds = %12
%17 = load i32, i32* %2
%18 = call i64 @checkIfNumberIsMultiple(i32 %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %21)
store i32 0, i32* %1
br label %30
23: ; preds = %16
br label %24
24: ; preds = %23, %12
br label %25
25: ; preds = %24, %6
br label %26
26: ; preds = %25
%27 = load i32, i32* %2
%28 = add i32 %27, -1
store i32 %28, i32* %2
br label %3
29: ; preds = %3
store i32 0, i32* %1
br label %30
30: ; preds = %29, %20
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
@.str = [21 x i8] c"Checking number %d \0A\00"
@.str.1 = [19 x i8] c" Number found %d \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %14
%2 = phi i32 [ 998001, %0 ], [ %15, %14 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i64 @isNumPalindrome(i32 %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = tail call i32 @isPrimeNumber(i32 %2)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = tail call i64 @checkIfNumberIsMultiple(i32 %2)
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %17
14: ; preds = %1, %9, %6
%15 = add nsw i32 %2, -1
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %1
17: ; preds = %14, %12
ret i32 0
}