xunge/DecIR huggingface dataset:
_Noreturn void quick_exit(int code) {
  static int lock;
  while (a_swap(&lock, 1))
    __syscall(29);
  __funcs_on_quick_exit();
  _Exit(code);
}


x86 assembly (clang, -O0):
<quick_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0x2ef2(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <a_swap@plt>
cmp    $0x0,%eax
je     1178 <quick_exit+0x38>
mov    $0x1d,%edi
mov    $0x0,%al
call   1040 <__syscall@plt>
jmp    114b <quick_exit+0xb>
mov    $0x0,%al
call   1050 <__funcs_on_quick_exit@plt>
mov    -0x4(%rbp),%edi
call   1060 <_Exit@plt>

x86 assembly (clang, -O2):
<quick_exit>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0x2ef8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <a_swap@plt>
test   %eax,%eax
je     118f <quick_exit+0x4f>
lea    0x2ee1(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x1d,%edi
xor    %eax,%eax
call   1040 <__syscall@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <a_swap@plt>
test   %eax,%eax
jne    1170 <quick_exit+0x30>
xor    %eax,%eax
call   1050 <__funcs_on_quick_exit@plt>
mov    %ebp,%edi
call   1060 <_Exit@plt>

LLVM IR (-O0):
@quick_exit.lock = internal global i32 0
define void @quick_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @a_swap to i32 (i32*, i32, ...)*)(i32* @quick_exit.lock, i32 1)
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = call i32 (i32, ...) bitcast (i32 (...)* @__syscall to i32 (i32, ...)*)(i32 29)
br label %3
8: ; preds = %3
%9 = call i32 (...) @__funcs_on_quick_exit()
%10 = load i32, i32* %2
unreachable
}

