xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
int cpuidCacheLineSize() {
  int a, b, c, d;
  cpuid(1, &a, &b, &c, &d);
  return ((b & 0x0000ff00) >> 8) << 3;
}


x86 assembly (clang, -O0):
<cpuidCacheLineSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
shl    $0x3,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuidCacheLineSize>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x1,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
shr    $0x5,%eax
and    $0x7f8,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuidCacheLineSize() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = ashr i32 %7, 8
%9 = shl i32 %8, 3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cpuidCacheLineSize() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %2
%11 = lshr i32 %10, 5
%12 = and i32 %11, 2040
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, int);
int /*<<< orphan*/ stderr;
int print_and_abort(const char *message, const char *file, int line) {
  (void)fprintf(stderr, "ASSERT: %s, file: %s @ line %d\n", message, file,
                line);
  abort();
  return (0);
}


x86 assembly (clang, -O0):
<print_and_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<print_and_abort>:
push   %rax
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"ASSERT: %s, file: %s @ line %d\0A\00"
define i32 @print_and_abort(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 i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
%12 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"ASSERT: %s, file: %s @ line %d\0A\00"
define i32 @print_and_abort(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ run_all_test();
int summary_test();
int main(void) {
  run_all_test();
  return (summary_test());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <run_all_test@plt>
mov    $0x0,%al
call   1040 <summary_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <run_all_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <summary_test@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run_all_test()
%2 = tail call i32 (...) @summary_test()
ret i32 %2
}
int test_imm_0Buint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x0B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Buint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 11
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=401 REPO_URL=heads/odroid-3.8.y "
         "REVISION=-v3.8.7-3469-g69ba4b3 CHANGED_REVISION=v3.8.7-3469-g69ba4b3 "
         "CHANGE_DATE=2014-03-04 06:26:03 -0300 BUILD_DATE=Ter Mar  4 06:27:43 "
         "BRT 2014 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y "
         "USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 "
         "USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [430 x i8] c"malidrv: API_VERSION=401 REPO_URL=heads/odroid-3.8.y REVISION=-v3.8.7-3469-g69ba4b3 CHANGED_REVISION=v3.8.7-3469-g69ba4b3 CHANGE_DATE=2014-03-04 06:26:03 -0300 BUILD_DATE=Ter Mar 4 06:27:43 BRT 2014 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [430 x i8] c"malidrv: API_VERSION=401 REPO_URL=heads/odroid-3.8.y REVISION=-v3.8.7-3469-g69ba4b3 CHANGED_REVISION=v3.8.7-3469-g69ba4b3 CHANGE_DATE=2014-03-04 06:26:03 -0300 BUILD_DATE=Ter Mar 4 06:27:43 BRT 2014 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0)
}
long long bit58() { return 0x0400000000000000LL; }


x86 assembly (clang, -O0):
<bit58>:
push   %rbp
mov    %rsp,%rbp
movabs $0x400000000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit58>:
movabs $0x400000000000000,%rax
ret

LLVM IR (-O0):
define i64 @bit58() {
ret i64 288230376151711744
}

LLVM IR (-O2):
define i64 @bit58() {
ret i64 288230376151711744
}
/* Variables and functions */
int /*<<< orphan*/ test_html_comment_entities();
void all_html_tests() { test_html_comment_entities(); }


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

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

LLVM IR (-O0):
define void @all_html_tests() {
%1 = call i32 (...) @test_html_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_html_tests() {
%1 = tail call i32 (...) @test_html_comment_entities()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Elf32_Addr;

/* Variables and functions */
int /*<<< orphan*/ *or1k_get_got();
Elf32_Addr elf_machine_dynamic(void) {
  Elf32_Addr *got = or1k_get_got();
  return *got;
}


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

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

LLVM IR (-O0):
define i32 @elf_machine_dynamic() {
%1 = alloca i32*
%2 = call i32* (...) @or1k_get_got()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @elf_machine_dynamic() {
%1 = tail call i32* (...) @or1k_get_got()
%2 = load i32, i32* %1
ret i32 %2
}
int test_imm_13int8_mem(signed char *val) {
  return ((*val) & (-0x13 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_13int8_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, -19
%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_13int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -19
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ do_compare(int, int);
int /*<<< orphan*/ expect(int, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  expect(0xff00000000000000LL,
         do_compare(0x0123456789abcdefLL, 0x0100000000000000LL));
  expect(0x00ffffffffffffff,
         do_compare(0x0123456789abcdefLL, 0x0023456789abcdefLL));
  expect(0x00000000000000ff,
         do_compare(0x00000000000000efLL, 0x0123456789abcdefLL));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x89abcdef,%edi
xor    %esi,%esi
call   1030 <do_compare@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1040 <expect@plt>
mov    $0x89abcdef,%esi
mov    %esi,%edi
call   1030 <do_compare@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1040 <expect@plt>
mov    $0xef,%edi
mov    $0x89abcdef,%esi
call   1030 <do_compare@plt>
mov    %eax,%esi
mov    $0xff,%edi
call   1040 <expect@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x89abcdef,%edi
xor    %esi,%esi
call   1030 <do_compare@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1040 <expect@plt>
mov    $0x89abcdef,%edi
mov    $0x89abcdef,%esi
call   1030 <do_compare@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1040 <expect@plt>
mov    $0xef,%edi
mov    $0x89abcdef,%esi
call   1030 <do_compare@plt>
mov    $0xff,%edi
mov    %eax,%esi
call   1040 <expect@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @do_compare(i32 -1985229329, i32 0)
%6 = call i32 @expect(i32 0, i32 %5)
%7 = call i32 @do_compare(i32 -1985229329, i32 -1985229329)
%8 = call i32 @expect(i32 -1, i32 %7)
%9 = call i32 @do_compare(i32 239, i32 -1985229329)
%10 = call i32 @expect(i32 255, i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @do_compare(i32 -1985229329, i32 0)
%4 = tail call i32 @expect(i32 0, i32 %3)
%5 = tail call i32 @do_compare(i32 -1985229329, i32 -1985229329)
%6 = tail call i32 @expect(i32 -1, i32 %5)
%7 = tail call i32 @do_compare(i32 239, i32 -1985229329)
%8 = tail call i32 @expect(i32 255, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int);
__attribute__((no, noclone)) void f3(int x) {
  if (x != 43 && x != 76 && x != 44 && x != 78 && x != 49 && x != 77 &&
      x != 46 && x != 75 && x != 45 && x != 82)
    bar(x, 3);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2b,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x4c,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x2c,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x4e,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x31,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x4d,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x2e,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x4b,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x2d,-0x4(%rbp)
je     118c <f3+0x7c>
cmpl   $0x52,-0x4(%rbp)
je     118c <f3+0x7c>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
lea    -0x2b(%rdi),%eax
cmp    $0x27,%eax
ja     1129 <f3+0x19>
movabs $0x8f0000004f,%rcx
bt     %rax,%rcx
jae    1129 <f3+0x19>
ret
mov    $0x3,%esi
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @f3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 43
br i1 %4, label %5, label %35
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 76
br i1 %7, label %8, label %35
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 44
br i1 %10, label %11, label %35
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp ne i32 %12, 78
br i1 %13, label %14, label %35
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp ne i32 %15, 49
br i1 %16, label %17, label %35
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp ne i32 %18, 77
br i1 %19, label %20, label %35
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp ne i32 %21, 46
br i1 %22, label %23, label %35
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp ne i32 %24, 75
br i1 %25, label %26, label %35
26: ; preds = %23
%27 = load i32, i32* %2
%28 = icmp ne i32 %27, 45
br i1 %28, label %29, label %35
29: ; preds = %26
%30 = load i32, i32* %2
%31 = icmp ne i32 %30, 82
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* %2
%34 = call i32 @bar(i32 %33, i32 3)
br label %35
35: ; preds = %32, %29, %26, %23, %20, %17, %14, %11, %8, %5, %1
ret void
}

LLVM IR (-O2):
define void @f3(i32 %0) {
switch i32 %0, label %2 [
i32 82, label %4
i32 78, label %4
i32 77, label %4
i32 76, label %4
i32 75, label %4
i32 49, label %4
i32 46, label %4
i32 45, label %4
i32 44, label %4
i32 43, label %4
]
2: ; preds = %1
%3 = tail call i32 @bar(i32 %0, i32 3)
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
ret void
}
/* Variables and functions */
void *Cyc_Absyn_compress(void *);
int Cyc_Tcutil_is_array_type(void *t) {
  int *_T0;
  int _T1;
  void *_T2 = Cyc_Absyn_compress(t);
  _T0 = (int *)_T2;
  _T1 = *_T0;
  if (_T1 != 5)
    goto _TL4;
  return 1;
_TL4:
  return 0;
  ;
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_is_array_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Cyc_Absyn_compress@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x5,-0x1c(%rbp)
je     1149 <Cyc_Tcutil_is_array_type+0x39>
jmp    1155 <Cyc_Tcutil_is_array_type+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <Cyc_Tcutil_is_array_type+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_is_array_type>:
push   %rax
call   1030 <Cyc_Absyn_compress@plt>
xor    %ecx,%ecx
cmpl   $0x5,(%rax)
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Cyc_Tcutil_is_array_type(i8* %0) {
%2 = tail call i8* @Cyc_Absyn_compress(i8* %0)
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 5
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ i();
int /*<<< orphan*/ proc1();
void h(int param1) {
  proc1();
  if (param1 > 0) {
    i();
  }
  return;
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <proc1@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1143 <h+0x23>
mov    $0x0,%al
call   1040 <i@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <proc1@plt>
test   %ebx,%ebx
jle    1136 <h+0x16>
xor    %eax,%eax
pop    %rbx
jmp    1040 <i@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @h(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @proc1()
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @i()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @h(i32 %0) {
%2 = tail call i32 (...) @proc1()
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @i()
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memreport_full(int, char const *, int, char const *, int,
                                  int /*<<< orphan*/);
void memreport(int kind, const char *s1, int n1, const char *s2, int n2) {
  memreport_full(kind, s1, n1, s2, n2, 0);
}


x86 assembly (clang, -O0):
<memreport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
xor    %r9d,%r9d
call   1030 <memreport_full@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memreport>:
xor    %r9d,%r9d
jmp    1030 <memreport_full@plt>

LLVM IR (-O0):
define void @memreport(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @memreport_full(i32 %11, i8* %12, i32 %13, i8* %14, i32 %15, i32 0)
ret void
}

LLVM IR (-O2):
define void @memreport(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @memreport_full(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4, i32 0)
ret void
}
/* Variables and functions */
char *jsonCmd(char *, int);
char *jsonCmdGetPermitJoin(void) { return (jsonCmd("getpermit", 1)); }


x86 assembly (clang, -O0):
<jsonCmdGetPermitJoin>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <jsonCmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonCmdGetPermitJoin>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <jsonCmd@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"getpermit\00"
define i8* @jsonCmdGetPermitJoin() {
%1 = tail call i8* @jsonCmd(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
ret i8* %1
}
int f2(unsigned long long a) { return __builtin_parityll(a); }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %rdi,%rax
shr    $0x20,%rax
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x10,%ecx
xor    %eax,%ecx
xor    %eax,%eax
xor    %ch,%cl
setnp  %al
ret

LLVM IR (-O0):
define i32 @f2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctpop.i64(i64 %3)
%5 = and i64 %4, 1
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f2(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ foobar(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("Usage: vulnerable <str>\n");
    return 1;
  }
  foobar(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <foobar@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1139 <main+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
call   1040 <foobar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [24 x i8] c"Usage: vulnerable <str>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @foobar(i8* %8)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %11
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_write_quaddobl_random_coefficient_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(472, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<celcon_write_quaddobl_random_coefficient_system>:
mov    $0x1d8,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @celcon_write_quaddobl_random_coefficient_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 472, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int Scl_ConHasInLoads_(int /*<<< orphan*/);
int /*<<< orphan*/ Scl_ConReadMan();
int Scl_ConHasInLoads() { return Scl_ConHasInLoads_(Scl_ConReadMan()); }


x86 assembly (clang, -O0):
<Scl_ConHasInLoads>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Scl_ConReadMan@plt>
mov    %eax,%edi
call   1030 <Scl_ConHasInLoads_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Scl_ConHasInLoads>:
push   %rax
xor    %eax,%eax
call   1040 <Scl_ConReadMan@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <Scl_ConHasInLoads_@plt>

LLVM IR (-O0):
define i32 @Scl_ConHasInLoads() {
%1 = call i32 (...) @Scl_ConReadMan()
%2 = call i32 @Scl_ConHasInLoads_(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @Scl_ConHasInLoads() {
%1 = tail call i32 (...) @Scl_ConReadMan()
%2 = tail call i32 @Scl_ConHasInLoads_(i32 %1)
ret i32 %2
}
_Bool is_plist_event(const int event) {
  _Bool result = 0;
  switch (event) {
  case 0x50:
  case 0x51:
  case 0x52:
  case 0x53:
    result = 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<is_plist_event>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffb0,%eax
sub    $0x3,%eax
ja     1123 <is_plist_event+0x23>
jmp    111f <is_plist_event+0x1f>
movb   $0x1,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_plist_event>:
and    $0xfffffffc,%edi
cmp    $0x50,%edi
sete   %al
ret

LLVM IR (-O0):
define zeroext i1 @is_plist_event(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
store i8 0, i8* %3
%4 = load i32, i32* %2
switch i32 %4, label %6 [
i32 80, label %5
i32 81, label %5
i32 82, label %5
i32 83, label %5
]
5: ; preds = %1, %1, %1, %1
store i8 1, i8* %3
br label %6
6: ; preds = %5, %1
%7 = load i8, i8* %3
%8 = trunc i8 %7 to i1
ret i1 %8
}

LLVM IR (-O2):
define zeroext i1 @is_plist_event(i32 %0) {
%2 = and i32 %0, -4
%3 = icmp eq i32 %2, 80
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xed() {
  Assert_real((isodigit(237) == 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_isodigit.c",
              1190, ("isodigit should be 0 for 0xed"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xed\00"
define void @t_isodigit_0xed() {
%1 = tail call i64 @isodigit(i32 237)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1190, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: shell [-hvp]\n");
  printf("   -h   print this message\n");
  printf("   -v   print additional diagnostic information\n");
  printf("   -p   do not emit a command prompt\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: shell [-hvp]\0A\00"
@.str.1 = [28 x i8] c" -h print this message\0A\00"
@.str.2 = [49 x i8] c" -v print additional diagnostic information\0A\00"
@.str.3 = [38 x i8] c" -p do not emit a command prompt\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [20 x i8] c"Usage: shell [-hvp]\00"
@str.4 = [27 x i8] c" -h print this message\00"
@str.5 = [48 x i8] c" -v print additional diagnostic information\00"
@str.6 = [37 x i8] c" -p do not emit a command prompt\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("%d\n", argc - 1);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ArdBir1(int, int /*<<< orphan*/);
int /*<<< orphan*/ Presentazione(int /*<<< orphan*/, int /*<<< orphan*/);
void ArdBir() {
  Presentazione(0, 0);
  ArdBir1(4, 0);
}


x86 assembly (clang, -O0):
<ArdBir>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1040 <Presentazione@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <ArdBir1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArdBir>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <Presentazione@plt>
mov    $0x4,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <ArdBir1@plt>

LLVM IR (-O0):
define void @ArdBir() {
%1 = call i32 @Presentazione(i32 0, i32 0)
%2 = call i32 @ArdBir1(i32 4, i32 0)
ret void
}

LLVM IR (-O2):
define void @ArdBir() {
%1 = tail call i32 @Presentazione(i32 0, i32 0)
%2 = tail call i32 @ArdBir1(i32 4, i32 0)
ret void
}
void call_back_1(void *target, void *routine_ptr) {
  ((void (*)(void *))routine_ptr)(target);
}


x86 assembly (clang, -O0):
<call_back_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_back_1>:
jmp    *%rsi

LLVM IR (-O0):
define void @call_back_1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to void (i8*)*
%7 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @call_back_1(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to void (i8*)*
tail call void %3(i8* %0)
ret void
}
int test_imm_39int32_reg(int val) { return ((val) & (0x39 << 0)) ? -20 : -40; }


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

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

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

LLVM IR (-O2):
define i32 @test_imm_39int32_reg(i32 %0) {
%2 = and i32 %0, 57
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct termios {
  scalar_t__ c_lflag;
};

/* Variables and functions */
void cfmakeraw(struct termios *termios_p) { termios_p->c_lflag = 0; }


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

x86 assembly (clang, -O2):
<cfmakeraw>:
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
%struct.termios = type { i64 }
define void @cfmakeraw(%struct.termios* nocapture writeonly %0) {
%2 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 0
store i64 0, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  unsigned long long t = 1, f = 2, u = 9, o = 19, s = 25, c = 4217, e = 7171939,
                     a = 1762195240847, b = 399833425042215739,
                     x[] = {o * b, f * u * s * c * a, t * e};
  puts((char *)x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movq   $0x1,-0x8(%rbp)
movq   $0x2,-0x10(%rbp)
movq   $0x9,-0x18(%rbp)
movq   $0x13,-0x20(%rbp)
movq   $0x19,-0x28(%rbp)
movq   $0x1079,-0x30(%rbp)
movq   $0x6d6f63,-0x38(%rbp)
movabs $0x19a4b05778f,%rax
mov    %rax,-0x40(%rbp)
movabs $0x58c7e61b4f8133b,%rax
7e 8c 05
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rax
imul   -0x48(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
imul   -0x28(%rbp),%rax
imul   -0x30(%rbp),%rax
imul   -0x40(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x38(%rbp),%rax
mov    %rax,-0x50(%rbp)
lea    -0x60(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0x6d6f63,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca [3 x i64]
store i64 1, i64* %1
store i64 2, i64* %2
store i64 9, i64* %3
store i64 19, i64* %4
store i64 25, i64* %5
store i64 4217, i64* %6
store i64 7171939, i64* %7
store i64 1762195240847, i64* %8
store i64 399833425042215739, i64* %9
%11 = getelementptr inbounds [3 x i64], [3 x i64]* %10, i64 0, i64 0
%12 = load i64, i64* %4
%13 = load i64, i64* %9
%14 = mul i64 %12, %13
store i64 %14, i64* %11
%15 = getelementptr inbounds i64, i64* %11, i64 1
%16 = load i64, i64* %2
%17 = load i64, i64* %3
%18 = mul i64 %16, %17
%19 = load i64, i64* %5
%20 = mul i64 %18, %19
%21 = load i64, i64* %6
%22 = mul i64 %20, %21
%23 = load i64, i64* %8
%24 = mul i64 %22, %23
store i64 %24, i64* %15
%25 = getelementptr inbounds i64, i64* %15, i64 1
%26 = load i64, i64* %1
%27 = load i64, i64* %7
%28 = mul i64 %26, %27
store i64 %28, i64* %25
%29 = getelementptr inbounds [3 x i64], [3 x i64]* %10, i64 0, i64 0
%30 = bitcast i64* %29 to i8*
%31 = call i32 @puts(i8* %30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x i64]
%2 = bitcast [3 x i64]* %1 to i8*
%3 = bitcast [3 x i64]* %1 to <2 x i64>*
store <2 x i64> <i64 7596835075802099041, i64 3344029798793309550>, <2 x i64>* %3
%4 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 2
store i64 7171939, i64* %4
%5 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ gsm_hex2int(char *, int);
char *pdu_get_tppid(char *body, char *tppid) {
  char *pBegin, *pEnd;
  pBegin = body;
  pEnd = pBegin + 2;
  *tppid = (char)gsm_hex2int(pBegin, 2);
  return pEnd;
}


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

x86 assembly (clang, -O2):
<pdu_get_tppid>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0x2(%rdi),%rbx
mov    $0x2,%esi
call   1030 <gsm_hex2int@plt>
mov    %al,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @pdu_get_tppid(i8* %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = tail call i64 @gsm_hex2int(i8* %0, i32 2)
%5 = trunc i64 %4 to i8
store i8 %5, i8* %1
ret i8* %3
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strclone(char *src) {
  char *retval = (char *)malloc((strlen(src) + 1) * sizeof(char));
  strcpy(retval, src);
  return retval;
}


x86 assembly (clang, -O0):
<strclone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strclone>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strclone(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @strclone(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
int test_imm_9Cuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x9C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Cuint64_highword_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, 32
%6 = and i64 %5, 156
%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_9Cuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 670014898176
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double pow(double, double);
double radius_sg(double mass, double sg) {
  return pow(6.67408E-11 * (mass / sg), 1.0 / 2.0);
}


x86 assembly (clang, -O0):
<radius_sg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
movsd  0xed4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radius_sg>:
divsd  %xmm1,%xmm0
mulsd  0xee4(%rip),%xmm0
movsd  0xee4(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @radius_sg(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
%8 = fmul double 6.674080e-11, %7
%9 = call double @pow(double %8, double 5.000000e-01)
ret double %9
}

LLVM IR (-O2):
define double @radius_sg(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = fmul double %3, 6.674080e-11
%5 = tail call double @pow(double %4, double 5.000000e-01)
ret double %5
}
int SumDigits(int number) {
  if (number / 10 == 0)
    return number;
  else
    return number % 10 + SumDigits(number / 10);
}


x86 assembly (clang, -O0):
<SumDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    113a <SumDigits+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <SumDigits+0x52>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <SumDigits@plt>
mov    -0xc(%rbp),%edx
add    %eax,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SumDigits>:
lea    0x9(%rdi),%ecx
xor    %eax,%eax
cmp    $0x13,%ecx
jb     113f <SumDigits+0x3f>
xor    %eax,%eax
nopl   0x0(%rax)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%r8
shr    $0x3f,%r8
sar    $0x22,%rdx
lea    (%rdx,%r8,1),%edi
lea    (%rdi,%rdi,1),%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%ecx
add    %ecx,%eax
lea    (%rdx,%r8,1),%ecx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <SumDigits+0x10>
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @SumDigits(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %9, %4 ], [ 0, %1 ]
%7 = sdiv i32 %5, 10
%8 = srem i32 %5, 10
%9 = add nsw i32 %8, %6
%10 = add nsw i32 %7, 9
%11 = icmp ult i32 %10, 19
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = phi i32 [ 0, %1 ], [ %9, %4 ]
%14 = phi i32 [ %0, %1 ], [ %7, %4 ]
%15 = add nsw i32 %14, %13
ret i32 %15
}
void case_lowers(s) char *s;
{
  unsigned char x;
  while (x = *s) {
    x -= 'A';
    if (x <= 'Z' - 'A')
      *s = x + 'a';
    ++s;
  }
}


x86 assembly (clang, -O0):
<case_lowers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1150 <case_lowers+0x50>
movzbl -0x9(%rbp),%eax
sub    $0x41,%eax
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x19,%eax
jg     113f <case_lowers+0x3f>
movzbl -0x9(%rbp),%eax
add    $0x61,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <case_lowers+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<case_lowers>:
mov    (%rdi),%al
test   %al,%al
je     112a <case_lowers+0x2a>
add    $0x1,%rdi
jmp    111b <case_lowers+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <case_lowers+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <case_lowers+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <case_lowers+0x10>
ret

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

LLVM IR (-O2):
define void @case_lowers(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}