xunge/DecIR huggingface dataset:
/* Variables and functions */
double log(double);
double math_acoth(double x) { return 0.5 * log((x + 1) / (x - 1)); }


x86 assembly (clang, -O0):
<math_acoth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xed1(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_acoth>:
push   %rax
movsd  0xee7(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  0xee3(%rip),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <log@plt>
mulsd  0xed6(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @math_acoth(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 1.000000e+00
%5 = load double, double* %2
%6 = fsub double %5, 1.000000e+00
%7 = fdiv double %4, %6
%8 = call double @log(double %7)
%9 = fmul double 5.000000e-01, %8
ret double %9
}

LLVM IR (-O2):
define double @math_acoth(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = fadd double %0, -1.000000e+00
%4 = fdiv double %2, %3
%5 = tail call double @log(double %4)
%6 = fmul double %5, 5.000000e-01
ret double %6
}
void to_lower(char *buf) {
  char c;
  while ((c = *buf) != '\0') {
    if (c >= 'A' && c <= 'Z')
      *buf += 32;
    buf++;
  }
}


x86 assembly (clang, -O0):
<to_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1154 <to_lower+0x54>
movsbl -0x9(%rbp),%eax
cmp    $0x41,%eax
jl     1143 <to_lower+0x43>
movsbl -0x9(%rbp),%eax
cmp    $0x5a,%eax
jg     1143 <to_lower+0x43>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <to_lower+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lower>:
mov    (%rdi),%al
test   %al,%al
je     112a <to_lower+0x2a>
add    $0x1,%rdi
jmp    111b <to_lower+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <to_lower+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <to_lower+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <to_lower+0x10>
ret

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

LLVM IR (-O2):
define void @to_lower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
int test_imm_EFuint8_mem(unsigned char *val) {
  return ((*val) & (0xEF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EFuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xef,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EFuint8_mem>:
testb  $0xef,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_EFuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 239
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_EFuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -17
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void test_stdbool_assignment(int y) {
  _Bool x = 0;
  if (y < 0) {
    x = y;
    return;
  }
  if (y > 1) {
    x = y;
    return;
  }
  x = y;
}


x86 assembly (clang, -O0):
<test_stdbool_assignment>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1126 <test_stdbool_assignment+0x26>
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    114d <test_stdbool_assignment+0x4d>
cmpl   $0x1,-0x4(%rbp)
jle    1141 <test_stdbool_assignment+0x41>
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    114d <test_stdbool_assignment+0x4d>
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
mov    %al,-0x5(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_stdbool_assignment(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err_template(int, char *);
void errAlloc(int n_error) {
  err_template(n_error, "\nFalha ao alocar memoria\n");
}


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

x86 assembly (clang, -O2):
<errAlloc>:
lea    0xee9(%rip),%rsi
jmp    1030 <err_template@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\0AFalha ao alocar memoria\0A\00"
define void @errAlloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @err_template(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AFalha ao alocar memoria\0A\00"
define void @errAlloc(i32 %0) {
%2 = tail call i32 @err_template(i32 %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int checker_read_long_double(int, char const *, int, long double *);
int checker_read_corr_long_double(const char *name, int eof_error_flag,
                                  long double *p_val) {
  return checker_read_long_double(2, name, eof_error_flag, p_val);
}


x86 assembly (clang, -O0):
<checker_read_corr_long_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x2,%edi
call   1030 <checker_read_long_double@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker_read_corr_long_double>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x2,%edi
jmp    1030 <checker_read_long_double@plt>

LLVM IR (-O0):
define i32 @checker_read_corr_long_double(i8* %0, i32 %1, x86_fp80* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca x86_fp80*
store i8* %0, i8** %4
store i32 %1, i32* %5
store x86_fp80* %2, x86_fp80** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load x86_fp80*, x86_fp80** %6
%10 = call i32 @checker_read_long_double(i32 2, i8* %7, i32 %8, x86_fp80* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @checker_read_corr_long_double(i8* %0, i32 %1, x86_fp80* %2) {
%4 = tail call i32 @checker_read_long_double(i32 2, i8* %0, i32 %1, x86_fp80* %2)
ret i32 %4
}
int MessageManipulatorwrap() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @MessageManipulatorwrap() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef scalar_t__ Bool;

/* Variables and functions */
char *blurb();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void sync_server_dpms_settings(Display *dpy, Bool enabled_p, int standby_secs,
                               int suspend_secs, int off_secs, Bool verbose_p) {
  if (verbose_p)
    fprintf(stderr, "%s: DPMS support not compiled in.\n", blurb());
}


x86 assembly (clang, -O0):
<sync_server_dpms_settings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     116e <sync_server_dpms_settings+0x4e>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1040 <blurb@plt>
mov    -0x2c(%rbp),%edi
mov    %rax,%rdx
lea    0xe97(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_server_dpms_settings>:
test   %r9,%r9
je     1148 <sync_server_dpms_settings+0x28>
push   %rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <blurb@plt>
lea    0xec3(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"%s: DPMS support not compiled in.\0A\00"
define void @sync_server_dpms_settings(i32* %0, i64 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = alloca i32*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
store i32* %0, i32** %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i64 %5, i64* %12
%13 = load i64, i64* %12
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %6
%16 = load i32, i32* @stderr
%17 = call i8* (...) @blurb()
%18 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %15, %6
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"%s: DPMS support not compiled in.\0A\00"
define void @sync_server_dpms_settings(i32* nocapture readnone %0, i64 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = icmp eq i64 %5, 0
br i1 %7, label %12, label %8
8: ; preds = %6
%9 = load i32, i32* @stderr
%10 = tail call i8* (...) @blurb()
%11 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %6
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("EOF value is %d\n", EOF);
  printf("getchar() != EOF value is %d\n", getchar() != EOF);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rbx
mov    (%rbx),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %esi,%esi
cmp    (%rbx),%eax
setne  %sil
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"EOF value is %d\0A\00"
@EOF = global i32 0
@.str.1 = [30 x i8] c"getchar() != EOF value is %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"EOF value is %d\0A\00"
@EOF = global i32 0
@.str.1 = [30 x i8] c"getchar() != EOF value is %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
void RTAssertMsg2Weak(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAssertMsg2Weak() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(int argc, const char *argv[]) {
  float area, radio;
  radio = 10;
  area = 3.14159 * (radio * radio);
  printf("El area del circulo es: %f\n", area);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb7(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [28 x i8] c"El area del circulo es: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 1.000000e+01, float* %7
%8 = load float, float* %7
%9 = load float, float* %7
%10 = fmul float %8, %9
%11 = fpext float %10 to double
%12 = fmul double 3.141590e+00, %11
%13 = fptrunc double %12 to float
store float %13, float* %6
%14 = load float, float* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"El area del circulo es: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float 0x4073A28B40000000)
ret i32 0
}
/* Type definitions */
struct crypt_cipher {
  int dummy;
};

/* Variables and functions */
int EINVAL;
int crypt_cipher_decrypt(struct crypt_cipher *ctx, const char *in, char *out,
                         size_t length, const char *iv, size_t iv_length) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<crypt_cipher_decrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
mov    0x2ebb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_cipher_decrypt>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.crypt_cipher = type { i32 }
@EINVAL = global i32 0
define i32 @crypt_cipher_decrypt(%struct.crypt_cipher* %0, i8* %1, i8* %2, i64 %3, i8* %4, i64 %5) {
%7 = alloca %struct.crypt_cipher*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i64
store %struct.crypt_cipher* %0, %struct.crypt_cipher** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i64 %5, i64* %12
%13 = load i32, i32* @EINVAL
%14 = sub nsw i32 0, %13
ret i32 %14
}

LLVM IR (-O2):
%struct.crypt_cipher = type { i32 }
@EINVAL = global i32 0
define i32 @crypt_cipher_decrypt(%struct.crypt_cipher* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i8* nocapture readnone %4, i64 %5) {
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}
double grib_op_neg_d(double a) { return -a; }


x86 assembly (clang, -O0):
<grib_op_neg_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_op_neg_d>:
xorps  0xef9(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @grib_op_neg_d(double %0) {
%2 = fneg double %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ parallel_clr_dav(int);
int /*<<< orphan*/ parallel_set_dav(int);
void parallel_cpu_set_dav(unsigned char val) {
  if (val) {
    parallel_set_dav(0x02);
  } else {
    parallel_clr_dav(~0x02);
  }
}


x86 assembly (clang, -O0):
<parallel_cpu_set_dav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1147 <parallel_cpu_set_dav+0x27>
mov    $0x2,%edi
call   1040 <parallel_set_dav@plt>
jmp    1151 <parallel_cpu_set_dav+0x31>
mov    $0xfffffffd,%edi
call   1030 <parallel_clr_dav@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_cpu_set_dav>:
test   %edi,%edi
je     112e <parallel_cpu_set_dav+0xe>
mov    $0x2,%edi
jmp    1040 <parallel_set_dav@plt>
mov    $0xfffffffd,%edi
jmp    1030 <parallel_clr_dav@plt>

LLVM IR (-O0):
define void @parallel_cpu_set_dav(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @parallel_set_dav(i32 2)
br label %9
7: ; preds = %1
%8 = call i32 @parallel_clr_dav(i32 -3)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @parallel_cpu_set_dav(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @parallel_set_dav(i32 2)
br label %7
5: ; preds = %1
%6 = tail call i32 @parallel_clr_dav(i32 -3)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_add_object_manager(void *bus, void **slot, const char *path) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_add_object_manager>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ec7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_add_object_manager>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_add_object_manager(i8* %0, i8** %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_add_object_manager(i8* nocapture readnone %0, i8** nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Variables and functions */
double min(double, double);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main(void) {
  double x, y;
  scanf("%lf%lf", &x, &y);
  printf("%g\n", min(x, y));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1040 <min@plt>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <min@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = call double @min(double %6, double %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}
void ls2h_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld) {}


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

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

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

LLVM IR (-O2):
%struct.hda_codec = type opaque
%struct.hdmi_eld = type opaque
define void @ls2h_hda_eld_proc_free(%struct.hda_codec* nocapture %0, %struct.hdmi_eld* nocapture %1) {
ret void
}
int thefunc(int verbosity) {
  if (verbosity >= 0)
    return printf("called %s\n", __func__) <= 0;
  else
    return 0;
}


x86 assembly (clang, -O0):
<thefunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114d <thefunc+0x3d>
lea    0xed4(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
cmp    $0x0,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <thefunc+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thefunc>:
test   %edi,%edi
js     1138 <thefunc+0x28>
push   %rax
lea    0xee4(%rip),%rdi
lea    0xee8(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setle  %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"called %s\0A\00"
@__func__.thefunc = [8 x i8] c"thefunc\00"
define i32 @thefunc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.thefunc, i64 0, i64 0))
%8 = icmp sle i32 %7, 0
%9 = zext i1 %8 to i32
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [11 x i8] c"called %s\0A\00"
@__func__.thefunc = [8 x i8] c"thefunc\00"
define i32 @thefunc(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.thefunc, i64 0, i64 0))
%5 = icmp slt i32 %4, 1
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
int c007(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c007() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EIO;
int /*<<< orphan*/ clearerr(int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
size_t fread(void *, size_t, size_t, int /*<<< orphan*/ *);
size_t fread_errno(void *ptr, size_t size, size_t nmemb, FILE *stream) {
  size_t rc = fread(ptr, size, nmemb, stream);
  if (rc != nmemb) {
    errno = EIO;
  }
  clearerr(stream);
  return rc;
}


x86 assembly (clang, -O0):
<fread_errno>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <fread@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1171 <fread_errno+0x51>
mov    0x2e7a(%rip),%rax
mov    (%rax),%ecx
mov    0x2e69(%rip),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rdi
call   1040 <clearerr@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fread_errno>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
call   1030 <fread@plt>
mov    %rax,%r15
cmp    %rbx,%rax
je     114a <fread_errno+0x2a>
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    0x2e90(%rip),%rcx
mov    %eax,(%rcx)
mov    %r14,%rdi
call   1040 <clearerr@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EIO = global i32 0
@errno = global i32 0
define i64 @fread_errno(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i32*, i32** %8
%14 = call i64 @fread(i8* %10, i64 %11, i64 %12, i32* %13)
store i64 %14, i64* %9
%15 = load i64, i64* %9
%16 = load i64, i64* %7
%17 = icmp ne i64 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %4
%19 = load i32, i32* @EIO
store i32 %19, i32* @errno
br label %20
20: ; preds = %18, %4
%21 = load i32*, i32** %8
%22 = call i32 @clearerr(i32* %21)
%23 = load i64, i64* %9
ret i64 %23
}

LLVM IR (-O2):
@EIO = global i32 0
@errno = global i32 0
define i64 @fread_errno(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fread(i8* %0, i64 %1, i64 %2, i32* %3)
%6 = icmp eq i64 %5, %2
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = load i32, i32* @EIO
store i32 %8, i32* @errno
br label %9
9: ; preds = %7, %4
%10 = tail call i32 @clearerr(i32* %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x6c() {
  Assert_real((isascii(108)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              545, ("isascii should be 1 for l"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for l\00"
define void @t_isascii_0x6c() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *ft_strcatchar(char *dst, const char src) {
  int i;
  i = 0;
  while (dst[i] != '\0')
    i++;
  dst[i] = src;
  dst[i + 1] = '\0';
  return (dst);
}


x86 assembly (clang, -O0):
<ft_strcatchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1138 <ft_strcatchar+0x38>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <ft_strcatchar+0x15>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcatchar>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,(%rax,%rcx,1)
lea    0x1(%rcx),%rcx
jne    1110 <ft_strcatchar+0x10>
lea    -0x1(%rcx),%edx
mov    %sil,(%rax,%rdx,1)
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @ft_strcatchar(i8* returned %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %8, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = and i64 %4, 4294967295
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 %1, i8* %11
%12 = add i64 %4, 1
%13 = and i64 %12, 4294967295
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 0, i8* %14
ret i8* %0
}
int test_imm_BDint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xBD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BDint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xbd,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BDint64_highword_mem>:
testb  $0xbd,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_BDint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 189
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_BDint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 811748818944
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ ArgNum();
scalar_t__ RandPerc();
int Cnd_Chance(void) { return (RandPerc() < ArgNum()); }


x86 assembly (clang, -O0):
<Cnd_Chance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <RandPerc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <ArgNum@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cnd_Chance>:
push   %rbx
xor    %eax,%eax
call   1030 <RandPerc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <ArgNum@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setl   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Cnd_Chance() {
%1 = call i64 (...) @RandPerc()
%2 = call i64 (...) @ArgNum()
%3 = icmp slt i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @Cnd_Chance() {
%1 = tail call i64 (...) @RandPerc()
%2 = tail call i64 (...) @ArgNum()
%3 = icmp slt i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *mystrcpy(char *src, size_t size) {
  char *dest = malloc(size * sizeof(char));
  strncpy(dest, src, size - 1);
  dest[size - 1] = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<mystrcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x0,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcpy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    -0x1(%r15),%rdx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mystrcpy(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = sub i64 %11, 1
%13 = call i32 @strncpy(i8* %9, i8* %10, i64 %12)
%14 = load i8*, i8** %5
%15 = load i64, i64* %4
%16 = sub i64 %15, 1
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @mystrcpy(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = add i64 %1, -1
%5 = tail call i32 @strncpy(i8* %3, i8* %0, i64 %4)
%6 = getelementptr inbounds i8, i8* %3, i64 %4
store i8 0, i8* %6
ret i8* %3
}
void gtk_selection_data_get_type() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @topicDecodeAddress() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
char *trim_str(char *, int /*<<< orphan*/);
char *cleanup_str(char *str, int key) {
  str = trim_str(str, strlen(str));
  return str;
}


x86 assembly (clang, -O0):
<cleanup_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <trim_str@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_str>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <trim_str@plt>

LLVM IR (-O0):
define i8* @cleanup_str(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = call i8* @trim_str(i8* %5, i32 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @cleanup_str(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i8* @trim_str(i8* %0, i32 %3)
ret i8* %4
}
/* Variables and functions */
int mod_find_p(char *, char *, char *, int /*<<< orphan*/ *);
int mod_find(char *mod, char *script, char *args) {
  return mod_find_p(mod, script, args, NULL);
}


x86 assembly (clang, -O0):
<mod_find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <mod_find_p@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_find>:
xor    %ecx,%ecx
jmp    1030 <mod_find_p@plt>

LLVM IR (-O0):
define i32 @mod_find(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @mod_find_p(i8* %7, i8* %8, i8* %9, i32* null)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mod_find(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @mod_find_p(i8* %0, i8* %1, i8* %2, i32* null)
ret i32 %4
}
void av_get_packet() {}


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

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

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

LLVM IR (-O2):
define void @av_get_packet() {
ret void
}
int atexit(f) void (*f)();
{
  on_exit(f, 0);
  return 0;
}


x86 assembly (clang, -O0):
<atexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <on_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @atexit(void (...)* %0) {
%2 = alloca void (...)*
store void (...)* %0, void (...)** %2
%3 = load void (...)*, void (...)** %2
%4 = call i32 (void (...)*, i32, ...) bitcast (i32 (...)* @on_exit to i32 (void (...)*, i32, ...)*)(void (...)* %3, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @atexit(void (...)* %0) {
%2 = tail call i32 (void (...)*, i32, ...) bitcast (i32 (...)* @on_exit to i32 (void (...)*, i32, ...)*)(void (...)* %0, i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int /*<<< orphan*/ bar(int);
int main() {
  if (__VERIFIER_nondet_int())
    bar(1);
  else
    bar(2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     114f <main+0x2f>
mov    $0x1,%edi
call   1030 <bar@plt>
jmp    1159 <main+0x39>
mov    $0x2,%edi
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%rax
mov    $0x1,%edi
adc    $0x0,%edi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 2, i32 1
%4 = tail call i32 @bar(i32 %3)
ret i32 0
}
int cubo(int n) { return n * n * n; }


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

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

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

LLVM IR (-O2):
define i32 @cubo(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
ret i32 %3
}
void updateCalibrateDisplay() {}


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

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

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

LLVM IR (-O2):
define void @updateCalibrateDisplay() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct lex_ctx_t {
  int dummy;
};
struct cmd_option_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ parse_or_expr(struct lex_ctx_t *, struct cmd_option_t *);
uint32_t parse_intexpr(struct lex_ctx_t *ctx, struct cmd_option_t *const_list) {
  return parse_or_expr(ctx, const_list);
}


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

x86 assembly (clang, -O2):
<parse_intexpr>:
jmp    1030 <parse_or_expr@plt>

LLVM IR (-O0):
%struct.lex_ctx_t = type { i32 }
%struct.cmd_option_t = type { i32 }
define i32 @parse_intexpr(%struct.lex_ctx_t* %0, %struct.cmd_option_t* %1) {
%3 = alloca %struct.lex_ctx_t*
%4 = alloca %struct.cmd_option_t*
store %struct.lex_ctx_t* %0, %struct.lex_ctx_t** %3
store %struct.cmd_option_t* %1, %struct.cmd_option_t** %4
%5 = load %struct.lex_ctx_t*, %struct.lex_ctx_t** %3
%6 = load %struct.cmd_option_t*, %struct.cmd_option_t** %4
%7 = call i32 @parse_or_expr(%struct.lex_ctx_t* %5, %struct.cmd_option_t* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.lex_ctx_t = type { i32 }
%struct.cmd_option_t = type { i32 }
define i32 @parse_intexpr(%struct.lex_ctx_t* %0, %struct.cmd_option_t* %1) {
%3 = tail call i32 @parse_or_expr(%struct.lex_ctx_t* %0, %struct.cmd_option_t* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ compare_and_swap(intptr_t *, intptr_t, intptr_t);
void clear_lowest_bit(intptr_t *p) {
  intptr_t old, new;
  do {
    old = *p;
    new = old - 1;
  } while (!compare_and_swap(p, old, new));
}


x86 assembly (clang, -O0):
<clear_lowest_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <compare_and_swap@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    111c <clear_lowest_bit+0xc>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_lowest_bit>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx),%rsi
lea    -0x1(%rsi),%rdx
mov    %rbx,%rdi
call   1030 <compare_and_swap@plt>
test   %eax,%eax
je     1120 <clear_lowest_bit+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @clear_lowest_bit(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
%4 = alloca i64
store i64* %0, i64** %2
br label %5
5: ; preds = %10, %1
%6 = load i64*, i64** %2
%7 = load i64, i64* %6
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = sub nsw i64 %8, 1
store i64 %9, i64* %4
br label %10
10: ; preds = %5
%11 = load i64*, i64** %2
%12 = load i64, i64* %3
%13 = load i64, i64* %4
%14 = call i32 @compare_and_swap(i64* %11, i64 %12, i64 %13)
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
br i1 %16, label %5, label %17
17: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @clear_lowest_bit(i64* %0) {
br label %2
2: ; preds = %2, %1
%3 = load i64, i64* %0
%4 = add nsw i64 %3, -1
%5 = tail call i32 @compare_and_swap(i64* %0, i64 %3, i64 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %2, label %7
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x34() {
  Assert_real((iscntrl(52) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              265, ("iscntrl should be 0 for 4"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x34>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x109,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x34>:
push   %rax
mov    $0x34,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x109,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for 4\00"
define void @t_iscntrl_0x34() {
%1 = call i64 @iscntrl(i32 52)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for 4\00"
define void @t_iscntrl_0x34() {
%1 = tail call i64 @iscntrl(i32 52)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}