xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage_class() {
  printf(
      "Usage: gioctl class add {send <lcr>|receive} -f {qos "
      "<rab_id>|del|ctl|dc} -cr <classref> [-dscp <dscp>] [-ip {6|4} <saddr> "
      "<splen> <daddr> <dplen>] [-p {tcp|udp|icmp4|icmp6} <sport> <dport>]\n");
  printf("Usage: gioctl class del {send <lcr>|receive} -cr <classref> [-dscp "
         "<dscp>] \n");
  printf("Usage: gioctl class list {send <lcr>|receive} [-dscp <dscp>]\n");
}


x86 assembly (clang, -O0):
<print_usage_class>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf99(%rip),%rdi
call   1030 <printf@plt>
lea    0xfda(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage_class>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9b(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdb(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [192 x i8] c"Usage: gioctl class add {send <lcr>|receive} -f {qos <rab_id>|del|ctl|dc} -cr <classref> [-dscp <dscp>] [-ip {6|4} <saddr> <splen> <daddr> <dplen>] [-p {tcp|udp|icmp4|icmp6} <sport> <dport>]\0A\00"
@.str.1 = [77 x i8] c"Usage: gioctl class del {send <lcr>|receive} -cr <classref> [-dscp <dscp>] \0A\00"
@.str.2 = [62 x i8] c"Usage: gioctl class list {send <lcr>|receive} [-dscp <dscp>]\0A\00"
define void @print_usage_class() {
%1 = call i32 @printf(i8* getelementptr inbounds ([192 x i8], [192 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [191 x i8] c"Usage: gioctl class add {send <lcr>|receive} -f {qos <rab_id>|del|ctl|dc} -cr <classref> [-dscp <dscp>] [-ip {6|4} <saddr> <splen> <daddr> <dplen>] [-p {tcp|udp|icmp4|icmp6} <sport> <dport>]\00"
@str.3 = [76 x i8] c"Usage: gioctl class del {send <lcr>|receive} -cr <classref> [-dscp <dscp>] \00"
@str.4 = [61 x i8] c"Usage: gioctl class list {send <lcr>|receive} [-dscp <dscp>]\00"
define void @print_usage_class() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([191 x i8], [191 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ssleay_rand_add(void const *, int, double);
void ssleay_rand_seed(const void *buf, int num) {
  ssleay_rand_add(buf, num, (double)num);
}


x86 assembly (clang, -O0):
<ssleay_rand_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
cvtsi2sdl -0xc(%rbp),%xmm0
call   1030 <ssleay_rand_add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssleay_rand_seed>:
cvtsi2sd %esi,%xmm0
jmp    1030 <ssleay_rand_add@plt>

LLVM IR (-O0):
define void @ssleay_rand_seed(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = call i32 @ssleay_rand_add(i8* %5, i32 %6, double %8)
ret void
}

LLVM IR (-O2):
define void @ssleay_rand_seed(i8* %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = tail call i32 @ssleay_rand_add(i8* %0, i32 %1, double %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prime_sieve();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ wieferich_primes();
int main() {
  prime_sieve();
  printf("Wieferich primes less than %d:\n", 5000);
  wieferich_primes();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <prime_sieve@plt>
lea    0xeb3(%rip),%rdi
mov    $0x1388,%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <wieferich_primes@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <prime_sieve@plt>
lea    0xec1(%rip),%rdi
mov    $0x1388,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <wieferich_primes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Wieferich primes less than %d:\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @prime_sieve()
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 5000)
%4 = call i32 (...) @wieferich_primes()
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Wieferich primes less than %d:\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @prime_sieve()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 5000)
%3 = tail call i32 (...) @wieferich_primes()
ret i32 0
}
/* Variables and functions */
int Cmd_Argc();
int /*<<< orphan*/ Com_Printf(char *);
int /*<<< orphan*/ TV_Status();
int /*<<< orphan*/ TV_Upstream_Status_f();
void TV_Status_f(void) {
  if (Cmd_Argc() == 1)
    TV_Status();
  else if (Cmd_Argc() == 2)
    TV_Upstream_Status_f();
  else
    Com_Printf("Usage: status [upstream]\n");
}


x86 assembly (clang, -O0):
<TV_Status_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Cmd_Argc@plt>
cmp    $0x1,%eax
jne    1160 <TV_Status_f+0x20>
mov    $0x0,%al
call   1030 <TV_Status@plt>
jmp    118d <TV_Status_f+0x4d>
mov    $0x0,%al
call   1040 <Cmd_Argc@plt>
cmp    $0x2,%eax
jne    117c <TV_Status_f+0x3c>
mov    $0x0,%al
call   1060 <TV_Upstream_Status_f@plt>
jmp    1188 <TV_Status_f+0x48>
lea    0xe7d(%rip),%rdi
call   1050 <Com_Printf@plt>
jmp    118d <TV_Status_f+0x4d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TV_Status_f>:
push   %rax
xor    %eax,%eax
call   1040 <Cmd_Argc@plt>
cmp    $0x1,%eax
jne    1155 <TV_Status_f+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <TV_Status@plt>
xor    %eax,%eax
call   1040 <Cmd_Argc@plt>
cmp    $0x2,%eax
jne    1169 <TV_Status_f+0x29>
xor    %eax,%eax
pop    %rcx
jmp    1060 <TV_Upstream_Status_f@plt>
lea    0xe90(%rip),%rdi
pop    %rax
jmp    1050 <Com_Printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: status [upstream]\0A\00"
define void @TV_Status_f() {
%1 = call i32 (...) @Cmd_Argc()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @TV_Status()
br label %13
5: ; preds = %0
%6 = call i32 (...) @Cmd_Argc()
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 (...) @TV_Upstream_Status_f()
br label %12
10: ; preds = %5
%11 = call i32 @Com_Printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
br label %13
13: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Usage: status [upstream]\0A\00"
define void @TV_Status_f() {
%1 = tail call i32 (...) @Cmd_Argc()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @TV_Status()
br label %12
5: ; preds = %0
%6 = tail call i32 (...) @Cmd_Argc()
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @TV_Upstream_Status_f()
br label %12
10: ; preds = %5
%11 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %8, %10, %3
ret void
}
/* Type definitions */
struct firewireDevice {
  int dummy;
};
struct device {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ writeDevice(int /*<<< orphan*/ *, struct device *);
void firewireWriteDevice(FILE *file, struct firewireDevice *dev) {
  writeDevice(file, (struct device *)dev);
}


x86 assembly (clang, -O0):
<firewireWriteDevice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <writeDevice@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<firewireWriteDevice>:
jmp    1030 <writeDevice@plt>

LLVM IR (-O0):
%struct.firewireDevice = type { i32 }
%struct.device = type { i32 }
define void @firewireWriteDevice(i32* %0, %struct.firewireDevice* %1) {
%3 = alloca i32*
%4 = alloca %struct.firewireDevice*
store i32* %0, i32** %3
store %struct.firewireDevice* %1, %struct.firewireDevice** %4
%5 = load i32*, i32** %3
%6 = load %struct.firewireDevice*, %struct.firewireDevice** %4
%7 = bitcast %struct.firewireDevice* %6 to %struct.device*
%8 = call i32 @writeDevice(i32* %5, %struct.device* %7)
ret void
}

LLVM IR (-O2):
%struct.firewireDevice = type { i32 }
%struct.device = type { i32 }
define void @firewireWriteDevice(i32* %0, %struct.firewireDevice* %1) {
%3 = bitcast %struct.firewireDevice* %1 to %struct.device*
%4 = tail call i32 @writeDevice(i32* %0, %struct.device* %3)
ret void
}
/* Type definitions */
struct constructHeader {
  int dummy;
};

/* Variables and functions */
char const *GetConstructModuleName(struct constructHeader *);
const char *EnvDefinstancesModuleName(void *theEnv, void *theDefinstances) {
  return GetConstructModuleName((struct constructHeader *)theDefinstances);
}


x86 assembly (clang, -O0):
<EnvDefinstancesModuleName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <GetConstructModuleName@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnvDefinstancesModuleName>:
mov    %rsi,%rdi
jmp    1030 <GetConstructModuleName@plt>

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
define i8* @EnvDefinstancesModuleName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to %struct.constructHeader*
%7 = call i8* @GetConstructModuleName(%struct.constructHeader* %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
define i8* @EnvDefinstancesModuleName(i8* nocapture readnone %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.constructHeader*
%4 = tail call i8* @GetConstructModuleName(%struct.constructHeader* %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ curinvis();
inviscur() { curinvis(); }


x86 assembly (clang, -O0):
<inviscur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <curinvis@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inviscur>:
xor    %eax,%eax
jmp    1030 <curinvis@plt>

LLVM IR (-O0):
define i32 @inviscur() {
%1 = alloca i32
%2 = call i32 (...) @curinvis()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @inviscur() {
%1 = tail call i32 (...) @curinvis()
ret i32 undef
}
void scm_inv_range(unsigned long start, unsigned long end) { return; }


x86 assembly (clang, -O0):
<scm_inv_range>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scm_inv_range>:
ret

LLVM IR (-O0):
define void @scm_inv_range(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @scm_inv_range(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int lib_func01();
int lib_func02();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  argc = argc;
  argv = argv;
  printf("hello world\n");
  printf("lib_func01 returned %d\n", lib_func01());
  printf("lib_func02 returned %d\n", lib_func02());
  return 0;
}


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)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <lib_func01@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <lib_func02@plt>
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <lib_func01@plt>
lea    0xea5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <lib_func02@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
@.str.1 = [24 x i8] c"lib_func01 returned %d\0A\00"
@.str.2 = [24 x i8] c"lib_func02 returned %d\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 = load i32, i32* %4
store i32 %6, i32* %4
%7 = load i8**, i8*** %5
store i8** %7, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @lib_func01()
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @lib_func02()
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"lib_func01 returned %d\0A\00"
@.str.2 = [24 x i8] c"lib_func02 returned %d\0A\00"
@str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @lib_func01()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @lib_func02()
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *);
void Dico_Long_Start(int nb_longs) {
  Inst_Printf(".data", "");
  Inst_Printf(".align", "4");
}


x86 assembly (clang, -O0):
<Dico_Long_Start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xee5(%rip),%rsi
call   1030 <Inst_Printf@plt>
lea    0xed1(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dico_Long_Start>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeef(%rip),%rsi
call   1030 <Inst_Printf@plt>
lea    0xedb(%rip),%rdi
lea    0xedb(%rip),%rsi
pop    %rax
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c".data\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [7 x i8] c".align\00"
@.str.3 = [2 x i8] c"4\00"
define void @Dico_Long_Start(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @Inst_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c".data\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [7 x i8] c".align\00"
@.str.3 = [2 x i8] c"4\00"
define void @Dico_Long_Start(i32 %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}
int voisinHautGauche(int *tab, int position, int colonne) {
  int count = 0;
  tab += position;
  count += *(tab + 1);
  count += *(tab + colonne);
  count += *(tab + 1 + colonne);
  return count;
}


x86 assembly (clang, -O0):
<voisinHautGauche>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    0x4(%rax,%rcx,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<voisinHautGauche>:
movslq %esi,%rcx
lea    (%rdi,%rcx,4),%rsi
movslq %edx,%rdx
mov    (%rsi,%rdx,4),%eax
add    0x4(%rdi,%rcx,4),%eax
add    0x4(%rsi,%rdx,4),%eax
ret

LLVM IR (-O0):
define i32 @voisinHautGauche(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %5
%9 = load i32*, i32** %4
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i32, i32* %9, i64 %10
store i32* %11, i32** %4
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = load i32, i32* %7
%16 = add nsw i32 %15, %14
store i32 %16, i32* %7
%17 = load i32*, i32** %4
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %7
%23 = add nsw i32 %22, %21
store i32 %23, i32* %7
%24 = load i32*, i32** %4
%25 = getelementptr inbounds i32, i32* %24, i64 1
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
%29 = load i32, i32* %28
%30 = load i32, i32* %7
%31 = add nsw i32 %30, %29
store i32 %31, i32* %7
%32 = load i32, i32* %7
ret i32 %32
}

LLVM IR (-O2):
define i32 @voisinHautGauche(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load i32, i32* %6
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = add nsw i32 %10, %7
%12 = getelementptr inbounds i32, i32* %6, i64 %8
%13 = load i32, i32* %12
%14 = add nsw i32 %11, %13
ret i32 %14
}
int f(int x) {
  int y;
  if (x > 0) {
    y = 1;
  } else {
    y = f(-x);
  }
  return y;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1131 <f+0x21>
movl   $0x1,-0x8(%rbp)
jmp    113e <f+0x2e>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
jg     1118 <f+0x18>
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
neg    %eax
test   %edi,%edi
mov    %eax,%edi
jns    1110 <f+0x10>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %3
br label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
%10 = call i32 @f(i32 %9)
store i32 %10, i32* %3
br label %11
11: ; preds = %7, %6
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = sub nsw i32 0, %4
%6 = icmp slt i32 %4, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret i32 1
}
__attribute__((no, noclone)) void f3(int i) {
  volatile int j;
  int *p = (int *)__builtin_calloc(20, sizeof(*p));
  int *o = &p[i];
  j = *o;
  j = o[0];
  __builtin_free(p);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x14,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
movl   $0x0,-0x4(%rsp)
movl   $0x0,-0x4(%rsp)
ret

LLVM IR (-O0):
define void @f3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i8* @calloc(i64 20, i64 4)
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %4
%8 = load i32*, i32** %4
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32* %11, i32** %5
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
store volatile i32 %13, i32* %3
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
store volatile i32 %16, i32* %3
%17 = load i32*, i32** %4
%18 = bitcast i32* %17 to i8*
ret void
}

LLVM IR (-O2):
define void @f3(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store volatile i32 0, i32* %2
store volatile i32 0, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void input_dirname() { printf("input_dirname\n"); }


x86 assembly (clang, -O0):
<input_dirname>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_dirname>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"input_dirname\0A\00"
define void @input_dirname() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"input_dirname\00"
define void @input_dirname() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, unsigned int *);
unsigned int readFileValue(char filename[]) {
  FILE *fp;
  unsigned int value = 0;
  fp = fopen(filename, "rt");
  fscanf(fp, "%x", &value);
  fclose(fp);
  return value;
}


x86 assembly (clang, -O0):
<readFileValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea1(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFileValue>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeb0(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rax,%rdi
call   1040 <fscanf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rt\00"
@.str.1 = [3 x i8] c"%x\00"
define i32 @readFileValue(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 @fscanf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%9 = load i32*, i32** %3
%10 = call i32 @fclose(i32* %9)
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"rt\00"
@.str.1 = [3 x i8] c"%x\00"
define i32 @readFileValue(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @fscanf(i32* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = call i32 @fclose(i32* %4)
%7 = load i32, i32* %2
ret i32 %7
}
double EDlog10(double x) { return (.434294 / x); }


x86 assembly (clang, -O0):
<EDlog10>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<EDlog10>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @EDlog10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 4.342940e-01, %3
ret double %4
}

LLVM IR (-O2):
define double @EDlog10(double %0) {
%2 = fdiv double 4.342940e-01, %0
ret double %2
}
int _get_joy_position(int axis) { return 0; }


x86 assembly (clang, -O0):
<_get_joy_position>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_joy_position>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @_get_joy_position(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @_get_joy_position(i32 %0) {
ret i32 0
}
/* Variables and functions */
unsigned int pow(int, int);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(int argc, char *argv[]) {
  unsigned sqr_sum = 0;
  unsigned sum_sqr = 0;
  sum_sqr = pow(100 * (100 + 1) / 2, 2);
  sqr_sum = 100 * (100 + 1) * (2 * 100 + 1) / 6;
  printf("Difference: %d\n", (sum_sqr - sqr_sum));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0x13ba,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %eax,-0x18(%rbp)
movl   $0x529ae,-0x14(%rbp)
mov    -0x18(%rbp),%esi
sub    -0x14(%rbp),%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x13ba,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
lea    -0x529ae(%rax),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Difference: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = call i32 @pow(i32 5050, i32 2)
store i32 %8, i32* %7
store i32 338350, i32* %6
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = sub i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Difference: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @pow(i32 5050, i32 2)
%4 = add i32 %3, -338350
%5 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ m_clear(int);
int /*<<< orphan*/ m_write(int, int /*<<< orphan*/, char *, scalar_t__);
int s_new();
scalar_t__ strlen(char *);
int s_cp(int m, char *s) {
  if (!m)
    m = s_new();
  else
    m_clear(m);
  m_write(m, 0, s, strlen(s) + 1);
  return m;
}


x86 assembly (clang, -O0):
<s_cp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1168 <s_cp+0x28>
mov    $0x0,%al
call   1030 <s_new@plt>
mov    %eax,-0x4(%rbp)
jmp    1170 <s_cp+0x30>
mov    -0x4(%rbp),%edi
call   1050 <m_clear@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
add    $0x1,%rcx
xor    %esi,%esi
call   1060 <m_write@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_cp>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
test   %edi,%edi
je     1153 <s_cp+0x13>
mov    %edi,%ebp
call   1050 <m_clear@plt>
jmp    115c <s_cp+0x1c>
xor    %eax,%eax
call   1030 <s_new@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rcx
mov    %ebp,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1060 <m_write@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s_cp(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 (...) @s_new()
store i32 %8, i32* %3
br label %12
9: ; preds = %2
%10 = load i32, i32* %3
%11 = call i32 @m_clear(i32 %10)
br label %12
12: ; preds = %9, %7
%13 = load i32, i32* %3
%14 = load i8*, i8** %4
%15 = load i8*, i8** %4
%16 = call i64 @strlen(i8* %15)
%17 = add nsw i64 %16, 1
%18 = call i32 @m_write(i32 %13, i32 0, i8* %14, i64 %17)
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @s_cp(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @s_new()
br label %8
6: ; preds = %2
%7 = tail call i32 @m_clear(i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %0, %6 ], [ %5, %4 ]
%10 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%11 = add nsw i64 %10, 1
%12 = tail call i32 @m_write(i32 %9, i32 0, i8* %1, i64 %11)
ret i32 %9
}
void plug_nl_sentences_shutdown(void *in_context) {}


x86 assembly (clang, -O0):
<plug_nl_sentences_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<plug_nl_sentences_shutdown>:
ret

LLVM IR (-O0):
define void @plug_nl_sentences_shutdown(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @plug_nl_sentences_shutdown(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_total_alloc_mem_syscall_wrapper();
int /*<<< orphan*/ get_total_free_mem_syscall_wrapper();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  printf("Average memory which is allocated: %lu \n",
         get_total_alloc_mem_syscall_wrapper());
  printf("Average memory which is free: %lu \n",
         get_total_free_mem_syscall_wrapper());
  return 0;
}


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)
mov    $0x0,%al
call   1050 <get_total_alloc_mem_syscall_wrapper@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <get_total_free_mem_syscall_wrapper@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <get_total_alloc_mem_syscall_wrapper@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <get_total_free_mem_syscall_wrapper@plt>
lea    0xed5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Average memory which is allocated: %lu \0A\00"
@.str.1 = [36 x i8] c"Average memory which is free: %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 (...) @get_total_alloc_mem_syscall_wrapper()
%7 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @get_total_free_mem_syscall_wrapper()
%9 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"Average memory which is allocated: %lu \0A\00"
@.str.1 = [36 x i8] c"Average memory which is free: %lu \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @get_total_alloc_mem_syscall_wrapper()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @get_total_free_mem_syscall_wrapper()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_palindrome(char const *, int, int);
void test10(void) {
  const char a[] = {'h', 'e', 'l', 'i', 'v', 'e', 'd', 'a', 's',
                    'a', 'd', 'e', 'v', 'i', 'l', 'e', 'h'};
  test_palindrome(a, sizeof(a), 1);
  test_palindrome(a, sizeof(a), 2);
  printf("\n");
}


x86 assembly (clang, -O0):
<test10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%al
mov    %al,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
call   1040 <test_palindrome@plt>
lea    -0x20(%rbp),%rdi
mov    $0x11,%esi
mov    $0x2,%edx
call   1040 <test_palindrome@plt>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test10>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x68,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x11,%esi
mov    $0x1,%edx
call   1040 <test_palindrome@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
mov    $0x2,%edx
call   1040 <test_palindrome@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test10.a = [17 x i8] c"helivedasadevileh"
@.str = [2 x i8] c"\0A\00"
define void @test10() {
%1 = alloca [17 x i8]
%2 = bitcast [17 x i8]* %1 to i8*
%3 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%4 = call i32 @test_palindrome(i8* %3, i32 17, i32 1)
%5 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%6 = call i32 @test_palindrome(i8* %5, i32 17, i32 2)
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.test10.a = [17 x i8] c"helivedasadevileh"
define void @test10() {
%1 = alloca [17 x i8]
%2 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%3 = call i32 @test_palindrome(i8* %2, i32 17, i32 1)
%4 = call i32 @test_palindrome(i8* %2, i32 17, i32 2)
%5 = call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void pause(void) { puts("pause\n"); }


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"pause\0A\00"
define void @pause() {
%1 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"pause\0A\00"
define void @pause() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
void gtk_expander_style_get_type() {}


x86 assembly (clang, -O0):
<gtk_expander_style_get_type>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_expander_style_get_type>:
ret

LLVM IR (-O0):
define void @gtk_expander_style_get_type() {
ret void
}

LLVM IR (-O2):
define void @gtk_expander_style_get_type() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void h265hvcc_set_length_size_1(uint8_t *p, uint8_t val) {
  p[21] &= ~0x3;
  p[21] |= val;
}


x86 assembly (clang, -O0):
<h265hvcc_set_length_size_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%ecx
and    $0xfffffffc,%ecx
mov    %ecx,0x54(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     0x54(%rax),%ecx
mov    %ecx,0x54(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265hvcc_set_length_size_1>:
mov    0x54(%rdi),%eax
and    $0xfffffffc,%eax
or     %esi,%eax
mov    %eax,0x54(%rdi)
ret

LLVM IR (-O0):
define void @h265hvcc_set_length_size_1(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 21
%7 = load i32, i32* %6
%8 = and i32 %7, -4
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 21
%12 = load i32, i32* %11
%13 = or i32 %12, %9
store i32 %13, i32* %11
ret void
}

LLVM IR (-O2):
define void @h265hvcc_set_length_size_1(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 21
%4 = load i32, i32* %3
%5 = and i32 %4, -4
%6 = or i32 %5, %1
store i32 %6, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int isint(char *s) {
  int i = 0;
  while (s[i]) {
    if (!isdigit(s[i]))
      return 0;
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1169 <isint+0x59>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    115b <isint+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    1170 <isint+0x60>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <isint+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isint>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <isint+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <isint+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <isint+0x20>
jmp    114b <isint+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isint(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %21, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @isdigit(i8 signext %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %12
store i32 0, i32* %2
br label %25
21: ; preds = %12
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %5
24: ; preds = %5
store i32 1, i32* %2
br label %25
25: ; preds = %24, %20
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @isint(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = tail call i32 @isdigit(i8 signext %10)
%12 = icmp eq i32 %11, 0
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
long int getSeconds(long int t) { return t / 1000000000; }


x86 assembly (clang, -O0):
<getSeconds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3b9aca00,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSeconds>:
mov    %rdi,%rax
movabs $0x112e0be826d694b3,%rcx
0b 2e 11
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x1a,%rdx
add    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @getSeconds(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 1000000000
ret i64 %4
}

LLVM IR (-O2):
define i64 @getSeconds(i64 %0) {
%2 = sdiv i64 %0, 1000000000
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, int);
void getname(char nam[][20], int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("Enter the name of [%d]:", i);
    gets(nam[i]);
  }
}


x86 assembly (clang, -O0):
<getname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1173 <getname+0x53>
mov    -0x10(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rdi
call   1040 <gets@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <getname+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getname>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    115f <getname+0x3f>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
call   1040 <gets@plt>
add    $0x1,%rbx
add    $0x14,%r14
cmp    %rbx,%r12
jne    1140 <getname+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Enter the name of [%d]:\00"
define void @getname([20 x i8]* %0, i32 %1) {
%3 = alloca [20 x i8]*
%4 = alloca i32
%5 = alloca i32
store [20 x i8]* %0, [20 x i8]** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i32, i32* %5
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load [20 x i8]*, [20 x i8]** %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 %15
%17 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 0
%18 = call i32 @gets(i8* %17)
br label %19
19: ; preds = %10
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Enter the name of [%d]:\00"
define void @getname([20 x i8]* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = trunc i64 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 %7, i64 0
%11 = tail call i32 @gets(i8* %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t copy_uint8_t(const uint8_t _val) { return _val; }


x86 assembly (clang, -O0):
<copy_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_uint8_t>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @copy_uint8_t(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @copy_uint8_t(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int modules_worker(int argc, char *argv[]) {
  printf("in modules_worker!\n");
  return 0;
}


x86 assembly (clang, -O0):
<modules_worker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modules_worker>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"in modules_worker!\0A\00"
define i32 @modules_worker(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"in modules_worker!\00"
define i32 @modules_worker(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned uDivTest17(unsigned X, unsigned Y) { return -X / ((unsigned)2); }


x86 assembly (clang, -O0):
<uDivTest17>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDivTest17>:
mov    %edi,%eax
neg    %eax
shr    %eax
ret

LLVM IR (-O0):
define i32 @uDivTest17(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sub i32 0, %5
%7 = udiv i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @uDivTest17(i32 %0, i32 %1) {
%3 = sub i32 0, %0
%4 = lshr i32 %3, 1
ret i32 %4
}
/* Variables and functions */
scalar_t__ match(char *, char *);
int /*<<< orphan*/ puts(char *);
void test(char *first, char *second) {
  match(second, first) ? puts("Yes") : puts("No");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <match@plt>
cmp    $0x0,%rax
je     1158 <test+0x38>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
jmp    1164 <test+0x44>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1040 <match@plt>
test   %rax,%rax
lea    0xecb(%rip),%rax
lea    0xec0(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"Yes\00"
@.str.1 = [3 x i8] c"No\00"
define void @test(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @match(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %2
%12 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"Yes\00"
@.str.1 = [3 x i8] c"No\00"
define void @test(i8* %0, i8* %1) {
%3 = tail call i64 @match(i8* %1, i8* %0)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret void
}
double min(double x, double y) {
  if (x <= y)
    return x;
  else
    return y;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1131 <min+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <min+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
movapd %xmm0,%xmm2
cmplesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ole double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}