xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t imul64(int64_t a, int64_t b) { return (a * b) >> 12; }


x86 assembly (clang, -O0):
<imul64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
sar    $0xc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imul64>:
mov    %edi,%eax
imul   %esi,%eax
sar    $0xc,%eax
ret

LLVM IR (-O0):
define i32 @imul64(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 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
%8 = ashr i32 %7, 12
ret i32 %8
}

LLVM IR (-O2):
define i32 @imul64(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = ashr i32 %3, 12
ret i32 %4
}
char *status(int n) {
  switch (n) {
  case 0:
    return "Run  ";
  default:
    return "Sleep";
  }
}


x86 assembly (clang, -O0):
<status>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
test   %eax,%eax
jne    1127 <status+0x27>
jmp    1117 <status+0x17>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <status+0x32>
lea    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<status>:
test   %edi,%edi
lea    0xef7(%rip),%rcx
lea    0xef6(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Run \00"
@.str.1 = [6 x i8] c"Sleep\00"
define i8* @status(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 0, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"Run \00"
@.str.1 = [6 x i8] c"Sleep\00"
define i8* @status(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint16_t;

/* Variables and functions */
uint16_t halReadReg16(uintptr_t physicalAddress) {
  volatile uint16_t *ptr = (uint16_t *)physicalAddress;
  return *ptr;
}


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

x86 assembly (clang, -O2):
<halReadReg16>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @halReadReg16(i64 %0) {
%2 = alloca i64
%3 = alloca i32*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load volatile i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @halReadReg16(i64 %0) {
%2 = inttoptr i64 %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int tuner_deselect(void *);
signed int bbm_com_tuner_deselect(void *handle) {
  signed int res;
  res = tuner_deselect(handle);
  return res;
}


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

x86 assembly (clang, -O2):
<bbm_com_tuner_deselect>:
jmp    1030 <tuner_deselect@plt>

LLVM IR (-O0):
define i32 @bbm_com_tuner_deselect(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @tuner_deselect(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @bbm_com_tuner_deselect(i8* %0) {
%2 = tail call i32 @tuner_deselect(i8* %0)
ret i32 %2
}
int test_imm_32int8_mem(signed char *val) {
  return ((*val) & (0x32 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_32int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x32,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_32int8_mem>:
testb  $0x32,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_32int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 50
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_32int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 50
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int isdir(char *name) {
  struct stat statbuf;
  if (stat(name, &statbuf) < 0)
    return 0;
  return S_ISDIR(statbuf.st_mode);
}


x86 assembly (clang, -O0):
<isdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    114f <isdir+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115a <isdir+0x3a>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     1138 <isdir+0x18>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @isdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISDIR(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isdir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void handler_alrm(int i) { puts("got signal ALRM"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"got signal ALRM\00"
define void @handler_alrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"got signal ALRM\00"
define void @handler_alrm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execv(char *, char **);
int setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main() {
  system("/bin/cp -f /etc/bind/named.conf.online /etc/bind/named.conf");
  int ret = setuid(0);
  char *args[] = {"bind9", "restart"};
  execv("/etc/init.d/bind9", args);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   1040 <setuid@plt>
mov    %eax,-0x8(%rbp)
mov    0x2cb4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cb1(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xece(%rip),%rdi
call   1050 <execv@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   1040 <setuid@plt>
movaps 0x2cc2(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeeb(%rip),%rdi
mov    %rsp,%rsi
call   1050 <execv@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [60 x i8] c"/bin/cp -f /etc/bind/named.conf.online /etc/bind/named.conf\00"
@.str.1 = [6 x i8] c"bind9\00"
@.str.2 = [8 x i8] c"restart\00"
@__const.main.args = [2 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [18 x i8] c"/etc/init.d/bind9\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x i8*]
store i32 0, i32* %1
%4 = call i32 @system(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @setuid(i32 0)
store i32 %5, i32* %2
%6 = bitcast [2 x i8*]* %3 to i8*
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%8 = call i32 @execv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8** %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [60 x i8] c"/bin/cp -f /etc/bind/named.conf.online /etc/bind/named.conf\00"
@.str.1 = [6 x i8] c"bind9\00"
@.str.2 = [8 x i8] c"restart\00"
@__const.main.args = [2 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [18 x i8] c"/etc/init.d/bind9\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = tail call i32 @system(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @setuid(i32 0)
%4 = bitcast [2 x i8*]* %1 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%6 = call i32 @execv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8** %5)
ret i32 0
}
/* Type definitions */
struct node {
  int dummy;
};
struct module {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
struct node *module_retval_get(struct module *);
int /*<<< orphan*/ subs_count_atleast(struct node const *, int);
struct node const *subs_first_const(struct node const *);
const struct node *retval_name(struct module *mod) {
  const struct node *retval = module_retval_get(mod);
  assert(subs_count_atleast(retval, 1));
  return subs_first_const(retval);
}


x86 assembly (clang, -O0):
<retval_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <module_retval_get@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1060 <subs_count_atleast@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1050 <subs_first_const@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<retval_name>:
push   %rbx
call   1030 <module_retval_get@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x1,%esi
call   1060 <subs_count_atleast@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <subs_first_const@plt>

LLVM IR (-O0):
%struct.node = type { i32 }
%struct.module = type { i32 }
define %struct.node* @retval_name(%struct.module* %0) {
%2 = alloca %struct.module*
%3 = alloca %struct.node*
store %struct.module* %0, %struct.module** %2
%4 = load %struct.module*, %struct.module** %2
%5 = call %struct.node* @module_retval_get(%struct.module* %4)
store %struct.node* %5, %struct.node** %3
%6 = load %struct.node*, %struct.node** %3
%7 = call i32 @subs_count_atleast(%struct.node* %6, i32 1)
%8 = call i32 @assert(i32 %7)
%9 = load %struct.node*, %struct.node** %3
%10 = call %struct.node* @subs_first_const(%struct.node* %9)
ret %struct.node* %10
}

LLVM IR (-O2):
%struct.node = type { i32 }
%struct.module = type { i32 }
define %struct.node* @retval_name(%struct.module* %0) {
%2 = tail call %struct.node* @module_retval_get(%struct.module* %0)
%3 = tail call i32 @subs_count_atleast(%struct.node* %2, i32 1)
%4 = tail call i32 @assert(i32 %3)
%5 = tail call %struct.node* @subs_first_const(%struct.node* %2)
ret %struct.node* %5
}
void image_init() {}


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

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

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

LLVM IR (-O2):
define void @image_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(void *);
int date_get_hour(void) {
  time_t t;
  struct tm *lt;
  t = time((void *)0);
  lt = localtime(&t);
  return lt->tm_hour;
}


x86 assembly (clang, -O0):
<date_get_hour>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_get_hour>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @date_get_hour() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i8* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @date_get_hour() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i8* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ TakeOffLocationHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void TakeOffLocationUpdated() { UAVObjUpdated(TakeOffLocationHandle()); }


x86 assembly (clang, -O0):
<TakeOffLocationUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <TakeOffLocationHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TakeOffLocationUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <TakeOffLocationHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @TakeOffLocationUpdated() {
%1 = call i32 (...) @TakeOffLocationHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @TakeOffLocationUpdated() {
%1 = tail call i32 (...) @TakeOffLocationHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int fun1089() { return 1089; }


x86 assembly (clang, -O0):
<fun1089>:
push   %rbp
mov    %rsp,%rbp
mov    $0x441,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1089>:
mov    $0x441,%eax
ret

LLVM IR (-O0):
define i32 @fun1089() {
ret i32 1089
}

LLVM IR (-O2):
define i32 @fun1089() {
ret i32 1089
}
int main(void) {
  int i = 10, n = 0;
  int j = 10;
  while (i) {
    int j = 1;
    n = n + i;
    i = i - j;
  }
  n = n + j;
  return n;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1148 <main+0x48>
movl   $0x1,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1120 <main+0x20>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x41,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
ret i32 65
}
adr0indreg1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*((double *)10000000)) <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0indreg1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    $0x989680,%eax
movsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1143 <adr0indreg1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <adr0indreg1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0indreg1>:
movsd  (%rcx),%xmm0
xor    %eax,%eax
ucomisd 0x989680,%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @adr0indreg1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double, double* inttoptr (i64 10000000 to double*)
%15 = load double*, double** %13
%16 = load double, double* %15
%17 = fcmp ole double %14, %16
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @adr0indreg1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture %5) {
%7 = load double, double* inttoptr (i64 10000000 to double*)
%8 = load double, double* %5
%9 = fcmp ole double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ LopPar_OFILM(unsigned char);
int /*<<< orphan*/ LopSin_OFILM(unsigned char, int);
void LopIni_OFILM(unsigned char UcDirSel_OFILM) {
  LopPar_OFILM(UcDirSel_OFILM);
  LopSin_OFILM(UcDirSel_OFILM, 0x01);
}


x86 assembly (clang, -O0):
<LopIni_OFILM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <LopPar_OFILM@plt>
mov    $0x1,%esi
movzbl -0x1(%rbp),%edi
call   1040 <LopSin_OFILM@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LopIni_OFILM>:
push   %rbx
mov    %edi,%ebx
call   1030 <LopPar_OFILM@plt>
mov    %ebx,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1040 <LopSin_OFILM@plt>

LLVM IR (-O0):
define void @LopIni_OFILM(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @LopPar_OFILM(i8 zeroext %3)
%5 = load i8, i8* %2
%6 = call i32 @LopSin_OFILM(i8 zeroext %5, i32 1)
ret void
}

LLVM IR (-O2):
define void @LopIni_OFILM(i8 zeroext %0) {
%2 = tail call i32 @LopPar_OFILM(i8 zeroext %0)
%3 = tail call i32 @LopSin_OFILM(i8 zeroext %0, i32 1)
ret void
}
char *whoami() { return (0L); }


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

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

LLVM IR (-O0):
define i8* @whoami() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @whoami() {
ret i8* null
}
void RTAvlroGCPtrGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlroGCPtrGet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_load_40x_pit();
void spr_read_40x_pit(void *opaque, int sprn) { gen_op_load_40x_pit(); }


x86 assembly (clang, -O0):
<spr_read_40x_pit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <gen_op_load_40x_pit@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @spr_read_40x_pit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @gen_op_load_40x_pit()
ret void
}

LLVM IR (-O2):
define void @spr_read_40x_pit(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @gen_op_load_40x_pit()
ret void
}
int adis16130_initialize_ring(struct iio_ring_buffer *ring) { return 0; }


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

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

LLVM IR (-O0):
%struct.iio_ring_buffer = type opaque
define i32 @adis16130_initialize_ring(%struct.iio_ring_buffer* %0) {
%2 = alloca %struct.iio_ring_buffer*
store %struct.iio_ring_buffer* %0, %struct.iio_ring_buffer** %2
ret i32 0
}

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define i32 @adis16130_initialize_ring(%struct.iio_ring_buffer* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Error(char *);
int /*<<< orphan*/ exit(int);
void Abort(char *s) {
  Error(s);
  exit(1);
}


x86 assembly (clang, -O0):
<Abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Abort>:
push   %rax
call   1030 <Error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @Abort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Error(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @Abort(i8* %0) {
%2 = tail call i32 @Error(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ clfunct(char *, char);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ inpline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
main() {
  int c, d;
  char in[1000], inp[1000], out[1000];
  inpline(in, 1000);
  clfunct(in, 'd');
  printf("%s", in);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xbd0,%rsp
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <inpline@plt>
lea    -0x3f0(%rbp),%rdi
mov    $0x64,%esi
call   1030 <clfunct@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getch@plt>
xor    %eax,%eax
add    $0xbd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <inpline@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <clfunct@plt>
lea    0xe94(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
%4 = alloca [1000 x i8]
%5 = alloca [1000 x i8]
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%7 = call i32 @inpline(i8* %6, i32 1000)
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%9 = call i32 @clfunct(i8* %8, i8 signext 100)
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @inpline(i8* %2, i32 1000)
%4 = call i32 @clfunct(i8* %2, i8 signext 100)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = call i32 (...) @getch()
ret i32 0
}
void foo_2_1_1_2_1_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_1_2_2_1_2() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_scan_solution_banner(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(132, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_scan_solution_banner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x84,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_scan_solution_banner>:
mov    $0x84,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @solcon_scan_solution_banner() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 132, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_scan_solution_banner() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 132, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int strlen(char *);
char *keepInner(char *in) {
  char *out = malloc(sizeof(char) * strlen(in) - 1);
  memcpy(out, &in[1], strlen(in) - 2);
  out[strlen(in) - 2] = '\0';
  return out;
}


x86 assembly (clang, -O0):
<keepInner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cltq
shl    $0x0,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
sub    $0x2,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x2,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keepInner>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    -0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%r14
lea    0x1(%rbx),%r15
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x2(%rax),%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x2(%rax,%r14,1)
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @keepInner(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = mul i64 1, %6
%8 = sub i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i8* @malloc(i32 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8*, i8** %2
%15 = call i32 @strlen(i8* %14)
%16 = sub nsw i32 %15, 2
%17 = call i32 @memcpy(i8* %11, i8* %13, i32 %16)
%18 = load i8*, i8** %3
%19 = load i8*, i8** %2
%20 = call i32 @strlen(i8* %19)
%21 = sub nsw i32 %20, 2
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %18, i64 %22
store i8 0, i8* %23
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
define i8* @keepInner(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add i32 %2, -1
%4 = tail call i8* @malloc(i32 %3)
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = tail call i32 @strlen(i8* %0)
%7 = add nsw i32 %6, -2
%8 = tail call i32 @memcpy(i8* %4, i8* %5, i32 %7)
%9 = tail call i32 @strlen(i8* %0)
%10 = add nsw i32 %9, -2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %4, i64 %11
store i8 0, i8* %12
ret i8* %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int scanline_pad;
};
typedef TYPE_1__ XPixmapFormatValues;

/* Variables and functions */
void set_XPixmapFormatValues_scanline_pad(void *_p, int _v) {
  ((XPixmapFormatValues *)_p)->scanline_pad = (int)_v;
}


x86 assembly (clang, -O0):
<set_XPixmapFormatValues_scanline_pad>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XPixmapFormatValues_scanline_pad>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XPixmapFormatValues_scanline_pad(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XPixmapFormatValues_scanline_pad(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
__attribute__((no)) int bar() {
  int a = -1;
  volatile unsigned b = 1U;
  int c = 1;
  c = (a + 972195718) >> (b ? 2 : 3);
  if (c == 243048929)
    ;
  else
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x39f28786,%eax
mov    -0x8(%rbp),%esi
mov    $0x3,%ecx
mov    $0x2,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xe7ca1e1,-0xc(%rbp)
jne    115f <bar+0x4f>
jmp    1164 <bar+0x54>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
movl   $0x1,0x4(%rsp)
cmpl   $0x0,0x4(%rsp)
je     1124 <bar+0x14>
xor    %eax,%eax
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @bar() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 -1, i32* %1
store volatile i32 1, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 972195718
%6 = load volatile i32, i32* %2
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 2, i32 3
%10 = ashr i32 %5, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 243048929
br i1 %12, label %13, label %14
13: ; preds = %0
br label %15
14: ; preds = %0
unreachable
15: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
define i32 @bar() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 1, i32* %1
%3 = load volatile i32, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
tail call void @abort()
unreachable
6: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ order(int, double *);
int /*<<< orphan*/ ranvec(int, double *);
void ordran(int n, double pbuf[]) {
  ranvec(n, pbuf);
  order(n, pbuf);
  return;
}


x86 assembly (clang, -O0):
<ordran>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <ranvec@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <order@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ordran>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <ranvec@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <order@plt>

LLVM IR (-O0):
define void @ordran(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load double*, double** %4
%7 = call i32 @ranvec(i32 %5, double* %6)
%8 = load i32, i32* %3
%9 = load double*, double** %4
%10 = call i32 @order(i32 %8, double* %9)
ret void
}

LLVM IR (-O2):
define void @ordran(i32 %0, double* %1) {
%3 = tail call i32 @ranvec(i32 %0, double* %1)
%4 = tail call i32 @order(i32 %0, double* %1)
ret void
}
int func(void) {
  int n = 3;
  int m = 5;
  n || m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    112b <func+0x2b>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func() {
%1 = alloca i32
%2 = alloca i32
store i32 3, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br label %8
8: ; preds = %5, %0
%9 = phi i1 [ true, %0 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 0
}

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
/* Variables and functions */
double aa_horner3(double, int, int, int);
double aa_tf_invsinc_series2(double theta2) {
  return aa_horner3(theta2, 1., 1. / 6, 7. / 360);
}


x86 assembly (clang, -O0):
<aa_tf_invsinc_series2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <aa_horner3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_tf_invsinc_series2>:
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <aa_horner3@plt>

LLVM IR (-O0):
define double @aa_tf_invsinc_series2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @aa_horner3(double %3, i32 1, i32 0, i32 0)
ret double %4
}

LLVM IR (-O2):
define double @aa_tf_invsinc_series2(double %0) {
%2 = tail call double @aa_horner3(double %0, i32 1, i32 0, i32 0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void aritmetica(void) {
  double vector[4] = {1.1, 2.2, 3.3, 4.4};
  double *p;
  int i;
  p = &vector[0];
  for (i = 0; i < 4; i++, p++)
    printf("%e\n", *p);
}


x86 assembly (clang, -O0):
<aritmetica>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jge    118b <aritmetica+0x7b>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
jmp    1153 <aritmetica+0x43>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aritmetica>:
push   %rbx
lea    0xf08(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xed8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xed0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xec8(%rip),%xmm0
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__const.aritmetica.vector = [4 x double] [double 1.100000e+00, double 2.200000e+00, double 3.300000e+00, double 4.400000e+00]
@.str = [4 x i8] c"%e\0A\00"
define void @aritmetica() {
%1 = alloca [4 x double]
%2 = alloca double*
%3 = alloca i32
%4 = bitcast [4 x double]* %1 to i8*
%5 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
store double* %5, double** %2
store i32 0, i32* %3
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load double*, double** %2
%11 = load double, double* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %11)
br label %13
13: ; preds = %9
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
%16 = load double*, double** %2
%17 = getelementptr inbounds double, double* %16, i32 1
store double* %17, double** %2
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%e\0A\00"
define void @aritmetica() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.100000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 2.200000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 3.300000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 4.400000e+00)
ret void
}
/* Variables and functions */
int f(int *);
main() {
  int i = 3;
  int got = f(&i);
  int __attribute((noderef)) *add_attr = &i;
  add_attr[2];
  return got;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 0, i32* %1
store i32 3, i32* %2
%5 = call i32 @f(i32* %2)
store i32 %5, i32* %3
store i32* %2, i32** %4
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 2
%8 = load i32, i32* %7
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%3 = call i32 @f(i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, size_t);
void __attribute__((weak)) __aeabi_memset_impl(void *dest, size_t n, int c) {
  memset(dest, c, n);
}


x86 assembly (clang, -O0):
<__aeabi_memset_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__aeabi_memset_impl>:
mov    %rsi,%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define weak void @__aeabi_memset_impl(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = load i64, i64* %5
%10 = call i32 @memset(i8* %7, i32 %8, i64 %9)
ret void
}

LLVM IR (-O2):
define weak void @__aeabi_memset_impl(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %2, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ determineWinner();
int /*<<< orphan*/ freeAll();
int /*<<< orphan*/ initialize_dealer();
int /*<<< orphan*/ initialize_player();
int /*<<< orphan*/ playDealersTurn();
int /*<<< orphan*/ playPlayersTurn();
int /*<<< orphan*/ player_busts();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  initialize_dealer();
  initialize_player();
  playPlayersTurn();
  if (!player_busts()) {
    playDealersTurn();
  }
  determineWinner();
  freeAll();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   10a0 <initialize_dealer@plt>
mov    $0x0,%al
call   1030 <initialize_player@plt>
mov    $0x0,%al
call   1050 <playPlayersTurn@plt>
mov    $0x0,%al
call   10b0 <player_busts@plt>
cmp    $0x0,%eax
jne    11db <main+0x4b>
mov    $0x0,%al
call   1090 <playDealersTurn@plt>
mov    $0x0,%al
call   1080 <determineWinner@plt>
mov    $0x0,%al
call   1040 <freeAll@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   10a0 <initialize_dealer@plt>
xor    %eax,%eax
call   1030 <initialize_player@plt>
xor    %eax,%eax
call   1050 <playPlayersTurn@plt>
xor    %eax,%eax
call   10b0 <player_busts@plt>
test   %eax,%eax
jne    11c6 <main+0x36>
xor    %eax,%eax
call   1090 <playDealersTurn@plt>
xor    %eax,%eax
call   1080 <determineWinner@plt>
xor    %eax,%eax
call   1040 <freeAll@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @initialize_dealer()
%5 = call i32 (...) @initialize_player()
%6 = call i32 (...) @playPlayersTurn()
%7 = call i32 (...) @player_busts()
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = call i32 (...) @playDealersTurn()
br label %11
11: ; preds = %9, %0
%12 = call i32 (...) @determineWinner()
%13 = call i32 (...) @freeAll()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @initialize_dealer()
%4 = tail call i32 (...) @initialize_player()
%5 = tail call i32 (...) @playPlayersTurn()
%6 = tail call i32 (...) @player_busts()
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = tail call i32 (...) @playDealersTurn()
br label %10
10: ; preds = %8, %0
%11 = tail call i32 (...) @determineWinner()
%12 = tail call i32 (...) @freeAll()
ret i32 0
}
/* Variables and functions */
long syscall(int, int);
long auditsec_register(int state) { return syscall(299, state); }


x86 assembly (clang, -O0):
<auditsec_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x12b,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auditsec_register>:
mov    %edi,%esi
mov    $0x12b,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i64 @auditsec_register(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @syscall(i32 299, i32 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @auditsec_register(i32 %0) {
%2 = tail call i64 @syscall(i32 299, i32 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ d();
void e() { d(); }


x86 assembly (clang, -O0):
<e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <d@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @e() {
%1 = call i32 (...) @d()
ret void
}

LLVM IR (-O2):
define void @e() {
%1 = tail call i32 (...) @d()
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int file_exists(const char *path) {
  struct stat buf;
  return stat(path, &buf) == 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ KIONIX_ACCEL_read_bytes(int, char *, int);
int /*<<< orphan*/ KIONIX_ACCEL_write_byte(int, char);
int KIONIX_ACCEL_reset(void) {
  char ctrl_reg3 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1D, &ctrl_reg3, 1) == 0) {
    ctrl_reg3 |= 0x80;
    KIONIX_ACCEL_write_byte(0x1D, ctrl_reg3);
  } else
    status = 1;
  return status;
}


x86 assembly (clang, -O0):
<KIONIX_ACCEL_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1d,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
cmp    $0x0,%rax
jne    116f <KIONIX_ACCEL_reset+0x4f>
movsbl -0x1(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x1(%rbp)
mov    $0x1d,%edi
movsbl -0x1(%rbp),%esi
call   1040 <KIONIX_ACCEL_write_byte@plt>
jmp    1176 <KIONIX_ACCEL_reset+0x56>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIONIX_ACCEL_reset>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1d,%edi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
test   %rax,%rax
jne    1161 <KIONIX_ACCEL_reset+0x41>
movsbl 0xf(%rsp),%esi
or     $0xffffff80,%esi
mov    %sil,0xf(%rsp)
mov    $0x1d,%edi
call   1040 <KIONIX_ACCEL_write_byte@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @KIONIX_ACCEL_reset() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 0, i32* %2
%3 = call i64 @KIONIX_ACCEL_read_bytes(i32 29, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = or i32 %7, 128
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @KIONIX_ACCEL_write_byte(i32 29, i8 signext %10)
br label %13
12: ; preds = %0
store i32 1, i32* %2
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @KIONIX_ACCEL_reset() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i64 @KIONIX_ACCEL_read_bytes(i32 29, i8* %1, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = or i8 %5, -128
store i8 %6, i8* %1
%7 = call i32 @KIONIX_ACCEL_write_byte(i32 29, i8 signext %6)
br label %8
8: ; preds = %0, %4
%9 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wFreeDebug(void *address) {
  if (address != NULL) {
    ;
    free(address);
  }
}


x86 assembly (clang, -O0):
<wFreeDebug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <wFreeDebug+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wFreeDebug>:
test   %rdi,%rdi
je     111a <wFreeDebug+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @wFreeDebug(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @wFreeDebug(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void CopyRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @CopyRow_Any_NEON() {
ret void
}