xunge/DecIR huggingface dataset:
unsigned xrop3_25_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T & S;
  stk3 = ~stk3;
  stk2 = D & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_25_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_25_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
and    %edi,%esi
lea    -0x100(%rsi),%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_25_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = load i32, i32* %6
%25 = and i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %10
%27 = xor i32 %26, -1
store i32 %27, i32* %10
%28 = load i32, i32* %5
%29 = load i32, i32* %10
%30 = and i32 %28, %29
store i32 %30, i32* %9
%31 = load i32, i32* %6
%32 = load i32, i32* %9
%33 = xor i32 %31, %32
store i32 %33, i32* %8
%34 = load i32, i32* %8
%35 = xor i32 %34, -1
store i32 %35, i32* %8
%36 = load i32, i32* %8
ret i32 %36
}

LLVM IR (-O2):
define i32 @xrop3_25_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = and i8 %1, %0
%6 = zext i8 %5 to i32
%7 = or i32 %6, -256
%8 = xor i32 %7, %4
ret i32 %8
}
int DRV_OS_STATUS_SWITCH(int enable) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DRV_OS_STATUS_SWITCH(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int lol(int b) {
  printf("asd %d\n", b);
  return -1;
}


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

x86 assembly (clang, -O2):
<lol>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"asd %d\0A\00"
define i32 @lol(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *name) { fprintf(stderr, "Usage: %s [file]\n", name); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s [file]\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s [file]\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void sound_close() { return; }


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

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

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

LLVM IR (-O2):
define void @sound_close() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_letters(char *);
void print_arguments(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; i++) {
    print_letters(argv[i]);
  }
}


x86 assembly (clang, -O0):
<print_arguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <print_arguments+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <print_letters@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <print_arguments+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arguments>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1142 <print_arguments+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <print_letters@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <print_arguments+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @print_arguments(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @print_letters(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int ft_count_if(char **tab, unsigned long (*f)(char *)) {
  int it;
  int len;
  it = 0;
  len = 0;
  while (tab[it]) {
    if (f(tab[it]) == 1)
      len++;
    it++;
  }
  return (len);
}


x86 assembly (clang, -O0):
<ft_count_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1164 <ft_count_if+0x64>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdi
call   *%rax
cmp    $0x1,%rax
jne    1156 <ft_count_if+0x56>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111e <ft_count_if+0x1e>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_count_if>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     113c <ft_count_if+0x3c>
mov    %rsi,%r14
add    $0x8,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
call   *%r14
xor    %ecx,%ecx
cmp    $0x1,%rax
sete   %cl
add    %ecx,%ebp
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <ft_count_if+0x20>
jmp    113e <ft_count_if+0x3e>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ft_count_if(i8** nocapture %0, i64 (i8*)* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %13, %5 ], [ 0, %2 ]
%7 = phi i8* [ %15, %5 ], [ %3, %2 ]
%8 = phi i32 [ %12, %5 ], [ 0, %2 ]
%9 = tail call i64 %1(i8* %7)
%10 = icmp eq i64 %9, 1
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %8, %11
%13 = add nuw i64 %6, 1
%14 = getelementptr inbounds i8*, i8** %0, i64 %13
%15 = load i8*, i8** %14
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %5
17: ; preds = %5, %2
%18 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %18
}
unsigned long AMCBase64RequiredEncodeBufferSize(unsigned long inLen,
                                                long useRfc822) {
  unsigned long ret;
  if (0 == inLen) {
    ret = 0;
  } else {
    ret = (inLen + 1) * 4 / 3;
    if (useRfc822) {
      ret += (inLen / 76);
    }
  }
  return ret + 1;
}


x86 assembly (clang, -O0):
<AMCBase64RequiredEncodeBufferSize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jne    1125 <AMCBase64RequiredEncodeBufferSize+0x25>
movq   $0x0,-0x18(%rbp)
jmp    1165 <AMCBase64RequiredEncodeBufferSize+0x65>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
shl    $0x2,%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1160 <AMCBase64RequiredEncodeBufferSize+0x60>
mov    -0x8(%rbp),%rax
mov    $0x4c,%ecx
xor    %edx,%edx
div    %rcx
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1165 <AMCBase64RequiredEncodeBufferSize+0x65>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMCBase64RequiredEncodeBufferSize>:
test   %rdi,%rdi
je     113e <AMCBase64RequiredEncodeBufferSize+0x3e>
lea    0x4(,%rdi,4),%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
mov    %rdx,%rcx
shr    %rcx
test   %rsi,%rsi
je     1140 <AMCBase64RequiredEncodeBufferSize+0x40>
movabs $0xd79435e50d79435f,%rdx
35 94 d7
mov    %rdi,%rax
mul    %rdx
shr    $0x6,%rdx
add    %rdx,%rcx
jmp    1140 <AMCBase64RequiredEncodeBufferSize+0x40>
xor    %ecx,%ecx
add    $0x1,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @AMCBase64RequiredEncodeBufferSize(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = icmp eq i64 0, %6
br i1 %7, label %8, label %9
8: ; preds = %2
store i64 0, i64* %5
br label %22
9: ; preds = %2
%10 = load i64, i64* %3
%11 = add i64 %10, 1
%12 = mul i64 %11, 4
%13 = udiv i64 %12, 3
store i64 %13, i64* %5
%14 = load i64, i64* %4
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %9
%17 = load i64, i64* %3
%18 = udiv i64 %17, 76
%19 = load i64, i64* %5
%20 = add i64 %19, %18
store i64 %20, i64* %5
br label %21
21: ; preds = %16, %9
br label %22
22: ; preds = %21, %8
%23 = load i64, i64* %5
%24 = add i64 %23, 1
ret i64 %24
}

LLVM IR (-O2):
define i64 @AMCBase64RequiredEncodeBufferSize(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = shl i64 %0, 2
%6 = add i64 %5, 4
%7 = udiv i64 %6, 3
%8 = icmp eq i64 %1, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = udiv i64 %0, 76
%11 = add nuw nsw i64 %7, %10
br label %12
12: ; preds = %2, %4, %9
%13 = phi i64 [ %11, %9 ], [ %7, %4 ], [ 0, %2 ]
%14 = add nuw nsw i64 %13, 1
ret i64 %14
}
/* Type definitions */
struct utimbuf {
  int /*<<< orphan*/ modtime;
  int /*<<< orphan*/ actime;
};

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ utime(char *, struct utimbuf *);
void _RepUpdateTime(char *File) {
  struct utimbuf Utime;
  Utime.actime = Utime.modtime = time(NULL);
  utime(File, &Utime);
}


x86 assembly (clang, -O0):
<_RepUpdateTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x10(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <utime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_RepUpdateTime>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x8(%rsp)
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <utime@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.utimbuf = type { i32, i32 }
define void @_RepUpdateTime(i8* nocapture %0) {
%2 = alloca %struct.utimbuf
%3 = bitcast %struct.utimbuf* %2 to i8*
%4 = tail call i32 @time(i32* null)
%5 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %2, i64 0, i32 1
store i32 %4, i32* %6
%7 = call i32 @utime(i8* %0, %struct.utimbuf* %2)
ret void
}
/* Type definitions */
struct proc_psi_twolines {
  int dummy;
};

/* Variables and functions */
int proc_psi_read(struct proc_psi_twolines **, unsigned long long *,
                  char const *, unsigned long);
int proc_psi_read_io(struct proc_psi_twolines **psi_io,
                     unsigned long long *starvation, unsigned long delay) {
  const char *procpath = "/proc/pressure"
                         "/io";
  return proc_psi_read(psi_io, starvation, procpath, delay);
}


x86 assembly (clang, -O0):
<proc_psi_read_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <proc_psi_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_psi_read_io>:
mov    %rdx,%rcx
lea    0xee6(%rip),%rdx
jmp    1030 <proc_psi_read@plt>

LLVM IR (-O0):
%struct.proc_psi_twolines = type { i32 }
@.str = [18 x i8] c"/proc/pressure/io\00"
define i32 @proc_psi_read_io(%struct.proc_psi_twolines** %0, i64* %1, i64 %2) {
%4 = alloca %struct.proc_psi_twolines**
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i8*
store %struct.proc_psi_twolines** %0, %struct.proc_psi_twolines*** %4
store i64* %1, i64** %5
store i64 %2, i64* %6
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load %struct.proc_psi_twolines**, %struct.proc_psi_twolines*** %4
%9 = load i64*, i64** %5
%10 = load i8*, i8** %7
%11 = load i64, i64* %6
%12 = call i32 @proc_psi_read(%struct.proc_psi_twolines** %8, i64* %9, i8* %10, i64 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.proc_psi_twolines = type { i32 }
@.str = [18 x i8] c"/proc/pressure/io\00"
define i32 @proc_psi_read_io(%struct.proc_psi_twolines** %0, i64* %1, i64 %2) {
%4 = tail call i32 @proc_psi_read(%struct.proc_psi_twolines** %0, i64* %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(int);
unsigned char *createHeader(int trashSize, int treeSize) {
  unsigned char *bytes = (unsigned char *)malloc(3 * sizeof(unsigned char));
  bytes[0] = trashSize << 5 | treeSize >> 8;
  bytes[1] = treeSize;
  return (bytes);
}


x86 assembly (clang, -O0):
<createHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x3,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createHeader>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x3,%edi
call   1030 <malloc@plt>
shl    $0x5,%ebp
mov    %ebx,%ecx
shr    $0x8,%ecx
or     %ebp,%ecx
mov    %cl,(%rax)
mov    %bl,0x1(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @createHeader(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i64 @malloc(i32 3)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %5
%8 = load i32, i32* %3
%9 = shl i32 %8, 5
%10 = load i32, i32* %4
%11 = ashr i32 %10, 8
%12 = or i32 %9, %11
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 0
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = trunc i32 %16 to i8
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8 %17, i8* %19
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
define i8* @createHeader(i32 %0, i32 %1) {
%3 = tail call i64 @malloc(i32 3)
%4 = inttoptr i64 %3 to i8*
%5 = shl i32 %0, 5
%6 = lshr i32 %1, 8
%7 = or i32 %6, %5
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
%9 = trunc i32 %1 to i8
%10 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %9, i8* %10
ret i8* %4
}
/* Variables and functions */
int b();
int c();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a = b() + c();
  printf("%d\n", a);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <b@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <c@plt>
add    %eax,%ebx
lea    0xeb6(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @b()
%2 = tail call i32 (...) @c()
%3 = add nsw i32 %2, %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
unsigned int seamless_send(char *, char *, unsigned long, int, int, int, int,
                           unsigned long);
unsigned int seamless_send_position(unsigned long id, int x, int y, int width,
                                    int height, unsigned long flags) {
  return seamless_send("POSITION", "0x%08lx,%d,%d,%d,%d,0x%lx", id, x, y, width,
                       height, flags);
}


x86 assembly (clang, -O0):
<seamless_send_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r10d
mov    -0x20(%rbp),%rax
lea    0xeb5(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <seamless_send@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seamless_send_position>:
push   %rax
mov    %r9,%rax
mov    %r8d,%r10d
mov    %ecx,%r9d
mov    %edx,%r8d
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xed7(%rip),%rdi
lea    0xed9(%rip),%rsi
push   %rax
push   %r10
call   1030 <seamless_send@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"POSITION\00"
@.str.1 = [26 x i8] c"0x%08lx,%d,%d,%d,%d,0x%lx\00"
define i32 @seamless_send_position(i64 %0, i32 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
store i64 %0, i64* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i64 %5, i64* %12
%13 = load i64, i64* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i64, i64* %12
%19 = call i32 @seamless_send(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i64 %13, i32 %14, i32 %15, i32 %16, i32 %17, i64 %18)
ret i32 %19
}

LLVM IR (-O2):
@.str = [9 x i8] c"POSITION\00"
@.str.1 = [26 x i8] c"0x%08lx,%d,%d,%d,%d,0x%lx\00"
define i32 @seamless_send_position(i64 %0, i32 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = tail call i32 @seamless_send(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i64 %0, i32 %1, i32 %2, i32 %3, i32 %4, i64 %5)
ret i32 %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int pawnLeftAttacks(int, int, int);
int pawnRightAttacks(int, int, int);
uint64_t pawnAttackDouble(uint64_t pawns, uint64_t targets, int colour) {
  return pawnLeftAttacks(pawns, targets, colour) &
         pawnRightAttacks(pawns, targets, colour);
}


x86 assembly (clang, -O0):
<pawnAttackDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <pawnLeftAttacks@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <pawnRightAttacks@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pawnAttackDouble>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1040 <pawnLeftAttacks@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <pawnRightAttacks@plt>
and    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pawnAttackDouble(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @pawnLeftAttacks(i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call i32 @pawnRightAttacks(i32 %11, i32 %12, i32 %13)
%15 = and i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @pawnAttackDouble(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pawnLeftAttacks(i32 %0, i32 %1, i32 %2)
%5 = tail call i32 @pawnRightAttacks(i32 %0, i32 %1, i32 %2)
%6 = and i32 %5, %4
ret i32 %6
}
int nop_process_label_set(const char *label, int use_default, int on_exec) {
  return 0;
}


x86 assembly (clang, -O0):
<nop_process_label_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nop_process_label_set(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @nop_process_label_set(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
char *fractional(const int number) { return ""; }


x86 assembly (clang, -O0):
<fractional>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fractional>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @fractional(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @fractional(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
float _mm_cvtss_f32(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_set_ss(float);
int /*<<< orphan*/ _mm_sqrt_ss(int /*<<< orphan*/);
float HMM_SquareRootF(float Float) {
  ;
  float Result;
  __m128 In = _mm_set_ss(Float);
  __m128 Out = _mm_sqrt_ss(In);
  Result = _mm_cvtss_f32(Out);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_SquareRootF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <_mm_set_ss@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <_mm_sqrt_ss@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <_mm_cvtss_f32@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_SquareRootF>:
push   %rax
call   1040 <_mm_set_ss@plt>
mov    %eax,%edi
call   1050 <_mm_sqrt_ss@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <_mm_cvtss_f32@plt>

LLVM IR (-O0):
define float @HMM_SquareRootF(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store float %0, float* %2
%6 = load float, float* %2
%7 = call i32 @_mm_set_ss(float %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @_mm_sqrt_ss(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = call float @_mm_cvtss_f32(i32 %10)
store float %11, float* %3
%12 = load float, float* %3
ret float %12
}

LLVM IR (-O2):
define float @HMM_SquareRootF(float %0) {
%2 = tail call i32 @_mm_set_ss(float %0)
%3 = tail call i32 @_mm_sqrt_ss(i32 %2)
%4 = tail call float @_mm_cvtss_f32(i32 %3)
ret float %4
}
void pnx833x_gpio_select_input(unsigned int pin) {
  if (pin < 32)
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) +
                                     0xF008))) &= ~(1 << (pin)));
    } while (0);
  else
    do {
      ((*((volatile unsigned long *)((0xa0000000ul + 0x17E00000ul) +
                                     0xF064))) &= ~(1 << (pin & 31)));
    } while (0);
}


x86 assembly (clang, -O0):
<pnx833x_gpio_select_input>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jae    113d <pnx833x_gpio_select_input+0x3d>
jmp    1116 <pnx833x_gpio_select_input+0x16>
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
cltq
mov    $0xb7e0f008,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0xb7e0f008,%eax
mov    %rcx,(%rax)
jmp    116c <pnx833x_gpio_select_input+0x6c>
jmp    1142 <pnx833x_gpio_select_input+0x42>
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
cltq
mov    $0xb7e0f064,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0xb7e0f064,%eax
mov    %rcx,(%rax)
jmp    116c <pnx833x_gpio_select_input+0x6c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pnx833x_gpio_select_input>:
mov    %edi,%ecx
mov    $0xb7e0f008,%eax
lea    0x5c(%rax),%rdx
cmp    $0x20,%edi
cmovb  %rax,%rdx
mov    $0xfffffffe,%eax
rol    %cl,%eax
cltq
and    %rax,(%rdx)
ret

LLVM IR (-O0):
define void @pnx833x_gpio_select_input(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 32
br i1 %4, label %5, label %14
5: ; preds = %1
br label %6
6: ; preds = %5
%7 = load i32, i32* %2
%8 = shl i32 1, %7
%9 = xor i32 %8, -1
%10 = sext i32 %9 to i64
%11 = load volatile i64, i64* inttoptr (i64 3084972040 to i64*)
%12 = and i64 %11, %10
store volatile i64 %12, i64* inttoptr (i64 3084972040 to i64*)
br label %13
13: ; preds = %6
br label %24
14: ; preds = %1
br label %15
15: ; preds = %14
%16 = load i32, i32* %2
%17 = and i32 %16, 31
%18 = shl i32 1, %17
%19 = xor i32 %18, -1
%20 = sext i32 %19 to i64
%21 = load volatile i64, i64* inttoptr (i64 3084972132 to i64*)
%22 = and i64 %21, %20
store volatile i64 %22, i64* inttoptr (i64 3084972132 to i64*)
br label %23
23: ; preds = %15
br label %24
24: ; preds = %23, %13
ret void
}

LLVM IR (-O2):
define void @pnx833x_gpio_select_input(i32 %0) {
%2 = icmp ult i32 %0, 32
%3 = and i32 %0, 31
%4 = select i1 %2, i64* inttoptr (i64 3084972040 to i64*), i64* inttoptr (i64 3084972132 to i64*)
%5 = shl nuw i32 1, %3
%6 = xor i32 %5, -1
%7 = sext i32 %6 to i64
%8 = load volatile i64, i64* %4
%9 = and i64 %8, %7
store volatile i64 %9, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int http_open(const char *url, int port) {
  printf("http_open() called!\n");
  return 1;
}


x86 assembly (clang, -O0):
<http_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [20 x i8] c"http_open() called!\00"
define i32 @http_open(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 1
}
struct l_class_OC_CBaseFSM *
_ZN3FSM7FakeFunEP9UEC_Event(struct l_class_OC_FSM *llvm_cbe_this,
                            struct l_struct_OC_UEC_Event *llvm_cbe_ev) {
  struct l_class_OC_CBaseFSM *llvm_cbe_retval;
  struct l_class_OC_FSM *llvm_cbe_this_2e_addr;
  struct l_struct_OC_UEC_Event *llvm_cbe_ev_2e_addr;
  struct l_class_OC_FSM *llvm_cbe_this1;
  struct l_class_OC_CBaseFSM *llvm_cbe_tmp__62;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  *(&llvm_cbe_ev_2e_addr) = llvm_cbe_ev;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  *(&llvm_cbe_retval) = ((struct l_class_OC_CBaseFSM *)0);
  llvm_cbe_tmp__62 = *(&llvm_cbe_retval);
  return llvm_cbe_tmp__62;
}


x86 assembly (clang, -O0):
<_ZN3FSM7FakeFunEP9UEC_Event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.l_class_OC_CBaseFSM = type opaque
%struct.l_class_OC_FSM = type opaque
%struct.l_struct_OC_UEC_Event = type opaque
define %struct.l_class_OC_CBaseFSM* @_ZN3FSM7FakeFunEP9UEC_Event(%struct.l_class_OC_FSM* %0, %struct.l_struct_OC_UEC_Event* %1) {
%3 = alloca %struct.l_class_OC_FSM*
%4 = alloca %struct.l_struct_OC_UEC_Event*
%5 = alloca %struct.l_class_OC_CBaseFSM*
%6 = alloca %struct.l_class_OC_FSM*
%7 = alloca %struct.l_struct_OC_UEC_Event*
%8 = alloca %struct.l_class_OC_FSM*
%9 = alloca %struct.l_class_OC_CBaseFSM*
store %struct.l_class_OC_FSM* %0, %struct.l_class_OC_FSM** %3
store %struct.l_struct_OC_UEC_Event* %1, %struct.l_struct_OC_UEC_Event** %4
%10 = load %struct.l_class_OC_FSM*, %struct.l_class_OC_FSM** %3
store %struct.l_class_OC_FSM* %10, %struct.l_class_OC_FSM** %6
%11 = load %struct.l_struct_OC_UEC_Event*, %struct.l_struct_OC_UEC_Event** %4
store %struct.l_struct_OC_UEC_Event* %11, %struct.l_struct_OC_UEC_Event** %7
%12 = load %struct.l_class_OC_FSM*, %struct.l_class_OC_FSM** %6
store %struct.l_class_OC_FSM* %12, %struct.l_class_OC_FSM** %8
store %struct.l_class_OC_CBaseFSM* null, %struct.l_class_OC_CBaseFSM** %5
%13 = load %struct.l_class_OC_CBaseFSM*, %struct.l_class_OC_CBaseFSM** %5
store %struct.l_class_OC_CBaseFSM* %13, %struct.l_class_OC_CBaseFSM** %9
%14 = load %struct.l_class_OC_CBaseFSM*, %struct.l_class_OC_CBaseFSM** %9
ret %struct.l_class_OC_CBaseFSM* %14
}

LLVM IR (-O2):
%struct.l_class_OC_CBaseFSM = type opaque
%struct.l_class_OC_FSM = type opaque
%struct.l_struct_OC_UEC_Event = type opaque
define noalias %struct.l_class_OC_CBaseFSM* @_ZN3FSM7FakeFunEP9UEC_Event(%struct.l_class_OC_FSM* nocapture readnone %0, %struct.l_struct_OC_UEC_Event* nocapture readnone %1) {
ret %struct.l_class_OC_CBaseFSM* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void fast_memfill64_s20(void *v_to, uint64_t val) {
  uint64_t *to = (uint64_t *)v_to;
  *(to) = val;
  *(to + 1) = val;
  *(to + 2) = val;
  *(to + 3) = val;
  *(to + 4) = val;
}


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

x86 assembly (clang, -O2):
<fast_memfill64_s20>:
movd   %esi,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqu %xmm0,(%rdi)
mov    %esi,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @fast_memfill64_s20(i8* nocapture writeonly %0, i32 %1) {
%3 = insertelement <4 x i32> poison, i32 %1, i64 0
%4 = shufflevector <4 x i32> %3, <4 x i32> poison, <4 x i32> zeroinitializer
%5 = bitcast i8* %0 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %5
%6 = getelementptr inbounds i8, i8* %0, i64 16
%7 = bitcast i8* %6 to i32*
store i32 %1, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void CAN_SCE_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @CAN_SCE_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @CAN_SCE_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int);
int /*<<< orphan*/ foo(int, int);
int main(void) {
  foo(3, 2);
  bar(12, 42);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x2,%esi
call   1040 <foo@plt>
mov    $0xc,%edi
mov    $0x2a,%esi
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x2,%esi
call   1040 <foo@plt>
mov    $0xc,%edi
mov    $0x2a,%esi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 3, i32 2)
%3 = call i32 @bar(i32 12, i32 42)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 3, i32 2)
%2 = tail call i32 @bar(i32 12, i32 42)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error_d(int, char *, char *);
void error(int errCode, char *errDesc) { error_d(errCode, errDesc, ""); }


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xed3(%rip),%rdx
call   1030 <error_d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
lea    0xee9(%rip),%rdx
jmp    1030 <error_d@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @error(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 i32 @error_d(i32 %5, i8* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @error(i32 %0, i8* %1) {
%3 = tail call i32 @error_d(i32 %0, i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void vAssertCalled(char *fileName, uint16_t lineNo) {
  printf("ASSERTION FAIL: %s:%d\n", fileName, lineNo);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<vAssertCalled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <vAssertCalled+0x22>

x86 assembly (clang, -O2):
<vAssertCalled>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1130 <vAssertCalled+0x20>

LLVM IR (-O0):
@.str = [23 x i8] c"ASSERTION FAIL: %s:%d\0A\00"
define void @vAssertCalled(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
br label %8
8: ; preds = %2, %8
br label %8
}

LLVM IR (-O2):
@.str = [23 x i8] c"ASSERTION FAIL: %s:%d\0A\00"
define void @vAssertCalled(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
br label %4
4: ; preds = %2, %4
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ escape(char *, char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main() {
  char s[1024], t[1024];
  fgets(s, 1024, stdin);
  escape(s, t);
  printf("%s", t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1040 <fgets@plt>
lea    -0x410(%rbp),%rdi
lea    -0x810(%rbp),%rsi
call   1050 <escape@plt>
lea    -0x810(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x808,%rsp
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
lea    0x400(%rsp),%r14
mov    %r14,%rdi
mov    $0x400,%esi
call   1040 <fgets@plt>
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <escape@plt>
lea    0xe93(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca [1024 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 1024, i32 %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i32 @escape(i8* %7, i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %3, i32 1024, i32 %5)
%7 = call i32 @escape(i8* %3, i8* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void CWda15_Write_Audio_Sample(unsigned int baseaddress, unsigned int sample) {
  int tmp = 1;
  while (tmp) {
    tmp = (*(volatile unsigned int *)((baseaddress) + (0x0014)));
    tmp = tmp & 0x20000000;
  }
  { (*(volatile unsigned int *)((baseaddress) + (0x0000)) = (sample)); };
}


x86 assembly (clang, -O0):
<CWda15_Write_Audio_Sample>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1138 <CWda15_Write_Audio_Sample+0x38>
mov    -0x4(%rbp),%eax
add    $0x14,%eax
mov    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x20000000,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <CWda15_Write_Audio_Sample+0x11>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x0,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CWda15_Write_Audio_Sample>:
lea    0x14(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testl  $0x20000000,(%rax)
jne    1110 <CWda15_Write_Audio_Sample+0x10>
mov    %edi,%eax
mov    %esi,(%rax)
ret

LLVM IR (-O0):
define void @CWda15_Write_Audio_Sample(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 1, i32* %5
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add i32 %10, 20
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = and i32 %15, 536870912
store i32 %16, i32* %5
br label %6
17: ; preds = %6
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = add i32 %19, 0
%21 = zext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
store volatile i32 %18, i32* %22
ret void
}

LLVM IR (-O2):
define void @CWda15_Write_Audio_Sample(i32 %0, i32 %1) {
%3 = add i32 %0, 20
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
br label %6
6: ; preds = %2, %6
%7 = load volatile i32, i32* %5
%8 = and i32 %7, 536870912
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %6
10: ; preds = %6
%11 = zext i32 %0 to i64
%12 = inttoptr i64 %11 to i32*
store volatile i32 %1, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ factor();
int /*<<< orphan*/ term1();
void term() {
  factor();
  term1();
}


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

x86 assembly (clang, -O2):
<term>:
push   %rax
xor    %eax,%eax
call   1040 <factor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <term1@plt>

LLVM IR (-O0):
define void @term() {
%1 = call i32 (...) @factor()
%2 = call i32 (...) @term1()
ret void
}

LLVM IR (-O2):
define void @term() {
%1 = tail call i32 (...) @factor()
%2 = tail call i32 (...) @term1()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long,
                           unsigned long, unsigned long, unsigned long);
int /*<<< orphan*/ stdout;
void printData(unsigned long userId, unsigned long collectionId,
               unsigned long timeStamp, unsigned long timeStampMilliseconds) {
  fprintf(stdout,
          "{\"user_id\":\"%lu\",\"collection_id\":\"%lu\",\"created_at\":\"%lu%"
          "03lu\"}\n",
          userId, collectionId, timeStamp, timeStampMilliseconds);
}


x86 assembly (clang, -O0):
<printData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printData>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [65 x i8] c"{\22user_id\22:\22%lu\22,\22collection_id\22:\22%lu\22,\22created_at\22:\22%lu%03lu\22}\0A\00"
define void @printData(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i32, i32* @stdout
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i64 %10, i64 %11, i64 %12, i64 %13)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [65 x i8] c"{\22user_id\22:\22%lu\22,\22collection_id\22:\22%lu\22,\22created_at\22:\22%lu%03lu\22}\0A\00"
define void @printData(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1, i64 %2, i64 %3)
ret void
}