xunge/DecIR huggingface dataset:
void put_u32(void *addr, unsigned int val) {
  unsigned char *b = addr;
  b[0] = (val >> 24) & 0xFF;
  b[1] = (val >> 16) & 0xFF;
  b[2] = (val >> 8) & 0xFF;
  b[3] = (val & 0xFF);
}


x86 assembly (clang, -O0):
<put_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @put_u32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = lshr i32 %7, 24
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i32, i32* %4
%14 = lshr i32 %13, 16
%15 = and i32 %14, 255
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %16, i8* %18
%19 = load i32, i32* %4
%20 = lshr i32 %19, 8
%21 = and i32 %20, 255
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 2
store i8 %22, i8* %24
%25 = load i32, i32* %4
%26 = and i32 %25, 255
%27 = trunc i32 %26 to i8
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i64 3
store i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @put_u32(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
char *corta_string(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *s = "a";
  s = corta_string(s);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <corta_string@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @corta_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
void aom_merge_corrupted_flag(int *corrupted, int value) {
  *corrupted |= value;
}


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

x86 assembly (clang, -O2):
<aom_merge_corrupted_flag>:
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @aom_merge_corrupted_flag(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = or i32 %7, %5
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @aom_merge_corrupted_flag(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = or i32 %3, %1
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Interrupts_Init();
int /*<<< orphan*/ Oscillator_Init();
int /*<<< orphan*/ Port_IO_Init();
int /*<<< orphan*/ Timer_Init();
void Init_Device(void) {
  Timer_Init();
  Port_IO_Init();
  Oscillator_Init();
  Interrupts_Init();
}


x86 assembly (clang, -O0):
<Init_Device>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Timer_Init@plt>
mov    $0x0,%al
call   1050 <Port_IO_Init@plt>
mov    $0x0,%al
call   1030 <Oscillator_Init@plt>
mov    $0x0,%al
call   1060 <Interrupts_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_Device>:
push   %rax
xor    %eax,%eax
call   1040 <Timer_Init@plt>
xor    %eax,%eax
call   1050 <Port_IO_Init@plt>
xor    %eax,%eax
call   1030 <Oscillator_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <Interrupts_Init@plt>

LLVM IR (-O0):
define void @Init_Device() {
%1 = call i32 (...) @Timer_Init()
%2 = call i32 (...) @Port_IO_Init()
%3 = call i32 (...) @Oscillator_Init()
%4 = call i32 (...) @Interrupts_Init()
ret void
}

LLVM IR (-O2):
define void @Init_Device() {
%1 = tail call i32 (...) @Timer_Init()
%2 = tail call i32 (...) @Port_IO_Init()
%3 = tail call i32 (...) @Oscillator_Init()
%4 = tail call i32 (...) @Interrupts_Init()
ret void
}
/* Variables and functions */
int strcmp(char *const, char *const);
int ptr_str_cmp(const void *vp, const void *vq) {
  char *const *a = vp;
  char *const *b = vq;
  int k = strcmp(*a, *b);
  return (k < 0) ? -1 : (k > 0);
}


x86 assembly (clang, -O0):
<ptr_str_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    115d <ptr_str_cmp+0x4d>
mov    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    116c <ptr_str_cmp+0x5c>
cmpl   $0x0,-0x24(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_str_cmp>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
setg   %cl
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ptr_str_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i8**
store i8** %9, i8*** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
store i8** %11, i8*** %6
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %6
%15 = load i8*, i8** %14
%16 = call i32 @strcmp(i8* %13, i8* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %2
br label %24
20: ; preds = %2
%21 = load i32, i32* %7
%22 = icmp sgt i32 %21, 0
%23 = zext i1 %22 to i32
br label %24
24: ; preds = %20, %19
%25 = phi i32 [ -1, %19 ], [ %23, %20 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @ptr_str_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
%8 = icmp sgt i32 %7, 0
%9 = zext i1 %8 to i32
%10 = icmp sgt i32 %7, -1
%11 = select i1 %10, i32 %9, i32 -1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ pop();
int /*<<< orphan*/ print_stack();
int /*<<< orphan*/ push(int);
int main(void) {
  push(10);
  push(20);
  push(30);
  print_stack();
  pop();
  pop();
  pop();
  pop();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1050 <push@plt>
mov    $0x14,%edi
call   1050 <push@plt>
mov    $0x1e,%edi
call   1050 <push@plt>
xor    %eax,%eax
call   1040 <print_stack@plt>
xor    %eax,%eax
call   1030 <pop@plt>
xor    %eax,%eax
call   1030 <pop@plt>
xor    %eax,%eax
call   1030 <pop@plt>
xor    %eax,%eax
call   1030 <pop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @push(i32 10)
%3 = call i32 @push(i32 20)
%4 = call i32 @push(i32 30)
%5 = call i32 (...) @print_stack()
%6 = call i32 (...) @pop()
%7 = call i32 (...) @pop()
%8 = call i32 (...) @pop()
%9 = call i32 (...) @pop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @push(i32 10)
%2 = tail call i32 @push(i32 20)
%3 = tail call i32 @push(i32 30)
%4 = tail call i32 (...) @print_stack()
%5 = tail call i32 (...) @pop()
%6 = tail call i32 (...) @pop()
%7 = tail call i32 (...) @pop()
%8 = tail call i32 (...) @pop()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
char *itob(int /*<<< orphan*/, int, char *);
char *uint8tob(uint8_t in, char *out) { return itob(in, 8, out); }


x86 assembly (clang, -O0):
<uint8tob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x8,%esi
call   1030 <itob@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint8tob>:
mov    %rsi,%rdx
mov    $0x8,%esi
jmp    1030 <itob@plt>

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

LLVM IR (-O2):
define i8* @uint8tob(i32 %0, i8* %1) {
%3 = tail call i8* @itob(i32 %0, i32 8, i8* %1)
ret i8* %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ char_out(int /*<<< orphan*/);
void strout_lower(const uint8_t *p) {
  while (*p)
    char_out(*p++);
}


x86 assembly (clang, -O0):
<strout_lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1148 <strout_lower+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
mov    %eax,%edi
call   1030 <char_out@plt>
jmp    111c <strout_lower+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strout_lower>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1131 <strout_lower+0x21>
add    $0x8,%rbx
call   1030 <char_out@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <strout_lower+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @strout_lower(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
br label %3
3: ; preds = %7, %1
%4 = load i64*, i64** %2
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i32 1
store i64* %9, i64** %2
%10 = load i64, i64* %8
%11 = trunc i64 %10 to i32
%12 = call i32 @char_out(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @strout_lower(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = icmp eq i64 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ %2, %1 ]
%6 = phi i64* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = trunc i64 %5 to i32
%9 = tail call i32 @char_out(i32 %8)
%10 = load i64, i64* %7
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *ft_dec_to_hex(int, int);
char *ft_prog_len(char *prog) {
  int len;
  char *res;
  len = 0;
  while (prog[len])
    len++;
  res = ft_dec_to_hex(len / 2, 4);
  return (res);
}


x86 assembly (clang, -O0):
<ft_prog_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1143 <ft_prog_len+0x33>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_prog_len+0x13>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    $0x4,%esi
call   1030 <ft_dec_to_hex@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_prog_len>:
mov    %rdi,%rax
mov    $0xffffffff,%edi
nopl   0x0(%rax,%rax,1)
add    $0x1,%edi
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1120 <ft_prog_len+0x10>
shr    %edi
mov    $0x4,%esi
jmp    1030 <ft_dec_to_hex@plt>

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

LLVM IR (-O2):
define i8* @ft_prog_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = lshr i32 %9, 1
%11 = tail call i8* @ft_dec_to_hex(i32 %10, i32 4)
ret i8* %11
}
int test14(int a, int b, int c, int d, int e, int f) {
  int x = a == b;
  int y = c == 0;
  int z = d == e;
  return x == y && x == z;
}


x86 assembly (clang, -O0):
<test14>:
push   %rbp
mov    %rsp,%rbp
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    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x20(%rbp),%ecx
mov    %al,-0x25(%rbp)
jne    1166 <test14+0x66>
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
sete   %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test14>:
cmp    %esi,%edi
sete   %al
test   %edx,%edx
setne  %dl
cmp    %r8d,%ecx
setne  %cl
xor    %al,%dl
xor    %al,%cl
and    %dl,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @test14(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp eq i32 %0, %1
%8 = icmp ne i32 %2, 0
%9 = icmp ne i32 %3, %4
%10 = xor i1 %7, %8
%11 = xor i1 %7, %9
%12 = and i1 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
float withdraw_acctotal(float fncAmount, float fncTotal) {
  fncTotal = fncTotal - fncAmount;
  return (fncTotal);
}


x86 assembly (clang, -O0):
<withdraw_acctotal>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<withdraw_acctotal>:
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @withdraw_acctotal(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = fsub float %5, %6
store float %7, float* %4
%8 = load float, float* %4
ret float %8
}

LLVM IR (-O2):
define float @withdraw_acctotal(float %0, float %1) {
%3 = fsub float %1, %0
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void multiqueue_free_payload(void *payload) { free(payload); }


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

x86 assembly (clang, -O2):
<multiqueue_free_payload>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @multiqueue_free_payload(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void loop_of_mfence() {
  for (int i = 0; i < 100; i++) {
    __asm__ __volatile__("mfence\n" :::);
  }
}


x86 assembly (clang, -O0):
<loop_of_mfence>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1126 <loop_of_mfence+0x26>
mfence
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <loop_of_mfence+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_of_mfence>:
mov    $0x64,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mfence
add    $0xffffffff,%eax
jne    1110 <loop_of_mfence+0x10>
ret

LLVM IR (-O0):
define void @loop_of_mfence() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @loop_of_mfence() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %4, %2 ]
tail call void asm sideeffect "mfence\0A", "~{dirflag},~{fpsr},~{flags}"()
%4 = add nuw nsw i32 %3, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %1, label %2
}
void SteamAPI_vr_void_ResetSeatedZeroPose(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_void_ResetSeatedZeroPose = [37 x i8] c"SteamAPI_vr_void_ResetSeatedZeroPose\00"
define void @SteamAPI_vr_void_ResetSeatedZeroPose(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 ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_vr_void_ResetSeatedZeroPose, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_void_ResetSeatedZeroPose = [37 x i8] c"SteamAPI_vr_void_ResetSeatedZeroPose\00"
define void @SteamAPI_vr_void_ResetSeatedZeroPose(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_vr_void_ResetSeatedZeroPose, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct sk_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree_skb(struct sk_buff *);
void nlmsg_free(struct sk_buff *skb) { kfree_skb(skb); }


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

x86 assembly (clang, -O2):
<nlmsg_free>:
jmp    1030 <kfree_skb@plt>

LLVM IR (-O0):
%struct.sk_buff = type { i32 }
define void @nlmsg_free(%struct.sk_buff* %0) {
%2 = alloca %struct.sk_buff*
store %struct.sk_buff* %0, %struct.sk_buff** %2
%3 = load %struct.sk_buff*, %struct.sk_buff** %2
%4 = call i32 @kfree_skb(%struct.sk_buff* %3)
ret void
}

LLVM IR (-O2):
%struct.sk_buff = type { i32 }
define void @nlmsg_free(%struct.sk_buff* %0) {
%2 = tail call i32 @kfree_skb(%struct.sk_buff* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ideallocator(void *data) { free(data); }


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

x86 assembly (clang, -O2):
<ideallocator>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ideallocator(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int sgsarrcomp_custom(void const *, void const *, void *);
int sgsarrcomp_custom_rev(const void *p1, const void *p2, void *userdata) {
  return sgsarrcomp_custom(p2, p1, userdata);
}


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

x86 assembly (clang, -O2):
<sgsarrcomp_custom_rev>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <sgsarrcomp_custom@plt>

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

LLVM IR (-O2):
define i32 @sgsarrcomp_custom_rev(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @sgsarrcomp_custom(i8* %1, i8* %0, i8* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
uid_t getuid(void) { return (uid_t)1; }


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

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

LLVM IR (-O0):
define i32 @getuid() {
ret i32 1
}

LLVM IR (-O2):
define i32 @getuid() {
ret i32 1
}
int cfg_string_handler(const char *optarg, void *value_addr,
                       const struct argconfig_options *opt) {
  *((const char **)value_addr) = optarg;
  return 0;
}


x86 assembly (clang, -O0):
<cfg_string_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.argconfig_options = type opaque
define i32 @cfg_string_handler(i8* %0, i8* %1, %struct.argconfig_options* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.argconfig_options*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.argconfig_options* %2, %struct.argconfig_options** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i8**
store i8* %7, i8** %9
ret i32 0
}

LLVM IR (-O2):
%struct.argconfig_options = type opaque
define i32 @cfg_string_handler(i8* %0, i8* nocapture writeonly %1, %struct.argconfig_options* nocapture readnone %2) {
%4 = bitcast i8* %1 to i8**
store i8* %0, i8** %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: xy2ij [-i {DD|CO}] [-f] [-r] [-v] -g <grid file> -o <point "
         "file>\n");
  printf("Try \"xy2ij -h\" for more information\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [73 x i8] c"Usage: xy2ij [-i {DD|CO}] [-f] [-r] [-v] -g <grid file> -o <point file>\0A\00"
@.str.1 = [37 x i8] c"Try \22xy2ij -h\22 for more information\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [72 x i8] c"Usage: xy2ij [-i {DD|CO}] [-f] [-r] [-v] -g <grid file> -o <point file>\00"
@str.2 = [36 x i8] c"Try \22xy2ij -h\22 for more information\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
void TimerDisable(unsigned long ulBase, unsigned long ulTimer) {
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x0000000C))) &=
      ~(ulTimer & (0x00000001 | 0x00000100));
}


x86 assembly (clang, -O0):
<TimerDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
and    $0x101,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerDisable>:
not    %esi
or     $0xfffffffffffffefe,%rsi
and    %rsi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @TimerDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 257
%7 = xor i64 %6, -1
%8 = load i64, i64* %3
%9 = add i64 %8, 12
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, %7
store volatile i64 %12, i64* %10
ret void
}

LLVM IR (-O2):
define void @TimerDisable(i64 %0, i64 %1) {
%3 = and i64 %1, 257
%4 = xor i64 %3, -1
%5 = add i64 %0, 12
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, %4
store volatile i64 %8, i64* %6
ret void
}
/* Variables and functions */
unsigned long sysfs_get_transitions(unsigned int);
unsigned long cpufreq_get_transitions(unsigned int cpu) {
  unsigned long ret = sysfs_get_transitions(cpu);
  return (ret);
}


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

x86 assembly (clang, -O2):
<cpufreq_get_transitions>:
jmp    1030 <sysfs_get_transitions@plt>

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

LLVM IR (-O2):
define i64 @cpufreq_get_transitions(i32 %0) {
%2 = tail call i64 @sysfs_get_transitions(i32 %0)
ret i64 %2
}
void dummy_delayed_irq_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @dummy_delayed_irq_handler() {
ret void
}
void equ(name, string) char *name;
char *string;
{
  outstr(name);
  outop0str("\tEQU\t");
  outline(string);
}


x86 assembly (clang, -O0):
<equ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <outstr@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <outop0str@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <outline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equ>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <outstr@plt>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <outop0str@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1050 <outline@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\09EQU\09\00"
define void @equ(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 = call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %5)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @outop0str to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @outline to i32 (i8*, ...)*)(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\09EQU\09\00"
define void @equ(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outop0str to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outline to i32 (i8*, ...)*)(i8* %1)
ret void
}
/* Variables and functions */
int irqtimestamp_test_mask(int, int, int, int, int, int);
int irqtimestamp_test(int addr, int imask, int width, int pirq, int irqgen) {
  return irqtimestamp_test_mask(addr, imask, width, pirq, irqgen, -1);
}


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

x86 assembly (clang, -O2):
<irqtimestamp_test>:
mov    $0xffffffff,%r9d
jmp    1030 <irqtimestamp_test_mask@plt>

LLVM IR (-O0):
define i32 @irqtimestamp_test(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @irqtimestamp_test_mask(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 -1)
ret i32 %16
}

LLVM IR (-O2):
define i32 @irqtimestamp_test(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @irqtimestamp_test_mask(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 -1)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_init(int /*<<< orphan*/ *, void *);
int __attribute__((unused))
___pthread_mutex_init(pthread_mutex_t *mutex, void *v, char *mutex_name,
                      char *fn, int ln) {
  return pthread_mutex_init(mutex, v);
}


x86 assembly (clang, -O0):
<___pthread_mutex_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pthread_mutex_init@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<___pthread_mutex_init>:
jmp    1030 <pthread_mutex_init@plt>

LLVM IR (-O0):
define i32 @___pthread_mutex_init(i32* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i32* %0, i32** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i8*, i8** %7
%13 = call i32 @pthread_mutex_init(i32* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @___pthread_mutex_init(i32* %0, i8* %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i32 %4) {
%6 = tail call i32 @pthread_mutex_init(i32* %0, i8* %1)
ret i32 %6
}
double foo_d(double a, double b) { return -(a * b); }


x86 assembly (clang, -O0):
<foo_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_d>:
xorpd  0xef8(%rip),%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @foo_d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double %5, %6
%8 = fneg double %7
ret double %8
}

LLVM IR (-O2):
define double @foo_d(double %0, double %1) {
%3 = fneg double %0
%4 = fmul double %3, %1
ret double %4
}
int main(void) {
  int counter = 0;
  while (0) {
    counter++;
    if (5 == counter) {
      break;
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1121 <main+0x21>
jmp    1142 <main+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x5,%eax
cmp    -0x8(%rbp),%eax
jne    113d <main+0x3d>
jmp    1142 <main+0x42>
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gtk_action_connect_accelerator() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_connect_accelerator() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ use(char *);
void test24(char *buffer) {
  use(buffer);
  buffer[1] = 'b';
}


x86 assembly (clang, -O0):
<test24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <use@plt>
mov    -0x8(%rbp),%rax
movb   $0x62,0x1(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test24>:
push   %rbx
mov    %rdi,%rbx
call   1030 <use@plt>
movb   $0x62,0x1(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @test24(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @use(i8* %3)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8 98, i8* %6
ret void
}

LLVM IR (-O2):
define void @test24(i8* %0) {
%2 = tail call i32 @use(i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 98, i8* %3
ret void
}
int ti_stochrsi_start(double const *options) {
  return ((int)options[0]) * 2 - 1;
}


x86 assembly (clang, -O0):
<ti_stochrsi_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
shl    $0x1,%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_stochrsi_start>:
cvttsd2si (%rdi),%eax
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_stochrsi_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = mul nsw i32 %6, 2
%8 = sub nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @ti_stochrsi_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = shl nsw i32 %3, 1
%5 = add nsw i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LLAdd(int);
int /*<<< orphan*/ LLPrint();
int /*<<< orphan*/ dm();
main() {
  LLAdd(1);
  LLAdd(2);
  LLAdd(3);
  LLPrint();
  dm();
  LLPrint();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1050 <LLAdd@plt>
mov    $0x2,%edi
call   1050 <LLAdd@plt>
mov    $0x3,%edi
call   1050 <LLAdd@plt>
mov    $0x0,%al
call   1030 <LLPrint@plt>
mov    $0x0,%al
call   1040 <dm@plt>
mov    $0x0,%al
call   1030 <LLPrint@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1050 <LLAdd@plt>
mov    $0x2,%edi
call   1050 <LLAdd@plt>
mov    $0x3,%edi
call   1050 <LLAdd@plt>
xor    %eax,%eax
call   1030 <LLPrint@plt>
xor    %eax,%eax
call   1040 <dm@plt>
xor    %eax,%eax
call   1030 <LLPrint@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @LLAdd(i32 1)
%2 = call i32 @LLAdd(i32 2)
%3 = call i32 @LLAdd(i32 3)
%4 = call i32 (...) @LLPrint()
%5 = call i32 (...) @dm()
%6 = call i32 (...) @LLPrint()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @LLAdd(i32 1)
%2 = tail call i32 @LLAdd(i32 2)
%3 = tail call i32 @LLAdd(i32 3)
%4 = tail call i32 (...) @LLPrint()
%5 = tail call i32 (...) @dm()
%6 = tail call i32 (...) @LLPrint()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: primes [-h] [start [stop]]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: primes [-h] [start [stop]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: primes [-h] [start [stop]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ TerminalNewMode(int /*<<< orphan*/);
void setcommandmode() { TerminalNewMode(0); }


x86 assembly (clang, -O0):
<setcommandmode>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <TerminalNewMode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setcommandmode>:
xor    %edi,%edi
jmp    1030 <TerminalNewMode@plt>

LLVM IR (-O0):
define void @setcommandmode() {
%1 = call i32 @TerminalNewMode(i32 0)
ret void
}

LLVM IR (-O2):
define void @setcommandmode() {
%1 = tail call i32 @TerminalNewMode(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ init_colors();
int /*<<< orphan*/ keypad(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ *stdscr;
void init(WINDOW *win) {
  init_colors();
  keypad(win, TRUE);
  keypad(stdscr, TRUE);
  noecho();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <init_colors@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
call   1030 <keypad@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%rdi
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
call   1030 <keypad@plt>
mov    $0x0,%al
call   1040 <noecho@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <init_colors@plt>
mov    0x2e9b(%rip),%r14
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <keypad@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%rdi
mov    (%r14),%esi
call   1030 <keypad@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <noecho@plt>

LLVM IR (-O0):
@TRUE = global i32 0
@stdscr = global i32* null
define void @init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @init_colors()
%4 = load i32*, i32** %2
%5 = load i32, i32* @TRUE
%6 = call i32 @keypad(i32* %4, i32 %5)
%7 = load i32*, i32** @stdscr
%8 = load i32, i32* @TRUE
%9 = call i32 @keypad(i32* %7, i32 %8)
%10 = call i32 (...) @noecho()
ret void
}

LLVM IR (-O2):
@TRUE = global i32 0
@stdscr = global i32* null
define void @init(i32* %0) {
%2 = tail call i32 (...) @init_colors()
%3 = load i32, i32* @TRUE
%4 = tail call i32 @keypad(i32* %0, i32 %3)
%5 = load i32*, i32** @stdscr
%6 = load i32, i32* @TRUE
%7 = tail call i32 @keypad(i32* %5, i32 %6)
%8 = tail call i32 (...) @noecho()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ stdout;
void getstr(char *s) {
  fflush(stdout);
  while ((*s = getchar()) != '\n')
    s++;
  *s = 0;
}


x86 assembly (clang, -O0):
<getstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0xa,%eax
je     1164 <getstr+0x44>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    113a <getstr+0x1a>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getstr>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1140 <getstr+0x20>
movb   $0x0,-0x1(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @getstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
br label %5
5: ; preds = %10, %1
%6 = call signext i8 (...) @getchar()
%7 = load i8*, i8** %2
store i8 %6, i8* %7
%8 = sext i8 %6 to i32
%9 = icmp ne i32 %8, 10
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %5
13: ; preds = %5
%14 = load i8*, i8** %2
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @getstr(i8* nocapture writeonly %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
br label %4
4: ; preds = %4, %1
%5 = phi i8* [ %0, %1 ], [ %8, %4 ]
%6 = tail call signext i8 (...) @getchar()
store i8 %6, i8* %5
%7 = icmp eq i8 %6, 10
%8 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %7, label %9, label %4
9: ; preds = %4
store i8 0, i8* %5
ret void
}
/* Variables and functions */
int safe_atolli(char const *, long long *);
int safe_atoli(const char *s, long int *ret_u) {
  do {
    switch (0) {
    case 0:
    case !!(sizeof(long int) == sizeof(long long int)):;
    }
  } while (false);
  return safe_atolli(s, (long long int *)ret_u);
}


x86 assembly (clang, -O0):
<safe_atoli>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1125 <safe_atoli+0x15>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <safe_atolli@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_atoli>:
jmp    1030 <safe_atolli@plt>

LLVM IR (-O0):
define i32 @safe_atoli(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i8*, i8** %3
%8 = load i64*, i64** %4
%9 = call i32 @safe_atolli(i8* %7, i64* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @safe_atoli(i8* %0, i64* %1) {
%3 = tail call i32 @safe_atolli(i8* %0, i64* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *prog) {
  printf("%s -p <ms_port> -m <IP> -d <IP> -n <numsockets>\n\n", prog);
  printf("-m: MS IP\n-d: Daemon IP (all listen(s) are spawned on this IP)\n");
  printf("-p: MS port number\n-n: number of hosts in cluster\n");
  return;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"%s -p <ms_port> -m <IP> -d <IP> -n <numsockets>\0A\0A\00"
@.str.1 = [64 x i8] c"-m: MS IP\0A-d: Daemon IP (all listen(s) are spawned on this IP)\0A\00"
@.str.2 = [51 x i8] c"-p: MS port number\0A-n: number of hosts in cluster\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"%s -p <ms_port> -m <IP> -d <IP> -n <numsockets>\0A\0A\00"
@str = [63 x i8] c"-m: MS IP\0A-d: Daemon IP (all listen(s) are spawned on this IP)\00"
@str.3 = [50 x i8] c"-p: MS port number\0A-n: number of hosts in cluster\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.3, i64 0, i64 0))
ret void
}