xunge/DecIR huggingface dataset:
__attribute__((visibility("hidden"))) int is_extendable(const int symbology) {
  switch (symbology) {
  case 13:
  case 14:
  case 34:
  case 35:
  case 37:
  case 38:
  case 69:
  case 130:
  case 135:
  case 136:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_extendable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff3,%eax
sub    $0x2,%eax
jb     1180 <is_extendable+0x80>
jmp    111e <is_extendable+0x1e>
mov    -0xc(%rbp),%eax
add    $0xffffffde,%eax
sub    $0x2,%eax
jb     1180 <is_extendable+0x80>
jmp    1132 <is_extendable+0x32>
mov    -0xc(%rbp),%eax
add    $0xffffffdb,%eax
sub    $0x2,%eax
jb     1180 <is_extendable+0x80>
jmp    1146 <is_extendable+0x46>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     1180 <is_extendable+0x80>
jmp    1157 <is_extendable+0x57>
mov    -0xc(%rbp),%eax
sub    $0x82,%eax
je     1180 <is_extendable+0x80>
jmp    116a <is_extendable+0x6a>
mov    -0xc(%rbp),%eax
add    $0xffffff79,%eax
sub    $0x1,%eax
ja     118c <is_extendable+0x8c>
jmp    1180 <is_extendable+0x80>
movl   $0x1,-0x4(%rbp)
jmp    1193 <is_extendable+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_extendable>:
mov    $0x1,%eax
lea    -0xd(%rdi),%ecx
cmp    $0x38,%ecx
ja     111d <is_extendable+0x1d>
movabs $0x100000003600003,%rdx
bt     %rcx,%rdx
jb     1132 <is_extendable+0x32>
add    $0xffffff7e,%edi
cmp    $0x6,%edi
ja     1133 <is_extendable+0x33>
mov    $0x61,%ecx
bt     %edi,%ecx
jae    1133 <is_extendable+0x33>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define hidden i32 @is_extendable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 13, label %5
i32 14, label %5
i32 34, label %5
i32 35, label %5
i32 37, label %5
i32 38, label %5
i32 69, label %5
i32 130, label %5
i32 135, label %5
i32 136, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define hidden i32 @is_extendable(i32 %0) {
switch i32 %0, label %2 [
i32 13, label %3
i32 14, label %3
i32 34, label %3
i32 35, label %3
i32 37, label %3
i32 38, label %3
i32 69, label %3
i32 130, label %3
i32 135, label %3
i32 136, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
void assertions2STARTSUBJECT() {}


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

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

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

LLVM IR (-O2):
define void @assertions2STARTSUBJECT() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t djb2(const char *str) {
  const unsigned char *aux = (const unsigned char *)str;
  uint32_t hash = 5381;
  while (*aux)
    hash = (hash << 5) + hash + *aux++;
  return hash;
}


x86 assembly (clang, -O0):
<djb2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1505,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <djb2+0x49>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
add    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <djb2+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <djb2+0x28>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movzbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @djb2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 33
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = zext i8 %5 to i32
%11 = add nsw i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ println(int);
int main() {
  int n;
  int p;
  n = 2;
  while (n <= 100) {
    p = is_prime(n);
    if (p > 0) {
      println(p);
    }
    n = n + 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     116b <main+0x4b>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115d <main+0x3d>
mov    -0xc(%rbp),%edi
call   1030 <println@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%ebx
jmp    1138 <main+0x18>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x65,%ebx
je     114c <main+0x2c>
mov    %ebx,%edi
call   1040 <is_prime@plt>
test   %eax,%eax
jle    1130 <main+0x10>
mov    %eax,%edi
call   1030 <println@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
br label %4
4: ; preds = %15, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 100
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @is_prime(i32 %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i32, i32* %3
%14 = call i32 @println(i32 %13)
br label %15
15: ; preds = %12, %7
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %4
18: ; preds = %4
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 2, %0 ], [ %8, %7 ]
%3 = tail call i32 @is_prime(i32 %2)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @println(i32 %3)
br label %7
7: ; preds = %5, %1
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 101
br i1 %9, label %10, label %1
10: ; preds = %7
ret i32 0
}
__attribute__((always_)) struct module *__module_address(unsigned long addr) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.module = type opaque
define %struct.module* @__module_address(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret %struct.module* null
}

LLVM IR (-O2):
%struct.module = type opaque
define noalias %struct.module* @__module_address(i64 %0) {
ret %struct.module* null
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int length_slow(char *string) {
  int i;
  if ((0))
    ;
  for (i = 0; '\0' != *string; ++i) {
    ++string;
    usleep(i * i);
  }
  if ((0))
    ;
  return i;
}


x86 assembly (clang, -O0):
<length_slow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     115a <length_slow+0x4a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%edi
imul   -0xc(%rbp),%edi
call   1030 <usleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <length_slow+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length_slow>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x0,(%rdi)
je     113b <length_slow+0x2b>
mov    %rdi,%r14
xor    %eax,%eax
xchg   %ax,%ax
mov    %rax,%rbx
mov    %ebx,%edi
imul   %ebx,%edi
call   1030 <usleep@plt>
lea    0x1(%rbx),%rax
cmpb   $0x0,0x1(%r14,%rbx,1)
jne    1120 <length_slow+0x10>
jmp    113d <length_slow+0x2d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @length_slow(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %10, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = mul nsw i32 %5, %5
%9 = tail call i32 @usleep(i32 %8)
%10 = add nuw nsw i32 %5, 1
%11 = load i8, i8* %7
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %14
}
int main(void) {
  int a = 1 + 2;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cascfguard2l(float *, float *, float, int, int, int, int);
void cascfguard2l_(float *dcu, float *cus, float *q2m0, int *nx, int *ny,
                   int *nxe, int *nye) {
  cascfguard2l(dcu, cus, *q2m0, *nx, *ny, *nxe, *nye);
  return;
}


x86 assembly (clang, -O0):
<cascfguard2l_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x30(%rbp),%rax
mov    (%rax),%r8d
mov    0x10(%rbp),%rax
mov    (%rax),%r9d
call   1030 <cascfguard2l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cascfguard2l_>:
mov    0x8(%rsp),%rax
movss  (%rdx),%xmm0
mov    (%rcx),%edx
mov    (%r8),%ecx
mov    (%r9),%r8d
mov    (%rax),%r9d
jmp    1030 <cascfguard2l@plt>

LLVM IR (-O0):
define void @cascfguard2l_(float* %0, float* %1, float* %2, i32* %3, i32* %4, i32* %5, i32* %6) {
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
store float* %0, float** %8
store float* %1, float** %9
store float* %2, float** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%15 = load float*, float** %8
%16 = load float*, float** %9
%17 = load float*, float** %10
%18 = load float, float* %17
%19 = load i32*, i32** %11
%20 = load i32, i32* %19
%21 = load i32*, i32** %12
%22 = load i32, i32* %21
%23 = load i32*, i32** %13
%24 = load i32, i32* %23
%25 = load i32*, i32** %14
%26 = load i32, i32* %25
%27 = call i32 @cascfguard2l(float* %15, float* %16, float %18, i32 %20, i32 %22, i32 %24, i32 %26)
ret void
}

LLVM IR (-O2):
define void @cascfguard2l_(float* %0, float* %1, float* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6) {
%8 = load float, float* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = tail call i32 @cascfguard2l(float* %0, float* %1, float %8, i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}
void sde_rotator_destroy_timeline(struct sde_rot_timeline *tl) {}


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

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

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

LLVM IR (-O2):
%struct.sde_rot_timeline = type opaque
define void @sde_rotator_destroy_timeline(%struct.sde_rot_timeline* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rad_to_tick(float rad) {
  uint16_t ticks = ((rad * (180 / 3.14159)) / 0.29) + 512;
  if (ticks > 1023)
    return 0x3FF;
  return (uint16_t)ticks;
}


x86 assembly (clang, -O0):
<rad_to_tick>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3ff,-0xc(%rbp)
jle    1156 <rad_to_tick+0x56>
movl   $0x3ff,-0x4(%rbp)
jmp    115c <rad_to_tick+0x5c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad_to_tick>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
divsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%ecx
cmp    $0x3ff,%ecx
mov    $0x3ff,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @rad_to_tick(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fmul double %6, 0x404CA5DDB05CC3E8
%8 = fdiv double %7, 2.900000e-01
%9 = fadd double %8, 5.120000e+02
%10 = fptosi double %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 1023
br i1 %12, label %13, label %14
13: ; preds = %1
store i32 1023, i32* %2
br label %16
14: ; preds = %1
%15 = load i32, i32* %4
store i32 %15, i32* %2
br label %16
16: ; preds = %14, %13
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @rad_to_tick(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x404CA5DDB05CC3E8
%4 = fdiv double %3, 2.900000e-01
%5 = fadd double %4, 5.120000e+02
%6 = fptosi double %5 to i32
%7 = icmp slt i32 %6, 1023
%8 = select i1 %7, i32 %6, i32 1023
ret i32 %8
}
void __pabt(void) { return; }


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

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

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

LLVM IR (-O2):
define void @__pabt() {
ret void
}
int isAsciiDigit(int x) { return (0x1F << 24 >> (x >> 1)) & !(x >> 6); }


x86 assembly (clang, -O0):
<isAsciiDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
mov    $0x1f000000,%eax
sar    %cl,%eax
mov    -0x4(%rbp),%ecx
sar    $0x6,%ecx
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAsciiDigit>:
mov    %edi,%ecx
shr    %ecx
mov    $0x1f000000,%edx
shr    %cl,%edx
xor    %eax,%eax
cmp    $0x40,%edi
setb   %al
and    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @isAsciiDigit(i32 %0) {
%2 = ashr i32 %0, 1
%3 = lshr i32 520093696, %2
%4 = icmp ult i32 %0, 64
%5 = zext i1 %4 to i32
%6 = and i32 %3, %5
ret i32 %6
}
int get_led_4(void) {
  unsigned int mode = (*(volatile unsigned int *)(0x7F008824)) & 8;
  if (mode)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<get_led_4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008824,%eax
mov    (%rax),%eax
and    $0x8,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1127 <get_led_4+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <get_led_4+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_led_4>:
mov    0x7f008824,%eax
shr    $0x3,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_led_4() {
%1 = alloca i32
%2 = alloca i32
%3 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%4 = and i32 %3, 8
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_led_4() {
%1 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%2 = lshr i32 %1, 3
%3 = and i32 %2, 1
ret i32 %3
}
void XkbSetAtomFuncs() {}


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

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

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

LLVM IR (-O2):
define void @XkbSetAtomFuncs() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void scanarray(int A[], int n) {
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
}


x86 assembly (clang, -O0):
<scanarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <scanarray+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <scanarray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanarray>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <scanarray+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <scanarray+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @scanarray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
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 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @scanarray(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %11, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, size_t);
void unmapFile(void *addr, size_t length) { (void)munmap(addr, length); }


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

x86 assembly (clang, -O2):
<unmapFile>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @unmapFile(i8* %0, i64 %1) {
%3 = tail call i32 @munmap(i8* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 1000000;
  int max = 0;
  while (a > 0) {
    max = a;
    a++;
  }
  a = -1000000;
  int min = 0;
  while (a < 0) {
    min = a;
    a--;
  }
  printf("max: %d\n", max);
  printf("min: %d\n", min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xf4240,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114b <main+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
movl   $0xfff0bdc0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1177 <main+0x67>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1159 <main+0x49>
mov    -0xc(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [9 x i8] c"max: %d\0A\00"
@.str.1 = [9 x i8] c"min: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1000000, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %5
12: ; preds = %5
store i32 -1000000, i32* %2
store i32 0, i32* %4
br label %13
13: ; preds = %16, %12
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32, i32* %2
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = add nsw i32 %18, -1
store i32 %19, i32* %2
br label %13
20: ; preds = %13
%21 = load i32, i32* %3
%22 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %4
%24 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
scalar_t__ malloc(int);
char *CuStrAlloc(int size) {
  char *newStr = (char *)malloc(sizeof(char) * ((unsigned int)size));
  return newStr;
}


x86 assembly (clang, -O0):
<CuStrAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CuStrAlloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @CuStrAlloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = mul i64 1, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define i8* @CuStrAlloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ print_message(char *);
void singleton_setup_fixture() {
  print_message("Singleton pqueue\n");
  print_message("----------------\n");
}


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

x86 assembly (clang, -O2):
<singleton_setup_fixture>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_message@plt>
lea    0xeee(%rip),%rdi
pop    %rax
jmp    1030 <print_message@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Singleton pqueue\0A\00"
@.str.1 = [18 x i8] c"----------------\0A\00"
define void @singleton_setup_fixture() {
%1 = call i32 @print_message(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_message(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Singleton pqueue\0A\00"
@.str.1 = [18 x i8] c"----------------\0A\00"
define void @singleton_setup_fixture() {
%1 = tail call i32 @print_message(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_message(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct fsm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fsm_compose(int /*<<< orphan*/, struct fsm *);
int /*<<< orphan*/ fsm_copy(struct fsm *);
int /*<<< orphan*/ fsm_destroy(struct fsm *);
struct fsm *fsm_priority_union_upper(int /*<<< orphan*/, int /*<<< orphan*/);
struct fsm *fsm_lenient_compose(struct fsm *net1, struct fsm *net2) {
  struct fsm *ret;
  ret = fsm_priority_union_upper(fsm_compose(fsm_copy(net1), net2),
                                 fsm_copy(net1));
  fsm_destroy(net1);
  return (ret);
}


x86 assembly (clang, -O0):
<fsm_lenient_compose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fsm_copy@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1060 <fsm_compose@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fsm_copy@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1030 <fsm_priority_union_upper@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <fsm_destroy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsm_lenient_compose>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <fsm_copy@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1060 <fsm_compose@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <fsm_copy@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <fsm_priority_union_upper@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1050 <fsm_destroy@plt>
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_lenient_compose(%struct.fsm* %0, %struct.fsm* %1) {
%3 = alloca %struct.fsm*
%4 = alloca %struct.fsm*
%5 = alloca %struct.fsm*
store %struct.fsm* %0, %struct.fsm** %3
store %struct.fsm* %1, %struct.fsm** %4
%6 = load %struct.fsm*, %struct.fsm** %3
%7 = call i32 @fsm_copy(%struct.fsm* %6)
%8 = load %struct.fsm*, %struct.fsm** %4
%9 = call i32 @fsm_compose(i32 %7, %struct.fsm* %8)
%10 = load %struct.fsm*, %struct.fsm** %3
%11 = call i32 @fsm_copy(%struct.fsm* %10)
%12 = call %struct.fsm* @fsm_priority_union_upper(i32 %9, i32 %11)
store %struct.fsm* %12, %struct.fsm** %5
%13 = load %struct.fsm*, %struct.fsm** %3
%14 = call i32 @fsm_destroy(%struct.fsm* %13)
%15 = load %struct.fsm*, %struct.fsm** %5
ret %struct.fsm* %15
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_lenient_compose(%struct.fsm* %0, %struct.fsm* %1) {
%3 = tail call i32 @fsm_copy(%struct.fsm* %0)
%4 = tail call i32 @fsm_compose(i32 %3, %struct.fsm* %1)
%5 = tail call i32 @fsm_copy(%struct.fsm* %0)
%6 = tail call %struct.fsm* @fsm_priority_union_upper(i32 %4, i32 %5)
%7 = tail call i32 @fsm_destroy(%struct.fsm* %0)
ret %struct.fsm* %6
}
/* Variables and functions */
int check_cursor_pos(char const *, int const *);
int main(int argc, char **argv) {
  const char *str2 = "greetings  ";
  const int expected_pos2[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 8};
  return check_cursor_pos(str2, expected_pos2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec4(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <check_cursor_pos@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movups 0xf11(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xec2(%rip),%rdi
mov    %rsp,%rsi
call   1030 <check_cursor_pos@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"greetings \00"
@__const.main.expected_pos2 = [11 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 7, i32 8]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [11 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %6
%8 = bitcast [11 x i32]* %7 to i8*
%9 = load i8*, i8** %6
%10 = getelementptr inbounds [11 x i32], [11 x i32]* %7, i64 0, i64 0
%11 = call i32 @check_cursor_pos(i8* %9, i32* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [12 x i8] c"greetings \00"
@__const.main.expected_pos2 = [11 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 7, i32 8]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [11 x i32]
%4 = bitcast [11 x i32]* %3 to i8*
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %3, i64 0, i64 0
%6 = call i32 @check_cursor_pos(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Fatal_Error(char *);
char *malloc(unsigned int);
char *Malloc(unsigned size) {
  char *data;
  if (!(data = malloc(size)))
    Fatal_Error("Out of memory!");
  return (data);
}


x86 assembly (clang, -O0):
<Malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114d <Malloc+0x2d>
lea    0xeb8(%rip),%rdi
call   1030 <Fatal_Error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <Malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <Fatal_Error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory!\00"
define i8* @Malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @Fatal_Error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory!\00"
define noalias i8* @Malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Fatal_Error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int test_imm_7Fint8_mem(signed char *val) {
  return ((*val) & (0x7F << 0)) ? -20 : -40;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *strstr(char const *, char *);
int32_t ion_readname_legacy(const char *readname) {
  return ((NULL != strstr(readname, "IONPGM_")) ? 1 : 0);
}


x86 assembly (clang, -O0):
<ion_readname_legacy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rsi
xor    %eax,%eax
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ion_readname_legacy>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"IONPGM_\00"
define i32 @ion_readname_legacy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @strstr(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32* null, %4
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"IONPGM_\00"
define i32 @ion_readname_legacy(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ callrts(char *);
uge() { callrts("ccuge"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"ccuge\00"
define i32 @uge() {
%1 = alloca i32
%2 = call i32 @callrts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"ccuge\00"
define i32 @uge() {
%1 = tail call i32 @callrts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ err;

/* Variables and functions */
int /*<<< orphan*/ __write(int, char const *, int);
int /*<<< orphan*/ abort();
void __check_for_sync8_kernelhelper(void) {
  if ((*(unsigned int *)0xffff0ffc) < 5) {
    const char err[] = "A newer kernel is required to run this binary. "
                       "(__kernel_cmpxchg64 helper)\n";
    __write(2, err, sizeof(err));
    abort();
  }
}


x86 assembly (clang, -O0):
<__check_for_sync8_kernelhelper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    $0xffff0ffc,%eax
cmpl   $0x5,(%rax)
jae    1175 <__check_for_sync8_kernelhelper+0x45>
lea    -0x50(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x4c,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rsi
mov    $0x2,%edi
mov    $0x4c,%edx
call   1040 <__write@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__check_for_sync8_kernelhelper>:
sub    $0x58,%rsp
mov    $0xffff0ffc,%eax
cmpl   $0x4,(%rax)
jbe    1133 <__check_for_sync8_kernelhelper+0x13>
add    $0x58,%rsp
ret
movups 0xf02(%rip),%xmm0
movups %xmm0,0x3c(%rsp)
movaps 0xeea(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe96(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x2,%edi
mov    $0x4c,%edx
call   1040 <__write@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.__check_for_sync8_kernelhelper.err = [76 x i8] c"A newer kernel is required to run this binary. (__kernel_cmpxchg64 helper)\0A\00"
define void @__check_for_sync8_kernelhelper() {
%1 = alloca [76 x i8]
%2 = load i32, i32* inttoptr (i64 4294905852 to i32*)
%3 = icmp ult i32 %2, 5
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = bitcast [76 x i8]* %1 to i8*
%6 = getelementptr inbounds [76 x i8], [76 x i8]* %1, i64 0, i64 0
%7 = call i32 @__write(i32 2, i8* %6, i32 76)
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@__const.__check_for_sync8_kernelhelper.err = [76 x i8] c"A newer kernel is required to run this binary. (__kernel_cmpxchg64 helper)\0A\00"
define void @__check_for_sync8_kernelhelper() {
%1 = alloca [76 x i8]
%2 = load i32, i32* inttoptr (i64 4294905852 to i32*)
%3 = icmp ult i32 %2, 5
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = getelementptr inbounds [76 x i8], [76 x i8]* %1, i64 0, i64 0
%6 = call i32 @__write(i32 2, i8* %5, i32 76)
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret void
}
/* Type definitions */
struct jx_database {
  int dummy;
};
struct jx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *jx_print_string(struct jx *);
int /*<<< orphan*/ log_message(struct jx_database *, char *, char const *,
                               char *);
void log_create(struct jx_database *db, const char *key, struct jx *j) {
  char *str = jx_print_string(j);
  log_message(db, "C %s %s\n", key, str);
  free(str);
}


x86 assembly (clang, -O0):
<log_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <jx_print_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe9c(%rip),%rsi
call   1050 <log_message@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_create>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <jx_print_string@plt>
mov    %rax,%rbx
lea    0xeb3(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
mov    %rax,%rcx
call   1050 <log_message@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.jx_database = type { i32 }
%struct.jx = type { i32 }
@.str = [9 x i8] c"C %s %s\0A\00"
define void @log_create(%struct.jx_database* %0, i8* %1, %struct.jx* %2) {
%4 = alloca %struct.jx_database*
%5 = alloca i8*
%6 = alloca %struct.jx*
%7 = alloca i8*
store %struct.jx_database* %0, %struct.jx_database** %4
store i8* %1, i8** %5
store %struct.jx* %2, %struct.jx** %6
%8 = load %struct.jx*, %struct.jx** %6
%9 = call i8* @jx_print_string(%struct.jx* %8)
store i8* %9, i8** %7
%10 = load %struct.jx_database*, %struct.jx_database** %4
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = call i32 @log_message(%struct.jx_database* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = load i8*, i8** %7
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
%struct.jx_database = type { i32 }
%struct.jx = type { i32 }
@.str = [9 x i8] c"C %s %s\0A\00"
define void @log_create(%struct.jx_database* %0, i8* %1, %struct.jx* %2) {
%4 = tail call i8* @jx_print_string(%struct.jx* %2)
%5 = tail call i32 @log_message(%struct.jx_database* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %4)
%6 = tail call i32 @free(i8* %4)
ret void
}
int foo(int i, int j) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
ret i32 0
}
void emit_item_from_context(struct processor_explicatory_state *process_state,
                            struct modern_stream *stream, void *stream_state,
                            struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_item_from_context>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_item_from_context(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_item_from_context(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
char littleEndian() {
  int a = 1;
  return *(char *)&a;
}


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

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

LLVM IR (-O0):
define signext i8 @littleEndian() {
%1 = alloca i32
store i32 1, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @littleEndian() {
ret i8 1
}
char *strcpy(char *s, char *t) {
  char *os;
  os = s;
  while ((*s++ = *t++) != 0)
    ;
  return os;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
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/toc.c",
                        284));
  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    $0x11c,%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    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [144 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/toc.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 ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [144 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/toc.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 ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}