LLVM IR (-O2):
@quick_exit.lock = internal global i32 0
define void @quick_exit(i32 %0) {
%2 = tail call i32 (i32*, i32, ...) bitcast (i32 (...)* @a_swap to i32 (i32*, i32, ...)*)(i32* @quick_exit.lock, i32 1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1, %4
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @__syscall to i32 (i32, ...)*)(i32 29)
%6 = tail call i32 (i32*, i32, ...) bitcast (i32 (...)* @a_swap to i32 (i32*, i32, ...)*)(i32* @quick_exit.lock, i32 1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %1
%9 = tail call i32 (...) @__funcs_on_quick_exit()
tail call void @_Exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ LCD_WriteData(int);
void createBlock() {
  LCD_WriteData(0x0);
  LCD_WriteData(0x0);
  LCD_WriteData(0xe);
  LCD_WriteData(0xe);
  LCD_WriteData(0xe);
  LCD_WriteData(0x0);
  LCD_WriteData(0x0);
  LCD_WriteData(0x0);
}


x86 assembly (clang, -O0):
<createBlock>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<createBlock>:
push   %rax
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <LCD_WriteData@plt>

LLVM IR (-O0):
define void @createBlock() {
%1 = call i32 @LCD_WriteData(i32 0)
%2 = call i32 @LCD_WriteData(i32 0)
%3 = call i32 @LCD_WriteData(i32 14)
%4 = call i32 @LCD_WriteData(i32 14)
%5 = call i32 @LCD_WriteData(i32 14)
%6 = call i32 @LCD_WriteData(i32 0)
%7 = call i32 @LCD_WriteData(i32 0)
%8 = call i32 @LCD_WriteData(i32 0)
ret void
}

LLVM IR (-O2):
define void @createBlock() {
%1 = tail call i32 @LCD_WriteData(i32 0)
%2 = tail call i32 @LCD_WriteData(i32 0)
%3 = tail call i32 @LCD_WriteData(i32 14)
%4 = tail call i32 @LCD_WriteData(i32 14)
%5 = tail call i32 @LCD_WriteData(i32 14)
%6 = tail call i32 @LCD_WriteData(i32 0)
%7 = tail call i32 @LCD_WriteData(i32 0)
%8 = tail call i32 @LCD_WriteData(i32 0)
ret void
}
/* Variables and functions */
int read(int, char *, int);
int errorCodesWithZero(int fd) {
  char buf[100];
  int rc = read(fd, buf, 10);
  if (rc < 0)
    return 0;
  return fd + 5;
}


x86 assembly (clang, -O0):
<errorCodesWithZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0xa,%edx
call   1030 <read@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x0,-0x74(%rbp)
jge    1148 <errorCodesWithZero+0x38>
movl   $0x0,-0x4(%rbp)
jmp    1151 <errorCodesWithZero+0x41>
mov    -0x8(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorCodesWithZero>:
push   %rbx
sub    $0x70,%rsp
mov    %edi,%ebx
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <read@plt>
add    $0x5,%ebx
xor    %ecx,%ecx
test   %eax,%eax
cmovns %ebx,%ecx
mov    %ecx,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @errorCodesWithZero(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [100 x i8]
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%8 = call i32 @read(i32 %6, i8* %7, i32 10)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 5
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @errorCodesWithZero(i32 %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 %0, i8* %3, i32 10)
%5 = icmp slt i32 %4, 0
%6 = add nsw i32 %0, 5
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
int Q_log2(int val) {
  int answer = 0;
  while (val >>= 1)
    answer++;
  return answer;
}


x86 assembly (clang, -O0):
<Q_log2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <Q_log2+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <Q_log2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_log2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <Q_log2+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <Q_log2+0x10>
ret

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

LLVM IR (-O2):
define i32 @Q_log2(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int strcmp(char *, char *);
int idCmp(const void *id1_, const void *id2_) {
  char **id1p = (char **)id1_;
  char **id2p = (char **)id2_;
  char *id1 = *id1p;
  char *id2 = *id2p;
  return strcmp(id1, id2);
}


x86 assembly (clang, -O0):
<idCmp>:
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),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idCmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @idCmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %5
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i8**
store i8** %12, i8*** %6
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
store i8* %14, i8** %7
%15 = load i8**, i8*** %6
%16 = load i8*, i8** %15
store i8* %16, i8** %8
%17 = load i8*, i8** %7
%18 = load i8*, i8** %8
%19 = call i32 @strcmp(i8* %17, i8* %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @idCmp(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)
ret i32 %7
}
int ispunct(int c) {}


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

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

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

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main() {
  char arr[50];
  memset(arr, 'a', 50 * sizeof(char));
  strncpy(arr, "hello world!", 50);
  printf("%s\n", arr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
mov    $0x61,%esi
mov    $0x32,%edx
call   1050 <memset@plt>
lea    -0x40(%rbp),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x32,%edx
call   1030 <strncpy@plt>
lea    -0x40(%rbp),%rsi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x61,%esi
mov    $0x32,%edx
call   1050 <memset@plt>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
mov    $0x32,%edx
call   1030 <strncpy@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 97, i32 50)
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 50)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 97, i32 50)
%4 = call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 50)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
void lstat64() {}


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

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

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

LLVM IR (-O2):
define void @lstat64() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  int *x;
  x = (int *)malloc(8);
  *x = 1234;
  *(x + 1) = 2345;
  x++;
  return *x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x4d2,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x929,0x4(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
movabs $0x929000004d2,%rcx
mov    %rcx,(%rax)
mov    $0x929,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 8)
%2 = inttoptr i64 %1 to i32*
store i32 1234, i32* %2
%3 = getelementptr inbounds i32, i32* %2, i64 1
store i32 2345, i32* %3
ret i32 2345
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char fgetc(int /*<<< orphan*/ *);
size_t strlen(char *);
void goToEndOfLine(char *line, FILE *file) {
  size_t length = strlen(line);
  char c = line[length - 1];
  while (c != '\n')
    c = fgetc(file);
}


x86 assembly (clang, -O0):
<goToEndOfLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0xa,%eax
je     116d <goToEndOfLine+0x4d>
mov    -0x10(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %al,-0x19(%rbp)
jmp    114f <goToEndOfLine+0x2f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goToEndOfLine>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
cmpb   $0xa,-0x1(%rax,%r14,1)
je     114c <goToEndOfLine+0x2c>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <fgetc@plt>
cmp    $0xa,%al
jne    1140 <goToEndOfLine+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @goToEndOfLine(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add i64 %3, -1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %11, label %8
8: ; preds = %2, %8
%9 = tail call signext i8 @fgetc(i32* %1)
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %8
11: ; preds = %8, %2
ret void
}
int adders(int in1, int in2, int in3) {
#pragma HLS INTERFACE ap_ctrl_none port = return
#pragma HLS INTERFACE ap_none port = in3
#pragma HLS INTERFACE ap_none port = in2
#pragma HLS INTERFACE ap_none port = in1
  int sum;
  sum = in1 + in2 + in3;
  return sum;
}


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

x86 assembly (clang, -O2):
<adders>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @adders(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
void ff_hevc_put_hevc_uni_pel_pixels8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels8_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ev_stop();
void sans_stop(void) { ev_stop(); }


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

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

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

LLVM IR (-O2):
define void @sans_stop() {
%1 = tail call i32 (...) @ev_stop()
ret void
}
void clear_bit(int nr, volatile unsigned long *addr) {
  *(addr + ((nr) / ((int)((sizeof(long) * 8))))) &=
      ~(1UL << ((nr) % ((int)((sizeof(long) * 8)))));
}


x86 assembly (clang, -O0):
<clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    %eax,%ecx
mov    $0x1,%esi
shl    %cl,%rsi
xor    $0xffffffffffffffff,%rsi
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
and    %rsi,%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit>:
mov    %edi,%ecx
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
lea    0x3f(%rcx),%edx
test   %edi,%edi
cmovns %ecx,%edx
sar    $0x6,%edx
movslq %edx,%rcx
and    %rax,(%rsi,%rcx,8)
ret

LLVM IR (-O0):
define void @clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = srem i32 %5, 64
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = xor i64 %8, -1
%10 = load i64*, i64** %4
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 64
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i64, i64* %10, i64 %13
%15 = load volatile i64, i64* %14
%16 = and i64 %15, %9
store volatile i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @clear_bit(i32 %0, i64* %1) {
%3 = srem i32 %0, 64
%4 = zext i32 %3 to i64
%5 = shl nuw i64 1, %4
%6 = xor i64 %5, -1
%7 = sdiv i32 %0, 64
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %1, i64 %8
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ipc_exchange(int, int /*<<< orphan*/);
void ipc_ping(void) { ipc_exchange(0x01000000, 0); }


x86 assembly (clang, -O0):
<ipc_ping>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1000000,%edi
xor    %esi,%esi
call   1030 <ipc_exchange@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_ping>:
mov    $0x1000000,%edi
xor    %esi,%esi
jmp    1030 <ipc_exchange@plt>

LLVM IR (-O0):
define void @ipc_ping() {
%1 = call i32 @ipc_exchange(i32 16777216, i32 0)
ret void
}

LLVM IR (-O2):
define void @ipc_ping() {
%1 = tail call i32 @ipc_exchange(i32 16777216, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test3(int, int, int, int, int);
__attribute__((no)) void test(int a, int b, int c, int d, int e) {
  test3(a, b, c, d, e);
}


x86 assembly (clang, -O0):
<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
call   1030 <test3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
jmp    1030 <test3@plt>

LLVM IR (-O0):
define void @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 @test3(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @test(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @test3(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void displayUsage() { printf("usage: mphconv <miles> <mph>\n"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"usage: mphconv <miles> <mph>\0A\00"
define void @displayUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"usage: mphconv <miles> <mph>\00"
define void @displayUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *);
void *malloc(int);
int main() {
  void *p = malloc(sizeof(double));
  int *pi = p;
  double *pd = p;
  *pi = 1;
  int a = *pi;
  *pd = 0;
  *pi = a;
  foo(pi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rdi
call   1040 <foo@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
movq   $0x0,(%rax)
movl   $0x1,(%rax)
mov    %rax,%rdi
call   1040 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca double*
%5 = alloca i32
store i32 0, i32* %1
%6 = call i8* @malloc(i32 8)
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %3
%9 = load i8*, i8** %2
%10 = bitcast i8* %9 to double*
store double* %10, double** %4
%11 = load i32*, i32** %3
store i32 1, i32* %11
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
store i32 %13, i32* %5
%14 = load double*, double** %4
store double 0.000000e+00, double* %14
%15 = load i32, i32* %5
%16 = load i32*, i32** %3
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = call i32 @foo(i32* %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(8) i8* @malloc(i32 8)
%2 = bitcast i8* %1 to i32*
%3 = bitcast i8* %1 to double*
store double 0.000000e+00, double* %3
store i32 1, i32* %2
%4 = tail call i32 @foo(i32* %2)
ret i32 0
}
/* Variables and functions */
void g();
void h() { return (g()); }


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

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

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

LLVM IR (-O2):
define void @h() {
tail call void (...) @g()
ret void
}
/* Variables and functions */
unsigned long __raw_readl(void *);
int /*<<< orphan*/ __raw_writel(unsigned long volatile, void *);
unsigned long AKSET_BITS(unsigned long bits_result, void *reg) {
  volatile unsigned long val;
  val = __raw_readl(reg);
  val |= bits_result;
  __raw_writel(val, reg);
  return 0;
}


x86 assembly (clang, -O0):
<AKSET_BITS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <__raw_readl@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__raw_writel@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AKSET_BITS>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <__raw_readl@plt>
mov    %rax,(%rsp)
or     %r14,(%rsp)
mov    (%rsp),%rdi
mov    %rbx,%rsi
call   1030 <__raw_writel@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @AKSET_BITS(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @__raw_readl(i8* %6)
store volatile i64 %7, i64* %5
%8 = load i64, i64* %3
%9 = load volatile i64, i64* %5
%10 = or i64 %9, %8
store volatile i64 %10, i64* %5
%11 = load volatile i64, i64* %5
%12 = load i8*, i8** %4
%13 = call i32 @__raw_writel(i64 %11, i8* %12)
ret i64 0
}

LLVM IR (-O2):
define i64 @AKSET_BITS(i64 %0, i8* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = tail call i64 @__raw_readl(i8* %1)
store volatile i64 %5, i64* %3
%6 = load volatile i64, i64* %3
%7 = or i64 %6, %0
store volatile i64 %7, i64* %3
%8 = load volatile i64, i64* %3
%9 = tail call i32 @__raw_writel(i64 %8, i8* %1)
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_rwlock_unlock(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_rwlock_wrlock(int /*<<< orphan*/ *);
void sync_sub(pthread_rwlock_t *lock, int *var, int val) {
  pthread_rwlock_wrlock(lock);
  { *var -= val; }
  pthread_rwlock_unlock(lock);
}


x86 assembly (clang, -O0):
<sync_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_rwlock_wrlock@plt>
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_rwlock_unlock@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_sub>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <pthread_rwlock_wrlock@plt>
sub    %r14d,(%rbx)
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <pthread_rwlock_unlock@plt>

LLVM IR (-O0):
define void @sync_sub(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 = call i32 @pthread_rwlock_wrlock(i32* %7)
%9 = load i32, i32* %6
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = sub nsw i32 %11, %9
store i32 %12, i32* %10
%13 = load i32*, i32** %4
%14 = call i32 @pthread_rwlock_unlock(i32* %13)
ret void
}

LLVM IR (-O2):
define void @sync_sub(i32* %0, i32* nocapture %1, i32 %2) {
%4 = tail call i32 @pthread_rwlock_wrlock(i32* %0)
%5 = load i32, i32* %1
%6 = sub nsw i32 %5, %2
store i32 %6, i32* %1
%7 = tail call i32 @pthread_rwlock_unlock(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ chmod(char *, int);
int lha_arch_chmod(char *filename, int unix_perms) {
  return chmod(filename, unix_perms) == 0;
}


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

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

LLVM IR (-O0):
define i32 @lha_arch_chmod(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 i64 @chmod(i8* %5, i32 %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @lha_arch_chmod(i8* nocapture %0, i32 %1) {
%3 = tail call i64 @chmod(i8* %0, i32 %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, unsigned int);
scalar_t__ strlen(char const *);
int main(int argc, char *argv[]) {
  const char *sentence = "the brown fox jumps over the lazy dog";
  printf("\"%s\" has a lenth of %d characters.\n", sentence,
         (unsigned)strlen(sentence));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf0e(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x25,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"the brown fox jumps over the lazy dog\00"
@.str.1 = [36 x i8] c"\22%s\22 has a lenth of %d characters.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %6
%9 = call i64 @strlen(i8* %8)
%10 = trunc i64 %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %7, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"the brown fox jumps over the lazy dog\00"
@.str.1 = [36 x i8] c"\22%s\22 has a lenth of %d characters.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 37)
ret i32 0
}
/* Type definitions */
typedef float const int32_t;

/* Variables and functions */
float float_from_q8_23(int32_t ival) {
  static const float scale = 1. / (float)(1UL << 23);
  return ival * scale;
}


x86 assembly (clang, -O0):
<float_from_q8_23>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_from_q8_23>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
@float_from_q8_23.scale = internal constant float 0x3E80000000000000
define float @float_from_q8_23(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3E80000000000000
ret float %4
}

LLVM IR (-O2):
define float @float_from_q8_23(float %0) {
%2 = fmul float %0, 0x3E80000000000000
ret float %2
}
void VP8LEncDspInitNEON(void) {}


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

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

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

LLVM IR (-O2):
define void @VP8LEncDspInitNEON() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ width;
};
typedef TYPE_1__ XConfigureEvent;

/* Variables and functions */
int get_XConfigureEvent_width(void *_p) {
  return (int)((XConfigureEvent *)_p)->width;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XConfigureEvent_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int str_len(char *f_str) {
  int count;
  for (count = 0; *(f_str + count) != '\0'; count++)
    ;
  return count - 1;
}


x86 assembly (clang, -O0):
<str_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <str_len+0x37>
jmp    1129 <str_len+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <str_len+0xf>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_len>:
mov    $0xfffffffe,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <str_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @str_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 = add nsw i32 %9, -1
ret i32 %10
}
int gpio_close() { return 100; }


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

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

LLVM IR (-O0):
define i32 @gpio_close() {
ret i32 100
}

LLVM IR (-O2):
define i32 @gpio_close() {
ret i32 100
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_get_channels() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_get_channels"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"NOT IMPLEMENTED:pa_format_info_get_channels\0A\00"
define i32 @pa_format_info_get_channels() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_format_info_get_channels\00"
define i32 @pa_format_info_get_channels() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int fun149() { return 149; }


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

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

LLVM IR (-O0):
define i32 @fun149() {
ret i32 149
}

LLVM IR (-O2):
define i32 @fun149() {
ret i32 149
}
/* Type definitions */
struct timex {
  long offset;
};

/* Variables and functions */
void setter_offset(struct timex *txc, long v) { txc->offset = v; }


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

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

LLVM IR (-O0):
%struct.timex = type { i64 }
define void @setter_offset(%struct.timex* %0, i64 %1) {
%3 = alloca %struct.timex*
%4 = alloca i64
store %struct.timex* %0, %struct.timex** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load %struct.timex*, %struct.timex** %3
%7 = getelementptr inbounds %struct.timex, %struct.timex* %6, i32 0, i32 0
store i64 %5, i64* %7
ret void
}

LLVM IR (-O2):
%struct.timex = type { i64 }
define void @setter_offset(%struct.timex* nocapture writeonly %0, i64 %1) {
%3 = getelementptr inbounds %struct.timex, %struct.timex* %0, i64 0, i32 0
store i64 %1, i64* %3
ret void
}
/* Type definitions */
struct catmc_atomic_int_least64_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct catmc_atomic_int_least64_t *);
void catmc_atomic_int_least64_t_destroy(
    struct catmc_atomic_int_least64_t *wrapper) {
  free(wrapper);
}


x86 assembly (clang, -O0):
<catmc_atomic_int_least64_t_destroy>:
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):
<catmc_atomic_int_least64_t_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.catmc_atomic_int_least64_t = type { i32 }
define void @catmc_atomic_int_least64_t_destroy(%struct.catmc_atomic_int_least64_t* nocapture %0) {
%2 = tail call i32 @free(%struct.catmc_atomic_int_least64_t* %0)
ret void
}
int min2(int a, int b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<min2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <min2+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min2+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min2>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min2(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int BOX_START(int index) {
  int x;
  x = index - (index % 3);
  x -= ((x / 9) % 3) * 9;
  return x;
}


x86 assembly (clang, -O0):
<BOX_START>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    $0x3,%ecx
cltd
idiv   %ecx
imul   $0x9,%edx,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOX_START>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
cltq
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    %ecx
add    %edx,%ecx
movslq %ecx,%rcx
imul   $0x55555556,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rdx
add    %esi,%edx
lea    (%rdx,%rdx,2),%edx
sub    %edx,%ecx
lea    (%rcx,%rcx,8),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @BOX_START(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = srem i32 %5, 3
%7 = sub nsw i32 %4, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sdiv i32 %8, 9
%10 = srem i32 %9, 3
%11 = mul nsw i32 %10, 9
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @BOX_START(i32 %0) {
%2 = srem i32 %0, 3
%3 = sub nsw i32 %0, %2
%4 = sdiv i32 %3, 9
%5 = srem i32 %4, 3
%6 = mul nsw i32 %5, -9
%7 = add i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
int /*<<< orphan*/ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, int);
int snd_card_load(int card) {
  char control[sizeof("/dev/snd"
                      "/controlC%i") +
               10];
  sprintf(control,
          "/dev/snd"
          "/controlC%i",
          card);
  return !access(control, R_OK);
}


x86 assembly (clang, -O0):
<snd_card_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snd_card_load>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"/dev/snd/controlC%i\00"
@R_OK = global i32 0
define i32 @snd_card_load(i32 %0) {
%2 = alloca i32
%3 = alloca [30 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* @R_OK
%9 = call i32 @access(i8* %7, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [20 x i8] c"/dev/snd/controlC%i\00"
@R_OK = global i32 0
define i32 @snd_card_load(i32 %0) {
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = load i32, i32* @R_OK
%6 = call i32 @access(i8* %3, i32 %5)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
scalar_t__ check_auth(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usage(int, char **);
int main(int argc, char *argv[]) {
  usage(argc, argv);
  if (check_auth(argv[1])) {
    printf("[!] Access GRANTED\n");
  } else {
    printf("[!] Access DENIED\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <check_auth@plt>
cmp    $0x0,%rax
je     117a <main+0x4a>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    1186 <main+0x56>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
call   1040 <usage@plt>
mov    0x8(%rbx),%rdi
call   1050 <check_auth@plt>
test   %rax,%rax
lea    0xeb4(%rip),%rax
lea    0xebf(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"[!] Access GRANTED\0A\00"
@.str.1 = [19 x i8] c"[!] Access DENIED\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @usage(i32 %6, i8** %7)
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @check_auth(i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %18
16: ; preds = %2
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@str = [18 x i8] c"[!] Access DENIED\00"
@str.2 = [19 x i8] c"[!] Access GRANTED\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @usage(i32 %0, i8** %1)
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i64 @check_auth(i8* %5)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.2, i64 0, i64 0)
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
ret i32 0
}
/* Type definitions */
typedef int __m128;

/* Variables and functions */
__m128 __attribute__((__always___, __nodebug__))
_mm_mul_ps(__m128 a, __m128 b) {
  return a * b;
}


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

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

LLVM IR (-O0):
define i32 @_mm_mul_ps(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @_mm_mul_ps(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ get_inode(char *);
int /*<<< orphan*/ printpathto(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int main(int argc, char **argv) {
  printpathto(get_inode("."));
  putchar('\n');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <get_inode@plt>
mov    %eax,%edi
call   1050 <printpathto@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <get_inode@plt>
mov    %eax,%edi
call   1050 <printpathto@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @get_inode(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printpathto(i32 %6)
%8 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @get_inode(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printpathto(i32 %3)
%5 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}