xunge/DecIR huggingface dataset:
void SteamAPI_ISteamMusic_Play(void *self) {
  xlogf("%s(self = %p)", __func__, self);
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"%s(self = %p)\00"
@__func__.SteamAPI_ISteamMusic_Play = [26 x i8] c"SteamAPI_ISteamMusic_Play\00"
define void @SteamAPI_ISteamMusic_Play(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @__func__.SteamAPI_ISteamMusic_Play, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s(self = %p)\00"
@__func__.SteamAPI_ISteamMusic_Play = [26 x i8] c"SteamAPI_ISteamMusic_Play\00"
define void @SteamAPI_ISteamMusic_Play(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @__func__.SteamAPI_ISteamMusic_Play, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_2Buint8_mem(unsigned char *val) {
  return ((*val) & (0x2B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_2Buint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 43
%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_2Buint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 43
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
char lower(char c) {
  if (c >= 'A' && c <= 'Z')
    return c + ('a' - 'A');
  return c;
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <lower+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <lower+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <lower+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @lower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @lower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_spinlock_t;

/* Variables and functions */
int pthread_spin_trylock(int /*<<< orphan*/ *);
int __attribute__((unused)) ___pthread_spin_trylock(pthread_spinlock_t *spin) {
  return pthread_spin_trylock(spin);
}


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

x86 assembly (clang, -O2):
<___pthread_spin_trylock>:
jmp    1030 <pthread_spin_trylock@plt>

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

LLVM IR (-O2):
define i32 @___pthread_spin_trylock(i32* %0) {
%2 = tail call i32 @pthread_spin_trylock(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Hello world!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(void const *, void const *);
bool comp(const void *data_given, const void *data_in_node) {
  return (strcmp(data_given, data_in_node) == 0);
}


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

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

LLVM IR (-O0):
define i32 @comp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @comp(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int create_path(char *);
scalar_t__ file_exists(char *);
int remove(char *);
int init_output_file(char *filename) {
  if (file_exists(filename)) {
    return remove(filename);
  } else {
    return create_path(filename);
  }
}


x86 assembly (clang, -O0):
<init_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <file_exists@plt>
cmp    $0x0,%rax
je     1160 <init_output_file+0x30>
mov    -0x10(%rbp),%rdi
call   1030 <remove@plt>
mov    %eax,-0x4(%rbp)
jmp    116c <init_output_file+0x3c>
mov    -0x10(%rbp),%rdi
call   1050 <create_path@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_output_file>:
push   %rbx
mov    %rdi,%rbx
call   1040 <file_exists@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1147 <init_output_file+0x17>
pop    %rbx
jmp    1030 <remove@plt>
pop    %rbx
jmp    1050 <create_path@plt>

LLVM IR (-O0):
define i32 @init_output_file(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @file_exists(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @remove(i8* %8)
store i32 %9, i32* %2
br label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @create_path(i8* %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @init_output_file(i8* %0) {
%2 = tail call i64 @file_exists(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @remove(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @create_path(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int);
void list_all() { print("abcdefghijklmnopqrstuvwxyz 0123456789!", true); }


x86 assembly (clang, -O0):
<list_all>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_all>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"abcdefghijklmnopqrstuvwxyz 0123456789!\00"
define void @list_all() {
%1 = call i32 @print(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"abcdefghijklmnopqrstuvwxyz 0123456789!\00"
define void @list_all() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const_DES_cblock;
typedef int /*<<< orphan*/ DES_key_schedule;

/* Variables and functions */
int /*<<< orphan*/ DES_key_sched(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void des_key_sched(const_DES_cblock *k, DES_key_schedule ks) {
  DES_key_sched(k, &ks);
}


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

x86 assembly (clang, -O2):
<des_key_sched>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <DES_key_sched@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @des_key_sched(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 = call i32 @DES_key_sched(i32* %5, i32* %4)
ret void
}

LLVM IR (-O2):
define void @des_key_sched(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @DES_key_sched(i32* %0, i32* %3)
ret void
}
void av_dict_get() {}


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

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

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

LLVM IR (-O2):
define void @av_dict_get() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void Exit() { _exit(1); }


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

x86 assembly (clang, -O2):
<Exit>:
push   %rax
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @Exit() {
%1 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @Exit() {
%1 = tail call i32 @_exit(i32 1)
unreachable
}
void foo() { ; }


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tcp_lp_unregister();
void module_unregister_fake(void) {
  if (0)
    tcp_lp_unregister();
}


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

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

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

LLVM IR (-O2):
define void @module_unregister_fake() {
ret void
}
/* Variables and functions */
unsigned int lrand48();
unsigned int quick_rand32(void) {
  static unsigned int accu = 2147483563;
  accu = 1664525 * accu + 1013904223;
  return accu + lrand48();
}


x86 assembly (clang, -O0):
<quick_rand32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
imul   $0x19660d,0x2f06(%rip),%eax
add    $0x3c6ef35f,%eax
mov    %eax,0x2efb(%rip)
mov    0x2ef5(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lrand48@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_rand32>:
push   %rbx
imul   $0x19660d,0x2f0d(%rip),%ebx
lea    0x3c6ef35f(%rbx),%eax
mov    %eax,0x2f01(%rip)
xor    %eax,%eax
call   1030 <lrand48@plt>
add    %ebx,%eax
add    $0x3c6ef35f,%eax
pop    %rbx
ret

LLVM IR (-O0):
@quick_rand32.accu = internal global i32 2147483563
define i32 @quick_rand32() {
%1 = load i32, i32* @quick_rand32.accu
%2 = mul i32 1664525, %1
%3 = add i32 %2, 1013904223
store i32 %3, i32* @quick_rand32.accu
%4 = load i32, i32* @quick_rand32.accu
%5 = call i32 (...) @lrand48()
%6 = add i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
@quick_rand32.accu = internal unnamed_addr global i32 2147483563
define i32 @quick_rand32() {
%1 = load i32, i32* @quick_rand32.accu
%2 = mul i32 %1, 1664525
%3 = add i32 %2, 1013904223
store i32 %3, i32* @quick_rand32.accu
%4 = tail call i32 (...) @lrand48()
%5 = add i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x67() {
  Assert_real((isascii(103)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              520, ("isascii should be 1 for g"));
}


x86 assembly (clang, -O0):
<t_isascii_0x67>:
push   %rbp
mov    %rsp,%rbp
mov    $0x67,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x208,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x67>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x208,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for g\00"
define void @t_isascii_0x67() {
%1 = call i32 @isascii(i32 103)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for g\00"
define void @t_isascii_0x67() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fmul_preg64_qword(int reg64) {
  put8(0xDC);
  put8(0x08 + reg64);
}


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

x86 assembly (clang, -O2):
<fmul_preg64_qword>:
push   %rbx
mov    %edi,%ebx
mov    $0xdc,%edi
call   1030 <put8@plt>
add    $0x8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fmul_preg64_qword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 220)
%4 = load i32, i32* %2
%5 = add nsw i32 8, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fmul_preg64_qword(i32 %0) {
%2 = tail call i32 @put8(i32 220)
%3 = add nsw i32 %0, 8
%4 = tail call i32 @put8(i32 %3)
ret void
}
int a(int i) { return i / 2; }


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @a(i32 %0) {
%2 = sdiv i32 %0, 2
ret i32 %2
}
unsigned long bar(unsigned char c) {
  unsigned long l;
  unsigned int i;
  i = ((unsigned int)c) << 8;
  i |= ((unsigned int)c) << 20;
  asm volatile("" :::);
  i = i & 0x07f007f0;
  asm volatile("" :::);
  l = (unsigned long)i;
  return l;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x14,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0x7f007f0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
imul   $0x100100,%edi,%eax
and    $0x7f00700,%eax
ret

LLVM IR (-O0):
define i64 @bar(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i64
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
store i32 %7, i32* %4
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 20
%11 = load i32, i32* %4
%12 = or i32 %11, %10
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = and i32 %13, 133171184
store i32 %14, i32* %4
%15 = load i32, i32* %4
%16 = zext i32 %15 to i64
store i64 %16, i64* %3
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @bar(i8 zeroext %0) {
%2 = zext i8 %0 to i64
%3 = mul nuw nsw i64 %2, 1048832
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%4 = and i64 %3, 133170944
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret i64 %4
}
void CRYPTO_get_dynlock_lock_callback(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_get_dynlock_lock_callback() {
ret void
}
/* Variables and functions */
int auditwarnlog(char **);
int audit_warn_soft(char *filename) {
  char *args[3];
  args[0] = "soft";
  args[1] = filename;
  args[2] = NULL;
  return (auditwarnlog(args));
}


x86 assembly (clang, -O0):
<audit_warn_soft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <auditwarnlog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audit_warn_soft>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
mov    %rdi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <auditwarnlog@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"soft\00"
define i32 @audit_warn_soft(i8* %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 1
store i8* %0, i8** %5
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 2
store i8* null, i8** %6
%7 = call i32 @auditwarnlog(i8** %4)
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  void *opaque;
  void *zfree;
  void *zalloc;
};
typedef TYPE_1__ z_stream;

/* Variables and functions */
void *Z_NULL;
void z_stream_init(z_stream *stream) {
  stream->zalloc = Z_NULL;
  stream->zfree = Z_NULL;
  stream->opaque = Z_NULL;
}


x86 assembly (clang, -O0):
<z_stream_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    0x2ebf(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    0x2ead(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<z_stream_init>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rdi)
mov    %rax,0x8(%rdi)
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8*, i8*, i8* }
@Z_NULL = global i8* null
define void @z_stream_init(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load i8*, i8** @Z_NULL
%4 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 2
store i8* %3, i8** %5
%6 = load i8*, i8** @Z_NULL
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 1
store i8* %6, i8** %8
%9 = load i8*, i8** @Z_NULL
%10 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %10, i32 0, i32 0
store i8* %9, i8** %11
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8*, i8*, i8* }
@Z_NULL = global i8* null
define void @z_stream_init(%struct.TYPE_3__* nocapture writeonly %0) {
%2 = load i8*, i8** @Z_NULL
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 2
store i8* %2, i8** %3
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
store i8* %2, i8** %4
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
store i8* %2, i8** %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, int);
double qq();
int main(void) {
  double r = qq();
  printf("answer is %f %d\n", r, (int)r);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <qq@plt>
cvttsd2si %xmm0,%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"answer is %f %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double (...) @qq()
store double %3, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fptosi double %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %4, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"answer is %f %d\0A\00"
define i32 @main() {
%1 = tail call double (...) @qq()
%2 = fptosi double %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %1, i32 %2)
ret i32 0
}
/* Variables and functions */
int add1(int, int);
int add2(int, int, int);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int x, y;
  x = add1(40, 2);
  y = add2(100, -5, -20);
  printf("got: %d %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x28,%edi
mov    $0x2,%esi
call   1040 <add1@plt>
mov    %eax,-0x8(%rbp)
mov    $0x64,%edi
mov    $0xfffffffb,%esi
mov    $0xffffffec,%edx
call   1050 <add2@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x28,%edi
mov    $0x2,%esi
call   1040 <add1@plt>
mov    %eax,%ebx
mov    $0x64,%edi
mov    $0xfffffffb,%esi
mov    $0xffffffec,%edx
call   1050 <add2@plt>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"got: %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @add1(i32 40, i32 2)
%2 = tail call i32 @add2(i32 100, i32 -5, i32 -20)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ generic_cpu_swap16p(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
void cpu_swap16p(uint16_t *outp, uint16_t in) { generic_cpu_swap16p(outp, in); }


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

x86 assembly (clang, -O2):
<cpu_swap16p>:
jmp    1030 <generic_cpu_swap16p@plt>

LLVM IR (-O0):
define void @cpu_swap16p(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 = call i32 @generic_cpu_swap16p(i32* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @cpu_swap16p(i32* %0, i32 %1) {
%3 = tail call i32 @generic_cpu_swap16p(i32* %0, i32 %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ mode_t;

/* Variables and functions */
scalar_t__ umask(int /*<<< orphan*/);
uint32_t getumask(void) {
  static char done;
  static mode_t mask;
  if (!done) {
    done = 1;
    mask = 0777 - umask(0);
  }
  return (mask);
}


x86 assembly (clang, -O0):
<getumask>:
push   %rbp
mov    %rsp,%rbp
cmpb   $0x0,0x2f15(%rip)
jne    1141 <getumask+0x31>
movb   $0x1,0x2f08(%rip)
xor    %edi,%edi
call   1030 <umask@plt>
mov    %rax,%rcx
mov    $0x1ff,%eax
sub    %rcx,%rax
mov    %rax,0x2ef7(%rip)
mov    0x2ef0(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getumask>:
push   %rax
cmpb   $0x1,0x2f18(%rip)
jne    1123 <getumask+0x13>
mov    0x2f17(%rip),%rax
pop    %rcx
ret
movb   $0x1,0x2f06(%rip)
xor    %edi,%edi
call   1030 <umask@plt>
mov    %rax,%rcx
mov    $0x1ff,%eax
sub    %rcx,%rax
mov    %rax,0x2ef5(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@getumask.done = internal global i8 0
@getumask.mask = internal global i64 0
define i64 @getumask() {
%1 = load i8, i8* @getumask.done
%2 = icmp ne i8 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
store i8 1, i8* @getumask.done
%4 = call i64 @umask(i32 0)
%5 = sub nsw i64 511, %4
store i64 %5, i64* @getumask.mask
br label %6
6: ; preds = %3, %0
%7 = load i64, i64* @getumask.mask
ret i64 %7
}

LLVM IR (-O2):
@getumask.done = internal unnamed_addr global i1 false
@getumask.mask = internal unnamed_addr global i64 0
define i64 @getumask() {
%1 = load i1, i1* @getumask.done
br i1 %1, label %2, label %4
2: ; preds = %0
%3 = load i64, i64* @getumask.mask
br label %7
4: ; preds = %0
store i1 true, i1* @getumask.done
%5 = tail call i64 @umask(i32 0)
%6 = sub nsw i64 511, %5
store i64 %6, i64* @getumask.mask
br label %7
7: ; preds = %2, %4
%8 = phi i64 [ %3, %2 ], [ %6, %4 ]
ret i64 %8
}
/* Variables and functions */
char *strcpy(char *, char *);
char *copy(char *buf, char *str) { return strcpy(buf, str); }


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

x86 assembly (clang, -O2):
<copy>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @copy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @strcpy(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @copy(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct timeval {
  int dummy;
};

/* Variables and functions */
int sendto_u(int, int /*<<< orphan*/ *, size_t, struct timeval,
             int /*<<< orphan*/ *);
int send_u(int sock, uint8_t *buf, size_t buflen, struct timeval wait) {
  return sendto_u(sock, buf, buflen, wait, NULL);
}


x86 assembly (clang, -O0):
<send_u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %ecx,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <sendto_u@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_u>:
xor    %r8d,%r8d
jmp    1030 <sendto_u@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @send_u(i32 %0, i32* %1, i64 %2, i32 %3) {
%5 = alloca %struct.timeval
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i64
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i32 %3, i32* %9
store i32 %0, i32* %6
store i32* %1, i32** %7
store i64 %2, i64* %8
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i64, i64* %8
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @sendto_u(i32 %10, i32* %11, i64 %12, i32 %14, i32* null)
ret i32 %15
}

LLVM IR (-O2):
define i32 @send_u(i32 %0, i32* %1, i64 %2, i32 %3) {
%5 = tail call i32 @sendto_u(i32 %0, i32* %1, i64 %2, i32 %3, i32* null)
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XClientMessageEvent;

/* Variables and functions */
int get_XClientMessageEvent_type(void *_p) {
  return (int)((XClientMessageEvent *)_p)->type;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XClientMessageEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
__attribute__((section(".after_vectors"))) void M0_PendSV_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<M0_PendSV_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <M0_PendSV_Handler+0x9>
jmp    1109 <M0_PendSV_Handler+0x9>

x86 assembly (clang, -O2):
<M0_PendSV_Handler>:
jmp    1100 <M0_PendSV_Handler>

LLVM IR (-O0):
define void @M0_PendSV_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @M0_PendSV_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
bool FILE_SIZE_VALID(uint64_t l) { return (l >> 63) == 0; }


x86 assembly (clang, -O0):
<FILE_SIZE_VALID>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @FILE_SIZE_VALID(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 63
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @FILE_SIZE_VALID(i32 %0) {
ret i32 poison
}
int score_to_l_code(unsigned int score) { return score ^ 0xDEADBEEF; }


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

x86 assembly (clang, -O2):
<score_to_l_code>:
mov    %edi,%eax
xor    $0xdeadbeef,%eax
ret

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

LLVM IR (-O2):
define i32 @score_to_l_code(i32 %0) {
%2 = xor i32 %0, -559038737
ret i32 %2
}
void definestring(str) char *str;
{ defineorundefinestring(str, 1); }


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

x86 assembly (clang, -O2):
<definestring>:
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <defineorundefinestring@plt>

LLVM IR (-O0):
define void @definestring(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @defineorundefinestring to i32 (i8*, i32, ...)*)(i8* %3, i32 1)
ret void
}

LLVM IR (-O2):
define void @definestring(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @defineorundefinestring to i32 (i8*, i32, ...)*)(i8* %0, i32 1)
ret void
}
unsigned int f91(unsigned int x, int y __attribute__((unused))) {
  return (x << ((-1) & (8 * sizeof(unsigned int) - 1))) + (x >> 1);
}


x86 assembly (clang, -O0):
<f91>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1f,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f91(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 = shl i32 %5, 31
%7 = load i32, i32* %3
%8 = lshr i32 %7, 1
%9 = add i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f91(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 31)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float h;
  printf("Area em hectares: ");
  scanf("%f", &h);
  printf("Area em Metros Quadrados: %.2f", h * 10000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeab(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
mulss  0xeb2(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Area em hectares: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [31 x i8] c"Area em Metros Quadrados: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fmul float %5, 1.000000e+04
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Area em hectares: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [31 x i8] c"Area em Metros Quadrados: %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fmul float %5, 1.000000e+04
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
int do_421() { return 421; }


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

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

LLVM IR (-O0):
define i32 @do_421() {
ret i32 421
}

LLVM IR (-O2):
define i32 @do_421() {
ret i32 421
}
/* Variables and functions */
int /*<<< orphan*/ crunched_usage();
int main(int, char **, char **);
int crunched_main(int argc, char **argv, char **envp) {
  if (argc <= 1)
    crunched_usage();
  return main(--argc, ++argv, envp);
}


x86 assembly (clang, -O0):
<crunched_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jg     1144 <crunched_main+0x24>
mov    $0x0,%al
call   1030 <crunched_usage@plt>
mov    -0x4(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
call   1040 <main@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crunched_main>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0x1,%edi
jg     1138 <crunched_main+0x18>
xor    %eax,%eax
call   1030 <crunched_usage@plt>
add    $0xffffffff,%ebp
add    $0x8,%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <main@plt>

LLVM IR (-O0):
define i32 @crunched_main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 (...) @crunched_usage()
br label %11
11: ; preds = %9, %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, -1
store i32 %13, i32* %4
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i32 1
store i8** %15, i8*** %5
%16 = load i8**, i8*** %6
%17 = call i32 @main(i32 %13, i8** %15, i8** %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @crunched_main(i32 %0, i8** %1, i8** %2) {
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (...) @crunched_usage()
br label %7
7: ; preds = %5, %3
%8 = add nsw i32 %0, -1
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = tail call i32 @main(i32 %8, i8** %9, i8** %2)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ echo_to_all(int, char *, int /*<<< orphan*/);
void start_fall(void) {
  echo_to_all(
      3, "The leaves begin changing colors signaling the start of fall.\r\n",
      0);
  return;
}


x86 assembly (clang, -O0):
<start_fall>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
lea    0xee0(%rip),%rsi
xor    %edx,%edx
call   1030 <echo_to_all@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_fall>:
lea    0xee9(%rip),%rsi
mov    $0x3,%edi
xor    %edx,%edx
jmp    1030 <echo_to_all@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"The leaves begin changing colors signaling the start of fall.\0D\0A\00"
define void @start_fall() {
%1 = call i32 @echo_to_all(i32 3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"The leaves begin changing colors signaling the start of fall.\0D\0A\00"
define void @start_fall() {
%1 = tail call i32 @echo_to_all(i32 3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
int mul_i(int a, int b) { return (a * b); }


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

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

LLVM IR (-O0):
define i32 @mul_i(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
ret i32 %7
}

LLVM IR (-O2):
define i32 @mul_i(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_space(int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("_");
  }
}


x86 assembly (clang, -O0):
<print_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <print_space+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_space+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_space>:
push   %rbx
test   %edi,%edi
jle    112f <print_space+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x5f,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <print_space+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_space(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 95)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void M68KC68KSync(void) {}


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

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

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

LLVM IR (-O2):
define void @M68KC68KSync() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setDate(int, int, int, int);
int /*<<< orphan*/ setTime(int, int, int);
void setBoth(int sec, int min, int hr, int day, int month, int year, int wday) {
  setDate(day, month, year, wday);
  setTime(sec, min, hr);
}


x86 assembly (clang, -O0):
<setBoth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    0x10(%rbp),%ecx
call   1040 <setDate@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <setTime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setBoth>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x20(%rsp),%eax
mov    %ecx,%edi
mov    %r8d,%esi
mov    %r9d,%edx
mov    %eax,%ecx
call   1040 <setDate@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <setTime@plt>

LLVM IR (-O0):
define void @setBoth(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %11
%16 = load i32, i32* %12
%17 = load i32, i32* %13
%18 = load i32, i32* %14
%19 = call i32 @setDate(i32 %15, i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = load i32, i32* %10
%23 = call i32 @setTime(i32 %20, i32 %21, i32 %22)
ret void
}

LLVM IR (-O2):
define void @setBoth(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @setDate(i32 %3, i32 %4, i32 %5, i32 %6)
%9 = tail call i32 @setTime(i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Print_int(char *, int);
int Read_int(char *);
int main(void) {
  int n;
  n = Read_int("Enter an int\n");
  Print_int("Input value is", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <Read_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <Print_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <Read_int@plt>
lea    0xeda(%rip),%rdi
mov    %eax,%esi
call   1030 <Print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Enter an int\0A\00"
@.str.1 = [15 x i8] c"Input value is\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @Read_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @Print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Enter an int\0A\00"
@.str.1 = [15 x i8] c"Input value is\00"
define i32 @main() {
%1 = tail call i32 @Read_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Print_int(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
void tv8532_setAutobright(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @tv8532_setAutobright(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Variables and functions */
void *strdup(char *);
void *str_dup_key_func(void *key) { return strdup((char *)key); }


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

x86 assembly (clang, -O2):
<str_dup_key_func>:
jmp    1030 <strdup@plt>

LLVM IR (-O0):
define i8* @str_dup_key_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strdup(i8* %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @str_dup_key_func(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}