#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*/ findDivisibility_brute(int);
int /*<<< orphan*/ findDivisibility_quick(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("Search for Smallest Multiple for values 1-10 and 1-20 using brute "
         "force and factoring respectively\n");
  printf("Looking for Smallest Multiple using the brute force method %lu\n",
         findDivisibility_brute(10));
  printf("Looking for Smallest Multiple using the factoring method: %lu\n",
         findDivisibility_quick(20));
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <findDivisibility_brute@plt>
mov    %eax,%esi
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x14,%edi
call   1040 <findDivisibility_quick@plt>
mov    %eax,%esi
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf37(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
call   1040 <findDivisibility_brute@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x14,%edi
call   1050 <findDivisibility_quick@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [100 x i8] c"Search for Smallest Multiple for values 1-10 and 1-20 using brute force and factoring respectively\0A\00"
@.str.1 = [64 x i8] c"Looking for Smallest Multiple using the brute force method %lu\0A\00"
@.str.2 = [63 x i8] c"Looking for Smallest Multiple using the factoring method: %lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @findDivisibility_brute(i32 10)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @findDivisibility_quick(i32 20)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 1
}

LLVM IR (-O2):
@.str.1 = [64 x i8] c"Looking for Smallest Multiple using the brute force method %lu\0A\00"
@.str.2 = [63 x i8] c"Looking for Smallest Multiple using the factoring method: %lu\0A\00"
@str = [99 x i8] c"Search for Smallest Multiple for values 1-10 and 1-20 using brute force and factoring respectively\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([99 x i8], [99 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @findDivisibility_brute(i32 10)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @findDivisibility_quick(i32 20)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 1
}