xunge/DecIR huggingface dataset:
void log_to_file(struct configuration_params *config, const char *msg, ...) {}


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

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

LLVM IR (-O0):
%struct.configuration_params = type opaque
define void @log_to_file(%struct.configuration_params* %0, i8* %1, ...) {
%3 = alloca %struct.configuration_params*
%4 = alloca i8*
store %struct.configuration_params* %0, %struct.configuration_params** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.configuration_params = type opaque
define void @log_to_file(%struct.configuration_params* nocapture %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
char EOF;
char getchar();
int /*<<< orphan*/ putchar(char);
main() {
  char c;
  while ((c = getchar()) != EOF) {
    if (c == ' ' || c == '\t') {
      putchar('\n');
    } else {
      putchar(c);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2ea5(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1185 <main+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1168 <main+0x48>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    1177 <main+0x57>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1180 <main+0x60>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
jmp    114f <main+0x2f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%al
je     1161 <main+0x41>
mov    $0xa,%cl
cmp    $0x9,%al
je     1140 <main+0x20>
cmp    $0x20,%al
je     1140 <main+0x20>
mov    %eax,%ecx
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i8 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %22, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = sext i8 %4 to i32
%6 = load i8, i8* @EOF
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %5, %7
br i1 %8, label %9, label %23
9: ; preds = %3
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %17, label %13
13: ; preds = %9
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 9
br i1 %16, label %17, label %19
17: ; preds = %13, %9
%18 = call i32 @putchar(i8 signext 10)
br label %22
19: ; preds = %13
%20 = load i8, i8* %2
%21 = call i32 @putchar(i8 signext %20)
br label %22
22: ; preds = %19, %17
br label %3
23: ; preds = %3
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@EOF = global i8 0
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i8, i8* @EOF
%3 = icmp eq i8 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %7
%5 = phi i8 [ %10, %7 ], [ %1, %0 ]
switch i8 %5, label %6 [
i8 32, label %7
i8 9, label %7
]
6: ; preds = %4
br label %7
7: ; preds = %4, %4, %6
%8 = phi i8 [ %5, %6 ], [ 10, %4 ], [ 10, %4 ]
%9 = tail call i32 @putchar(i8 signext %8)
%10 = tail call signext i8 (...) @getchar()
%11 = load i8, i8* @EOF
%12 = icmp eq i8 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %7, %0
ret i32 0
}
void osd_clone_set_angle(int angle) {}


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

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

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

LLVM IR (-O2):
define void @osd_clone_set_angle(i32 %0) {
ret void
}
long long lcec_mod_64(long long val, unsigned long div) { return val % div; }


x86 assembly (clang, -O0):
<lcec_mod_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcec_mod_64>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1118 <lcec_mod_64+0x18>
xor    %edx,%edx
div    %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @lcec_mod_64(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 = urem i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @lcec_mod_64(i64 %0, i64 %1) {
%3 = urem i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ opt_number(void *);
int /*<<< orphan*/ optdescript_n(int /*<<< orphan*/, char *);
void optdescript(void *v, char *descript) {
  optdescript_n(opt_number(v), descript);
}


x86 assembly (clang, -O0):
<optdescript>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <opt_number@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <optdescript_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<optdescript>:
push   %rbx
mov    %rsi,%rbx
call   1030 <opt_number@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <optdescript_n@plt>

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

LLVM IR (-O2):
define void @optdescript(i8* %0, i8* %1) {
%3 = tail call i32 @opt_number(i8* %0)
%4 = tail call i32 @optdescript_n(i32 %3, i8* %1)
ret void
}
/* Variables and functions */
float kill_denormal(float);
float fadd_native(float a, float b) { return kill_denormal(a + b); }


x86 assembly (clang, -O0):
<fadd_native>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
call   1030 <kill_denormal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fadd_native>:
addss  %xmm1,%xmm0
jmp    1030 <kill_denormal@plt>

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

LLVM IR (-O2):
define float @fadd_native(float %0, float %1) {
%3 = fadd float %0, %1
%4 = tail call float @kill_denormal(float %3)
ret float %4
}
/* Variables and functions */
float atof(char const *);
float conv_float(const char *data) { return atof(data); }


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

x86 assembly (clang, -O2):
<conv_float>:
jmp    1030 <atof@plt>

LLVM IR (-O0):
define float @conv_float(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call float @atof(i8* %3)
ret float %4
}

LLVM IR (-O2):
define float @conv_float(i8* nocapture %0) {
%2 = tail call float @atof(i8* %0)
ret float %2
}
/* Variables and functions */
scalar_t__ foo();
int bar() {
  if (foo() != 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
cmp    $0x0,%rax
je     1135 <bar+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    113c <bar+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bar() {
%1 = alloca i32
%2 = call i64 (...) @foo()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i64 (...) @foo()
%2 = icmp ne i64 %1, 0
%3 = sext i1 %2 to i32
ret i32 %3
}
int _isatty(int fd) {
  return 1;
  fd = fd;
}


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

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

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

LLVM IR (-O2):
define i32 @_isatty(i32 %0) {
ret i32 1
}
void foo_1_1_1_2_1_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_1_2_2_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void _check_array_bounds(int *array, int index) {
  if (index < 0 || index >= *array) {
    printf("Array index out of bounds. index: %d, array size: %d\n", index,
           *array);
    exit(-4);
  }
}


x86 assembly (clang, -O0):
<_check_array_bounds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1148 <_check_array_bounds+0x28>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jl     1167 <_check_array_bounds+0x47>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    $0xfffffffc,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_array_bounds>:
push   %rax
mov    (%rdi),%edx
test   %esi,%esi
js     112d <_check_array_bounds+0xd>
cmp    %esi,%edx
jle    112d <_check_array_bounds+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    $0xfffffffc,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"Array index out of bounds. index: %d, array size: %d\0A\00"
define void @_check_array_bounds(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 = icmp slt i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = icmp sge i32 %8, %10
br i1 %11, label %12, label %18
12: ; preds = %7, %2
%13 = load i32, i32* %4
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %15)
%17 = call i32 @exit(i32 -4)
unreachable
18: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"Array index out of bounds. index: %d, array size: %d\0A\00"
define void @_check_array_bounds(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
%4 = load i32, i32* %0
%5 = icmp sgt i32 %4, %1
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %4)
%9 = tail call i32 @exit(i32 -4)
unreachable
10: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *);
void sig_chld(int signo) { error(1, 0, "Ispell died"); }


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

x86 assembly (clang, -O2):
<sig_chld>:
lea    0xee9(%rip),%rdx
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Ispell died\00"
define void @sig_chld(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @error(i32 1, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Ispell died\00"
define void @sig_chld(i32 %0) {
%2 = tail call i32 @error(i32 1, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
int execute_semop() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_semop() {
ret i32 0
}
void swapd(double *a, double *b) {
  double w;
  w = *a;
  *a = *b;
  *b = w;
  return;
}


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

x86 assembly (clang, -O2):
<swapd>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  %xmm1,(%rdi)
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @swapd(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double, double* %6
store double %7, double* %5
%8 = load double*, double** %4
%9 = load double, double* %8
%10 = load double*, double** %3
store double %9, double* %10
%11 = load double, double* %5
%12 = load double*, double** %4
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @swapd(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
store double %4, double* %0
store double %3, double* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int die(int level) {
  if (level)
    exit(level);
  return level;
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112d <die+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die>:
test   %edi,%edi
jne    1117 <die+0x7>
xor    %eax,%eax
ret
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @die(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 %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @die(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @exit(i32 %0)
unreachable
5: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pop();
int /*<<< orphan*/ push(int);
void lognot_handler(void) { push(!pop()); }


x86 assembly (clang, -O0):
<lognot_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pop@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lognot_handler>:
push   %rax
xor    %eax,%eax
call   1030 <pop@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @lognot_handler() {
%1 = call i32 (...) @pop()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
%5 = call i32 @push(i32 %4)
ret void
}

LLVM IR (-O2):
define void @lognot_handler() {
%1 = tail call i32 (...) @pop()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @push(i32 %3)
ret void
}
_Bool F2(_Bool B1, _Bool B2) {
  _Bool R;
  R = B1 && B2;
  return R;
}


x86 assembly (clang, -O0):
<F2>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
and    $0x1,%cl
mov    %cl,-0x1(%rbp)
and    $0x1,%al
mov    %al,-0x2(%rbp)
xor    %eax,%eax
testb  $0x1,-0x1(%rbp)
mov    %al,-0x4(%rbp)
je     112a <F2+0x2a>
mov    -0x2(%rbp),%al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
and    $0x1,%al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @F2(i1 zeroext %0, i1 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = zext i1 %0 to i8
store i8 %6, i8* %3
%7 = zext i1 %1 to i8
store i8 %7, i8* %4
%8 = load i8, i8* %3
%9 = trunc i8 %8 to i1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8, i8* %4
%12 = trunc i8 %11 to i1
br label %13
13: ; preds = %10, %2
%14 = phi i1 [ false, %2 ], [ %12, %10 ]
%15 = zext i1 %14 to i8
store i8 %15, i8* %5
%16 = load i8, i8* %5
%17 = trunc i8 %16 to i1
ret i1 %17
}

LLVM IR (-O2):
define zeroext i1 @F2(i1 zeroext %0, i1 zeroext %1) {
%3 = and i1 %0, %1
ret i1 %3
}
void c_pomp_master_begin_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_master_begin_(%struct.ompregdescr* nocapture %0) {
ret void
}
/* Variables and functions */
double RAND_MAX;
double errcheck(double, char *);
scalar_t__ rand();
double Rand() { return errcheck((double)rand() / RAND_MAX, "rand"); }


x86 assembly (clang, -O0):
<Rand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb1(%rip),%rax
divsd  (%rax),%xmm0
lea    0xebe(%rip),%rdi
call   1030 <errcheck@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rand>:
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb4(%rip),%rax
divsd  (%rax),%xmm0
lea    0xec1(%rip),%rdi
pop    %rax
jmp    1030 <errcheck@plt>

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
@.str = [5 x i8] c"rand\00"
define double @Rand() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
%5 = call double @errcheck(double %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
@.str = [5 x i8] c"rand\00"
define double @Rand() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
%5 = tail call double @errcheck(double %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret double %5
}
void strip_underscores(char *buf) {
  char *s, *d;
  d = buf;
  for (s = buf; *s != '\0'; s++) {
    *d = *s;
    if (*d != '_') {
      d++;
    }
  }
  *d = '\0';
}


x86 assembly (clang, -O0):
<strip_underscores>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1166 <strip_underscores+0x66>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     1150 <strip_underscores+0x50>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1155 <strip_underscores+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <strip_underscores+0x18>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_underscores>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <strip_underscores+0x28>
lea    0x1(%rdi),%rax
nopw   0x0(%rax,%rax,1)
mov    %cl,(%rdi)
xor    %edx,%edx
cmp    $0x5f,%cl
setne  %dl
add    %rdx,%rdi
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strip_underscores+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @strip_underscores(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
store i8 %5, i8* %6
%8 = icmp ne i8 %5, 95
%9 = zext i1 %8 to i64
%10 = getelementptr i8, i8* %6, i64 %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i8* [ %0, %1 ], [ %10, %4 ]
store i8 0, i8* %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set();
int /*<<< orphan*/ show();
int main() {
  set();
  show();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <set@plt>
mov    $0x0,%al
call   1030 <show@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <set@plt>
xor    %eax,%eax
call   1030 <show@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @set()
%2 = call i32 (...) @show()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @set()
%2 = tail call i32 (...) @show()
ret i32 0
}
/* Variables and functions */
scalar_t__ cosf(float);
float warp_ease_cosine(float t) {
  return (1.0f - (float)cosf(t * ((float)3.14159265358979323846))) * 0.5f;
}


x86 assembly (clang, -O0):
<warp_ease_cosine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <cosf@plt>
cvtsi2ss %rax,%xmm1
movss  0xec8(%rip),%xmm0
subss  %xmm1,%xmm0
movss  0xeb8(%rip),%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warp_ease_cosine>:
push   %rax
mulss  0xee7(%rip),%xmm0
call   1030 <cosf@plt>
cvtsi2ss %rax,%xmm1
movss  0xed9(%rip),%xmm0
subss  %xmm1,%xmm0
mulss  0xed1(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @warp_ease_cosine(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x400921FB60000000
%5 = call i64 @cosf(float %4)
%6 = sitofp i64 %5 to float
%7 = fsub float 1.000000e+00, %6
%8 = fmul float %7, 5.000000e-01
ret float %8
}

LLVM IR (-O2):
define float @warp_ease_cosine(float %0) {
%2 = fmul float %0, 0x400921FB60000000
%3 = tail call i64 @cosf(float %2)
%4 = sitofp i64 %3 to float
%5 = fsub float 1.000000e+00, %4
%6 = fmul float %5, 5.000000e-01
ret float %6
}
int test_014(int a, int c, int b, int d) { return a + (b & 1) + d + b; }


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

x86 assembly (clang, -O2):
<test_014>:
mov    %edx,%eax
and    $0x1,%eax
add    %edi,%eax
add    %edx,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_014(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, 1
%6 = add i32 %2, %0
%7 = add i32 %6, %5
%8 = add i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ kgettask();
int /*<<< orphan*/ krealpath(char const *, char *);
int /*<<< orphan*/ taskSetCurrentWorkingDirectory(int /*<<< orphan*/, char *);
int kchdir(const char *path) {
  char absPath[256];
  if (!krealpath(path, absPath)) {
    return -1;
  }
  taskSetCurrentWorkingDirectory(kgettask(), absPath);
  return 0;
}


x86 assembly (clang, -O0):
<kchdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1040 <krealpath@plt>
cmp    $0x0,%eax
jne    1164 <kchdir+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <kchdir+0x50>
mov    $0x0,%al
call   1030 <kgettask@plt>
mov    %eax,%edi
lea    -0x110(%rbp),%rsi
call   1050 <taskSetCurrentWorkingDirectory@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kchdir>:
push   %rbx
sub    $0x100,%rsp
mov    %rsp,%rsi
call   1040 <krealpath@plt>
test   %eax,%eax
je     1159 <kchdir+0x29>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <kgettask@plt>
mov    %rsp,%rsi
mov    %eax,%edi
call   1050 <taskSetCurrentWorkingDirectory@plt>
jmp    115e <kchdir+0x2e>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @kchdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [256 x i8]
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = call i32 @krealpath(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 -1, i32* %2
br label %14
10: ; preds = %1
%11 = call i32 (...) @kgettask()
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%13 = call i32 @taskSetCurrentWorkingDirectory(i32 %11, i8* %12)
store i32 0, i32* %2
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @kchdir(i8* %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @krealpath(i8* %0, i8* %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = call i32 (...) @kgettask()
%8 = call i32 @taskSetCurrentWorkingDirectory(i32 %7, i8* %3)
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ 0, %6 ], [ -1, %1 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ sqrt(double);
double dlevmar_stddev(double *covar, int m, int i) {
  return (double)sqrt(covar[i * m + i]);
}


x86 assembly (clang, -O0):
<dlevmar_stddev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <sqrt@plt>
cvtsi2sd %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlevmar_stddev>:
push   %rax
imul   %edx,%esi
add    %edx,%esi
movslq %esi,%rax
movsd  (%rdi,%rax,8),%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dlevmar_stddev(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = mul nsw i32 %8, %9
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %7, i64 %13
%15 = load double, double* %14
%16 = call i64 @sqrt(double %15)
%17 = sitofp i64 %16 to double
ret double %17
}

LLVM IR (-O2):
define double @dlevmar_stddev(double* nocapture %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = add nsw i32 %4, %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds double, double* %0, i64 %6
%8 = load double, double* %7
%9 = tail call i64 @sqrt(double %8)
%10 = sitofp i64 %9 to double
ret double %10
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t uDMAIntStatus(void) {
  return ((*((volatile unsigned long *)(0x400FF504))));
}


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

x86 assembly (clang, -O2):
<uDMAIntStatus>:
mov    0x400ff504,%rax
40
ret

LLVM IR (-O0):
define i64 @uDMAIntStatus() {
%1 = load volatile i64, i64* inttoptr (i64 1074787588 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @uDMAIntStatus() {
%1 = load volatile i64, i64* inttoptr (i64 1074787588 to i64*)
ret i64 %1
}
int do_698() { return 698; }


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

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

LLVM IR (-O0):
define i32 @do_698() {
ret i32 698
}

LLVM IR (-O2):
define i32 @do_698() {
ret i32 698
}
void foo559(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo559(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ caller();
int main() {
  caller();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <caller@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @caller()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @caller()
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bzero(struct timespec *, int);
struct timespec timer_start() {
  struct timespec start_time;
  bzero(&start_time, sizeof(struct timespec));
  return start_time;
}


x86 assembly (clang, -O0):
<timer_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <bzero@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_start>:
push   %rax
mov    %rsp,%rdi
mov    $0x4,%esi
call   1030 <bzero@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @timer_start() {
%1 = alloca %struct.timespec
%2 = call i32 @bzero(%struct.timespec* %1, i32 4)
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @timer_start() {
%1 = alloca %struct.timespec
%2 = call i32 @bzero(%struct.timespec* %1, i32 4)
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
void(Memento_breakpoint)(void) {}


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

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

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

LLVM IR (-O2):
define void @Memento_breakpoint() {
ret void
}
void rop3_128_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D & stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_128_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_128_0_1>:
and    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_128_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %6
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = or i32 %26, %32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = and i32 %39, %42
%44 = or i32 %33, %43
%45 = trunc i32 %44 to i8
%46 = load i8*, i8** %4
store i8 %45, i8* %46
ret void
}

LLVM IR (-O2):
define void @rop3_128_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
store i8 %5, i8* %0
ret void
}
int func17() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @func17() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *reason) {
  fprintf(stderr, "%s\nUsage: mount <fs> <device> <mountpoint>\n", reason);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"%s\0AUsage: mount <fs> <device> <mountpoint>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"%s\0AUsage: mount <fs> <device> <mountpoint>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ do_PyThread_exit_prog(int, int);
void PyThread__exit_prog(int status) { do_PyThread_exit_prog(status, 1); }


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

x86 assembly (clang, -O2):
<PyThread__exit_prog>:
mov    $0x1,%esi
jmp    1030 <do_PyThread_exit_prog@plt>

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

LLVM IR (-O2):
define void @PyThread__exit_prog(i32 %0) {
%2 = tail call i32 @do_PyThread_exit_prog(i32 %0, i32 1)
ret void
}
int main(void) {
  int x = -5;
  int a[-x];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xfffffffb,-0x4(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
store i32 -5, i32* %1
%4 = load i32, i32* %1
%5 = sub nsw i32 0, %4
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %2
%8 = alloca i32, i64 %6
store i64 %6, i64* %3
%9 = load i8*, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a52_syncinfo(unsigned char *, int *, int *, int *);
int mpeg3_ac3_check(unsigned char *header) {
  int flags, samplerate, bitrate;
  return !a52_syncinfo(header, &flags, &samplerate, &bitrate);
}


x86 assembly (clang, -O0):
<mpeg3_ac3_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1030 <a52_syncinfo@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpeg3_ac3_check>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1030 <a52_syncinfo@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @mpeg3_ac3_check(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @a52_syncinfo(i8* %6, i32* %3, i32* %4, i32* %5)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mpeg3_ac3_check(i8* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = call i32 @a52_syncinfo(i8* %0, i32* %2, i32* %3, i32* %4)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
int d_ge_mr1(double *a1, double a2) { return (((*a1) >= (a2))); }


x86 assembly (clang, -O0):
<d_ge_mr1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_ge_mr1>:
movsd  (%rdi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @d_ge_mr1(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double, double* %4
%8 = fcmp oge double %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_ge_mr1(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp oge double %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
int main(void) { return 142 % 100; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ _delta_encode_block(void const *, void const *, size_t,
                                       void *, size_t, int);
int16_t delta_encode(const void *_prev_state, const void *_cur_state,
                     size_t data_size, void *_output, size_t out_size) {
  return _delta_encode_block(_prev_state, _cur_state, data_size, _output,
                             out_size, 64);
}


x86 assembly (clang, -O0):
<delta_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x40,%r9d
call   1030 <_delta_encode_block@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delta_encode>:
mov    $0x40,%r9d
jmp    1030 <_delta_encode_block@plt>

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

LLVM IR (-O2):
define i32 @delta_encode(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i32 @_delta_encode_block(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4, i32 64)
ret i32 %6
}
/* Variables and functions */
char *GetEnvVar(char const *);
scalar_t__ atoi(char const *);
int IsEnvVarTrue(const char *name) {
  const char *s = GetEnvVar(name);
  return s && atoi(s) != 0;
}


x86 assembly (clang, -O0):
<IsEnvVarTrue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <GetEnvVar@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     115c <IsEnvVarTrue+0x3c>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEnvVarTrue>:
push   %rax
call   1030 <GetEnvVar@plt>
test   %rax,%rax
je     1140 <IsEnvVarTrue+0x20>
mov    %rax,%rdi
call   1040 <atoi@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @IsEnvVarTrue(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @GetEnvVar(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @atoi(i8* %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ false, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @IsEnvVarTrue(i8* %0) {
%2 = tail call i8* @GetEnvVar(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @atoi(i8* %2)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ usb_vcp_is_enabled();
int /*<<< orphan*/ usb_vcp_send_strn_cooked(char const *, unsigned int);
void stdout_print_strn(void *data, const char *str, unsigned int len) {
  if (usb_vcp_is_enabled()) {
    usb_vcp_send_strn_cooked(str, len);
  }
}


x86 assembly (clang, -O0):
<stdout_print_strn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1040 <usb_vcp_is_enabled@plt>
cmp    $0x0,%rax
je     1150 <stdout_print_strn+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <usb_vcp_send_strn_cooked@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdout_print_strn>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
xor    %eax,%eax
call   1040 <usb_vcp_is_enabled@plt>
test   %rax,%rax
je     1144 <stdout_print_strn+0x24>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <usb_vcp_send_strn_cooked@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @stdout_print_strn(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 = call i64 (...) @usb_vcp_is_enabled()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @usb_vcp_send_strn_cooked(i8* %10, i32 %11)
br label %13
13: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
define void @stdout_print_strn(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i64 (...) @usb_vcp_is_enabled()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @usb_vcp_send_strn_cooked(i8* %1, i32 %2)
br label %8
8: ; preds = %6, %3
ret void
}
unsigned int extract_sweep_id(unsigned int pattern) {
  unsigned int ret;
  ret = (pattern >> 0) &
        ((1 << (((sizeof(unsigned int)) * 8) -
                (8 + (__builtin_ctz((1024 / (sizeof(unsigned int)))))))) -
         1);
  return ret;
}


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

x86 assembly (clang, -O2):
<extract_sweep_id>:
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @extract_sweep_id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 0
%6 = and i32 %5, 65535
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @extract_sweep_id(i32 %0) {
%2 = and i32 %0, 65535
ret i32 %2
}