xunge/DecIR huggingface dataset:
double activate_step(double x) {
  if (x < 0.0)
    return -1.0;
  return 1.0;
}


x86 assembly (clang, -O0):
<activate_step>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1129 <activate_step+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1136 <activate_step+0x36>
movsd  0xecf(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<activate_step>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @activate_step(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double -1.000000e+00, double* %2
br label %8
7: ; preds = %1
store double 1.000000e+00, double* %2
br label %8
8: ; preds = %7, %6
%9 = load double, double* %2
ret double %9
}

LLVM IR (-O2):
define double @activate_step(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double -1.000000e+00, double 1.000000e+00
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
clock_t clock(void) {
  errno = ENOSYS;
  return (clock_t)-1;
}


x86 assembly (clang, -O0):
<clock>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @clock() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @clock() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}
double test4(double a, double b, double c) { return -(-a + b * c); }


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
mulsd  %xmm2,%xmm1
subsd  %xmm0,%xmm1
xorpd  0xef0(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @test4(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fneg double %7
%9 = load double, double* %5
%10 = load double, double* %6
%11 = call double @llvm.fmuladd.f64(double %9, double %10, double %8)
%12 = fneg double %11
ret double %12
}

LLVM IR (-O2):
define double @test4(double %0, double %1, double %2) {
%4 = fneg double %0
%5 = tail call double @llvm.fmuladd.f64(double %1, double %2, double %4)
%6 = fneg double %5
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
scalar_t__ memchr(int /*<<< orphan*/ const *, char, int);
const uint8_t *find_space(const uint8_t *begin, const uint8_t *end) {
  uint8_t *p = (uint8_t *)memchr(begin, ' ', end - begin);
  return p ? p : end;
}


x86 assembly (clang, -O0):
<find_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%edx
mov    $0x20,%esi
call   1030 <memchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115b <find_space+0x4b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1163 <find_space+0x53>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_space>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdx
sub    %rdi,%rdx
shr    $0x2,%rdx
mov    $0x20,%esi
call   1030 <memchr@plt>
test   %rax,%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @find_space(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32*, i32** %4
%8 = load i32*, i32** %3
%9 = ptrtoint i32* %7 to i64
%10 = ptrtoint i32* %8 to i64
%11 = sub i64 %9, %10
%12 = sdiv exact i64 %11, 4
%13 = trunc i64 %12 to i32
%14 = call i64 @memchr(i32* %6, i8 signext 32, i32 %13)
%15 = inttoptr i64 %14 to i32*
store i32* %15, i32** %5
%16 = load i32*, i32** %5
%17 = icmp ne i32* %16, null
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = load i32*, i32** %5
br label %22
20: ; preds = %2
%21 = load i32*, i32** %4
br label %22
22: ; preds = %20, %18
%23 = phi i32* [ %19, %18 ], [ %21, %20 ]
ret i32* %23
}

LLVM IR (-O2):
define i32* @find_space(i32* %0, i32* %1) {
%3 = ptrtoint i32* %1 to i64
%4 = ptrtoint i32* %0 to i64
%5 = sub i64 %3, %4
%6 = lshr exact i64 %5, 2
%7 = trunc i64 %6 to i32
%8 = tail call i64 @memchr(i32* %0, i8 signext 32, i32 %7)
%9 = inttoptr i64 %8 to i32*
%10 = icmp eq i64 %8, 0
%11 = select i1 %10, i32* %1, i32* %9
ret i32* %11
}
void i2d_ECPKParameters(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ECPKParameters() {
ret void
}
char get_char_key(int number, int place) {
  switch (number) {
  case 0:
    return 'Y';
    break;
  case 1:
    return 'Z';
    break;
  default:
    return 'A' + (number - 2) * 3 + place;
  }
}


x86 assembly (clang, -O0):
<get_char_key>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112e <get_char_key+0x2e>
jmp    111d <get_char_key+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1137 <get_char_key+0x37>
jmp    1140 <get_char_key+0x40>
movb   $0x59,-0x1(%rbp)
jmp    1152 <get_char_key+0x52>
movb   $0x5a,-0x1(%rbp)
jmp    1152 <get_char_key+0x52>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
imul   $0x3,%eax,%eax
add    $0x41,%eax
add    -0xc(%rbp),%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_char_key>:
test   %edi,%edi
je     110c <get_char_key+0xc>
cmp    $0x1,%edi
jne    110f <get_char_key+0xf>
mov    $0x5a,%al
ret
mov    $0x59,%al
ret
lea    (%rdi,%rdi,2),%eax
add    %esi,%eax
add    $0x3b,%al
ret

LLVM IR (-O0):
define signext i8 @get_char_key(i32 %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
switch i32 %6, label %9 [
i32 0, label %7
i32 1, label %8
]
7: ; preds = %2
store i8 89, i8* %3
br label %17
8: ; preds = %2
store i8 90, i8* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 2
%12 = mul nsw i32 %11, 3
%13 = add nsw i32 65, %12
%14 = load i32, i32* %5
%15 = add nsw i32 %13, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
br label %17
17: ; preds = %9, %8, %7
%18 = load i8, i8* %3
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @get_char_key(i32 %0, i32 %1) {
switch i32 %0, label %4 [
i32 0, label %9
i32 1, label %3
]
3: ; preds = %2
br label %9
4: ; preds = %2
%5 = mul i32 %0, 3
%6 = add i32 %5, 59
%7 = add nsw i32 %6, %1
%8 = trunc i32 %7 to i8
br label %9
9: ; preds = %2, %4, %3
%10 = phi i8 [ %8, %4 ], [ 90, %3 ], [ 89, %2 ]
ret i8 %10
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ checkInput(int *);
int /*<<< orphan*/ isODD(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int number;
  printf("Enter number: ");
  checkInput(&number);
  isODD(number);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1050 <checkInput@plt>
mov    -0x8(%rbp),%edi
call   1030 <isODD@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1050 <checkInput@plt>
mov    0x4(%rsp),%edi
call   1030 <isODD@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter number: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @checkInput(i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @isODD(i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter number: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @checkInput(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @isODD(i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Perm();
int main() {
  int i;
  for (i = 0; i < 5; i++)
    Perm();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <Perm@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Perm()
%2 = tail call i32 (...) @Perm()
%3 = tail call i32 (...) @Perm()
%4 = tail call i32 (...) @Perm()
%5 = tail call i32 (...) @Perm()
ret i32 0
}
int execute_getdents64() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_getdents64() {
ret i32 0
}
int startwin_open(void) { return 0; }


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

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

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

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

/* Variables and functions */
struct item *join_lists() {
  struct item *joined = NULL;
  return joined;
}


x86 assembly (clang, -O0):
<join_lists>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.item = type { i32 }
define %struct.item* @join_lists() {
%1 = alloca %struct.item*
store %struct.item* null, %struct.item** %1
%2 = load %struct.item*, %struct.item** %1
ret %struct.item* %2
}

LLVM IR (-O2):
%struct.item = type { i32 }
define noalias %struct.item* @join_lists() {
ret %struct.item* null
}
char *msbrk(size)
register int size;
{
  register char *address;
  if ((address = sbrk(size)) == (char *)-1)
    error(1, "Not enough memory. Use chmem to allocate more", ((char *)0));
  return address;
}


x86 assembly (clang, -O0):
<msbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <sbrk@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jne    1162 <msbrk+0x42>
mov    $0x1,%edi
lea    0xea9(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msbrk>:
push   %rbx
xor    %eax,%eax
call   1030 <sbrk@plt>
movslq %eax,%rbx
cmp    $0xffffffffffffffff,%rbx
jne    1146 <msbrk+0x26>
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"Not enough memory. Use chmem to allocate more\00"
define i8* @msbrk(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = icmp eq i8* %7, inttoptr (i64 -1 to i8*)
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* null)
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [46 x i8] c"Not enough memory. Use chmem to allocate more\00"
define i8* @msbrk(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = icmp eq i8* %4, inttoptr (i64 -1 to i8*)
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* null)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
int fib(int a) {
  if (a == 0 || a == 1) {
    return 1;
  } else {
    int n1 = 0, n2 = 0;
#pragma omp task firstprivate(a) shared(n1)
    n1 = fib(a - 1);
#pragma omp task firstprivate(a) shared(n2)
    n2 = fib(a - 2);
#pragma omp taskwait
    return n1 + n2;
  }
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <fib+0x1f>
cmpl   $0x1,-0x8(%rbp)
jne    113b <fib+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    116e <fib+0x5e>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jb     1145 <fib+0x35>
mov    %edi,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    $0xfffffffe,%ebx
add    %eax,%ebp
cmp    $0x1,%ebx
ja     1130 <fib+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fib(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %8, %1
store i32 1, i32* %2
br label %22
12: ; preds = %8
store i32 0, i32* %4
store i32 0, i32* %5
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
%15 = call i32 @fib(i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 2
%18 = call i32 @fib(i32 %17)
store i32 %18, i32* %5
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = add nsw i32 %19, %20
store i32 %21, i32* %2
br label %22
22: ; preds = %12, %11
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
unsigned long inl(unsigned short port) {
  unsigned long ret;
  asm volatile("inl (%%dx),%%eax" : "=a"(ret) : "d"(port));
  return ret;
}


x86 assembly (clang, -O0):
<inl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i64 @inl(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i64
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i64 asm sideeffect "inl (%dx),%eax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @inl(i16 zeroext %0) {
%2 = tail call i64 asm sideeffect "inl (%dx),%eax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void EndSUMOProof(FILE *Stream) {
  fprintf(Stream, "    </proof>\n");
  fprintf(Stream, "  </answer>\n");
  fprintf(Stream, "  <summary proofs='1'/>\n");
  fprintf(Stream, "</queryResponse>\n");
}


x86 assembly (clang, -O0):
<EndSUMOProof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed7(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EndSUMOProof>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xeda(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xece(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xece(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [14 x i8] c" </proof>\0A\00"
@.str.1 = [13 x i8] c" </answer>\0A\00"
@.str.2 = [25 x i8] c" <summary proofs='1'/>\0A\00"
@.str.3 = [18 x i8] c"</queryResponse>\0A\00"
define void @EndSUMOProof(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c" </proof>\0A\00"
@.str.1 = [13 x i8] c" </answer>\0A\00"
@.str.2 = [25 x i8] c" <summary proofs='1'/>\0A\00"
@.str.3 = [18 x i8] c"</queryResponse>\0A\00"
define void @EndSUMOProof(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 12, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i64 24, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i64 17, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncat(char *, char *, int);
void fill_str(char buff[], char *start, char *end) {
  buff[0] = '\0';
  strncat(buff, start, end - start);
}


x86 assembly (clang, -O0):
<fill_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1030 <strncat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_str>:
movb   $0x0,(%rdi)
sub    %esi,%edx
jmp    1030 <strncat@plt>

LLVM IR (-O0):
define void @fill_str(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 = getelementptr inbounds i8, i8* %7, i64 0
store i8 0, i8* %8
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i8*, i8** %5
%13 = ptrtoint i8* %11 to i64
%14 = ptrtoint i8* %12 to i64
%15 = sub i64 %13, %14
%16 = trunc i64 %15 to i32
%17 = call i32 @strncat(i8* %9, i8* %10, i32 %16)
ret void
}

LLVM IR (-O2):
define void @fill_str(i8* %0, i8* %1, i8* %2) {
store i8 0, i8* %0
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i8* %1 to i64
%6 = sub i64 %4, %5
%7 = trunc i64 %6 to i32
%8 = tail call i32 @strncat(i8* %0, i8* %1, i32 %7)
ret void
}
int ft_isalpha(int c) {
  return ((c >= 65 && c <= 90) || (c >= 97 && c <= 122));
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <ft_isalpha+0x20>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113f <ft_isalpha+0x3f>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1139 <ft_isalpha+0x39>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 122
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void INT_Excep_MTU0_TGIV0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU0_TGIV0() {
ret void
}
/* Variables and functions */
char *calloc(unsigned int, unsigned int);
char *icalloc(int nelem, int elsize) {
  if (nelem == 0 || elsize == 0)
    nelem = elsize = 1;
  return calloc((unsigned)nelem, (unsigned)elsize);
}


x86 assembly (clang, -O0):
<icalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <icalloc+0x22>
cmpl   $0x0,-0x8(%rbp)
jne    1140 <icalloc+0x30>
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <calloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icalloc>:
test   %edi,%edi
sete   %al
test   %esi,%esi
sete   %cl
or     %al,%cl
mov    $0x1,%eax
cmovne %eax,%edi
cmovne %eax,%esi
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @icalloc(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp eq i32 %1, 0
%5 = or i1 %3, %4
%6 = select i1 %5, i32 1, i32 %0
%7 = select i1 %5, i32 1, i32 %1
%8 = tail call i8* @calloc(i32 %6, i32 %7)
ret i8* %8
}
void rte_rmb(void) { __sync_synchronize(); }


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

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

LLVM IR (-O0):
define void @rte_rmb() {
fence seq_cst
ret void
}

LLVM IR (-O2):
define void @rte_rmb() {
fence seq_cst
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ imul64();
int main() {
  imul64();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <imul64@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <imul64@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @imul64()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test();
int main() {
  init("union");
  test();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ok@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"union\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 (...) @ok()
ret i32 %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"union\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @ok()
ret i32 %3
}
outstr(ptr) char ptr[];
{
  int k;
  k = 0;
  while (outbyte(ptr[k++]))
    ;
}


x86 assembly (clang, -O0):
<outstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
mov    $0x0,%al
call   1030 <outbyte@plt>
cmp    $0x0,%eax
je     114e <outstr+0x3e>
jmp    1123 <outstr+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outstr>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
xor    %eax,%eax
call   1030 <outbyte@plt>
add    $0x1,%rbx
test   %eax,%eax
jne    1120 <outstr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @outstr(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ 0, %1 ]
%4 = add nuw i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @outbyte to i32 (i32, ...)*)(i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %2
10: ; preds = %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int c;
  for (c = 0; c < 255; c++) {
    printf("%d\t%c\n", c, c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0xff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\09%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 255
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 255
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void _update_vram_params() {}


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

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

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

LLVM IR (-O2):
define void @_update_vram_params() {
ret void
}
void bar() {
  printf("%s %s\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/geminy/aidear/refs/heads/master/snippets/"
         "makefile/gnumake/gcc/foo.c",
         __func__);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xf7c(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xf80(%rip),%rdx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/geminy/aidear/refs/heads/master/snippets/makefile/gnumake/gcc/foo.c\00"
@__func__.bar = [4 x i8] c"bar\00"
define void @bar() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.bar, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/geminy/aidear/refs/heads/master/snippets/makefile/gnumake/gcc/foo.c\00"
@__func__.bar = [4 x i8] c"bar\00"
define void @bar() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.bar, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int setgid(int);
int main() {
  if (setgid(1) == -1) {
    perror("setgid");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <setgid@plt>
cmp    $0xffffffff,%eax
jne    115a <main+0x3a>
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1161 <main+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <setgid@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1136 <main+0x16>
pop    %rcx
ret
lea    0xec3(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"setgid\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @setgid(i32 1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [7 x i8] c"setgid\00"
define i32 @main() {
%1 = tail call i32 @setgid(i32 1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 1, %3 ], [ 0, %0 ]
ret i32 %6
}
I0A1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if (22 <= (*((signed char *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0xa98ac7,%eax
movsbl (%rax),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     113f <I0A1+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <I0A1+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0A1>:
xor    %eax,%eax
cmpb   $0x16,0xa98ac7
16
setge  %al
ret

LLVM IR (-O0):
define i32 @I0A1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8, i8* inttoptr (i64 11111111 to i8*)
%17 = sext i8 %16 to i32
%18 = icmp sle i32 22, %17
br i1 %18, label %19, label %20
19: ; preds = %6
store i32 1, i32* %7
br label %21
20: ; preds = %6
store i32 0, i32* %7
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @I0A1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = load i8, i8* inttoptr (i64 11111111 to i8*)
%8 = icmp sgt i8 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}
double light_time(double distance) {
  double t = 0.0;
  return t;
}


x86 assembly (clang, -O0):
<light_time>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<light_time>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @light_time(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @light_time(double %0) {
ret double 0.000000e+00
}
int test_imm_75uint32_mem(unsigned int *val) {
  return ((*val) & (0x75 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_75uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 117
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef double int32_t;

/* Variables and functions */
double convert_int32_to_double(void *buf, int i) { return ((int32_t *)buf)[i]; }


x86 assembly (clang, -O0):
<convert_int32_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_int32_to_double>:
movslq %esi,%rax
movsd  (%rdi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @convert_int32_to_double(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 = bitcast i8* %5 to double*
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds double, double* %6, i64 %8
%10 = load double, double* %9
ret double %10
}

LLVM IR (-O2):
define double @convert_int32_to_double(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to double*
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds double, double* %3, i64 %4
%6 = load double, double* %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ output_byte(char);
int /*<<< orphan*/ output_string(char *);
void output_label_name(char *p) {
  output_byte('_');
  output_string(p);
}


x86 assembly (clang, -O0):
<output_label_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5f,%edi
call   1030 <output_byte@plt>
mov    -0x8(%rbp),%rdi
call   1040 <output_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_label_name>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5f,%edi
call   1030 <output_byte@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <output_string@plt>

LLVM IR (-O0):
define void @output_label_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @output_byte(i8 signext 95)
%4 = load i8*, i8** %2
%5 = call i32 @output_string(i8* %4)
ret void
}

LLVM IR (-O2):
define void @output_label_name(i8* %0) {
%2 = tail call i32 @output_byte(i8 signext 95)
%3 = tail call i32 @output_string(i8* %0)
ret void
}
int b(int a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @b(i32 %0) {
ret i32 0
}
int test_imm_CFuint32_mem(unsigned int *val) {
  return ((*val) & (0xCF << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_CFuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 207
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
unsigned long long read_num(char const *, int, char *);
unsigned long long read_dec(const char *s) {
  return read_num(s, 10, "decimal");
}


x86 assembly (clang, -O0):
<read_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
lea    0xed4(%rip),%rdx
call   1030 <read_num@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_dec>:
lea    0xee9(%rip),%rdx
mov    $0xa,%esi
jmp    1030 <read_num@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"decimal\00"
define i64 @read_dec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @read_num(i8* %3, i32 10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i64 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"decimal\00"
define i64 @read_dec(i8* %0) {
%2 = tail call i64 @read_num(i8* %0, i32 10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ szBuf;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ strcpy(char *, char *);
void *thread4(void *arg) {
  while (1) {
    sleep(1);
    char szBuf[128];
    memset(szBuf, 0, sizeof(szBuf));
    strcpy(szBuf, "thread4");
  }
}


x86 assembly (clang, -O0):
<thread4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    -0x90(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1030 <strcpy@plt>
jmp    113f <thread4+0xf>

x86 assembly (clang, -O2):
<thread4>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsp,%rbx
lea    0xebc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1150 <thread4+0x20>

LLVM IR (-O0):
@.str = [8 x i8] c"thread4\00"
define i8* @thread4(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
br label %4
4: ; preds = %1, %4
%5 = call i32 @sleep(i32 1)
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i32 0, i32 128)
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"thread4\00"
define noalias i8* @thread4(i8* nocapture readnone %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %1, %4
%5 = call i32 @sleep(i32 1)
%6 = call i32 @memset(i8* %3, i32 0, i32 128)
%7 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %4
}
/* Variables and functions */
scalar_t__ alf_ml_is_attached();
int alf_ml_r_type();
int alf_ml_is_first() {
  return ((alf_ml_r_type() == 1) ||
          ((alf_ml_r_type() == 2) && (alf_ml_is_attached())));
}


x86 assembly (clang, -O0):
<alf_ml_is_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <alf_ml_r_type@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x1,%ecx
mov    %al,-0x1(%rbp)
je     116d <alf_ml_is_first+0x4d>
mov    $0x0,%al
call   1040 <alf_ml_r_type@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
mov    %al,-0x2(%rbp)
jne    1167 <alf_ml_is_first+0x47>
mov    $0x0,%al
call   1030 <alf_ml_is_attached@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alf_ml_is_first>:
push   %rax
xor    %eax,%eax
call   1040 <alf_ml_r_type@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     1159 <alf_ml_is_first+0x39>
xor    %eax,%eax
call   1040 <alf_ml_r_type@plt>
mov    %eax,%ecx
mov    $0x0,%eax
cmp    $0x2,%ecx
jne    1159 <alf_ml_is_first+0x39>
xor    %eax,%eax
call   1030 <alf_ml_is_attached@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @alf_ml_is_first() {
%1 = call i32 (...) @alf_ml_r_type()
%2 = icmp eq i32 %1, 1
br i1 %2, label %11, label %3
3: ; preds = %0
%4 = call i32 (...) @alf_ml_r_type()
%5 = icmp eq i32 %4, 2
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = call i64 (...) @alf_ml_is_attached()
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ false, %3 ], [ %8, %6 ]
br label %11
11: ; preds = %9, %0
%12 = phi i1 [ true, %0 ], [ %10, %9 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @alf_ml_is_first() {
%1 = tail call i32 (...) @alf_ml_r_type()
%2 = icmp eq i32 %1, 1
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i32 (...) @alf_ml_r_type()
%5 = icmp eq i32 %4, 2
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 (...) @alf_ml_is_attached()
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %3, %6, %0
%11 = phi i32 [ 1, %0 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
int devfreq_msm_cpufreq_update_bw(void) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ my_putw(unsigned int, int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(unsigned int, int /*<<< orphan*/ *);
void putcw(unsigned int x, FILE *f) {
  if (x > 127) {
    my_putw((x << 1) + 1, f);
  } else {
    putc(x << 1, f);
  }
}


x86 assembly (clang, -O0):
<putcw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x7f,-0x4(%rbp)
jbe    1150 <putcw+0x30>
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <my_putw@plt>
jmp    115f <putcw+0x3f>
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putcw>:
mov    %edi,%eax
lea    (%rax,%rax,1),%edi
cmp    $0x80,%eax
jb     1134 <putcw+0x14>
or     $0x1,%edi
jmp    1030 <my_putw@plt>
jmp    1040 <putc@plt>

LLVM IR (-O0):
define void @putcw(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = icmp ugt i32 %5, 127
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = shl i32 %8, 1
%10 = add i32 %9, 1
%11 = load i32*, i32** %4
%12 = call i32 @my_putw(i32 %10, i32* %11)
br label %18
13: ; preds = %2
%14 = load i32, i32* %3
%15 = shl i32 %14, 1
%16 = load i32*, i32** %4
%17 = call i32 @putc(i32 %15, i32* %16)
br label %18
18: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
define void @putcw(i32 %0, i32* %1) {
%3 = icmp ugt i32 %0, 127
%4 = shl i32 %0, 1
br i1 %3, label %5, label %8
5: ; preds = %2
%6 = or i32 %4, 1
%7 = tail call i32 @my_putw(i32 %6, i32* %1)
br label %10
8: ; preds = %2
%9 = tail call i32 @putc(i32 %4, i32* %1)
br label %10
10: ; preds = %8, %5
ret void
}