xunge/DecIR huggingface dataset:
char codeToChar(char toDecode) {
  char mask[7] = {'$', 'A', 'C', 'G', 'T', '#', '@'};
  return mask[toDecode];
}


x86 assembly (clang, -O0):
<codeToChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xef0(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xeea(%rip),%ax
mov    %ax,-0x4(%rbp)
mov    0xee2(%rip),%al
mov    %al,-0x2(%rbp)
movsbq -0x1(%rbp),%rax
movsbl -0x8(%rbp,%rax,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<codeToChar>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
@__const.codeToChar.mask = [7 x i8] c"$ACGT#@"
define signext i8 @codeToChar(i8 signext %0) {
%2 = alloca i8
%3 = alloca [7 x i8]
store i8 %0, i8* %2
%4 = bitcast [7 x i8]* %3 to i8*
%5 = load i8, i8* %2
%6 = sext i8 %5 to i64
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 %6
%8 = load i8, i8* %7
ret i8 %8
}

LLVM IR (-O2):
@__const.codeToChar.mask = [7 x i8] c"$ACGT#@"
define signext i8 @codeToChar(i8 signext %0) {
%2 = sext i8 %0 to i64
%3 = getelementptr inbounds [7 x i8], [7 x i8]* @__const.codeToChar.mask, i64 0, i64 %2
%4 = load i8, i8* %3
ret i8 %4
}
int find_first_bit(void *m, int max) {
  unsigned long *mask = m;
  int i;
  for (i = 0; i < max; i++) {
    if (((mask)[(i) / (sizeof(unsigned long) * 8)] &
         (1UL << ((i) % (sizeof(unsigned long) * 8)))))
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<find_first_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116e <find_first_bit+0x6e>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     115b <find_first_bit+0x5b>
jmp    116e <find_first_bit+0x6e>
jmp    1160 <find_first_bit+0x60>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111a <find_first_bit+0x1a>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_first_bit>:
test   %esi,%esi
jle    112d <find_first_bit+0x2d>
mov    %esi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
mov    %rax,%rdx
shr    $0x6,%rdx
mov    (%rdi,%rdx,8),%rdx
bt     %rax,%rdx
jb     112c <find_first_bit+0x2c>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <find_first_bit+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @find_first_bit(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i64*
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %21
5: ; preds = %2
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %16
%8 = phi i64 [ 0, %5 ], [ %17, %16 ]
%9 = lshr i64 %8, 6
%10 = getelementptr inbounds i64, i64* %3, i64 %9
%11 = load i64, i64* %10
%12 = and i64 %8, 63
%13 = shl nuw i64 1, %12
%14 = and i64 %11, %13
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %7
%17 = add nuw nsw i64 %8, 1
%18 = icmp eq i64 %17, %6
br i1 %18, label %21, label %7
19: ; preds = %7
%20 = trunc i64 %8 to i32
br label %21
21: ; preds = %16, %19, %2
%22 = phi i32 [ 0, %2 ], [ %20, %19 ], [ %1, %16 ]
ret i32 %22
}
void namelistFree(char **az) {
  if (az) {
    int i;
    for (i = 0; az[i]; i++)
      sqlite3_free(az[i]);
    sqlite3_free(az);
  }
}


x86 assembly (clang, -O0):
<namelistFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116d <namelistFree+0x5d>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1162 <namelistFree+0x52>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <sqlite3_free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112e <namelistFree+0x1e>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <sqlite3_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<namelistFree>:
test   %rdi,%rdi
je     1154 <namelistFree+0x44>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1143 <namelistFree+0x33>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <sqlite3_free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <namelistFree+0x20>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sqlite3_free@plt>
ret

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

LLVM IR (-O2):
define void @namelistFree(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %12, %6 ], [ %4, %3 ]
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @sqlite3_free to i32 (i8*, ...)*)(i8* %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8*, i8** %0, i64 %10
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3
%15 = tail call i32 (i8**, ...) bitcast (i32 (...)* @sqlite3_free to i32 (i8**, ...)*)(i8** %0)
br label %16
16: ; preds = %14, %1
ret void
}
int test_imm_E9int64_midword_reg(long long val) {
  return ((val >> 16) & (0xE9 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E9int64_midword_reg>:
test   $0xe90000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E9int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 233
%6 = icmp ne i64 %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_E9int64_midword_reg(i64 %0) {
%2 = and i64 %0, 15269888
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_calendar_get_date() {}


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

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

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

LLVM IR (-O2):
define void @gtk_calendar_get_date() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_silence_memchunk() {
  printf("NOT IMPLEMENTED:"
         "pa_silence_memchunk"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"NOT IMPLEMENTED:pa_silence_memchunk\0A\00"
define i32 @pa_silence_memchunk() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_silence_memchunk\00"
define i32 @pa_silence_memchunk() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool mpga_get_protection_absent(const uint8_t *p_mpga) {
  return !!(p_mpga[1] & 0x01);
}


x86 assembly (clang, -O0):
<mpga_get_protection_absent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpga_get_protection_absent>:
mov    0x4(%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @mpga_get_protection_absent(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mpga_get_protection_absent(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = and i32 %3, 1
ret i32 %4
}
double d_vi(double redchan, double nirchan) {
  double result;
  if ((nirchan + redchan) == 0.0) {
    result = -1.0;
  } else {
    result = (nirchan - redchan);
  }
  return result;
}


x86 assembly (clang, -O0):
<d_vi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    113d <d_vi+0x3d>
jp     113d <d_vi+0x3d>
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    114c <d_vi+0x4c>
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_vi>:
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
subsd  %xmm0,%xmm1
xorpd  %xmm3,%xmm3
cmpeqsd %xmm2,%xmm3
movsd  0xee3(%rip),%xmm0
andpd  %xmm3,%xmm0
andnpd %xmm1,%xmm3
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @d_vi(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fadd double %6, %7
%9 = fcmp oeq double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %2
store double -1.000000e+00, double* %5
br label %15
11: ; preds = %2
%12 = load double, double* %4
%13 = load double, double* %3
%14 = fsub double %12, %13
store double %14, double* %5
br label %15
15: ; preds = %11, %10
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @d_vi(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fcmp oeq double %3, 0.000000e+00
%5 = fsub double %1, %0
%6 = select i1 %4, double -1.000000e+00, double %5
ret double %6
}
/* Variables and functions */
int create_hash(char *);
int put(char *bucket[], char *key, char *value) {
  int hash = create_hash(key);
  bucket[hash] = value;
  return (hash);
}


x86 assembly (clang, -O0):
<put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <create_hash@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <create_hash@plt>
cltq
mov    %r14,(%rbx,%rax,8)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @put(i8** %0, i8* %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = call i32 @create_hash(i8* %8)
store i32 %9, i32* %7
%10 = load i8*, i8** %6
%11 = load i8**, i8*** %4
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
store i8* %10, i8** %14
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @put(i8** nocapture writeonly %0, i8* %1, i8* %2) {
%4 = tail call i32 @create_hash(i8* %1)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
store i8* %2, i8** %6
ret i32 %4
}
/* Variables and functions */
scalar_t__ modf(double, double *);
double floor(double x) {
  double val;
  return modf(x, &val) < 0 ? val - 1.0 : val;
}


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
call   1030 <modf@plt>
cmp    $0x0,%rax
jge    1150 <floor+0x40>
movsd  -0x10(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    115a <floor+0x4a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
push   %rax
mov    %rsp,%rdi
call   1030 <modf@plt>
movsd  (%rsp),%xmm0
test   %rax,%rax
jns    112b <floor+0x1b>
addsd  0xed5(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @floor(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i64 @modf(double %4, double* %3)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %3
%9 = fsub double %8, 1.000000e+00
br label %12
10: ; preds = %1
%11 = load double, double* %3
br label %12
12: ; preds = %10, %7
%13 = phi double [ %9, %7 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @floor(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i64 @modf(double %0, double* %2)
%5 = icmp slt i64 %4, 0
%6 = load double, double* %2
%7 = fadd double %6, -1.000000e+00
%8 = select i1 %5, double %7, double %6
ret double %8
}
int is_ascii_text(char in_c) {
  if ((in_c >= 0x0 && in_c <= 0x7E)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_ascii_text>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jl     1130 <is_ascii_text+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x7e,%eax
jg     1130 <is_ascii_text+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <is_ascii_text+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ascii_text>:
xor    %eax,%eax
cmp    $0x7f,%dil
setae  %al
ret

LLVM IR (-O0):
define i32 @is_ascii_text(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 126
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 0, i32* %2
br label %13
12: ; preds = %7, %1
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_ascii_text(i8 signext %0) {
%2 = icmp ugt i8 %0, 126
%3 = zext i1 %2 to i32
ret i32 %3
}
int am_getconfig_bool_def(const char *path, int def) { return -1; }


x86 assembly (clang, -O0):
<am_getconfig_bool_def>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @am_getconfig_bool_def(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @am_getconfig_bool_def(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
long long baddu4(int a, int b) { return (a + b) & 0xff; }


x86 assembly (clang, -O0):
<baddu4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
and    $0xff,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<baddu4>:
add    %esi,%edi
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i64 @baddu4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
%8 = and i32 %7, 255
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @baddu4(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = and i32 %3, 255
%5 = zext i32 %4 to i64
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *initialize_int(int *ptr) {
  if (ptr != NULL) {
    free(ptr);
    ptr = NULL;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<initialize_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <initialize_int+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_int>:
test   %rdi,%rdi
je     111f <initialize_int+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i32* @initialize_int(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i32* %0)
br label %5
5: ; preds = %3, %1
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ dissect_cr_rn(unsigned long, unsigned int);
void dissect_cr(unsigned long local_cr) {
  unsigned int crn;
  for (crn = 0; crn < 8; crn++) {
    dissect_cr_rn(local_cr, crn);
  }
}


x86 assembly (clang, -O0):
<dissect_cr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jae    1147 <dissect_cr+0x37>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <dissect_cr_rn@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <dissect_cr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dissect_cr>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <dissect_cr_rn@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <dissect_cr_rn@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <dissect_cr_rn@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <dissect_cr_rn@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <dissect_cr_rn@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <dissect_cr_rn@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <dissect_cr_rn@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
pop    %rbx
jmp    1030 <dissect_cr_rn@plt>

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

LLVM IR (-O2):
define void @dissect_cr(i64 %0) {
%2 = tail call i32 @dissect_cr_rn(i64 %0, i32 0)
%3 = tail call i32 @dissect_cr_rn(i64 %0, i32 1)
%4 = tail call i32 @dissect_cr_rn(i64 %0, i32 2)
%5 = tail call i32 @dissect_cr_rn(i64 %0, i32 3)
%6 = tail call i32 @dissect_cr_rn(i64 %0, i32 4)
%7 = tail call i32 @dissect_cr_rn(i64 %0, i32 5)
%8 = tail call i32 @dissect_cr_rn(i64 %0, i32 6)
%9 = tail call i32 @dissect_cr_rn(i64 %0, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFD;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
void coe_disable(int fd) { fcntl(fd, F_SETFD, 0); }


x86 assembly (clang, -O0):
<coe_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coe_disable>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <fcntl@plt>

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

LLVM IR (-O2):
@F_SETFD = global i32 0
define void @coe_disable(i32 %0) {
%2 = load i32, i32* @F_SETFD
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void on_death(void) {
  for (int i = 0; i < 4; i++)
    fprintf(stderr, "I am dead.\n");
}


x86 assembly (clang, -O0):
<on_death>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    114c <on_death+0x3c>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <on_death+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_death>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%r14
mov    (%r14),%edi
lea    0xedb(%rip),%rbx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"I am dead.\0A\00"
define void @on_death() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_size;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stat(char const *, struct stat *);
size_t get_file_size(const char *filename) {
  struct stat st;
  stat(filename, &st);
  printf("%lld\n", st.st_size);
  return (size_t)st.st_size;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
movslq -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
mov    0x8(%rsp),%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movslq %ebx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [6 x i8] c"%lld\0A\00"
define i64 @get_file_size(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [6 x i8] c"%lld\0A\00"
define i64 @get_file_size(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = sext i32 %6 to i64
ret i64 %8
}
double f13(double x) {
  double t = x + 0.0;
  return t - 0.0;
}


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

x86 assembly (clang, -O2):
<f13>:
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @f13(double %0) {
%2 = fadd double %0, 0.000000e+00
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x49() {
  Assert_real((isxdigit(73) == 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_isxdigit.c",
              370, ("isxdigit should be 0 for I"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x49>:
push   %rax
mov    $0x49,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x172,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for I\00"
define void @t_isxdigit_0x49() {
%1 = call i64 @isxdigit(i32 73)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for I\00"
define void @t_isxdigit_0x49() {
%1 = tail call i64 @isxdigit(i32 73)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned long long __u64;

/* Variables and functions */
bool check_overflow(__u64 value, unsigned bits) {
  return (value & ((1ULL << bits) - 1)) == value;
}


x86 assembly (clang, -O0):
<check_overflow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    -0x8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_overflow>:
mov    %esi,%ecx
shr    %cl,%rdi
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @check_overflow(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = sub i64 %8, 1
%10 = and i64 %5, %9
%11 = load i64, i64* %3
%12 = icmp eq i64 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @check_overflow(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = lshr i64 %0, %3
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *strdup(const char *str) {
  size_t len = strlen(str) + 1;
  char *new = malloc(len);
  if (new == NULL) {
    return NULL;
  }
  memcpy(new, str, len);
  return new;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1173 <strdup+0x43>
movq   $0x0,-0x8(%rbp)
jmp    118c <strdup+0x5c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <strdup+0x31>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
/* Variables and functions */
unsigned long GetError38();
unsigned long geterror() { return GetError38(); }


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

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

LLVM IR (-O0):
define i64 @geterror() {
%1 = call i64 (...) @GetError38()
ret i64 %1
}

LLVM IR (-O2):
define i64 @geterror() {
%1 = tail call i64 (...) @GetError38()
ret i64 %1
}
long long LLneg(long long x) { return -x; }


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

x86 assembly (clang, -O2):
<LLneg>:
mov    %rdi,%rax
neg    %rax
ret

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

LLVM IR (-O2):
define i64 @LLneg(i64 %0) {
%2 = sub nsw i64 0, %0
ret i64 %2
}
void foo270() {}


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

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

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

LLVM IR (-O2):
define void @foo270() {
ret void
}
void debug_shell_printf(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @debug_shell_printf(i8* nocapture %0, ...) {
ret void
}
__typeof__(memchr(1, 1, (void *)1)) test_memchr_132(void) {
  return memchr(1, 1, (void *)1);
}


x86 assembly (clang, -O0):
<test_memchr_132>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rdx,%rdi
call   1030 <memchr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_memchr_132>:
mov    $0x1,%edi
mov    $0x1,%edx
mov    $0x1,%esi
jmp    1030 <memchr@plt>

LLVM IR (-O0):
define i8* @test_memchr_132() {
%1 = call i8* @memchr(i8* inttoptr (i64 1 to i8*), i32 1, i64 1)
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_memchr_132() {
%1 = tail call i8* @memchr(i8* dereferenceable(1) inttoptr (i64 1 to i8*), i32 1, i64 1)
ret i8* %1
}
int test_74_4(int *mem) { return __atomic_fetch_nand(mem + 0, -1, 4); }


x86 assembly (clang, -O0):
<test_74_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
and    %esi,%edx
mov    %edx,-0x28(%rbp)
not    %edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    1150 <test_74_4+0x50>
jmp    1122 <test_74_4+0x22>
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_74_4>:
mov    (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
not    %ecx
lock cmpxchg %ecx,(%rdi)
jne    1110 <test_74_4+0x10>
ret

LLVM IR (-O0):
define i32 @test_74_4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 -1, i32* %3
%7 = load i32, i32* %3
%8 = atomicrmw nand i32* %6, i32 %7 acq_rel
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_74_4(i32* nocapture %0) {
%2 = atomicrmw nand i32* %0, i32 -1 acq_rel
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ nocall(char *);
void dumpstate(void) { nocall("dumpstate"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"dumpstate\00"
define void @dumpstate() {
%1 = tail call i32 @nocall(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
int isseparator(char c) {
  return c == '/' || c == ':' || c == ';' || c == '-' || c == '_' || c == '(' ||
         c == ')';
}


x86 assembly (clang, -O0):
<isseparator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
je     1183 <isseparator+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x2(%rbp)
je     1183 <isseparator+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3b,%ecx
mov    %al,-0x2(%rbp)
je     1183 <isseparator+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     1183 <isseparator+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     1183 <isseparator+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x28,%ecx
mov    %al,-0x2(%rbp)
je     1183 <isseparator+0x83>
movsbl -0x1(%rbp),%eax
cmp    $0x29,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isseparator>:
lea    -0x28(%rdi),%ecx
cmp    $0x37,%cl
ja     1121 <isseparator+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x800000000c00a1,%rdx
bt     %rcx,%rdx
jae    1121 <isseparator+0x21>
ret
xor    %eax,%eax
cmp    $0x29,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isseparator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 47
br i1 %5, label %30, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 58
br i1 %9, label %30, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 59
br i1 %13, label %30, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 45
br i1 %17, label %30, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 95
br i1 %21, label %30, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 40
br i1 %25, label %30, label %26
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 41
br label %30
30: ; preds = %26, %22, %18, %14, %10, %6, %1
%31 = phi i1 [ true, %22 ], [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @isseparator(i8 signext %0) {
switch i8 %0, label %2 [
i8 95, label %5
i8 59, label %5
i8 58, label %5
i8 47, label %5
i8 45, label %5
i8 40, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 41
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Hello World!");
  puts("This is \"PACKAGE_STRING\".");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
@.str.1 = [26 x i8] c"This is \22PACKAGE_STRING\22.\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
@.str.1 = [26 x i8] c"This is \22PACKAGE_STRING\22.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void gtk_tree_store_remove() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_store_remove() {
ret void
}
/* Type definitions */
struct statfs {
  long long f_bsize;
  long long f_bfree;
};

/* Variables and functions */
int statfs(char const *, struct statfs *);
long long free_bytes_in_fs(const char *mnt) {
  struct statfs vfs;
  int rc = statfs(mnt, &vfs);
  if (0 != rc) {
    return -1;
  }
  return vfs.f_bsize * vfs.f_bfree;
}


x86 assembly (clang, -O0):
<free_bytes_in_fs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <statfs@plt>
mov    %eax,-0x24(%rbp)
xor    %eax,%eax
cmp    -0x24(%rbp),%eax
je     1144 <free_bytes_in_fs+0x34>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1151 <free_bytes_in_fs+0x41>
mov    -0x20(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_bytes_in_fs>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
call   1030 <statfs@plt>
mov    0x10(%rsp),%rcx
imul   0x8(%rsp),%rcx
neg    %eax
sbb    %rax,%rax
or     %rcx,%rax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
%struct.statfs = type { i64, i64 }
define i64 @free_bytes_in_fs(i8* %0) {
%2 = alloca %struct.statfs
%3 = bitcast %struct.statfs* %2 to i8*
%4 = call i32 @statfs(i8* %0, %struct.statfs* %2)
%5 = icmp eq i32 %4, 0
%6 = getelementptr inbounds %struct.statfs, %struct.statfs* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = getelementptr inbounds %struct.statfs, %struct.statfs* %2, i64 0, i32 1
%9 = load i64, i64* %8
%10 = mul nsw i64 %9, %7
%11 = select i1 %5, i64 %10, i64 -1
ret i64 %11
}
void dd_pbl_ios_appflyer_session_start(const char *client_id,
                                       const char *apple_id) {}


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

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

LLVM IR (-O0):
define void @dd_pbl_ios_appflyer_session_start(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @dd_pbl_ios_appflyer_session_start(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t);
int /*<<< orphan*/ read_write_data(int, int, size_t);
void send_data(int socket, int fd, size_t size) {
  printf("sending data of %u bytes long\n", size);
  read_write_data(fd, socket, size);
}


x86 assembly (clang, -O0):
<send_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <read_write_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_data>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%r14d
lea    0xecd(%rip),%rdi
mov    %rdx,%rsi
call   1040 <printf@plt>
mov    %ebp,%edi
mov    %r14d,%esi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <read_write_data@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"sending data of %u bytes long\0A\00"
define void @send_data(i32 %0, i32 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = load i64, i64* %6
%12 = call i32 @read_write_data(i32 %9, i32 %10, i64 %11)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"sending data of %u bytes long\0A\00"
define void @send_data(i32 %0, i32 %1, i64 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %2)
%5 = tail call i32 @read_write_data(i32 %1, i32 %0, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NumberIO_BinToStr(unsigned int, unsigned int, char *, int);
int /*<<< orphan*/ StrIO_WriteString(char *, int);
void NumberIO_WriteBin(unsigned int x, unsigned int n) {
  typedef struct _T14_a _T14;
  struct _T14_a {
    char array[79 + 1];
  };
  _T14 a;
  NumberIO_BinToStr(x, n, (char *)&a.array[0], 79);
  StrIO_WriteString((char *)&a.array[0], 79);
}


x86 assembly (clang, -O0):
<NumberIO_WriteBin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x58(%rbp),%rdx
mov    $0x4f,%ecx
call   1030 <NumberIO_BinToStr@plt>
lea    -0x58(%rbp),%rdi
mov    $0x4f,%esi
call   1040 <StrIO_WriteString@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumberIO_WriteBin>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdx
mov    $0x4f,%ecx
call   1030 <NumberIO_BinToStr@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
call   1040 <StrIO_WriteString@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct._T14_a = type { [80 x i8] }
define void @NumberIO_WriteBin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct._T14_a
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = getelementptr inbounds %struct._T14_a, %struct._T14_a* %5, i32 0, i32 0
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%10 = call i32 @NumberIO_BinToStr(i32 %6, i32 %7, i8* %9, i32 79)
%11 = getelementptr inbounds %struct._T14_a, %struct._T14_a* %5, i32 0, i32 0
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 0
%13 = call i32 @StrIO_WriteString(i8* %12, i32 79)
ret void
}

LLVM IR (-O2):
%struct._T14_a = type { [80 x i8] }
define void @NumberIO_WriteBin(i32 %0, i32 %1) {
%3 = alloca %struct._T14_a
%4 = getelementptr inbounds %struct._T14_a, %struct._T14_a* %3, i64 0, i32 0, i64 0
%5 = call i32 @NumberIO_BinToStr(i32 %0, i32 %1, i8* %4, i32 79)
%6 = call i32 @StrIO_WriteString(i8* %4, i32 79)
ret void
}