xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ReadNumber(int /*<<< orphan*/ *, int *);
char ReadWhiteSpace(int /*<<< orphan*/ *);
int /*<<< orphan*/ gl_err(char *);
void ReadCoordinates(FILE *file, int *x, int *y) {
  ReadNumber(file, x);
  if (ReadWhiteSpace(file) != '@')
    gl_err("ReadCoordinates: '@' expected");
  ReadNumber(file, y);
}


x86 assembly (clang, -O0):
<ReadCoordinates>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ReadNumber@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ReadWhiteSpace@plt>
movsbl %al,%eax
cmp    $0x40,%eax
je     1172 <ReadCoordinates+0x42>
lea    0xe93(%rip),%rdi
call   1050 <gl_err@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <ReadNumber@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadCoordinates>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1040 <ReadNumber@plt>
mov    %rbx,%rdi
call   1030 <ReadWhiteSpace@plt>
cmp    $0x40,%al
je     1157 <ReadCoordinates+0x27>
lea    0xeae(%rip),%rdi
call   1050 <gl_err@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ReadNumber@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"ReadCoordinates: '@' expected\00"
define void @ReadCoordinates(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 = call i32 @ReadNumber(i32* %7, i32* %8)
%10 = load i32*, i32** %4
%11 = call signext i8 @ReadWhiteSpace(i32* %10)
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 64
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @gl_err(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
%17 = load i32*, i32** %4
%18 = load i32*, i32** %6
%19 = call i32 @ReadNumber(i32* %17, i32* %18)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"ReadCoordinates: '@' expected\00"
define void @ReadCoordinates(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @ReadNumber(i32* %0, i32* %1)
%5 = tail call signext i8 @ReadWhiteSpace(i32* %0)
%6 = icmp eq i8 %5, 64
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @gl_err(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %3
%10 = tail call i32 @ReadNumber(i32* %0, i32* %2)
ret void
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int __syscall_ret(int /*<<< orphan*/);
int sched_setparam(pid_t pid, const struct sched_param *param) {
  return __syscall_ret(-ENOSYS);
}


x86 assembly (clang, -O0):
<sched_setparam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    0x2ec0(%rip),%rax
sub    (%rax),%edi
call   1030 <__syscall_ret@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sched_setparam>:
mov    0x2ed1(%rip),%rax
xor    %edi,%edi
sub    (%rax),%edi
jmp    1030 <__syscall_ret@plt>

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@ENOSYS = global i32 0
define i32 @sched_setparam(i32 %0, %struct.sched_param* %1) {
%3 = alloca i32
%4 = alloca %struct.sched_param*
store i32 %0, i32* %3
store %struct.sched_param* %1, %struct.sched_param** %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
%7 = call i32 @__syscall_ret(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@ENOSYS = global i32 0
define i32 @sched_setparam(i32 %0, %struct.sched_param* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
%5 = tail call i32 @__syscall_ret(i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ write_t0();
int /*<<< orphan*/ write_t1();
void writeSyncFrame(int sync) {
  for (int i = 0; i < sync; i++) {
    write_t1();
  }
  write_t0();
}


x86 assembly (clang, -O0):
<writeSyncFrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1153 <writeSyncFrame+0x33>
mov    $0x0,%al
call   1030 <write_t1@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <writeSyncFrame+0x12>
mov    $0x0,%al
call   1040 <write_t0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeSyncFrame>:
push   %rbx
test   %edi,%edi
jle    113c <writeSyncFrame+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <write_t1@plt>
add    $0xffffffff,%ebx
jne    1130 <writeSyncFrame+0x10>
xor    %eax,%eax
pop    %rbx
jmp    1040 <write_t0@plt>

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

LLVM IR (-O2):
define void @writeSyncFrame(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %5, %1
%4 = tail call i32 (...) @write_t0()
ret void
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 (...) @write_t1()
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %3, label %5
}
int test_unsignedlonglong() {
  int i;
  unsigned long long sums[2] = {0};
#pragma acc parallel loop
  for (i = 0; i < 8192; i++) {
#pragma acc atomic
    sums[0]++;
#pragma acc atomic
    ++sums[1];
  }
  for (i = 0; i < 2; i++) {
    if (sums[i] != (8192)) {
      return i + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_unsignedlonglong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2000,-0x8(%rbp)
jge    1162 <test_unsignedlonglong+0x52>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <test_unsignedlonglong+0x1f>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11a7 <test_unsignedlonglong+0x97>
movslq -0x8(%rbp),%rax
cmpq   $0x2000,-0x20(%rbp,%rax,8)
je     1194 <test_unsignedlonglong+0x84>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11ae <test_unsignedlonglong+0x9e>
jmp    1199 <test_unsignedlonglong+0x89>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1169 <test_unsignedlonglong+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_unsignedlonglong() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ klee_assume(int);
void nondet_assume(int expr) { klee_assume(expr); }


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

x86 assembly (clang, -O2):
<nondet_assume>:
jmp    1030 <klee_assume@plt>

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

LLVM IR (-O2):
define void @nondet_assume(i32 %0) {
%2 = tail call i32 @klee_assume(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int pthread_mutex_init(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
pthread_mutex_t *Thread_create_mutex() {
  pthread_mutex_t *mutex = NULL;
  int rc = 0;
  ;
  mutex = malloc(sizeof(pthread_mutex_t));
  rc = pthread_mutex_init(mutex, NULL);
  ;
  return mutex;
}


x86 assembly (clang, -O0):
<Thread_create_mutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_mutex_init@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thread_create_mutex>:
push   %rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1040 <pthread_mutex_init@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @Thread_create_mutex() {
%1 = alloca i32*
%2 = alloca i32
store i32* null, i32** %1
store i32 0, i32* %2
%3 = call i32* @malloc(i32 4)
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @pthread_mutex_init(i32* %4, i32* null)
store i32 %5, i32* %2
%6 = load i32*, i32** %1
ret i32* %6
}

LLVM IR (-O2):
define i32* @Thread_create_mutex() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i32 @pthread_mutex_init(i32* %1, i32* null)
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
void timelib_eat_until_separator(char **ptr) {
  while (strchr(" \t.,:;/-0123456789", **ptr) == NULL) {
    ++*ptr;
  }
}


x86 assembly (clang, -O0):
<timelib_eat_until_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
lea    0xed6(%rip),%rdi
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    114f <timelib_eat_until_separator+0x3f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <timelib_eat_until_separator+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timelib_eat_until_separator>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <strchr@plt>
test   %rax,%rax
jne    115b <timelib_eat_until_separator+0x4b>
lea    0xecb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     1140 <timelib_eat_until_separator+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c" \09.,:;/-0123456789\00"
define void @timelib_eat_until_separator(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %9, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = call i32* @strchr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %10
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c" \09.,:;/-0123456789\00"
define void @timelib_eat_until_separator(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i32* @strchr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 signext %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %12
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i32* @strchr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = icmp eq i32* %10, null
br i1 %11, label %6, label %12
12: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump(char const *, char const *, int, char *, int, char *);
void hexdump(const char *message, const char *data, int len) {
  dump(message, data, len, "%02x ", 16, "   ");
}


x86 assembly (clang, -O0):
<hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xecb(%rip),%rcx
mov    $0x10,%r8d
lea    0xec4(%rip),%r9
call   1030 <dump@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdump>:
lea    0xee9(%rip),%rcx
lea    0xee8(%rip),%r9
mov    $0x10,%r8d
jmp    1030 <dump@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%02x \00"
@.str.1 = [4 x i8] c" \00"
define void @hexdump(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @dump(i8* %7, i8* %8, i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02x \00"
@.str.1 = [4 x i8] c" \00"
define void @hexdump(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @dump(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void string_free1(char *s) { free(s); }


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

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

LLVM IR (-O2):
define void @string_free1(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int varfunc(int num, ...) {
  if (!num)
    goto end;
  varfunc(num - 1, 0, 0);
end:
  return 23;
}


x86 assembly (clang, -O0):
<varfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112a <varfunc+0x1a>
jmp    113b <varfunc+0x2b>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <varfunc@plt>
mov    $0x17,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<varfunc>:
test   %edi,%edi
je     1127 <varfunc+0x17>
push   %rax
add    $0xffffffff,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <varfunc@plt>
add    $0x8,%rsp
mov    $0x17,%eax
ret

LLVM IR (-O0):
define i32 @varfunc(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = call i32 (i32, ...) @varfunc(i32 %8, i32 0, i32 0)
br label %10
10: ; preds = %6, %5
ret i32 23
}

LLVM IR (-O2):
define i32 @varfunc(i32 %0, ...) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 (i32, ...) @varfunc(i32 %4, i32 0, i32 0)
br label %6
6: ; preds = %1, %3
ret i32 23
}
/* Variables and functions */
char *concat(char const *, char *, char *);
char *HTMLGenTitle(const char *innerHTML) {
  return concat(innerHTML, "<title>", "</title>");
}


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

x86 assembly (clang, -O2):
<HTMLGenTitle>:
lea    0xee9(%rip),%rsi
lea    0xeea(%rip),%rdx
jmp    1030 <concat@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"<title>\00"
@.str.1 = [9 x i8] c"</title>\00"
define i8* @HTMLGenTitle(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @concat(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"<title>\00"
@.str.1 = [9 x i8] c"</title>\00"
define i8* @HTMLGenTitle(i8* %0) {
%2 = tail call i8* @concat(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int);
int sub(int, int);
int main() {
  printf("sum = %d\n", add(5, 3));
  printf("sub = %d\n", sub(5, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x3,%esi
call   1030 <add@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0x3,%esi
call   1050 <sub@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x3,%esi
call   1030 <add@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0x3,%esi
call   1050 <sub@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"sum = %d\0A\00"
@.str.1 = [10 x i8] c"sub = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 5, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @sub(i32 5, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
void gtk_notebook_prepend_page_menu() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_prepend_page_menu() {
ret void
}
void EVP_CIPHER_CTX_get_app_data(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_get_app_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printw(char *);
void printBanner() { printw("\n\n\rTest programs for HC-SR04\n\n\r"); }


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"\0A\0A\0DTest programs for HC-SR04\0A\0A\0D\00"
define void @printBanner() {
%1 = call i32 @printw(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0A\0A\0DTest programs for HC-SR04\0A\0A\0D\00"
define void @printBanner() {
%1 = tail call i32 @printw(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void mainProcLoop() {
  while (1) {
    uart_puts("Bucle del proceso main!\r\n");
  }
}


x86 assembly (clang, -O0):
<mainProcLoop>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <mainProcLoop+0x9>
lea    0xee0(%rip),%rdi
call   1030 <uart_puts@plt>
jmp    1119 <mainProcLoop+0x9>

x86 assembly (clang, -O2):
<mainProcLoop>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <uart_puts@plt>
jmp    1120 <mainProcLoop+0x10>

LLVM IR (-O0):
@.str = [26 x i8] c"Bucle del proceso main!\0D\0A\00"
define void @mainProcLoop() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @uart_puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %1
}

LLVM IR (-O2):
@.str = [26 x i8] c"Bucle del proceso main!\0D\0A\00"
define void @mainProcLoop() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @uart_puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_REVOKEDINFO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_REVOKEDINFO_it;
void OCSP_REVOKEDINFO_free(OCSP_REVOKEDINFO *a) {
  ASN1_item_free((ASN1_VALUE *)a, &OCSP_REVOKEDINFO_it);
}


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

x86 assembly (clang, -O2):
<OCSP_REVOKEDINFO_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@OCSP_REVOKEDINFO_it = global i32 0
define void @OCSP_REVOKEDINFO_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @OCSP_REVOKEDINFO_it)
ret void
}
int brcm_pcie_bounce_uninit(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @brcm_pcie_bounce_uninit(%struct.device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_FLASH_CLK_OUTPUT() { set_io_bit(0x36, 3); }


x86 assembly (clang, -O0):
<TOSH_MAKE_FLASH_CLK_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x36,%edi
mov    $0x3,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_FLASH_CLK_OUTPUT>:
mov    $0x36,%edi
mov    $0x3,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_FLASH_CLK_OUTPUT() {
%1 = call i32 @set_io_bit(i32 54, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_FLASH_CLK_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 54, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, ...);
void version(void) {
  printf("\nFrontdown %s\n", "0.1");
  printf("Compiled: %s %s with gcc %d.%d.%d\n\n", "Mar 15 2022", "23:03:07", 9,
         4, 0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    0xf00(%rip),%rsi
lea    0xf05(%rip),%rdx
mov    $0x9,%ecx
mov    $0x4,%r8d
xor    %r9d,%r9d
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef0(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    0xf03(%rip),%rsi
lea    0xf08(%rip),%rdx
mov    $0x9,%ecx
mov    $0x4,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
pop    %r11
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\0AFrontdown %s\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
@.str.2 = [36 x i8] c"Compiled: %s %s with gcc %d.%d.%d\0A\0A\00"
@.str.3 = [12 x i8] c"Mar 15 2022\00"
@.str.4 = [9 x i8] c"23:03:07\00"
define void @version() {
%1 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 9, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\0AFrontdown %s\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
@.str.2 = [36 x i8] c"Compiled: %s %s with gcc %d.%d.%d\0A\0A\00"
@.str.3 = [12 x i8] c"Mar 15 2022\00"
@.str.4 = [9 x i8] c"23:03:07\00"
define void @version() {
%1 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 9, i32 4, i32 0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t fast_mod31_16(uint32_t a) { return (a & 0x1f) + (a >> 5); }


x86 assembly (clang, -O0):
<fast_mod31_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fast_mod31_16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 31
%5 = load i32, i32* %2
%6 = ashr i32 %5, 5
%7 = add nsw i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fast_mod31_16(i32 %0) {
%2 = and i32 %0, 31
%3 = ashr i32 %0, 5
%4 = add nsw i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x1d() {
  Assert_real((isascii(29)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              150, ("isascii should be 1 for 0x1d"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x1d\00"
define void @t_isascii_0x1d() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int linkName(int old, int new) {
  return ((old == 2 || old == 3) && (new == 2 || new == 3)) ||
         (old == 3 && new == 4);
}


x86 assembly (clang, -O0):
<linkName>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     111e <linkName+0x1e>
cmpl   $0x3,-0x4(%rbp)
jne    113c <linkName+0x3c>
mov    $0x1,%al
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     115b <linkName+0x5b>
mov    $0x1,%al
cmpl   $0x3,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     115b <linkName+0x5b>
xor    %eax,%eax
cmpl   $0x3,-0x4(%rbp)
mov    %al,-0xa(%rbp)
jne    1155 <linkName+0x55>
cmpl   $0x4,-0x8(%rbp)
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linkName>:
mov    %edi,%eax
xor    $0x3,%eax
and    $0xfffffffe,%edi
xor    $0x2,%edi
mov    %esi,%ecx
and    $0xfffffffe,%ecx
xor    $0x2,%ecx
or     %edi,%ecx
sete   %cl
xor    $0x4,%esi
or     %eax,%esi
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @linkName(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 = icmp eq i32 %5, 2
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 3
br i1 %9, label %10, label %16
10: ; preds = %7, %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %24, label %13
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 3
br i1 %15, label %24, label %16
16: ; preds = %13, %7
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 3
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 4
br label %22
22: ; preds = %19, %16
%23 = phi i1 [ false, %16 ], [ %21, %19 ]
br label %24
24: ; preds = %22, %13, %10
%25 = phi i1 [ true, %13 ], [ true, %10 ], [ %23, %22 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @linkName(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 3
%4 = and i32 %0, -2
%5 = icmp eq i32 %4, 2
%6 = and i32 %1, -2
%7 = icmp eq i32 %6, 2
%8 = and i1 %5, %7
%9 = icmp eq i32 %1, 4
%10 = and i1 %3, %9
%11 = or i1 %10, %8
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int mask_match(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *);
int mask_match3(char *nick, char *user, char *host, char *val) {
  char ident[512];
  snprintf(ident, 512, "%s!%s@%s", nick, user, host);
  return mask_match(ident, val);
}


x86 assembly (clang, -O0):
<mask_match3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    $0x200,%esi
lea    0xea6(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x220(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <mask_match@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mask_match3>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rcx,%rbx
mov    %rdx,%r9
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xec3(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x200,%esi
call   1040 <snprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <mask_match@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s!%s@%s\00"
define i32 @mask_match3(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [512 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = call i32 @snprintf(i8* %10, i32 512, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %13)
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%16 = load i8*, i8** %8
%17 = call i32 @mask_match(i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s!%s@%s\00"
define i32 @mask_match3(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [512 x i8]
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%7 = call i32 @snprintf(i8* %6, i32 512, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
%8 = call i32 @mask_match(i8* %6, i8* %3)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_601(void) {
  DeinitFields();
  ClearONOFF();
}


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

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

LLVM IR (-O0):
define void @SwitchFrom_601() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_601() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
float *dvector(int nl, int nh) {
  float *v;
  v = (float *)malloc((size_t)((nh - nl + 1 + 1) * sizeof(float)));
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<dvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x4,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvector>:
push   %rbx
mov    %edi,%ebx
sub    %edi,%esi
add    $0x2,%esi
movslq %esi,%rdi
shl    $0x2,%rdi
call   1030 <malloc@plt>
movslq %ebx,%rcx
shl    $0x2,%rcx
neg    %rcx
add    %rcx,%rax
add    $0x4,%rax
pop    %rbx
ret

LLVM IR (-O0):
define float* @dvector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = mul i64 %11, 4
%13 = call i64 @malloc(i64 %12)
%14 = inttoptr i64 %13 to float*
store float* %14, float** %5
%15 = load float*, float** %5
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = sub i64 0, %17
%19 = getelementptr inbounds float, float* %15, i64 %18
%20 = getelementptr inbounds float, float* %19, i64 1
ret float* %20
}

LLVM IR (-O2):
define float* @dvector(i32 %0, i32 %1) {
%3 = sub i32 2, %0
%4 = add i32 %3, %1
%5 = sext i32 %4 to i64
%6 = shl nsw i64 %5, 2
%7 = tail call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to float*
%9 = sext i32 %0 to i64
%10 = sub nsw i64 0, %9
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = getelementptr inbounds float, float* %11, i64 1
ret float* %12
}
/* Variables and functions */
int /*<<< orphan*/ addmac();
dodefine() { addmac(); }


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

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

LLVM IR (-O0):
define i32 @dodefine() {
%1 = alloca i32
%2 = call i32 (...) @addmac()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @dodefine() {
%1 = tail call i32 (...) @addmac()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _SC_CLK_TCK;
scalar_t__ sysconf(int /*<<< orphan*/);
int ticksPerSec(void) { return (int)sysconf(_SC_CLK_TCK); }


x86 assembly (clang, -O0):
<ticksPerSec>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ticksPerSec>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_CLK_TCK = global i32 0
define i32 @ticksPerSec() {
%1 = load i32, i32* @_SC_CLK_TCK
%2 = call i64 @sysconf(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@_SC_CLK_TCK = global i32 0
define i32 @ticksPerSec() {
%1 = load i32, i32* @_SC_CLK_TCK
%2 = tail call i64 @sysconf(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int foo1(int a) {
  int b = a + 1;
  if (b != 0)
    return b;
  return 1;
}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1125 <foo1+0x25>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112c <foo1+0x2c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
inc    %edi
mov    $0x1,%eax
cmovne %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @foo1(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 1, i32 %2
ret i32 %4
}
int namecmp(const char *a, const char *b) {
  int i;
  for (i = 0; i < 4; i++)
    if (a[i] != b[i])
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<namecmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    115c <namecmp+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1149 <namecmp+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1163 <namecmp+0x63>
jmp    114e <namecmp+0x4e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <namecmp+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<namecmp>:
mov    (%rdi),%cl
mov    $0x1,%eax
cmp    (%rsi),%cl
jne    1126 <namecmp+0x26>
mov    0x1(%rdi),%cl
cmp    0x1(%rsi),%cl
jne    1126 <namecmp+0x26>
mov    0x2(%rdi),%cl
cmp    0x2(%rsi),%cl
jne    1126 <namecmp+0x26>
mov    0x3(%rdi),%cl
xor    %eax,%eax
cmp    0x3(%rsi),%cl
setne  %al
ret

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

LLVM IR (-O2):
define i32 @namecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %25
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %1, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %8, %10
br i1 %11, label %12, label %25
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %0, i64 2
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %1, i64 2
%16 = load i8, i8* %15
%17 = icmp eq i8 %14, %16
br i1 %17, label %18, label %25
18: ; preds = %12
%19 = getelementptr inbounds i8, i8* %0, i64 3
%20 = load i8, i8* %19
%21 = getelementptr inbounds i8, i8* %1, i64 3
%22 = load i8, i8* %21
%23 = icmp ne i8 %20, %22
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %18, %12, %6, %2
%26 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 1, %12 ], [ %24, %18 ]
ret i32 %26
}
/* Type definitions */
typedef int u_int16_t;

/* Variables and functions */
int compare_func_16(const u_int16_t *p1, u_int16_t *p2) { return (*p1 - *p2); }


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

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

LLVM IR (-O0):
define i32 @compare_func_16(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @compare_func_16(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ UI_DEV_DESTROY;
int close(int);
int ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int suinput_close(int uinput_fd) {
  sleep(2);
  if (ioctl(uinput_fd, UI_DEV_DESTROY) == -1) {
    close(uinput_fd);
    return -1;
  }
  if (close(uinput_fd) == -1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<suinput_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    -0x8(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    1173 <suinput_close+0x43>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1197 <suinput_close+0x67>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
cmp    $0xffffffff,%eax
jne    1190 <suinput_close+0x60>
movl   $0xffffffff,-0x4(%rbp)
jmp    1197 <suinput_close+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suinput_close>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
sete   %bpl
mov    %ebx,%edi
call   1040 <close@plt>
cmp    $0xffffffff,%eax
sete   %al
or     %bpl,%al
movzbl %al,%eax
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@UI_DEV_DESTROY = global i32 0
define i32 @suinput_close(i32 %0) {
%2 = tail call i32 @sleep(i32 2)
%3 = load i32, i32* @UI_DEV_DESTROY
%4 = tail call i32 @ioctl(i32 %0, i32 %3)
%5 = icmp eq i32 %4, -1
%6 = tail call i32 @close(i32 %0)
%7 = icmp eq i32 %6, -1
%8 = select i1 %5, i1 true, i1 %7
%9 = sext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t firmware_phys_to_bus_address(uint32_t addr) {
  return (addr | 0x40000000);
}


x86 assembly (clang, -O0):
<firmware_phys_to_bus_address>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x40000000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<firmware_phys_to_bus_address>:
mov    %edi,%eax
or     $0x40000000,%eax
ret

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

LLVM IR (-O2):
define i32 @firmware_phys_to_bus_address(i32 %0) {
%2 = or i32 %0, 1073741824
ret i32 %2
}
void short_wait(void) {
  int i;
  for (i = 0; i < 150; i++) {
    __asm volatile("nop");
  }
}


x86 assembly (clang, -O0):
<short_wait>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x96,-0x4(%rbp)
jge    1127 <short_wait+0x27>
nop
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <short_wait+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @short_wait() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%3 = add nuw nsw i32 %2, 1
%4 = icmp eq i32 %3, 150
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Variables and functions */
int _mm_tzcnt_32(unsigned int);
int test_mm_tzcnt_32(unsigned int __X) { return _mm_tzcnt_32(__X); }


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

x86 assembly (clang, -O2):
<test_mm_tzcnt_32>:
jmp    1030 <_mm_tzcnt_32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_tzcnt_32(i32 %0) {
%2 = tail call i32 @_mm_tzcnt_32(i32 %0)
ret i32 %2
}