xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("%s", "Dividing by zero test\n");
  int a = 42, b;
  b = a / 22 - 1;
  printf("a / b = %d", a / b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2a,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x16,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [23 x i8] c"Dividing by zero test\0A\00"
@.str.2 = [11 x i8] c"a / b = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
store i32 42, i32* %2
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 22
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = sdiv i32 %8, %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [11 x i8] c"a / b = %d\00"
@str = [22 x i8] c"Dividing by zero test\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 poison)
ret i32 0
}
unsigned xfs_sb_version_tonew(unsigned v) {
  return ((((v) == 1) ? 0 : (((v) == 2) ? 0x0010 : (0x0010 | 0x0020))) | 4);
}


x86 assembly (clang, -O0):
<xfs_sb_version_tonew>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111b <xfs_sb_version_tonew+0x1b>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <xfs_sb_version_tonew+0x31>
mov    -0x4(%rbp),%edx
mov    $0x30,%eax
mov    $0x10,%ecx
cmp    $0x2,%edx
cmove  %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfs_sb_version_tonew>:
xor    %ecx,%ecx
cmp    $0x2,%edi
setne  %cl
shl    $0x5,%ecx
or     $0x14,%ecx
cmp    $0x1,%edi
mov    $0x4,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xfs_sb_version_tonew(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 2
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 16, i32 48
br label %11
11: ; preds = %6, %5
%12 = phi i32 [ 0, %5 ], [ %10, %6 ]
%13 = or i32 %12, 4
ret i32 %13
}

LLVM IR (-O2):
define i32 @xfs_sb_version_tonew(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = icmp eq i32 %0, 2
%4 = select i1 %3, i32 20, i32 52
%5 = select i1 %2, i32 4, i32 %4
ret i32 %5
}
int fun_stub_in_so(int x, int y) { return x + y; }


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

