xunge/DecIR huggingface dataset:
int test_021(int a, int b, int c, int d) { return b + (a & 1) + b; }


x86 assembly (clang, -O0):
<test_021>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_021>:
and    $0x1,%edi
lea    (%rdi,%rsi,2),%eax
ret

LLVM IR (-O0):
define i32 @test_021(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = and i32 %10, 1
%12 = add nsw i32 %9, %11
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_021(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %0, 1
%6 = shl i32 %1, 1
%7 = or i32 %6, %5
ret i32 %7
}
/* Type definitions */
struct cal {
  int dummy;
};

/* Variables and functions */
int cal_init_file(char *, struct cal **);
int cal_init(struct cal **cal_out) {
  return cal_init_file("/dev/mtd1ro", cal_out);
}


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

x86 assembly (clang, -O2):
<cal_init>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <cal_init_file@plt>

LLVM IR (-O0):
%struct.cal = type { i32 }
@.str = [12 x i8] c"/dev/mtd1ro\00"
define i32 @cal_init(%struct.cal** %0) {
%2 = alloca %struct.cal**
store %struct.cal** %0, %struct.cal*** %2
%3 = load %struct.cal**, %struct.cal*** %2
%4 = call i32 @cal_init_file(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.cal** %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.cal = type { i32 }
@.str = [12 x i8] c"/dev/mtd1ro\00"
define i32 @cal_init(%struct.cal** %0) {
%2 = tail call i32 @cal_init_file(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.cal** %0)
ret i32 %2
}
print(string) char *string;
{ printf("%s", string); }


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

x86 assembly (clang, -O2):
<print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @print(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @print(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
int fun654() { return 654; }


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

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

LLVM IR (-O0):
define i32 @fun654() {
ret i32 654
}

LLVM IR (-O2):
define i32 @fun654() {
ret i32 654
}
/* Variables and functions */
int atoi(char const *);
char *om_sysfs_get(char *);
int om_screen_brightness_get() {
  const char *res = om_sysfs_get("brightness");
  if (res == NULL)
    return -1;
  return atoi(res);
}


x86 assembly (clang, -O0):
<om_screen_brightness_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <om_sysfs_get@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <om_screen_brightness_get+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <om_screen_brightness_get+0x3b>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_screen_brightness_get>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <om_sysfs_get@plt>
test   %rax,%rax
je     113b <om_screen_brightness_get+0x1b>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"brightness\00"
define i32 @om_screen_brightness_get() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* @om_sysfs_get(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %10
7: ; preds = %0
%8 = load i8*, i8** %2
%9 = call i32 @atoi(i8* %8)
store i32 %9, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [11 x i8] c"brightness\00"
define i32 @om_screen_brightness_get() {
%1 = tail call i8* @om_sysfs_get(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @atoi(i8* %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ -1, %0 ]
ret i32 %6
}
int jac_chain_nm9_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @jac_chain_nm9_free(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cson_free(void *, char const *);
void *realloc(void *, size_t);
void *cson_realloc(void *hint, size_t n, char const *descr) {
  if (0 == n) {
    cson_free(hint, descr);
    return NULL;
  } else {
    return realloc(hint, n);
  }
}


x86 assembly (clang, -O0):
<cson_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    115a <cson_realloc+0x3a>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <cson_free@plt>
movq   $0x0,-0x8(%rbp)
jmp    116b <cson_realloc+0x4b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cson_realloc>:
test   %rsi,%rsi
je     112a <cson_realloc+0xa>
jmp    1040 <realloc@plt>
push   %rax
mov    %rdx,%rsi
call   1030 <cson_free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @cson_realloc(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
%8 = load i64, i64* %6
%9 = icmp eq i64 0, %8
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = call i32 @cson_free(i8* %11, i8* %12)
store i8* null, i8** %4
br label %18
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = call i8* @realloc(i8* %15, i64 %16)
store i8* %17, i8** %4
br label %18
18: ; preds = %14, %10
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define noalias i8* @cson_realloc(i8* %0, i64 %1, i8* %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @cson_free(i8* %0, i8* %2)
br label %9
7: ; preds = %3
%8 = tail call i8* @realloc(i8* %0, i64 %1)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ null, %5 ], [ %8, %7 ]
ret i8* %10
}
int strcmp(const char *a, const char *b) {
  while (*a && (*a == *b)) {
    ;
    a++;
    b++;
  };
  return *a - *b;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1164 <strcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
test   %al,%al
je     1123 <strcmp+0x23>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
cmp    (%rsi),%al
jne    1125 <strcmp+0x25>
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <strcmp+0x10>
xor    %eax,%eax
movsbl %al,%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %20, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %13, %16
br label %18
18: ; preds = %10, %5
%19 = phi i1 [ false, %5 ], [ %17, %10 ]
br i1 %19, label %20, label %25
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %5
25: ; preds = %18
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = load i8*, i8** %4
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %28, %31
ret i32 %32
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %13, %11 ], [ %1, %2 ]
%8 = phi i8* [ %12, %11 ], [ %0, %2 ]
%9 = load i8, i8* %7
%10 = icmp eq i8 %6, %9
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i8* [ %1, %2 ], [ %13, %11 ], [ %7, %5 ]
%18 = phi i8 [ 0, %2 ], [ 0, %11 ], [ %6, %5 ]
%19 = sext i8 %18 to i32
%20 = load i8, i8* %17
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %19, %21
ret i32 %22
}
void EC_GROUP_check_discriminant(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @SPI6_IRQHandler() {
ret void
}
int this_is_just_here_to_make_automake_work() { return 0; }


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

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

LLVM IR (-O0):
define i32 @this_is_just_here_to_make_automake_work() {
ret i32 0
}

LLVM IR (-O2):
define i32 @this_is_just_here_to_make_automake_work() {
ret i32 0
}
/* Variables and functions */
int http_tosp_length(char, char const *);
int http_method_length(const char *s) { return http_tosp_length(' ', s); }


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

x86 assembly (clang, -O2):
<http_method_length>:
mov    %rdi,%rsi
mov    $0x20,%edi
jmp    1030 <http_tosp_length@plt>

LLVM IR (-O0):
define i32 @http_method_length(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @http_tosp_length(i8 signext 32, i8* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @http_method_length(i8* %0) {
%2 = tail call i32 @http_tosp_length(i8 signext 32, i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void version(void) { printf("%s\n", "0.27"); }


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

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"0.27\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long long unsignedlonglong_ignoring_unsignedshort(unsigned long long x,
                                                           unsigned short y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedlonglong_ignoring_unsignedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedlonglong_ignoring_unsignedshort>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsignedlonglong_ignoring_unsignedshort(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglong_ignoring_unsignedshort(i64 returned %0, i16 zeroext %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int n;
  scanf("%*d%*d%d", &n);
  printf("%d\n", n);
  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)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%*d%*d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DrawCenteredCircle(double, double, double);
int /*<<< orphan*/ InitGraphics();
main() {
  InitGraphics();
  DrawCenteredCircle(1.0, 1.0, 0.5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <InitGraphics@plt>
movsd  0xecd(%rip),%xmm1
movsd  0xecd(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <DrawCenteredCircle@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <InitGraphics@plt>
movsd  0xed0(%rip),%xmm0
movsd  0xed0(%rip),%xmm2
movaps %xmm0,%xmm1
call   1030 <DrawCenteredCircle@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @InitGraphics()
%2 = call i32 @DrawCenteredCircle(double 1.000000e+00, double 1.000000e+00, double 5.000000e-01)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @InitGraphics()
%2 = tail call i32 @DrawCenteredCircle(double 1.000000e+00, double 1.000000e+00, double 5.000000e-01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int ***);
int main() {
  int a = 1;
  int *pa = &a;
  int **ppa = &pa;
  int ***pppa = &ppa;
  foo(pppa);
  return a;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <foo@plt>
mov    0x4(%rsp),%eax
add    $0x18,%rsp
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 1, i32* %2
store i32* %2, i32** %3
store i32** %3, i32*** %4
store i32*** %4, i32**** %5
%6 = load i32***, i32**** %5
%7 = call i32 @foo(i32*** %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32**
%4 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%5 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%6 = bitcast i32*** %3 to i8*
store i32** %2, i32*** %3
%7 = call i32 @foo(i32*** %3)
%8 = load i32, i32* %1
ret i32 %8
}
/* Variables and functions */
char *eXdbmGetErrorString(int /*<<< orphan*/);
int /*<<< orphan*/ eXdbmGetLastError();
int /*<<< orphan*/ printf(char *, ...);
void ErrorMessage(void) {
  printf("\n*******************\n");
  printf("Error received : \n");
  printf("   ===> %s\n", eXdbmGetErrorString(eXdbmGetLastError()));
  printf("*******************\n");
}


x86 assembly (clang, -O0):
<ErrorMessage>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <eXdbmGetLastError@plt>
mov    %eax,%edi
call   1050 <eXdbmGetErrorString@plt>
mov    %rax,%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ErrorMessage>:
push   %rax
lea    0xec4(%rip),%rdi
call   1040 <puts@plt>
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <eXdbmGetLastError@plt>
mov    %eax,%edi
call   1060 <eXdbmGetErrorString@plt>
lea    0xe92(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8e(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"\0A*******************\0A\00"
@.str.1 = [19 x i8] c"Error received : \0A\00"
@.str.2 = [12 x i8] c" ===> %s\0A\00"
@.str.3 = [21 x i8] c"*******************\0A\00"
define void @ErrorMessage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @eXdbmGetLastError()
%4 = call i8* @eXdbmGetErrorString(i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [12 x i8] c" ===> %s\0A\00"
@str = [21 x i8] c"\0A*******************\00"
@str.4 = [18 x i8] c"Error received : \00"
@str.5 = [20 x i8] c"*******************\00"
define void @ErrorMessage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 (...) @eXdbmGetLastError()
%4 = tail call i8* @eXdbmGetErrorString(i32 %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
ret void
}
/* Variables and functions */
int isatty(int);
int isTerminalRunning() { return isatty(1); }


x86 assembly (clang, -O0):
<isTerminalRunning>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <isatty@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTerminalRunning>:
mov    $0x1,%edi
jmp    1030 <isatty@plt>

LLVM IR (-O0):
define i32 @isTerminalRunning() {
%1 = call i32 @isatty(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @isTerminalRunning() {
%1 = tail call i32 @isatty(i32 1)
ret i32 %1
}
void UARTEnableRX(void) { *((char *)0xFFFFFFE2) = *((char *)0xFFFFFFE2) | 1; }


x86 assembly (clang, -O0):
<UARTEnableRX>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffe2,%eax
movsbl (%rax),%eax
or     $0x1,%eax
mov    %al,%cl
mov    $0xffffffe2,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTEnableRX>:
mov    $0xffffffe2,%eax
orb    $0x1,(%rax)
ret

LLVM IR (-O0):
define void @UARTEnableRX() {
%1 = load i8, i8* inttoptr (i64 4294967266 to i8*)
%2 = sext i8 %1 to i32
%3 = or i32 %2, 1
%4 = trunc i32 %3 to i8
store i8 %4, i8* inttoptr (i64 4294967266 to i8*)
ret void
}

LLVM IR (-O2):
define void @UARTEnableRX() {
%1 = load i8, i8* inttoptr (i64 4294967266 to i8*)
%2 = or i8 %1, 1
store i8 %2, i8* inttoptr (i64 4294967266 to i8*)
ret void
}
signed long long int
signedlonglongint_ignoring_signedchar(signed long long int x, signed char y) {
  return x;
}


x86 assembly (clang, -O0):
<signedlonglongint_ignoring_signedchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedlonglongint_ignoring_signedchar>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlonglongint_ignoring_signedchar(i64 %0, i8 signext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlonglongint_ignoring_signedchar(i64 returned %0, i8 signext %1) {
ret i64 %0
}
int descending(int num0, int num1) { return num0 < num1; }


x86 assembly (clang, -O0):
<descending>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<descending>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @descending(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 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @descending(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
float ldexp(float, int);
float Float_ldexp(float x, int exponent) { return ldexp(x, exponent); }


x86 assembly (clang, -O0):
<Float_ldexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
call   1030 <ldexp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Float_ldexp>:
jmp    1030 <ldexp@plt>

LLVM IR (-O0):
define float @Float_ldexp(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
store i32 %1, i32* %4
%5 = load float, float* %3
%6 = load i32, i32* %4
%7 = call float @ldexp(float %5, i32 %6)
ret float %7
}

LLVM IR (-O2):
define float @Float_ldexp(float %0, i32 %1) {
%3 = tail call float @ldexp(float %0, i32 %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog_name) {
  fprintf(stderr,
          "Usage: %s\n"
          "Vigenere mode (default): -v(igenere) (-e(ncrypt)/-d(ecrpyt) "
          "-p(assword) [password]\n"
          "Caesar mode: -c(aesar) -r(otation) [rot]\n"
          "Base conversion mode: -b(ase) [base]\n"
          "Other: -h(elp)\n",
          prog_name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [187 x i8] c"Usage: %s\0AVigenere mode (default): -v(igenere) (-e(ncrypt)/-d(ecrpyt) -p(assword) [password]\0ACaesar mode: -c(aesar) -r(otation) [rot]\0ABase conversion mode: -b(ase) [base]\0AOther: -h(elp)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [187 x i8] c"Usage: %s\0AVigenere mode (default): -v(igenere) (-e(ncrypt)/-d(ecrpyt) -p(assword) [password]\0ACaesar mode: -c(aesar) -r(otation) [rot]\0ABase conversion mode: -b(ase) [base]\0AOther: -h(elp)\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ write_com_4bit(int);
void lcd_shift_reverse() {
  write_com_4bit(0x0004 | 0x0000 | 0x0001);
  while (write_com_4bit(0x0100) != 0)
    ;
}


x86 assembly (clang, -O0):
<lcd_shift_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <write_com_4bit@plt>
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
cmp    $0x0,%rax
je     1137 <lcd_shift_reverse+0x27>
jmp    111e <lcd_shift_reverse+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_shift_reverse>:
push   %rax
mov    $0x5,%edi
call   1030 <write_com_4bit@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
test   %rax,%rax
jne    1120 <lcd_shift_reverse+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @lcd_shift_reverse() {
%1 = call i64 @write_com_4bit(i32 5)
br label %2
2: ; preds = %5, %0
%3 = call i64 @write_com_4bit(i32 256)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @lcd_shift_reverse() {
%1 = tail call i64 @write_com_4bit(i32 5)
br label %2
2: ; preds = %2, %0
%3 = tail call i64 @write_com_4bit(i32 256)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}
/* Variables and functions */
int sprintf(char *, char *, unsigned char);
void string_escape_hex(char c, char *replstr, int *replstr_len, int *op) {
  *op = 2;
  *replstr_len = sprintf(replstr, "\\x%x", (unsigned char)c);
}


x86 assembly (clang, -O0):
<string_escape_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
movzbl -0x1(%rbp),%edx
call   1030 <sprintf@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_escape_hex>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%rax
movl   $0x2,(%rcx)
movzbl %dil,%edx
lea    0xed8(%rip),%rsi
mov    %rax,%rdi
call   1030 <sprintf@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\\x%x\00"
define void @string_escape_hex(i8 signext %0, i8* %1, i32* %2, i32* %3) {
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
store i8 %0, i8* %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %8
store i32 2, i32* %9
%10 = load i8*, i8** %6
%11 = load i8, i8* %5
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %11)
%13 = load i32*, i32** %7
store i32 %12, i32* %13
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\\x%x\00"
define void @string_escape_hex(i8 signext %0, i8* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
store i32 2, i32* %3
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
store i32 %5, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int test = ~0;
  int counter = 0;
  for (; test; test <<= 1, counter++)
    ;
  printf("%d bits\n", counter);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1153 <main+0x43>
jmp    113c <main+0x2c>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"%d bits\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load i32, i32* %2
%10 = shl i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d bits\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 32)
ret i32 0
}
void XtRemoveGrab() {}


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

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

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

LLVM IR (-O2):
define void @XtRemoveGrab() {
ret void
}
/* Type definitions */
struct _tuple14 {
  int dummy;
};
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
struct _tuple14 *Cyc_suck_line_rec(struct Cyc_Lexing_lexbuf *, int);
struct _tuple14 *Cyc_suck_line(struct Cyc_Lexing_lexbuf *lexbuf) {
  struct _tuple14 *_T0;
  _T0 = Cyc_suck_line_rec(lexbuf, 10);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_suck_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <Cyc_suck_line_rec@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_suck_line>:
mov    $0xa,%esi
jmp    1030 <Cyc_suck_line_rec@plt>

LLVM IR (-O0):
%struct._tuple14 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple14* @Cyc_suck_line(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca %struct._tuple14*
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call %struct._tuple14* @Cyc_suck_line_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 10)
store %struct._tuple14* %5, %struct._tuple14** %3
%6 = load %struct._tuple14*, %struct._tuple14** %3
ret %struct._tuple14* %6
}

LLVM IR (-O2):
%struct._tuple14 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple14* @Cyc_suck_line(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call %struct._tuple14* @Cyc_suck_line_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 10)
ret %struct._tuple14* %2
}
void exynos_update_ip_idle_status(int index, int idle) { return; }


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

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

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

LLVM IR (-O2):
define void @exynos_update_ip_idle_status(i32 %0, i32 %1) {
ret void
}
void xml_free_converted_attrs(const char **attr) {}


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

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

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

LLVM IR (-O2):
define void @xml_free_converted_attrs(i8** nocapture %0) {
ret void
}
char *sdup(s)
register const char *s;
{
  int n = strlen(s) + 1;
  char *cp = newchunk(n);
  strcpy(cp, s);
  return (cp);
}


x86 assembly (clang, -O0):
<sdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1050 <newchunk@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
xor    %eax,%eax
call   1050 <newchunk@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @sdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add i64 %6, 1
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 (i32, ...) bitcast (i32 (...)* @newchunk to i32 (i32, ...)*)(i32 %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %2
%15 = call i8* @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @sdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @newchunk to i32 (i32, ...)*)(i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i8* @strcpy(i8* dereferenceable(1) %7, i8* dereferenceable(1) %0)
ret i8* %7
}
void foo_2_2_2_2_2_1_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_2_2_1_1_2_1() {
ret void
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int, int /*<<< orphan*/, int, int);
scalar_t__ owl_escape_value(int);
int autohelperowl_attackpat74(struct pattern *patt, int transformation,
                              int move, int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-1, 0, move, transformation);
  return owl_escape_value(a) > 0;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat74>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <owl_escape_value@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat74>:
push   %rax
mov    %esi,%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <offset@plt>
mov    %eax,%edi
call   1030 <owl_escape_value@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat74(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -1, i32 0, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i64 @owl_escape_value(i32 %18)
%20 = icmp sgt i64 %19, 0
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat74(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -1, i32 0, i32 %2, i32 %1)
%7 = tail call i64 @owl_escape_value(i32 %6)
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ESimdInit(int);
void epic_init(int simd) { ESimdInit(simd); }


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

x86 assembly (clang, -O2):
<epic_init>:
jmp    1030 <ESimdInit@plt>

LLVM IR (-O0):
define void @epic_init(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ESimdInit(i32 %3)
ret void
}

LLVM IR (-O2):
define void @epic_init(i32 %0) {
%2 = tail call i32 @ESimdInit(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__29__IO__clr();
void Msp430GpioC__9__HplGeneralIO__clr(void) {
  HplMsp430GeneralIOP__29__IO__clr();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__9__HplGeneralIO__clr() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__29__IO__clr()
ret void
}
/* Variables and functions */
int a();
int b();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i = a() + b();
  if (i > 0) {
    printf("%d\n", i);
  } else {
    printf("TEH FUCK\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <a@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <b@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    117a <main+0x4a>
mov    -0x8(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1188 <main+0x58>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <a@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <b@plt>
add    %ebx,%eax
jle    1167 <main+0x27>
lea    0xea4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1173 <main+0x33>
lea    0xe96(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [10 x i8] c"TEH FUCK\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @a()
%4 = call i32 (...) @b()
%5 = add nsw i32 %3, %4
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %13
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@str = [9 x i8] c"TEH FUCK\00"
define i32 @main() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @b()
%3 = add nsw i32 %2, %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %9
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main() {
  f();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct binder_io {
  int dummy;
};
typedef int /*<<< orphan*/ n;

/* Variables and functions */
int /*<<< orphan*/ *bio_alloc(struct binder_io *, int);
void bio_put_uint32(struct binder_io *bio, uint32_t n) {
  uint32_t *ptr = bio_alloc(bio, sizeof(n));
  if (ptr)
    *ptr = n;
}


x86 assembly (clang, -O0):
<bio_put_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <bio_alloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1145 <bio_put_uint32+0x35>
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bio_put_uint32>:
push   %rbx
mov    %esi,%ebx
mov    $0x4,%esi
call   1030 <bio_alloc@plt>
test   %rax,%rax
je     1124 <bio_put_uint32+0x14>
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
%struct.binder_io = type { i32 }
define void @bio_put_uint32(%struct.binder_io* %0, i32 %1) {
%3 = alloca %struct.binder_io*
%4 = alloca i32
%5 = alloca i32*
store %struct.binder_io* %0, %struct.binder_io** %3
store i32 %1, i32* %4
%6 = load %struct.binder_io*, %struct.binder_io** %3
%7 = call i32* @bio_alloc(%struct.binder_io* %6, i32 4)
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32*, i32** %5
store i32 %11, i32* %12
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.binder_io = type { i32 }
define void @bio_put_uint32(%struct.binder_io* %0, i32 %1) {
%3 = tail call i32* @bio_alloc(%struct.binder_io* %0, i32 4)
%4 = icmp eq i32* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
store i32 %1, i32* %3
br label %6
6: ; preds = %5, %2
ret void
}
/* Variables and functions */
char *strchr(char *, char);
unsigned long strtoul(char *, int /*<<< orphan*/ *, unsigned int);
unsigned long get_long(char **start, char search, unsigned int base) {
  char *ptr1, *ptr2;
  ptr1 = *start;
  if ((ptr2 = strchr(ptr1, search)) == NULL)
    return 0;
  *ptr2 = '\0';
  *start = ptr2;
  return strtoul(ptr1, NULL, base);
}


x86 assembly (clang, -O0):
<get_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    1168 <get_long+0x48>
movq   $0x0,-0x8(%rbp)
jmp    118e <get_long+0x6e>
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <strtoul@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_long>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rdi,%rbp
mov    (%rdi),%rbx
mov    %rbx,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     1152 <get_long+0x32>
movb   $0x0,(%rax)
mov    %rax,0x0(%rbp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <strtoul@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @get_long(i8** %0, i8 signext %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
store i8** %0, i8*** %5
store i8 %1, i8* %6
store i32 %2, i32* %7
%10 = load i8**, i8*** %5
%11 = load i8*, i8** %10
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = load i8, i8* %6
%14 = call i8* @strchr(i8* %12, i8 signext %13)
store i8* %14, i8** %9
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %3
store i64 0, i64* %4
br label %24
17: ; preds = %3
%18 = load i8*, i8** %9
store i8 0, i8* %18
%19 = load i8*, i8** %9
%20 = load i8**, i8*** %5
store i8* %19, i8** %20
%21 = load i8*, i8** %8
%22 = load i32, i32* %7
%23 = call i64 @strtoul(i8* %21, i32* null, i32 %22)
store i64 %23, i64* %4
br label %24
24: ; preds = %17, %16
%25 = load i64, i64* %4
ret i64 %25
}

LLVM IR (-O2):
define i64 @get_long(i8** nocapture %0, i8 signext %1, i32 %2) {
%4 = load i8*, i8** %0
%5 = tail call i8* @strchr(i8* dereferenceable(1) %4, i8 signext %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %3
store i8 0, i8* %5
store i8* %5, i8** %0
%8 = tail call i64 @strtoul(i8* nocapture %4, i32* null, i32 %2)
br label %9
9: ; preds = %3, %7
%10 = phi i64 [ %8, %7 ], [ 0, %3 ]
ret i64 %10
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int clear_quaddobl_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(184, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<clear_quaddobl_homotopy>:
mov    $0xb8,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @clear_quaddobl_homotopy() {
%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_c2phc(i32 184, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_quaddobl_homotopy() {
%1 = tail call i32 @_ada_use_c2phc(i32 184, i32* undef, i32* undef, double* undef)
ret i32 %1
}