xunge/DecIR huggingface dataset:
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/rgnorder.c",
                        278));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x116,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x116,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/rgnorder.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i32 278)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/rgnorder.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i32 278)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int main(void) {
  printf("This should be sent to stdout\n");
  fprintf(stderr, "This should be sent to stderr\n");
  printf("This should be sent to stdout\n");
  fprintf(stderr, "This should be sent to stderr\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xef3(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
mov    0x2ea5(%rip),%r15
mov    (%r15),%edi
lea    0xebb(%rip),%rbx
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [31 x i8] c"This should be sent to stdout\0A\00"
@stderr = global i32 0
@.str.1 = [31 x i8] c"This should be sent to stderr\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [31 x i8] c"This should be sent to stderr\0A\00"
@str.2 = [30 x i8] c"This should be sent to stdout\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void speex_warning_int(char *str, int val) {
  fprintf(stderr, "warning: %s %d\n", str, val);
}


x86 assembly (clang, -O0):
<speex_warning_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speex_warning_int>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"warning: %s %d\0A\00"
define void @speex_warning_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"warning: %s %d\0A\00"
define void @speex_warning_int(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
int find_length(int x) {
  int length;
  length = 0;
  while (x != 0) {
    x /= 10;
    length += 1;
  }
  return (length);
}


x86 assembly (clang, -O0):
<find_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <find_length+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <find_length+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_length>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <find_length+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <find_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @find_length(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
unsigned long long f2(x) { return ((unsigned long long)(x != 0) - 3) / 2; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
cltq
sub    $0x3,%rax
shr    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
movabs $0x7ffffffffffffffe,%rcx
ff ff 7f
lea    0x1(%rcx),%rax
test   %edi,%edi
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @f2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = sext i32 %5 to i64
%7 = sub i64 %6, 3
%8 = udiv i64 %7, 2
ret i64 %8
}

LLVM IR (-O2):
define i64 @f2(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i64 9223372036854775806, i64 9223372036854775807
ret i64 %3
}
void graphic_init() {}


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

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

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

LLVM IR (-O2):
define void @graphic_init() {
ret void
}
int test_imm_B1int32_reg(int val) { return ((val) & (0xB1 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_B1int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xb1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B1int32_reg>:
test   $0xb1,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B1int32_reg(i32 %0) {
%2 = and i32 %0, 177
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int readb_idx_reg(int /*<<< orphan*/, int);
int /*<<< orphan*/ writeb_idx_reg(int /*<<< orphan*/, int, int);
void writeb_idx_mask(uint16_t reg, uint8_t idx, uint8_t val, uint8_t mask) {
  uint8_t tmp;
  tmp = readb_idx_reg(reg, idx);
  tmp &= ~mask;
  tmp |= (val & mask);
  writeb_idx_reg(reg, idx, tmp);
}


x86 assembly (clang, -O0):
<writeb_idx_mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <readb_idx_reg@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <writeb_idx_reg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeb_idx_mask>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%r15d
mov    %edi,%ebx
call   1030 <readb_idx_reg@plt>
xor    %eax,%ebp
and    %r14d,%ebp
xor    %eax,%ebp
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <writeb_idx_reg@plt>

LLVM IR (-O0):
define void @writeb_idx_mask(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @readb_idx_reg(i32 %10, i32 %11)
store i32 %12, i32* %9
%13 = load i32, i32* %8
%14 = xor i32 %13, -1
%15 = load i32, i32* %9
%16 = and i32 %15, %14
store i32 %16, i32* %9
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = and i32 %17, %18
%20 = load i32, i32* %9
%21 = or i32 %20, %19
store i32 %21, i32* %9
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = load i32, i32* %9
%25 = call i32 @writeb_idx_reg(i32 %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @writeb_idx_mask(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @readb_idx_reg(i32 %0, i32 %1)
%6 = xor i32 %3, -1
%7 = and i32 %5, %6
%8 = and i32 %3, %2
%9 = or i32 %7, %8
%10 = tail call i32 @writeb_idx_reg(i32 %0, i32 %1, i32 %9)
ret void
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *strncat(char *dest, const char *src, size_t n) {
  size_t i = strlen(dest);
  strncpy((char *)(dest + i), src, n);
  return dest;
}


x86 assembly (clang, -O0):
<strncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
add    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncat>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    (%rax,%rbx,1),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strncat(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @strncpy(i8* %5, i8* %1, i64 %2)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;

/* Variables and functions */
int /*<<< orphan*/ _unsupported();
int pthread_condattr_init(pthread_condattr_t *attr) {
  _unsupported();
  return -1;
}


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

x86 assembly (clang, -O2):
<pthread_condattr_init>:
push   %rax
xor    %eax,%eax
call   1030 <_unsupported@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @pthread_condattr_init(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @_unsupported()
ret i32 -1
}
int query_format(unsigned int format) {
  unsigned int i;
  int flag = 0x1 | 0x2 | 0x10 | 0x20 | 0x4 | 0x400;
  if (format == 0x32315659)
    return flag;
  return 0;
}


x86 assembly (clang, -O0):
<query_format>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x437,-0x10(%rbp)
cmpl   $0x32315659,-0x8(%rbp)
jne    1126 <query_format+0x26>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <query_format+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<query_format>:
xor    %ecx,%ecx
cmp    $0x32315659,%edi
mov    $0x437,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @query_format(i32 %0) {
%2 = icmp eq i32 %0, 842094169
%3 = select i1 %2, i32 1079, i32 0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int pthread_join(int /*<<< orphan*/, void **);
void __safe_p_join(pthread_t t, void **retval) {
  void *rv;
  if (!retval) {
    retval = &rv;
  }
  int en = pthread_join(t, retval);
  if (en) {
    abort();
  }
}


x86 assembly (clang, -O0):
<__safe_p_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1142 <__safe_p_join+0x22>
lea    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <pthread_join@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1162 <__safe_p_join+0x42>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__safe_p_join>:
push   %rax
test   %rsi,%rsi
mov    %rsp,%rax
cmove  %rax,%rsi
call   1040 <pthread_join@plt>
test   %eax,%eax
jne    1136 <__safe_p_join+0x16>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @__safe_p_join(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = icmp ne i8** %7, null
br i1 %8, label %10, label %9
9: ; preds = %2
store i8** %5, i8*** %4
br label %10
10: ; preds = %9, %2
%11 = load i32, i32* %3
%12 = load i8**, i8*** %4
%13 = call i32 @pthread_join(i32 %11, i8** %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @__safe_p_join(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = icmp eq i8** %1, null
%6 = select i1 %5, i8** %3, i8** %1
%7 = call i32 @pthread_join(i32 %0, i8** %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
ret void
}
void access_index_4(int *arr) { arr[4] = 0; }


x86 assembly (clang, -O0):
<access_index_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<access_index_4>:
movl   $0x0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @access_index_4(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
store i32 0, i32* %2
ret void
}
/* Variables and functions */
unsigned short crc16_add(unsigned char const, unsigned short);
unsigned short crc16_data(const unsigned char *data, int len,
                          unsigned short acc) {
  int i;
  for (i = 0; i < len; ++i) {
    acc = crc16_add(*data, acc);
    ++data;
  }
  return acc;
}


x86 assembly (clang, -O0):
<crc16_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1169 <crc16_data+0x59>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
movzbl %al,%edi
movzwl -0xe(%rbp),%esi
call   1030 <crc16_add@plt>
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <crc16_data+0x1d>
movzwl -0xe(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc16_data>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%eax
test   %esi,%esi
jle    1146 <crc16_data+0x36>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%r14,%rbx,1),%edi
movzwl %ax,%esi
call   1030 <crc16_add@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <crc16_data+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define zeroext i16 @crc16_data(i8* nocapture %0, i32 %1, i16 zeroext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i32 [ %12, %5 ], [ 0, %3 ]
%7 = phi i16 [ %10, %5 ], [ %2, %3 ]
%8 = phi i8* [ %11, %5 ], [ %0, %3 ]
%9 = load i8, i8* %8
%10 = tail call zeroext i16 @crc16_add(i8 zeroext %9, i16 zeroext %7)
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %1
br i1 %13, label %14, label %5
14: ; preds = %5, %3
%15 = phi i16 [ %2, %3 ], [ %10, %5 ]
ret i16 %15
}
void glmAddVector2d(double result[2], const double v1[2], const double v2[2]) {
  result[0] = v1[0] + v2[0];
  result[1] = v1[1] + v2[1];
}


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

x86 assembly (clang, -O2):
<glmAddVector2d>:
movsd  (%rsi),%xmm0
addsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
addsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmAddVector2d(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** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fadd double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fadd double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
ret void
}

LLVM IR (-O2):
define void @glmAddVector2d(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fadd double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fadd double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ keccak_absorb(int /*<<< orphan*/ *, int,
                                 unsigned char const *, unsigned long long,
                                 int);
void shake128_absorb(uint64_t *s, const unsigned char *input,
                     unsigned long long inputByteLen) {
  keccak_absorb(s, 168, input, inputByteLen, 0x1F);
}


x86 assembly (clang, -O0):
<shake128_absorb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0xa8,%esi
mov    $0x1f,%r8d
call   1030 <keccak_absorb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shake128_absorb>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0xa8,%esi
mov    $0x1f,%r8d
jmp    1030 <keccak_absorb@plt>

LLVM IR (-O0):
define void @shake128_absorb(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @keccak_absorb(i32* %7, i32 168, i8* %8, i64 %9, i32 31)
ret void
}

LLVM IR (-O2):
define void @shake128_absorb(i32* %0, i8* %1, i64 %2) {
%4 = tail call i32 @keccak_absorb(i32* %0, i32 168, i8* %1, i64 %2, i32 31)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CMN_error(char *);
int /*<<< orphan*/ close(int);
void errorClose2Sock(char *msg, int sock, int sock2) {
  close(sock);
  close(sock2);
  CMN_error(msg);
}


x86 assembly (clang, -O0):
<errorClose2Sock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <close@plt>
mov    -0x10(%rbp),%edi
call   1040 <close@plt>
mov    -0x8(%rbp),%rdi
call   1030 <CMN_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorClose2Sock>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <close@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <CMN_error@plt>

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

LLVM IR (-O2):
define void @errorClose2Sock(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @close(i32 %1)
%5 = tail call i32 @close(i32 %2)
%6 = tail call i32 @CMN_error(i8* %0)
ret void
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_CC_SFD_PIN() { return 0x01 & (inp_emulate(-5) >> 3); }


x86 assembly (clang, -O0):
<TOSH_READ_CC_SFD_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffb,%edi
call   1030 <inp_emulate@plt>
sar    $0x3,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_CC_SFD_PIN>:
push   %rax
mov    $0xfffffffb,%edi
call   1030 <inp_emulate@plt>
shr    $0x3,%al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_CC_SFD_PIN() {
%1 = call i32 @inp_emulate(i32 -5)
%2 = ashr i32 %1, 3
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_CC_SFD_PIN() {
%1 = tail call i32 @inp_emulate(i32 -5)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 3
%4 = and i8 %3, 1
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ postMessage(int /*<<< orphan*/, int, unsigned int);
void pchar(char c) { postMessage(0, 1, (unsigned int)c); }


x86 assembly (clang, -O0):
<pchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <postMessage@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i32 @postMessage(i32 0, i32 1, i32 %4)
ret void
}

LLVM IR (-O2):
define void @pchar(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 @postMessage(i32 0, i32 1, i32 %2)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t set_xlow_1(uint64_t u) { return (u - 1) | ~u; }


x86 assembly (clang, -O0):
<set_xlow_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_xlow_1>:
lea    -0x1(%rdi),%eax
not    %edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @set_xlow_1(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = xor i32 %0, -1
%4 = or i32 %2, %3
ret i32 %4
}
int test(float c) { return !!c * 7LL == 0; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
imul   $0x7,%rax,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
xorps  %xmm1,%xmm1
cmpeqss %xmm0,%xmm1
movd   %xmm1,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp une float %3, 0.000000e+00
%5 = xor i1 %4, true
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = sext i32 %7 to i64
%9 = mul nsw i64 %8, 7
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @test(float %0) {
%2 = fcmp oeq float %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
int compare(p1, p2) const void *p1;
const void *p2;
{
  char *const *v1;
  char *const *v2;
  v1 = (char *const *)p1;
  v2 = (char *const *)p2;
  return strcmp(*v1, *v2);
}


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

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ GLdouble;

/* Variables and functions */
int figureDistCmpZero(scalar_t__);
int figureDistCmp(GLdouble a, GLdouble b) { return figureDistCmpZero(a - b); }


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

x86 assembly (clang, -O2):
<figureDistCmp>:
sub    %rsi,%rdi
jmp    1030 <figureDistCmpZero@plt>

LLVM IR (-O0):
define i32 @figureDistCmp(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
%8 = call i32 @figureDistCmpZero(i64 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @figureDistCmp(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = tail call i32 @figureDistCmpZero(i64 %3)
ret i32 %4
}
void path_020_expected_7(int a, int b) {
  if (a > 10) {
    while (a) {
      if (b == 1) {
        continue;
      }
      if (b == 2) {
        continue;
      }
      if (b == 3) {
        continue;
      }
      if (b == 2) {
        break;
      }
      return;
    }
  }
}


x86 assembly (clang, -O0):
<path_020_expected_7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    1169 <path_020_expected_7+0x69>
jmp    1119 <path_020_expected_7+0x19>
cmpl   $0x0,-0x4(%rbp)
je     1164 <path_020_expected_7+0x64>
cmpl   $0x1,-0x8(%rbp)
jne    1132 <path_020_expected_7+0x32>
jmp    1119 <path_020_expected_7+0x19>
cmpl   $0x2,-0x8(%rbp)
jne    1141 <path_020_expected_7+0x41>
jmp    1119 <path_020_expected_7+0x19>
cmpl   $0x3,-0x8(%rbp)
jne    1150 <path_020_expected_7+0x50>
jmp    1119 <path_020_expected_7+0x19>
cmpl   $0x2,-0x8(%rbp)
jne    115f <path_020_expected_7+0x5f>
jmp    1164 <path_020_expected_7+0x64>
jmp    1169 <path_020_expected_7+0x69>
jmp    1169 <path_020_expected_7+0x69>
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_020_expected_7>:
cmp    $0xb,%edi
jl     1112 <path_020_expected_7+0x12>
add    $0xffffffff,%esi
cmp    $0x2,%esi
ja     1112 <path_020_expected_7+0x12>
nopl   (%rax)
jmp    1110 <path_020_expected_7+0x10>
ret

LLVM IR (-O0):
define void @path_020_expected_7(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 sgt i32 %5, 10
br i1 %6, label %7, label %29
7: ; preds = %2
br label %8
8: ; preds = %22, %18, %14, %7
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %28
11: ; preds = %8
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %15
14: ; preds = %11
br label %8
15: ; preds = %11
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %19
18: ; preds = %15
br label %8
19: ; preds = %15
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 3
br i1 %21, label %22, label %23
22: ; preds = %19
br label %8
23: ; preds = %19
%24 = load i32, i32* %4
%25 = icmp eq i32 %24, 2
br i1 %25, label %26, label %27
26: ; preds = %23
br label %28
27: ; preds = %23
br label %29
28: ; preds = %26, %8
br label %29
29: ; preds = %27, %28, %2
ret void
}

LLVM IR (-O2):
define void @path_020_expected_7(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 10
%4 = add i32 %1, -1
%5 = icmp ult i32 %4, 3
%6 = and i1 %3, %5
br i1 %6, label %7, label %8
7: ; preds = %2, %7
br label %7
8: ; preds = %2
ret void
}
int fib(int n) {
  if (n <= 1) {
    return n;
  } else {
    return fib(n - 2) + fib(n - 1);
  }
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1130 <fib+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fib+0x43>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%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    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1147 <fib+0x37>
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x3(%rbx),%edi
call   1030 <fib@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1130 <fib+0x20>
mov    $0x1,%ebx
add    %ebx,%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
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %16
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 2
%11 = call i32 @fib(i32 %10)
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @fib(i32 %13)
%15 = add nsw i32 %11, %14
store i32 %15, i32* %2
br label %16
16: ; preds = %8, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, 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, -2
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -1
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 3
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ 1, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
int base64length(int hexlen) {
  int bits = hexlen * 8;
  return bits % 6 ? bits / 6 + 1 : bits / 6;
}


x86 assembly (clang, -O0):
<base64length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     113a <base64length+0x3a>
mov    -0x8(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <base64length+0x48>
mov    -0x8(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64length>:
shl    $0x3,%edi
movslq %edi,%rcx
imul   $0x2aaaaaab,%rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x20,%rdx
add    %eax,%edx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,2),%esi
xor    %eax,%eax
cmp    %esi,%ecx
setne  %al
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @base64length(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 8
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = srem i32 %6, 6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %3
%11 = sdiv i32 %10, 6
%12 = add nsw i32 %11, 1
br label %16
13: ; preds = %1
%14 = load i32, i32* %3
%15 = sdiv i32 %14, 6
br label %16
16: ; preds = %13, %9
%17 = phi i32 [ %12, %9 ], [ %15, %13 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @base64length(i32 %0) {
%2 = shl nsw i32 %0, 3
%3 = srem i32 %2, 6
%4 = icmp ne i32 %3, 0
%5 = sdiv i32 %2, 6
%6 = zext i1 %4 to i32
%7 = add nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() {
  int i;
  for (i = 0; i < 100; i++)
    f(7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1148 <main+0x38>
mov    $0x7,%edi
call   1030 <f@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   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x7,%edi
call   1030 <f@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
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, 100
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @f(i32 7)
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() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @f(i32 7)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t blue(uint32_t colourcode) { return (colourcode >> 00) & 0x3ff; }


x86 assembly (clang, -O0):
<blue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x0,%eax
and    $0x3ff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blue>:
mov    %edi,%eax
and    $0x3ff,%eax
ret

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

LLVM IR (-O2):
define i32 @blue(i32 %0) {
%2 = and i32 %0, 1023
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_201() {
  Assert_real((isqrt(201) == 14),
              "/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/stdlib/isqrt.c",
              1010, ("Integer square root of 201 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_201>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc9,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x3f2,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_201>:
push   %rax
mov    $0xc9,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x3f2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 201 should be 14\00"
define void @t_sqrt_201() {
%1 = call i32 @isqrt(i32 201)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1010, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 201 should be 14\00"
define void @t_sqrt_201() {
%1 = tail call i32 @isqrt(i32 201)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1010, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void AONRTCIncValueCh2Set(uint32_t ui32IncValue) {
  (*((volatile unsigned long *)(0x40092000 + 0x00000024))) = ui32IncValue;
}


x86 assembly (clang, -O0):
<AONRTCIncValueCh2Set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x40092024,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AONRTCIncValueCh2Set>:
mov    %rdi,0x40092024
40
ret

LLVM IR (-O0):
define void @AONRTCIncValueCh2Set(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074339876 to i64*)
ret void
}

LLVM IR (-O2):
define void @AONRTCIncValueCh2Set(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074339876 to i64*)
ret void
}
/* Type definitions */
struct route_node {
  int dummy;
};
struct bgp_node {
  int dummy;
};

/* Variables and functions */
struct bgp_node *bgp_node_from_rnode(struct route_node *);
int /*<<< orphan*/ bgp_node_to_rnode(struct bgp_node *);
struct route_node *route_next_until(int /*<<< orphan*/, int /*<<< orphan*/);
struct bgp_node *bgp_route_next_until(struct bgp_node *node,
                                      struct bgp_node *limit) {
  struct route_node *rnode;
  rnode = route_next_until(bgp_node_to_rnode(node), bgp_node_to_rnode(limit));
  return bgp_node_from_rnode(rnode);
}


x86 assembly (clang, -O0):
<bgp_route_next_until>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bgp_node_to_rnode@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <bgp_node_to_rnode@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1040 <route_next_until@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <bgp_node_from_rnode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bgp_route_next_until>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <bgp_node_to_rnode@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <bgp_node_to_rnode@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <route_next_until@plt>
mov    %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <bgp_node_from_rnode@plt>

LLVM IR (-O0):
%struct.bgp_node = type { i32 }
%struct.route_node = type { i32 }
define %struct.bgp_node* @bgp_route_next_until(%struct.bgp_node* %0, %struct.bgp_node* %1) {
%3 = alloca %struct.bgp_node*
%4 = alloca %struct.bgp_node*
%5 = alloca %struct.route_node*
store %struct.bgp_node* %0, %struct.bgp_node** %3
store %struct.bgp_node* %1, %struct.bgp_node** %4
%6 = load %struct.bgp_node*, %struct.bgp_node** %3
%7 = call i32 @bgp_node_to_rnode(%struct.bgp_node* %6)
%8 = load %struct.bgp_node*, %struct.bgp_node** %4
%9 = call i32 @bgp_node_to_rnode(%struct.bgp_node* %8)
%10 = call %struct.route_node* @route_next_until(i32 %7, i32 %9)
store %struct.route_node* %10, %struct.route_node** %5
%11 = load %struct.route_node*, %struct.route_node** %5
%12 = call %struct.bgp_node* @bgp_node_from_rnode(%struct.route_node* %11)
ret %struct.bgp_node* %12
}

LLVM IR (-O2):
%struct.bgp_node = type { i32 }
%struct.route_node = type { i32 }
define %struct.bgp_node* @bgp_route_next_until(%struct.bgp_node* %0, %struct.bgp_node* %1) {
%3 = tail call i32 @bgp_node_to_rnode(%struct.bgp_node* %0)
%4 = tail call i32 @bgp_node_to_rnode(%struct.bgp_node* %1)
%5 = tail call %struct.route_node* @route_next_until(i32 %3, i32 %4)
%6 = tail call %struct.bgp_node* @bgp_node_from_rnode(%struct.route_node* %5)
ret %struct.bgp_node* %6
}
/* Variables and functions */
int f(int);
int main(void) {
  int *x, *y;
  int N;
  for (int j = 0; j < N;) {
    x[j] = f(y[j]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1154 <main+0x44>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <f@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}