x86 assembly (clang, -O2):
<fun_stub_in_so>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @fun_stub_in_so(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int fun1181() { return 1181; }


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

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

LLVM IR (-O0):
define i32 @fun1181() {
ret i32 1181
}

LLVM IR (-O2):
define i32 @fun1181() {
ret i32 1181
}
void InitDevice() {}


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

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

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

LLVM IR (-O2):
define void @InitDevice() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_isneg(int);
int main() {
  my_isneg(0);
  my_isneg(21);
  my_isneg(-21);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <my_isneg@plt>
mov    $0x15,%edi
call   1030 <my_isneg@plt>
mov    $0xffffffeb,%edi
call   1030 <my_isneg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <my_isneg@plt>
mov    $0x15,%edi
call   1030 <my_isneg@plt>
mov    $0xffffffeb,%edi
call   1030 <my_isneg@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @my_isneg(i32 0)
%2 = tail call i32 @my_isneg(i32 21)
%3 = tail call i32 @my_isneg(i32 -21)
ret i32 0
}
/* Variables and functions */
void *Util_allocOrDie(size_t, char const *);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *Util_cloneOrDie(const void *pRhs, size_t size, const char *message) {
  void *pLhs = Util_allocOrDie(size, message);
  if (pLhs == NULL) {
    abort();
    return NULL;
  }
  memcpy(pLhs, pRhs, size);
  return pLhs;
}


x86 assembly (clang, -O0):
<Util_cloneOrDie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <Util_allocOrDie@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1167 <Util_cloneOrDie+0x37>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Util_cloneOrDie>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <Util_allocOrDie@plt>
test   %rax,%rax
je     1165 <Util_cloneOrDie+0x35>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i8* @Util_cloneOrDie(i8* %0, i64 %1, i8* %2) {
%4 = tail call i8* @Util_allocOrDie(i64 %1, i8* %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
%9 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
ret i8* %4
}
void gluPerspective(int a, float b, int c, int d) {}


x86 assembly (clang, -O0):
<gluPerspective>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gluPerspective(i32 %0, float %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store float %1, float* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @gluPerspective(i32 %0, float %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int embed_dobldobl_system(int d) {
  int fail;
  int *b;
  double *c;
  fail = _ada_use_c2phc(129, &d, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<embed_dobldobl_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x81,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<embed_dobldobl_system>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x81,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @embed_dobldobl_system(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 129, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @embed_dobldobl_system(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 129, i32* %2, i32* undef, double* undef)
ret i32 %3
}
int init_module(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init_module() {
ret i32 0
}
/* Type definitions */
typedef unsigned char uint32_t;

/* Variables and functions */
uint32_t get_uint32be(unsigned char *p) {
  return ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
}


x86 assembly (clang, -O0):
<get_uint32be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint32be>:
mov    0x3(%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @get_uint32be(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = or i32 %19, %23
%25 = trunc i32 %24 to i8
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @get_uint32be(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
ret i8 %3
}
/* Variables and functions */
int M_PI;
double fmod(double, int);
double amod(double angle) {
  double ret = fmod(angle, 2 * M_PI);
  return (ret < 0 ? ret + 2 * M_PI : ret);
}


x86 assembly (clang, -O0):
<amod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
shl    $0x1,%edi
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1169 <amod+0x59>
movsd  -0x10(%rbp),%xmm0
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1173 <amod+0x63>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<amod>:
push   %rbx
mov    0x2ed0(%rip),%rbx
mov    (%rbx),%edi
add    %edi,%edi
call   1030 <fmod@plt>
mov    (%rbx),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
movsd  0xec2(%rip),%xmm2
movapd %xmm3,%xmm4
andnpd %xmm2,%xmm4
andpd  %xmm1,%xmm3
orpd   %xmm4,%xmm3
addsd  %xmm3,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @amod(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load i32, i32* @M_PI
%6 = mul nsw i32 2, %5
%7 = call double @fmod(double %4, i32 %6)
store double %7, double* %3
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load double, double* %3
%12 = load i32, i32* @M_PI
%13 = mul nsw i32 2, %12
%14 = sitofp i32 %13 to double
%15 = fadd double %11, %14
br label %18
16: ; preds = %1
%17 = load double, double* %3
br label %18
18: ; preds = %16, %10
%19 = phi double [ %15, %10 ], [ %17, %16 ]
ret double %19
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @amod(double %0) {
%2 = load i32, i32* @M_PI
%3 = shl nsw i32 %2, 1
%4 = tail call double @fmod(double %0, i32 %3)
%5 = fcmp olt double %4, 0.000000e+00
%6 = load i32, i32* @M_PI
%7 = shl nsw i32 %6, 1
%8 = sitofp i32 %7 to double
%9 = select i1 %5, double %8, double -0.000000e+00
%10 = fadd double %4, %9
ret double %10
}
void gtk_label_set_pattern() {}


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

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

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

LLVM IR (-O2):
define void @gtk_label_set_pattern() {
ret void
}
int oddeven(int n) {
  if (n % 2 == 0) {
    return 0;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<oddeven>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <oddeven+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <oddeven+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @oddeven(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
void gtk_label_get_max_width_chars() {}


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

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

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

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

/* Variables and functions */
void USB_EndPoint15(uint32_t event) {}


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

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

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

LLVM IR (-O2):
define void @USB_EndPoint15(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn2();
int fn1() {
  fn2();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @fn1() {
%1 = call i32 (...) @fn2()
ret i32 0
}

LLVM IR (-O2):
define i32 @fn1() {
%1 = tail call i32 (...) @fn2()
ret i32 0
}
int test_imm_35uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x35 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_35uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 3473408
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
short is_box(char b) {
  if (b == 'b' || b == 'r' || b == 'c' || b == 'm' || b == 'g' || b == 'y' ||
      b == 'l') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_box>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x62,%eax
je     1165 <is_box+0x65>
movsbl -0x3(%rbp),%eax
cmp    $0x72,%eax
je     1165 <is_box+0x65>
movsbl -0x3(%rbp),%eax
cmp    $0x63,%eax
je     1165 <is_box+0x65>
movsbl -0x3(%rbp),%eax
cmp    $0x6d,%eax
je     1165 <is_box+0x65>
movsbl -0x3(%rbp),%eax
cmp    $0x67,%eax
je     1165 <is_box+0x65>
movsbl -0x3(%rbp),%eax
cmp    $0x79,%eax
je     1165 <is_box+0x65>
movsbl -0x3(%rbp),%eax
cmp    $0x6c,%eax
jne    1170 <is_box+0x70>
movw   $0x1,-0x2(%rbp)
jmp    1176 <is_box+0x76>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_box>:
add    $0x9e,%dil
cmp    $0x17,%dil
ja     111e <is_box+0x1e>
mov    $0x1,%ax
movzbl %dil,%ecx
mov    $0x810c23,%edx
bt     %rcx,%rdx
jae    111e <is_box+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i16 @is_box(i8 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 98
br i1 %6, label %31, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 114
br i1 %10, label %31, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 99
br i1 %14, label %31, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 109
br i1 %18, label %31, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 103
br i1 %22, label %31, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 121
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 108
br i1 %30, label %31, label %32
31: ; preds = %27, %23, %19, %15, %11, %7, %1
store i16 1, i16* %2
br label %33
32: ; preds = %27
store i16 0, i16* %2
br label %33
33: ; preds = %32, %31
%34 = load i16, i16* %2
ret i16 %34
}

LLVM IR (-O2):
define signext i16 @is_box(i8 signext %0) {
switch i8 %0, label %2 [
i8 121, label %3
i8 114, label %3
i8 109, label %3
i8 108, label %3
i8 103, label %3
i8 99, label %3
i8 98, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i16 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i16 %4
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
struct __uportsys_sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int __uportsys_getpeername(int, struct __uportsys_sockaddr *,
                           int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
int getpeername(int sd, struct sockaddr *addr, socklen_t *addr_len) {
  return __uportsys_getpeername(sd, (struct __uportsys_sockaddr *)addr,
                                addr_len, &errno);
}


x86 assembly (clang, -O0):
<getpeername>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2eab(%rip),%rcx
call   1030 <__uportsys_getpeername@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpeername>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <__uportsys_getpeername@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.__uportsys_sockaddr = type { i32 }
@errno = global i32 0
define i32 @getpeername(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = bitcast %struct.sockaddr* %8 to %struct.__uportsys_sockaddr*
%10 = load i32*, i32** %6
%11 = call i32 @__uportsys_getpeername(i32 %7, %struct.__uportsys_sockaddr* %9, i32* %10, i32* @errno)
ret i32 %11
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
%struct.__uportsys_sockaddr = type { i32 }
@errno = global i32 0
define i32 @getpeername(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = bitcast %struct.sockaddr* %1 to %struct.__uportsys_sockaddr*
%5 = tail call i32 @__uportsys_getpeername(i32 %0, %struct.__uportsys_sockaddr* %4, i32* %2, i32* @errno)
ret i32 %5
}
int dfaerror_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dfaerror_shutdown() {
ret i32 0
}
int do_852() { return 852; }


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

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

LLVM IR (-O0):
define i32 @do_852() {
ret i32 852
}

LLVM IR (-O2):
define i32 @do_852() {
ret i32 852
}
__attribute__((weak)) void handler_Default() {}


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

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

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

LLVM IR (-O2):
define weak void @handler_Default() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ barrier();
void flush(void) {
  while ((*(volatile unsigned char *)0x16000018) & (1 << 3))
    barrier();
}


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <flush+0x9>
mov    $0x16000018,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     113b <flush+0x2b>
mov    $0x0,%al
call   1030 <barrier@plt>
jmp    1119 <flush+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
push   %rax
testb  $0x8,0x16000018
08
je     1131 <flush+0x21>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <barrier@plt>
testb  $0x8,0x16000018
08
jne    1120 <flush+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @flush() {
br label %1
1: ; preds = %6, %0
%2 = load volatile i8, i8* inttoptr (i64 369098776 to i8*)
%3 = zext i8 %2 to i32
%4 = and i32 %3, 8
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @barrier()
br label %1
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @flush() {
%1 = load volatile i8, i8* inttoptr (i64 369098776 to i8*)
%2 = and i8 %1, 8
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 (...) @barrier()
%6 = load volatile i8, i8* inttoptr (i64 369098776 to i8*)
%7 = and i8 %6, 8
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %0
ret void
}
void uv_register_nmi_notifier(void) {}


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

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

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

LLVM IR (-O2):
define void @uv_register_nmi_notifier() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x1e() {
  Assert_real((isalpha(30) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              155, ("isalpha should be 0 for 0x1e"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x1e\00"
define void @t_isalpha_0x1e() {
%1 = tail call i64 @isalpha(i32 30)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 155, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x1a() {
  Assert_real((isascii(26)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              135, ("isascii should be 1 for 0x1a"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x1a\00"
define void @t_isascii_0x1a() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char map2check_non_det_char() { return 0; }


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

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

LLVM IR (-O0):
define signext i8 @map2check_non_det_char() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @map2check_non_det_char() {
ret i8 0
}
/* Variables and functions */
int add_numbers(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int result;
  result = add_numbers(4, 3);
  printf("The result is %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <add_numbers@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <add_numbers@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The result is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @add_numbers(i32 4, i32 3)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The result is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @add_numbers(i32 4, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *argv0) {
  fprintf(stderr, "Usage: %s\n", argv0);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, char *);
char *pktconfig(char *buf, char *parameter, int n) {
  sprintf(buf, "P%i.%s", n, parameter);
  return buf;
}


x86 assembly (clang, -O0):
<pktconfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xecb(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pktconfig>:
push   %rbx
mov    %rsi,%rcx
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"P%i.%s\00"
define i8* @pktconfig(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = load i8*, i8** %5
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"P%i.%s\00"
define i8* @pktconfig(i8* returned writeonly %0, i8* %1, i32 %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %1)
ret i8* %0
}
/* Variables and functions */
int is_story(char *);
bool is_mad_bomber(void) { return is_story("3-971123-caad"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"3-971123-caad\00"
define i32 @is_mad_bomber() {
%1 = call i32 @is_story(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [14 x i8] c"3-971123-caad\00"
define i32 @is_mad_bomber() {
%1 = tail call i32 @is_story(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
double f4_cb_send_pre_double_double_double_double_float(
    double (*cb)(double, double, double, double, float)) {
  float r = 55.0;
  return cb(8.25, 9.25, 10.25, 11.25, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_double_double_double_double_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  0xf14(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  -0xc(%rbp),%xmm4
movsd  0xede(%rip),%xmm0
movsd  0xede(%rip),%xmm1
movsd  0xede(%rip),%xmm2
movsd  0xede(%rip),%xmm3
call   *%rax
movsd  0xeb4(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_double_double_double_double_float>:
push   %rax
movsd  0xef7(%rip),%xmm0
movsd  0xef7(%rip),%xmm1
movsd  0xef7(%rip),%xmm2
movsd  0xef7(%rip),%xmm3
movss  0xeff(%rip),%xmm4
call   *%rdi
addsd  0xeed(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_double_double_double_double_float(double (double, double, double, double, float)* %0) {
%2 = alloca double (double, double, double, double, float)*
%3 = alloca float
store double (double, double, double, double, float)* %0, double (double, double, double, double, float)** %2
store float 5.500000e+01, float* %3
%4 = load double (double, double, double, double, float)*, double (double, double, double, double, float)** %2
%5 = load float, float* %3
%6 = call double %4(double 8.250000e+00, double 9.250000e+00, double 1.025000e+01, double 1.125000e+01, float %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_double_double_double_double_float(double (double, double, double, double, float)* nocapture %0) {
%2 = tail call double %0(double 8.250000e+00, double 9.250000e+00, double 1.025000e+01, double 1.125000e+01, float 5.500000e+01)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
/* Variables and functions */
scalar_t__ isdigit(char);
scalar_t__ islower(char);
unsigned HexValue(char C) {
  if (isdigit(C)) {
    return C - '0';
  } else if (islower(C)) {
    return C - 'a' + 10;
  } else {
    return C - 'A' + 10;
  }
}


x86 assembly (clang, -O0):
<HexValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1150 <HexValue+0x30>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1182 <HexValue+0x62>
movsbl -0x5(%rbp),%edi
call   1040 <islower@plt>
cmp    $0x0,%rax
je     1175 <HexValue+0x55>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1182 <HexValue+0x62>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HexValue>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
movsbl %bl,%ebx
test   %rax,%rax
je     1135 <HexValue+0x15>
add    $0xffffffd0,%ebx
jmp    1149 <HexValue+0x29>
mov    %ebx,%edi
call   1040 <islower@plt>
test   %rax,%rax
je     1146 <HexValue+0x26>
add    $0xffffffa9,%ebx
jmp    1149 <HexValue+0x29>
add    $0xffffffc9,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @HexValue(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = sext i8 %0 to i32
%6 = add nsw i32 %5, -48
br label %15
7: ; preds = %1
%8 = tail call i64 @islower(i8 signext %0)
%9 = icmp eq i64 %8, 0
%10 = sext i8 %0 to i32
br i1 %9, label %13, label %11
11: ; preds = %7
%12 = add nsw i32 %10, -87
br label %15
13: ; preds = %7
%14 = add nsw i32 %10, -55
br label %15
15: ; preds = %13, %11, %4
%16 = phi i32 [ %6, %4 ], [ %12, %11 ], [ %14, %13 ]
ret i32 %16
}
/* Variables and functions */
char __bsign(char, char);
signed char intr_wrap_466(signed char p1, signed char p2) {
  return __bsign(p1, p2);
}


x86 assembly (clang, -O0):
<intr_wrap_466>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
movsbl %al,%edi
movsbl -0x2(%rbp),%esi
call   1030 <__bsign@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_466>:
jmp    1030 <__bsign@plt>

LLVM IR (-O0):
define signext i8 @intr_wrap_466(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = load i8, i8* %4
%7 = call signext i8 @__bsign(i8 signext %5, i8 signext %6)
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @intr_wrap_466(i8 signext %0, i8 signext %1) {
%3 = tail call signext i8 @__bsign(i8 signext %0, i8 signext %1)
ret i8 %3
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *kzalloc(size_t size, int flags) {
  (void)flags;
  void *p = malloc(size);
  if (p)
    memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<kzalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1156 <kzalloc+0x36>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kzalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <kzalloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @kzalloc(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i8*
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i64, i64* %3
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = load i64, i64* %3
%14 = call i32 @memset(i8* %12, i32 0, i64 %13)
br label %15
15: ; preds = %11, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @kzalloc(i64 %0, i32 %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memset(i8* %3, i32 0, i64 %0)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void cprop_test5(int *data) {
  int j = 5;
  if (data[0])
    data[1] = 10;
  else
    data[2] = 15;
  data[3] = j + 21;
}


x86 assembly (clang, -O0):
<cprop_test5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     112c <cprop_test5+0x2c>
mov    -0x8(%rbp),%rax
movl   $0xa,0x4(%rax)
jmp    1137 <cprop_test5+0x37>
mov    -0x8(%rbp),%rax
movl   $0xf,0x8(%rax)
mov    -0xc(%rbp),%ecx
add    $0x15,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_test5>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
lea    (%rax,%rax,4),%ecx
add    $0xa,%ecx
mov    %ecx,0x4(%rdi,%rax,4)
movl   $0x1a,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @cprop_test5(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i64 2, i64 1
%5 = select i1 %3, i32 15, i32 10
%6 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 26, i32* %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *stderr;
FILE *get_file(int mode) { return stderr; }


x86 assembly (clang, -O0):
<get_file>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@stderr = global i32* null
define i32* @get_file(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32*, i32** @stderr
ret i32* %3
}

LLVM IR (-O2):
@stderr = global i32* null
define i32* @get_file(i32 %0) {
%2 = load i32*, i32** @stderr
ret i32* %2
}
void set_led_3(int mode) {
  if (mode == 1) {
    (*(volatile unsigned int *)(0x7F008824)) |= 4;
  } else if (mode == 0) {
    (*(volatile unsigned int *)(0x7F008824)) &= ~4;
  }
  return;
}


x86 assembly (clang, -O0):
<set_led_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1127 <set_led_3+0x27>
mov    $0x7f008824,%eax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    $0x7f008824,%eax
mov    %ecx,(%rax)
jmp    1147 <set_led_3+0x47>
cmpl   $0x0,-0x4(%rbp)
jne    1142 <set_led_3+0x42>
mov    $0x7f008824,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    $0x7f008824,%eax
mov    %ecx,(%rax)
jmp    1147 <set_led_3+0x47>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_led_3>:
test   %edi,%edi
je     1115 <set_led_3+0x15>
cmp    $0x1,%edi
jne    1126 <set_led_3+0x26>
mov    0x7f008824,%eax
or     $0x4,%eax
jmp    111f <set_led_3+0x1f>
mov    0x7f008824,%eax
and    $0xfffffffb,%eax
mov    %eax,0x7f008824
ret

LLVM IR (-O0):
define void @set_led_3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%7 = or i32 %6, 4
store volatile i32 %7, i32* inttoptr (i64 2130741284 to i32*)
br label %15
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%13 = and i32 %12, -5
store volatile i32 %13, i32* inttoptr (i64 2130741284 to i32*)
br label %14
14: ; preds = %11, %8
br label %15
15: ; preds = %14, %5
ret void
}

LLVM IR (-O2):
define void @set_led_3(i32 %0) {
switch i32 %0, label %10 [
i32 1, label %2
i32 0, label %5
]
2: ; preds = %1
%3 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%4 = or i32 %3, 4
br label %8
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%7 = and i32 %6, -5
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ %4, %2 ]
store volatile i32 %9, i32* inttoptr (i64 2130741284 to i32*)
br label %10
10: ; preds = %8, %1
ret void
}
int test_imm_94uint8_reg(unsigned char val) {
  return ((val) & (0x94 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_94uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x94,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_94uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -108
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct input {
  int dummy;
};

/* Variables and functions */
int input_text_size(struct input *);
int input_text_isfull(struct input *inp) {
  return (input_text_size(inp) == 410);
}


x86 assembly (clang, -O0):
<input_text_isfull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <input_text_size@plt>
cmp    $0x19a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_text_isfull>:
push   %rax
call   1030 <input_text_size@plt>
xor    %ecx,%ecx
cmp    $0x19a,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.input = type { i32 }
define i32 @input_text_isfull(%struct.input* %0) {
%2 = alloca %struct.input*
store %struct.input* %0, %struct.input** %2
%3 = load %struct.input*, %struct.input** %2
%4 = call i32 @input_text_size(%struct.input* %3)
%5 = icmp eq i32 %4, 410
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.input = type { i32 }
define i32 @input_text_isfull(%struct.input* %0) {
%2 = tail call i32 @input_text_size(%struct.input* %0)
%3 = icmp eq i32 %2, 410
%4 = zext i1 %3 to i32
ret i32 %4
}