xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ get_bonded_neighbors(int **, int **, int, int, int *, int **,
                                        int *);
int get_num_neighbors(int **vbonds, int **hbonds, int M, int N, int A1[2]) {
  int neighbors[4][2];
  int numnei = -1;
  get_bonded_neighbors(vbonds, hbonds, M, N, A1, neighbors, &numnei);
  return numnei;
}


x86 assembly (clang, -O0):
<get_num_neighbors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0xffffffff,-0x44(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8
lea    -0x40(%rbp),%r9
lea    -0x44(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <get_bonded_neighbors@plt>
mov    -0x44(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num_neighbors>:
sub    $0x38,%rsp
movl   $0xffffffff,0xc(%rsp)
ff
lea    0xc(%rsp),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%r9
call   1030 <get_bonded_neighbors@plt>
mov    0xc(%rsp),%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i32 @get_num_neighbors(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*
%11 = alloca [4 x [2 x i32]]
%12 = 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
store i32 -1, i32* %12
%13 = load i32**, i32*** %6
%14 = load i32**, i32*** %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32*, i32** %10
%18 = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %11, i64 0, i64 0
%19 = bitcast [2 x i32]* %18 to i32**
%20 = call i32 @get_bonded_neighbors(i32** %13, i32** %14, i32 %15, i32 %16, i32* %17, i32** %19, i32* %12)
%21 = load i32, i32* %12
ret i32 %21
}

LLVM IR (-O2):
define i32 @get_num_neighbors(i32** %0, i32** %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca [4 x [2 x i32]]
%7 = alloca i32
%8 = bitcast [4 x [2 x i32]]* %6 to i8*
%9 = bitcast i32* %7 to i8*
store i32 -1, i32* %7
%10 = bitcast [4 x [2 x i32]]* %6 to i32**
%11 = call i32 @get_bonded_neighbors(i32** %0, i32** %1, i32 %2, i32 %3, i32* %4, i32** %10, i32* %7)
%12 = load i32, i32* %7
ret i32 %12
}
int axp_set_otpoffen(int otp) {
  int ret = 0;
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @axp_set_otpoffen(i32 %0) {
ret i32 0
}
/* Type definitions */
struct TcpdaemonServerEnvironment {
  int dummy;
};

/* Variables and functions */
int InitDaemonEnv(struct TcpdaemonServerEnvironment *);
int InitDaemonEnv_IF(struct TcpdaemonServerEnvironment *p_env) {
  return InitDaemonEnv(p_env);
}


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

x86 assembly (clang, -O2):
<InitDaemonEnv_IF>:
jmp    1030 <InitDaemonEnv@plt>

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

LLVM IR (-O2):
%struct.TcpdaemonServerEnvironment = type { i32 }
define i32 @InitDaemonEnv_IF(%struct.TcpdaemonServerEnvironment* %0) {
%2 = tail call i32 @InitDaemonEnv(%struct.TcpdaemonServerEnvironment* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main(void) {
  int i, j, k;
  i = 1;
  j = 2;
  k = i + j;
  if (k != 3)
    assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
je     1147 <main+0x37>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct ptrlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mtrandom_ulong(int /*<<< orphan*/);
void *ptrlist_entry(struct ptrlist const *const, int /*<<< orphan*/);
int /*<<< orphan*/ ptrlist_len(struct ptrlist const *const);
void *ptrlist_random(const struct ptrlist *const l) {
  if (!ptrlist_len(l))
    return NULL;
  return ptrlist_entry(l, mtrandom_ulong(ptrlist_len(l)));
}


x86 assembly (clang, -O0):
<ptrlist_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ptrlist_len@plt>
cmp    $0x0,%eax
jne    115b <ptrlist_random+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    1182 <ptrlist_random+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ptrlist_len@plt>
mov    %eax,%edi
call   1040 <mtrandom_ulong@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <ptrlist_entry@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrlist_random>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ptrlist_len@plt>
test   %eax,%eax
je     1157 <ptrlist_random+0x27>
mov    %rbx,%rdi
call   1030 <ptrlist_len@plt>
mov    %eax,%edi
call   1040 <mtrandom_ulong@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1050 <ptrlist_entry@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ptrlist = type { i32 }
define i8* @ptrlist_random(%struct.ptrlist* %0) {
%2 = alloca i8*
%3 = alloca %struct.ptrlist*
store %struct.ptrlist* %0, %struct.ptrlist** %3
%4 = load %struct.ptrlist*, %struct.ptrlist** %3
%5 = call i32 @ptrlist_len(%struct.ptrlist* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %14
8: ; preds = %1
%9 = load %struct.ptrlist*, %struct.ptrlist** %3
%10 = load %struct.ptrlist*, %struct.ptrlist** %3
%11 = call i32 @ptrlist_len(%struct.ptrlist* %10)
%12 = call i32 @mtrandom_ulong(i32 %11)
%13 = call i8* @ptrlist_entry(%struct.ptrlist* %9, i32 %12)
store i8* %13, i8** %2
br label %14
14: ; preds = %8, %7
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
%struct.ptrlist = type { i32 }
define i8* @ptrlist_random(%struct.ptrlist* %0) {
%2 = tail call i32 @ptrlist_len(%struct.ptrlist* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @ptrlist_len(%struct.ptrlist* %0)
%6 = tail call i32 @mtrandom_ulong(i32 %5)
%7 = tail call i8* @ptrlist_entry(%struct.ptrlist* %0, i32 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ null, %1 ]
ret i8* %9
}
void show_hpm_temp(void) {}


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

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

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

LLVM IR (-O2):
define void @show_hpm_temp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, int);
int read(int, int *, int);
int readi(int fd, int *dest) {
  int r = read(fd, dest, sizeof(int));
  if (r != sizeof(int) && r)
    die("Couldn't read integer (Got %d)\n", r);
  return r;
}


x86 assembly (clang, -O0):
<readi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x4,%rax
je     116a <readi+0x4a>
cmpl   $0x0,-0x14(%rbp)
je     116a <readi+0x4a>
mov    -0x14(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1040 <die@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readi>:
push   %rbx
mov    $0x4,%edx
call   1030 <read@plt>
mov    %eax,%ebx
test   $0xfffffffb,%eax
je     1142 <readi+0x22>
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
call   1040 <die@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Couldn't read integer (Got %d)\0A\00"
define i32 @readi(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = load i32*, i32** %4
%8 = call i32 @read(i32 %6, i32* %7, i32 4)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = icmp ne i64 %10, 4
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %5
%17 = call i32 @die(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %12, %2
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@.str = [32 x i8] c"Couldn't read integer (Got %d)\0A\00"
define i32 @readi(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @read(i32 %0, i32* %1, i32 4)
%4 = and i32 %3, -5
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @die(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %6, %2
ret i32 %3
}
void auto_init(void) {}


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

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

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

LLVM IR (-O2):
define void @auto_init() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
bool str_equals(const char *str, const char *other) {
  if (str == NULL || other == NULL)
    return 0;
  return strcmp(str, other) == 0;
}


x86 assembly (clang, -O0):
<str_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <str_equals+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <str_equals+0x32>
movl   $0x0,-0x4(%rbp)
jmp    115e <str_equals+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_equals>:
xor    %eax,%eax
test   %rdi,%rdi
je     1131 <str_equals+0x21>
test   %rsi,%rsi
je     1131 <str_equals+0x21>
push   %rax
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @str_equals(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 0, i32* %3
br label %18
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = call i64 @strcmp(i8* %13, i8* %14)
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
store i32 %17, i32* %3
br label %18
18: ; preds = %12, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @str_equals(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i64 @strcmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ sum(double, double);
void sum_test() {
  sum(1, 2);
  sum(1.1, 2.2);
}


x86 assembly (clang, -O0):
<sum_test>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  0xef4(%rip),%xmm1
call   1030 <sum@plt>
movsd  0xecf(%rip),%xmm0
movsd  0xecf(%rip),%xmm1
call   1030 <sum@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_test>:
push   %rax
movsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
call   1030 <sum@plt>
movsd  0xee2(%rip),%xmm0
movsd  0xee2(%rip),%xmm1
pop    %rax
jmp    1030 <sum@plt>

LLVM IR (-O0):
define void @sum_test() {
%1 = call i32 @sum(double 1.000000e+00, double 2.000000e+00)
%2 = call i32 @sum(double 1.100000e+00, double 2.200000e+00)
ret void
}

LLVM IR (-O2):
define void @sum_test() {
%1 = tail call i32 @sum(double 1.000000e+00, double 2.000000e+00)
%2 = tail call i32 @sum(double 1.100000e+00, double 2.200000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ generate_random_uuid(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void generate_key(char *buffer) {
  char sysctl_bootid[16];
  generate_random_uuid(sysctl_bootid);
  sprintf(buffer, "%pU", sysctl_bootid);
}


x86 assembly (clang, -O0):
<generate_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <generate_random_uuid@plt>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rdx
lea    0xebc(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_key>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <generate_random_uuid@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1040 <sprintf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%pU\00"
define void @generate_key(i8* %0) {
%2 = alloca i8*
%3 = alloca [16 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @generate_random_uuid(i8* %4)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%pU\00"
define void @generate_key(i8* nocapture writeonly %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @generate_random_uuid(i8* %3)
%5 = call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
int hashtable_ptrcmp(void *x, void *y) { return (x == y); }


x86 assembly (clang, -O0):
<hashtable_ptrcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtable_ptrcmp>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @hashtable_ptrcmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void ABGRToARGB() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToARGB() {
ret void
}
int sspm_is_continuation_line(char *line) {
  if (line[0] == ' ' || line[0] == '\t') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sspm_is_continuation_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1128 <sspm_is_continuation_line+0x28>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    1134 <sspm_is_continuation_line+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <sspm_is_continuation_line+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sspm_is_continuation_line>:
mov    (%rdi),%al
cmp    $0x20,%al
sete   %cl
cmp    $0x9,%al
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @sspm_is_continuation_line(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 32
%4 = icmp eq i8 %2, 9
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void wifi_rsp_tcpip_configure(
    const struct wifi_msg_tcpip_configure_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_tcpip_configure_rsp_t = type opaque
define void @wifi_rsp_tcpip_configure(%struct.wifi_msg_tcpip_configure_rsp_t* nocapture %0) {
ret void
}
void g_signal_emit_by_name() {}


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

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

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

LLVM IR (-O2):
define void @g_signal_emit_by_name() {
ret void
}
/* Variables and functions */
long reset_turn(long);
long set_turn(long n) { return reset_turn(n); }


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

x86 assembly (clang, -O2):
<set_turn>:
jmp    1030 <reset_turn@plt>

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

LLVM IR (-O2):
define i64 @set_turn(i64 %0) {
%2 = tail call i64 @reset_turn(i64 %0)
ret i64 %2
}
/* Type definitions */
struct cll_handler {
  int dummy;
};

/* Variables and functions */
void *_cll_search_nop(struct cll_handler *handler, void *data) { return NULL; }


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

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

LLVM IR (-O0):
%struct.cll_handler = type { i32 }
define i8* @_cll_search_nop(%struct.cll_handler* %0, i8* %1) {
%3 = alloca %struct.cll_handler*
%4 = alloca i8*
store %struct.cll_handler* %0, %struct.cll_handler** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
%struct.cll_handler = type { i32 }
define noalias i8* @_cll_search_nop(%struct.cll_handler* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
char *strerror(int);
void print_errno_message(int errnum) {
  char const *s = NULL;
  if (!s && !(s = strerror(errnum)))
    s = "Unknown system error";
  fprintf(stderr, ": %s", s);
}


x86 assembly (clang, -O0):
<print_errno_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <print_errno_message+0x3f>
mov    -0x4(%rbp),%edi
call   1040 <strerror@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    115f <print_errno_message+0x3f>
lea    0xea5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_errno_message>:
push   %rax
call   1040 <strerror@plt>
test   %rax,%rax
lea    0xed0(%rip),%rdx
cmovne %rax,%rdx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
pop    %rax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Unknown system error\00"
@stderr = global i32 0
@.str.1 = [5 x i8] c": %s\00"
define void @print_errno_message(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* null, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i8* @strerror(i32 %7)
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %6
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %3
br label %11
11: ; preds = %10, %6, %1
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Unknown system error\00"
@stderr = global i32 0
@.str.1 = [5 x i8] c": %s\00"
define void @print_errno_message(i32 %0) {
%2 = tail call i8* @strerror(i32 %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int ILibString_StartsWithEx(char const *, int, char const *, int, int);
int ILibString_StartsWith(const char *inString, int inStringLength,
                          const char *startsWithString,
                          int startsWithStringLength) {
  return (ILibString_StartsWithEx(inString, inStringLength, startsWithString,
                                  startsWithStringLength, 1));
}


x86 assembly (clang, -O0):
<ILibString_StartsWith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x1,%r8d
call   1030 <ILibString_StartsWithEx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ILibString_StartsWith>:
mov    $0x1,%r8d
jmp    1030 <ILibString_StartsWithEx@plt>

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

LLVM IR (-O2):
define i32 @ILibString_StartsWith(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @ILibString_StartsWithEx(i8* %0, i32 %1, i8* %2, i32 %3, i32 1)
ret i32 %5
}
int fun166() { return 166; }


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

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

LLVM IR (-O0):
define i32 @fun166() {
ret i32 166
}

LLVM IR (-O2):
define i32 @fun166() {
ret i32 166
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This is the second test file\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"This is the second test file\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"This is the second test file\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_smaxsorted(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_smaxsorted(N, x, stride);
  printf("max: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <stdlib_strided_smaxsorted@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_smaxsorted@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"max: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_smaxsorted(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"max: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_smaxsorted(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
void **Pointer_array(int size) {
  return ((void **)malloc((unsigned)(size * sizeof(void *))));
}


x86 assembly (clang, -O0):
<Pointer_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pointer_array>:
shl    $0x3,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8** @Pointer_array(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = mul i64 %4, 8
%6 = trunc i64 %5 to i32
%7 = call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8**
ret i8** %8
}

LLVM IR (-O2):
define i8** @Pointer_array(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i8**
ret i8** %4
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRA0_get(void) { return U_WMRCORENONE_get("U_WMRA0"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRA0\00"
define i32 @U_WMRA0_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRA0\00"
define i32 @U_WMRA0_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
bool nrf52_errata_142(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf52_errata_142() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf52_errata_142() {
ret i32 0
}
void checkForTimeout() {}


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

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

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

LLVM IR (-O2):
define void @checkForTimeout() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ color_fenable(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void color_enable(const char *seq) { color_fenable(seq, stdout); }


x86 assembly (clang, -O0):
<color_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <color_fenable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_enable>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <color_fenable@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @color_enable(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @color_fenable(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @color_enable(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @color_fenable(i8* %0, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
const uint8_t *
sdp_event_query_attribute_value_get_attribute_value(const uint8_t *event) {
  return &event[8];
}


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

x86 assembly (clang, -O2):
<sdp_event_query_attribute_value_get_attribute_value>:
lea    0x20(%rdi),%rax
ret

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

LLVM IR (-O2):
define i32* @sdp_event_query_attribute_value_get_attribute_value(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 8
ret i32* %2
}
void av_stream_new_side_data() {}


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

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

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

LLVM IR (-O2):
define void @av_stream_new_side_data() {
ret void
}
unsigned rot(unsigned x, int n) {
  const int bits = 8 * 4;
  return (n == 0) ? x : ((x << n) | (x >> (bits - n)));
}


x86 assembly (clang, -O0):
<rot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1126 <rot+0x26>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <rot+0x42>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rot(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 32, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %19
10: ; preds = %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = shl i32 %11, %12
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = sub nsw i32 32, %15
%17 = lshr i32 %14, %16
%18 = or i32 %13, %17
br label %19
19: ; preds = %10, %8
%20 = phi i32 [ %9, %8 ], [ %18, %10 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @rot(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct REOFifo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ REOFifo_update_contexts(struct REOFifo *);
void REOFifo_finish(struct REOFifo *self) { REOFifo_update_contexts(self); }


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

x86 assembly (clang, -O2):
<REOFifo_finish>:
jmp    1030 <REOFifo_update_contexts@plt>

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

LLVM IR (-O2):
%struct.REOFifo = type { i32 }
define void @REOFifo_finish(%struct.REOFifo* %0) {
%2 = tail call i32 @REOFifo_update_contexts(%struct.REOFifo* %0)
ret void
}
int main() {
  int x;
  x = 0;
  switch (x)
  case 0:;
    switch (x)
    case 0:
      switch (x) {
      case 0:
        goto next;
      default:
        return 1;
      }
  return 1;
next:
  switch (x)
  case 1:
    return 1;
  switch (x) {
    {
      x = 1 + 1;
    foo:
    case 1:
      return 1;
    }
  }
  switch (x) {
  case 0:
    return x;
  case 1:
    return 1;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    1127 <main+0x27>
jmp    1122 <main+0x22>
jmp    1127 <main+0x27>
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    1158 <main+0x58>
jmp    1137 <main+0x37>
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    114c <main+0x4c>
jmp    1147 <main+0x47>
jmp    1164 <main+0x64>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <main+0xe0>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <main+0xe0>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    1181 <main+0x81>
jmp    1175 <main+0x75>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <main+0xe0>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    119e <main+0x9e>
jmp    1192 <main+0x92>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <main+0xe0>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     11c2 <main+0xc2>
jmp    11b1 <main+0xb1>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     11cd <main+0xcd>
jmp    11d9 <main+0xd9>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11e0 <main+0xe0>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <main+0xe0>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %5 [
i32 0, label %4
]
4: ; preds = %0
br label %5
5: ; preds = %4, %0
%6 = load i32, i32* %2
switch i32 %6, label %11 [
i32 0, label %7
]
7: ; preds = %5
%8 = load i32, i32* %2
switch i32 %8, label %10 [
i32 0, label %9
]
9: ; preds = %7
br label %12
10: ; preds = %7
store i32 1, i32* %1
br label %25
11: ; preds = %5
store i32 1, i32* %1
br label %25
12: ; preds = %9
%13 = load i32, i32* %2
switch i32 %13, label %15 [
i32 1, label %14
]
14: ; preds = %12
store i32 1, i32* %1
br label %25
15: ; preds = %12
%16 = load i32, i32* %2
switch i32 %16, label %19 [
i32 1, label %18
]
17: ; No predecessors!
br label %18
18: ; preds = %15, %17
store i32 1, i32* %1
br label %25
19: ; preds = %15
%20 = load i32, i32* %2
switch i32 %20, label %24 [
i32 0, label %21
i32 1, label %23
]
21: ; preds = %19
%22 = load i32, i32* %2
store i32 %22, i32* %1
br label %25
23: ; preds = %19
store i32 1, i32* %1
br label %25
24: ; preds = %19
store i32 1, i32* %1
br label %25
25: ; preds = %24, %23, %21, %18, %14, %11, %10
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
double accuracy(count, missed)
long count, missed;
{ return (100.0 * (count - missed) / count); }


x86 assembly (clang, -O0):
<accuracy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm1
movsd  0xedf(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<accuracy>:
cvtsi2sd %rdi,%xmm1
sub    %rsi,%rdi
cvtsi2sd %rdi,%xmm0
mulsd  0xeeb(%rip),%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @accuracy(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
%8 = sitofp i64 %7 to double
%9 = fmul double 1.000000e+02, %8
%10 = load i64, i64* %3
%11 = sitofp i64 %10 to double
%12 = fdiv double %9, %11
ret double %12
}

LLVM IR (-O2):
define double @accuracy(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = sitofp i64 %3 to double
%5 = fmul double %4, 1.000000e+02
%6 = sitofp i64 %0 to double
%7 = fdiv double %5, %6
ret double %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long root;
};
typedef TYPE_1__ XButtonReleasedEvent;

/* Variables and functions */
void set_XButtonReleasedEvent_root(void *_p, unsigned long _v) {
  ((XButtonReleasedEvent *)_p)->root = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XButtonReleasedEvent_root>:
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):
<set_XButtonReleasedEvent_root>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XButtonReleasedEvent_root(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ seatest_test_fixture_end();
int /*<<< orphan*/ seatest_test_fixture_start(char *);
void chgrp_tests(void) {
  do {
    seatest_test_fixture_start(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/sshilovsky/vifm/refs/heads/master/tests/iop/"
        "chgrp.c");
  } while (0);
  do {
    seatest_test_fixture_end();
  } while (0);
}


x86 assembly (clang, -O0):
<chgrp_tests>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <chgrp_tests+0x9>
lea    0xed0(%rip),%rdi
call   1040 <seatest_test_fixture_start@plt>
jmp    113a <chgrp_tests+0x1a>
mov    $0x0,%al
call   1030 <seatest_test_fixture_end@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chgrp_tests>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <seatest_test_fixture_start@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <seatest_test_fixture_end@plt>

LLVM IR (-O0):
@.str = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sshilovsky/vifm/refs/heads/master/tests/iop/chgrp.c\00"
define void @chgrp_tests() {
br label %1
1: ; preds = %0
%2 = call i32 @seatest_test_fixture_start(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
%5 = call i32 (...) @seatest_test_fixture_end()
br label %6
6: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sshilovsky/vifm/refs/heads/master/tests/iop/chgrp.c\00"
define void @chgrp_tests() {
%1 = tail call i32 @seatest_test_fixture_start(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @seatest_test_fixture_end()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fsqrtd(int s, int d) {
  assem_debug("fsqrtd s%d,d%d\n", d, s);
  output_w32(0xeeb10bc0 | ((d & 7) << 12) | (s & 7));
}


x86 assembly (clang, -O0):
<emit_fsqrtd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0x8(%rbp),%edi
and    $0x7,%edi
shl    $0xc,%edi
or     $0xeeb10bc0,%edi
mov    -0x4(%rbp),%eax
and    $0x7,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fsqrtd>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
lea    0xed0(%rip),%rdi
mov    %r14d,%edx
call   1030 <assem_debug@plt>
and    $0x7,%ebx
shl    $0xc,%ebx
and    $0x7,%r14d
lea    (%r14,%rbx,1),%edi
add    $0xeeb10bc0,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"fsqrtd s%d,d%d\0A\00"
define void @emit_fsqrtd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @assem_debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = and i32 %8, 7
%10 = shl i32 %9, 12
%11 = or i32 -290387008, %10
%12 = load i32, i32* %3
%13 = and i32 %12, 7
%14 = or i32 %11, %13
%15 = call i32 @output_w32(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"fsqrtd s%d,d%d\0A\00"
define void @emit_fsqrtd(i32 %0, i32 %1) {
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
%4 = shl i32 %1, 12
%5 = and i32 %4, 28672
%6 = and i32 %0, 7
%7 = or i32 %6, %5
%8 = or i32 %7, -290387008
%9 = tail call i32 @output_w32(i32 %8)
ret void
}
__attribute__((no, noclone)) int f6(void *a, int b, int *c, int *d) {
  asm volatile("" : : "r"(a), "r"(b), "r"(c), "r"(d) : "memory");
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @f6(i8* %0, i32 %1, i32* %2, i32* %3) {
tail call void asm sideeffect "", "r,r,r,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 %1, i32* %2, i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void term_resumecur(void) { printf("\033[u"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[u\00"
define void @term_resumecur() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[u\00"
define void @term_resumecur() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_mail_box(int, int, int);
void write_lmb(int index) {
  int left_index = (index + 1) % 5;
  write_mail_box(false, left_index, true);
}


x86 assembly (clang, -O0):
<write_lmb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <write_mail_box@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_lmb>:
add    $0x1,%edi
movslq %edi,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
xor    %edi,%edi
mov    $0x1,%edx
jmp    1030 <write_mail_box@plt>

LLVM IR (-O0):
define void @write_lmb(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = srem i32 %5, 5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @write_mail_box(i32 0, i32 %7, i32 1)
ret void
}

LLVM IR (-O2):
define void @write_lmb(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 5
%4 = tail call i32 @write_mail_box(i32 0, i32 %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void timer_handler(int signum) {
  (void)signum;
  fprintf(stderr, "Bye, bye!\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<timer_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Bye, bye!\0A\00"
@EXIT_SUCCESS = global i32 0
define void @timer_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Bye, bye!\0A\00"
@EXIT_SUCCESS = global i32 0
define void @timer_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void cf_reset_to_default(void) {}


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

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

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

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