xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void smpte_hbrmt_set_timestamp(uint8_t *p_hbrmt, uint32_t timestamp) {
  p_hbrmt[8] = (timestamp >> 24) & 0xff;
  p_hbrmt[9] = (timestamp >> 16) & 0xff;
  p_hbrmt[10] = (timestamp >> 8) & 0xff;
  p_hbrmt[11] = (timestamp >> 0) & 0xff;
}


x86 assembly (clang, -O0):
<smpte_hbrmt_set_timestamp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x2c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_hbrmt_set_timestamp>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %eax,0x20(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x24(%rdi)
mov    %edx,0x28(%rdi)
mov    %esi,0x2c(%rdi)
ret

LLVM IR (-O0):
define void @smpte_hbrmt_set_timestamp(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 8
store i32 %7, i32* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 9
store i32 %12, i32* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 10
store i32 %17, i32* %19
%20 = load i32, i32* %4
%21 = ashr i32 %20, 0
%22 = and i32 %21, 255
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 11
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @smpte_hbrmt_set_timestamp(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %3, i32* %4
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %6, i32* %7
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i32, i32* %0, i64 10
store i32 %9, i32* %10
%11 = and i32 %1, 255
%12 = getelementptr inbounds i32, i32* %0, i64 11
store i32 %11, i32* %12
ret void
}
void get_nanf(float *x) {
  int i_nan = 0x7f8fffffL;
  union {
    float f;
    int i;
    struct {
      unsigned : 1, e : 11;
    } s;
  } z;
  z.i = -1;
  *x = z.f;
}


x86 assembly (clang, -O0):
<get_nanf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x7f8fffff,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nanf>:
movl   $0xffffffff,(%rdi)
ret

LLVM IR (-O0):
%union.anon = type { float }
define void @get_nanf(float* %0) {
%2 = alloca float*
%3 = alloca i32
%4 = alloca %union.anon
store float* %0, float** %2
store i32 2140143615, i32* %3
%5 = bitcast %union.anon* %4 to i32*
store i32 -1, i32* %5
%6 = bitcast %union.anon* %4 to float*
%7 = load float, float* %6
%8 = load float*, float** %2
store float %7, float* %8
ret void
}

LLVM IR (-O2):
define void @get_nanf(float* nocapture writeonly %0) {
store float 0xFFFFFFFFE0000000, float* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int /*<<< orphan*/ my_assert_fail(char *, char *, int);
void test_5(int i) {
  do {
    if (!(i < 10))
      my_assert_fail("i < 10",
                     "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/Gurgel100/gcc/refs/"
                     "heads/master/gcc/testsuite/gcc.dg/analyzer/abort.c",
                     78);
  } while (0);
  __analyzer_eval(i < 10);
}


x86 assembly (clang, -O0):
<test_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     114d <test_5+0x2d>
lea    0xec4(%rip),%rdi
lea    0xec4(%rip),%rsi
mov    $0x4e,%edx
call   1040 <my_assert_fail@plt>
jmp    1152 <test_5+0x32>
cmpl   $0xa,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_5>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%edi
jl     1140 <test_5+0x20>
lea    0xed1(%rip),%rdi
lea    0xed1(%rip),%rsi
mov    $0x4e,%edx
call   1040 <my_assert_fail@plt>
xor    %edi,%edi
cmp    $0xa,%ebx
setl   %dil
pop    %rbx
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"i < 10\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Gurgel100/gcc/refs/heads/master/gcc/testsuite/gcc.dg/analyzer/abort.c\00"
define void @test_5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = call i32 @my_assert_fail(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 78)
br label %8
8: ; preds = %6, %3
br label %9
9: ; preds = %8
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 10
%12 = zext i1 %11 to i32
%13 = call i32 @__analyzer_eval(i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"i < 10\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Gurgel100/gcc/refs/heads/master/gcc/testsuite/gcc.dg/analyzer/abort.c\00"
define void @test_5(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @my_assert_fail(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 78)
br label %5
5: ; preds = %1, %3
%6 = zext i1 %2 to i32
%7 = tail call i32 @__analyzer_eval(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
void condition(void) { emitln("<condition>"); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"<condition>\00"
define void @condition() {
%1 = tail call i32 @emitln(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long double logb(double);
__attribute__((weak)) long double logbl(long double x) {
  return logb((double)x);
}


x86 assembly (clang, -O0):
<logbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <logb@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logbl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <logb@plt>

LLVM IR (-O0):
define weak x86_fp80 @logbl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @logb(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define weak x86_fp80 @logbl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @logb(double %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void die(int errorcode, char *message) {
  fprintf(stderr, "ERROR: %s", message);
  exit(errorcode);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"ERROR: %s\00"
define void @die(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"ERROR: %s\00"
define void @die(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
void _M2_RTco_finish(void) {}


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

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

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

LLVM IR (-O2):
define void @_M2_RTco_finish() {
ret void
}
void __attribute__((visibility("default")))
border_n_vertical_special_sand_w(unsigned char *pic, unsigned char *mirr) {
  *pic = 0x2E;
  *mirr = 0x02 | 0x01;
}


x86 assembly (clang, -O0):
<border_n_vertical_special_sand_w>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2e,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_n_vertical_special_sand_w>:
movb   $0x2e,(%rdi)
movb   $0x3,(%rsi)
ret

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

LLVM IR (-O2):
define void @border_n_vertical_special_sand_w(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 46, i8* %0
store i8 3, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_no_check(int, char const *, int);
void init(void) {
  static const char m[] = "@ HACK INIT\n";
  write_no_check(2, m, sizeof m - 1);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
mov    $0xc,%edx
call   1030 <write_no_check@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
mov    $0xc,%edx
jmp    1030 <write_no_check@plt>

LLVM IR (-O0):
@init.m = internal constant [13 x i8] c"@ HACK INIT\0A\00"
define void @init() {
%1 = call i32 @write_no_check(i32 2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @init.m, i64 0, i64 0), i32 12)
ret void
}

LLVM IR (-O2):
@init.m = internal constant [13 x i8] c"@ HACK INIT\0A\00"
define void @init() {
%1 = tail call i32 @write_no_check(i32 2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @init.m, i64 0, i64 0), i32 12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int f(int x, int y) {
  printf("f(%d)\n", x);
  return y;
}


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

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"f(%d)\0A\00"
define i32 @f(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 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %4
ret i32 %7
}

LLVM IR (-O2):
@.str = [7 x i8] c"f(%d)\0A\00"
define i32 @f(i32 %0, i32 returned %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %1
}
int test_imm_E6uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xE6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E6uint64_highword_reg>:
movabs $0xe600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E6uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 230
%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_E6uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 987842478080
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double wf4(double lambda, double lambda2, double D_AB, double D_AC, double D_BC,
           double D_Av, double D_Bv, double D_Cv) {
  return (((1 - lambda) * (D_AC + D_Bv) + (lambda2 - 1) * (D_AB + D_Cv) +
           (lambda - lambda2) * (D_BC + D_Av)));
}


x86 assembly (clang, -O0):
<wf4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  0xecc(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
addsd  -0x38(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm3
subsd  %xmm3,%xmm0
movsd  -0x18(%rbp),%xmm3
addsd  -0x40(%rbp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
addsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<wf4>:
movsd  0xef7(%rip),%xmm8
subsd  %xmm0,%xmm8
addsd  %xmm6,%xmm3
mulsd  %xmm3,%xmm8
subsd  %xmm1,%xmm0
addsd  0xee5(%rip),%xmm1
addsd  %xmm7,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm2,%xmm8
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm8,%xmm0
ret

LLVM IR (-O0):
define double @wf4(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%17 = load double, double* %9
%18 = fsub double 1.000000e+00, %17
%19 = load double, double* %12
%20 = load double, double* %15
%21 = fadd double %19, %20
%22 = load double, double* %10
%23 = fsub double %22, 1.000000e+00
%24 = load double, double* %11
%25 = load double, double* %16
%26 = fadd double %24, %25
%27 = fmul double %23, %26
%28 = call double @llvm.fmuladd.f64(double %18, double %21, double %27)
%29 = load double, double* %9
%30 = load double, double* %10
%31 = fsub double %29, %30
%32 = load double, double* %13
%33 = load double, double* %14
%34 = fadd double %32, %33
%35 = call double @llvm.fmuladd.f64(double %31, double %34, double %28)
ret double %35
}

LLVM IR (-O2):
define double @wf4(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fsub double 1.000000e+00, %0
%10 = fadd double %3, %6
%11 = fadd double %1, -1.000000e+00
%12 = fadd double %2, %7
%13 = fmul double %11, %12
%14 = tail call double @llvm.fmuladd.f64(double %9, double %10, double %13)
%15 = fsub double %0, %1
%16 = fadd double %4, %5
%17 = tail call double @llvm.fmuladd.f64(double %15, double %16, double %14)
ret double %17
}
void fninit() { asm volatile("fninit\n"); }


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

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

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

LLVM IR (-O2):
define void @fninit() {
tail call void asm sideeffect "fninit\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ shutdown(int, int);
void net_close(int fd) {
  if (fd >= 0) {
    shutdown(fd, 2);
    close(fd);
  }
}


x86 assembly (clang, -O0):
<net_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     114a <net_close+0x2a>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_close>:
test   %edi,%edi
js     1139 <net_close+0x19>
push   %rbx
mov    %edi,%ebx
mov    $0x2,%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>
ret

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

LLVM IR (-O2):
define void @net_close(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @shutdown(i32 %0, i32 2)
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Car_Get(int);
int Car_GetAxlesNum(int /*<<< orphan*/);
int Car_GetCarAxlesNum(int carnum) { return Car_GetAxlesNum(Car_Get(carnum)); }


x86 assembly (clang, -O0):
<Car_GetCarAxlesNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Car_Get@plt>
mov    %eax,%edi
call   1040 <Car_GetAxlesNum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Car_GetCarAxlesNum>:
push   %rax
call   1030 <Car_Get@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <Car_GetAxlesNum@plt>

LLVM IR (-O0):
define i32 @Car_GetCarAxlesNum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @Car_Get(i32 %3)
%5 = call i32 @Car_GetAxlesNum(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @Car_GetCarAxlesNum(i32 %0) {
%2 = tail call i32 @Car_Get(i32 %0)
%3 = tail call i32 @Car_GetAxlesNum(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ tty_put_ui32(int);
int /*<<< orphan*/ tty_putchar(char);
void tty_put_i32(int v) {
  if (v < 0) {
    tty_putchar('-');
    v = -v;
  }
  tty_put_ui32(v);
}


x86 assembly (clang, -O0):
<tty_put_i32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1147 <tty_put_i32+0x27>
mov    $0x2d,%edi
call   1030 <tty_putchar@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <tty_put_ui32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_put_i32>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1133 <tty_put_i32+0x13>
mov    $0x2d,%edi
call   1030 <tty_putchar@plt>
neg    %ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <tty_put_ui32@plt>

LLVM IR (-O0):
define void @tty_put_i32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @tty_putchar(i8 signext 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = call i32 @tty_put_ui32(i32 %10)
ret void
}

LLVM IR (-O2):
define void @tty_put_i32(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @tty_putchar(i8 signext 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @tty_put_ui32(i32 %7)
ret void
}
int fun346() { return 346; }


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

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

LLVM IR (-O0):
define i32 @fun346() {
ret i32 346
}

LLVM IR (-O2):
define i32 @fun346() {
ret i32 346
}
/* Variables and functions */
int /*<<< orphan*/ random_seed(int);
void random_init(void) {
  random_seed(1);
  return;
}


x86 assembly (clang, -O0):
<random_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <random_seed@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_init>:
mov    $0x1,%edi
jmp    1030 <random_seed@plt>

LLVM IR (-O0):
define void @random_init() {
%1 = call i32 @random_seed(i32 1)
ret void
}

LLVM IR (-O2):
define void @random_init() {
%1 = tail call i32 @random_seed(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("Usage: ftee filename\n"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Usage: ftee filename\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Usage: ftee filename\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_size(int);
void size3(void) { set_size(3); }


x86 assembly (clang, -O0):
<size3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <set_size@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<size3>:
mov    $0x3,%edi
jmp    1030 <set_size@plt>

LLVM IR (-O0):
define void @size3() {
%1 = call i32 @set_size(i32 3)
ret void
}

LLVM IR (-O2):
define void @size3() {
%1 = tail call i32 @set_size(i32 3)
ret void
}
double multfl(double a, double b) { return a * b; }


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

x86 assembly (clang, -O2):
<multfl>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @multfl(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 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @multfl(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ die_if(int, char *);
void get_cur_timestamp(struct timespec *now) {
  int retval;
  retval = clock_gettime(CLOCK_MONOTONIC, now);
  die_if(retval == -1, "clock_gettime");
}


x86 assembly (clang, -O0):
<get_cur_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xeac(%rip),%rsi
call   1040 <die_if@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cur_timestamp>:
push   %rax
mov    %rdi,%rsi
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <clock_gettime@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
lea    0xebe(%rip),%rsi
pop    %rax
jmp    1040 <die_if@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [14 x i8] c"clock_gettime\00"
define void @get_cur_timestamp(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
%3 = alloca i32
store %struct.timespec* %0, %struct.timespec** %2
%4 = load i32, i32* @CLOCK_MONOTONIC
%5 = load %struct.timespec*, %struct.timespec** %2
%6 = call i32 @clock_gettime(i32 %4, %struct.timespec* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, -1
%9 = zext i1 %8 to i32
%10 = call i32 @die_if(i32 %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [14 x i8] c"clock_gettime\00"
define void @get_cur_timestamp(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = tail call i32 @clock_gettime(i32 %2, %struct.timespec* %0)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = tail call i32 @die_if(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
char *opf_panid(char *buf) { return buf + 4; }


x86 assembly (clang, -O0):
<opf_panid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opf_panid>:
lea    0x4(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @opf_panid(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void helptext(char *p_name) {
  printf("Usage: %s -a <amount> -i <interest rate> -d <duration>\n", p_name);
}


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

x86 assembly (clang, -O2):
<helptext>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Usage: %s -a <amount> -i <interest rate> -d <duration>\0A\00"
define void @helptext(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Usage: %s -a <amount> -i <interest rate> -d <duration>\0A\00"
define void @helptext(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
float atanf(float);
void __hv_atan_f(float bIn, float *bOut) { *bOut = atanf(bIn); }


x86 assembly (clang, -O0):
<__hv_atan_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <atanf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_atan_f>:
push   %rbx
mov    %rdi,%rbx
call   1030 <atanf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__hv_atan_f(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = call float @atanf(float %5)
%7 = load float*, float** %4
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @__hv_atan_f(float %0, float* nocapture writeonly %1) {
%3 = tail call float @atanf(float %0)
store float %3, float* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
main() {
  float count = 0.0;
  int nums = 0;
  float i = 1;
  while (i < 2.1) {
    count += i;
    i += 0.1;
    nums++;
  }
  printf(
      "The average of the numbers from 1.0 to 2.0 by increments of 0.1 is: %f",
      (count / nums));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movss  0xeca(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1191 <main+0x81>
movss  -0x10(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9a(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <main+0x2b>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [71 x i8] c"The average of the numbers from 1.0 to 2.0 by increments of 0.1 is: %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store i32 0, i32* %3
store float 1.000000e+00, float* %4
br label %5
5: ; preds = %9, %0
%6 = load float, float* %4
%7 = fpext float %6 to double
%8 = fcmp olt double %7, 2.100000e+00
br i1 %8, label %9, label %19
9: ; preds = %5
%10 = load float, float* %4
%11 = load float, float* %2
%12 = fadd float %11, %10
store float %12, float* %2
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = fadd double %14, 1.000000e-01
%16 = fptrunc double %15 to float
store float %16, float* %4
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %5
19: ; preds = %5
%20 = load float, float* %2
%21 = load i32, i32* %3
%22 = sitofp i32 %21 to float
%23 = fdiv float %20, %22
%24 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), float %23)
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@.str = [71 x i8] c"The average of the numbers from 1.0 to 2.0 by increments of 0.1 is: %f\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), float 0x3FF8000020000000)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int inside(uint32_t seq1, uint32_t seq2, uint32_t seq3) {
  return seq3 - seq2 >= seq1 - seq2;
}


x86 assembly (clang, -O0):
<inside>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inside>:
xor    %eax,%eax
cmp    %rdi,%rdx
setge  %al
ret

LLVM IR (-O0):
define i32 @inside(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i64, i64* %5
%9 = sub nsw i64 %7, %8
%10 = load i64, i64* %4
%11 = load i64, i64* %5
%12 = sub nsw i64 %10, %11
%13 = icmp sge i64 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @inside(i64 %0, i64 %1, i64 %2) {
%4 = icmp sge i64 %2, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void version(void) {
  fprintf(stderr, "ewfverify version: %s\n", "20060505-1");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xedc(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xedf(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"ewfverify version: %s\0A\00"
@.str.1 = [11 x i8] c"20060505-1\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"ewfverify version: %s\0A\00"
@.str.1 = [11 x i8] c"20060505-1\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_u32_murmur32s_data(int /*<<< orphan*/ const *, size_t,
                                           uintptr_t);
uint32_t rgph_u32_murmur32s_u8a(const uint8_t *key, size_t len,
                                uintptr_t seed) {
  return rgph_u32_murmur32s_data(key, len, seed);
}


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

x86 assembly (clang, -O2):
<rgph_u32_murmur32s_u8a>:
jmp    1030 <rgph_u32_murmur32s_data@plt>

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

LLVM IR (-O2):
define i32 @rgph_u32_murmur32s_u8a(i32* %0, i64 %1, i64 %2) {
%4 = tail call i32 @rgph_u32_murmur32s_data(i32* %0, i64 %1, i64 %2)
ret i32 %4
}
/* Type definitions */
struct scorer_query {
  int dummy;
};
struct prepared_pattern {
  int dummy;
};

/* Variables and functions */
int score_string_prepared_inline(int, char const *, struct scorer_query const *,
                                 struct prepared_pattern const *,
                                 unsigned int const, unsigned int *);
__attribute__((no)) int
score_string_prepared_1(const char *string, const struct scorer_query *query,
                        const struct prepared_pattern *prepared_pattern,
                        const unsigned string_length, unsigned *match) {
  return score_string_prepared_inline(1, string, query, prepared_pattern,
                                      string_length, match);
}


x86 assembly (clang, -O0):
<score_string_prepared_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    $0x1,%edi
call   1030 <score_string_prepared_inline@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<score_string_prepared_1>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <score_string_prepared_inline@plt>

LLVM IR (-O0):
%struct.scorer_query = type { i32 }
%struct.prepared_pattern = type { i32 }
define i32 @score_string_prepared_1(i8* %0, %struct.scorer_query* %1, %struct.prepared_pattern* %2, i32 %3, i32* %4) {
%6 = alloca i8*
%7 = alloca %struct.scorer_query*
%8 = alloca %struct.prepared_pattern*
%9 = alloca i32
%10 = alloca i32*
store i8* %0, i8** %6
store %struct.scorer_query* %1, %struct.scorer_query** %7
store %struct.prepared_pattern* %2, %struct.prepared_pattern** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load i8*, i8** %6
%12 = load %struct.scorer_query*, %struct.scorer_query** %7
%13 = load %struct.prepared_pattern*, %struct.prepared_pattern** %8
%14 = load i32, i32* %9
%15 = load i32*, i32** %10
%16 = call i32 @score_string_prepared_inline(i32 1, i8* %11, %struct.scorer_query* %12, %struct.prepared_pattern* %13, i32 %14, i32* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.scorer_query = type { i32 }
%struct.prepared_pattern = type { i32 }
define i32 @score_string_prepared_1(i8* %0, %struct.scorer_query* %1, %struct.prepared_pattern* %2, i32 %3, i32* %4) {
%6 = tail call i32 @score_string_prepared_inline(i32 1, i8* %0, %struct.scorer_query* %1, %struct.prepared_pattern* %2, i32 %3, i32* %4)
ret i32 %6
}
int resume_async(struct ThreadInfo *tinfo) { return -1; }


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

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

LLVM IR (-O0):
%struct.ThreadInfo = type opaque
define i32 @resume_async(%struct.ThreadInfo* %0) {
%2 = alloca %struct.ThreadInfo*
store %struct.ThreadInfo* %0, %struct.ThreadInfo** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.ThreadInfo = type opaque
define i32 @resume_async(%struct.ThreadInfo* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ putstr(char *);
void run(void) {
  putstr("Hello, I am the ARM\n");
  exit(0);
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <putstr@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<run>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <putstr@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Hello, I am the ARM\0A\00"
define void @run() {
%1 = call i32 @putstr(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"Hello, I am the ARM\0A\00"
define void @run() {
%1 = tail call i32 @putstr(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ analogWrite(int, char);
void setSpeed(char MOTOR_LADO, char VEL_MOTOR) {
  if (MOTOR_LADO == 1) {
    analogWrite(11, VEL_MOTOR);
  } else {
    analogWrite(10, VEL_MOTOR);
  }
}


x86 assembly (clang, -O0):
<setSpeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x1,%eax
jne    1144 <setSpeed+0x34>
mov    $0xb,%edi
movsbl -0x2(%rbp),%esi
call   1030 <analogWrite@plt>
jmp    1152 <setSpeed+0x42>
mov    $0xa,%edi
movsbl -0x2(%rbp),%esi
call   1030 <analogWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setSpeed>:
xor    %eax,%eax
cmp    $0x1,%dil
sete   %al
or     $0xa,%eax
mov    %eax,%edi
jmp    1030 <analogWrite@plt>

LLVM IR (-O0):
define void @setSpeed(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 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8, i8* %4
%10 = call i32 @analogWrite(i32 11, i8 signext %9)
br label %14
11: ; preds = %2
%12 = load i8, i8* %4
%13 = call i32 @analogWrite(i32 10, i8 signext %12)
br label %14
14: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
define void @setSpeed(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 1
%4 = select i1 %3, i32 11, i32 10
%5 = tail call i32 @analogWrite(i32 %4, i8 signext %1)
ret void
}
int defined_twice_c(void) { return 0; }


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

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

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

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

/* Variables and functions */
void EEPROMIntDisable(uint32_t ui32IntFlags) {
  ;
  (*((volatile unsigned long *)(0x400FD010))) &= ~0x00000004;
  (*((volatile unsigned long *)(0x400AF040))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<EEPROMIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x400fd010,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffb,%rcx
mov    $0x400fd010,%eax
mov    %rcx,(%rax)
mov    $0x400af040,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    $0x400af040,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMIntDisable>:
andq   $0xfffffffffffffffb,0x400fd010
40 fb
andq   $0xfffffffffffffffe,0x400af040
40 fe
ret

LLVM IR (-O0):
define void @EEPROMIntDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load volatile i64, i64* inttoptr (i64 1074778128 to i64*)
%4 = and i64 %3, -5
store volatile i64 %4, i64* inttoptr (i64 1074778128 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1074458688 to i64*)
%6 = and i64 %5, -2
store volatile i64 %6, i64* inttoptr (i64 1074458688 to i64*)
ret void
}

LLVM IR (-O2):
define void @EEPROMIntDisable(i32 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074778128 to i64*)
%3 = and i64 %2, -5
store volatile i64 %3, i64* inttoptr (i64 1074778128 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 1074458688 to i64*)
%5 = and i64 %4, -2
store volatile i64 %5, i64* inttoptr (i64 1074458688 to i64*)
ret void
}
void find_task_by_vpid(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<find_task_by_vpid>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_task_by_vpid>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.find_task_by_vpid = [18 x i8] c"find_task_by_vpid\00"
define void @find_task_by_vpid() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.find_task_by_vpid, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.find_task_by_vpid = [18 x i8] c"find_task_by_vpid\00"
define void @find_task_by_vpid() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.find_task_by_vpid, i64 0, i64 0))
ret void
}
char *xrealloc(ptr, size)
char *ptr;
unsigned size;
{
  register char *tem = realloc(ptr, size);
  if (!tem)
    memory_out();
  return tem;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xrealloc+0x33>
mov    $0x0,%al
call   1030 <memory_out@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %esi,%esi
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1137 <xrealloc+0x17>
xor    %eax,%eax
call   1030 <memory_out@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = tail call i8* @realloc(i8* %0, i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @memory_out()
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
scalar_t__ apparentmoon(double, int);
scalar_t__ apparentsun(double, int);
double npitopi(scalar_t__);
double f_msangle(double jd, double angle) {
  return npitopi(apparentmoon(jd, 1) - apparentsun(jd, 1) - angle);
}


x86 assembly (clang, -O0):
<f_msangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <apparentmoon@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%edi
call   1040 <apparentsun@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
cvtsi2sd %rax,%xmm0
subsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <npitopi@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_msangle>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    $0x1,%edi
call   1030 <apparentmoon@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
mov    $0x1,%edi
call   1040 <apparentsun@plt>
sub    %rax,%rbx
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
subsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1050 <npitopi@plt>

LLVM IR (-O0):
define double @f_msangle(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 = call i64 @apparentmoon(double %5, i32 1)
%7 = load double, double* %3
%8 = call i64 @apparentsun(double %7, i32 1)
%9 = sub nsw i64 %6, %8
%10 = sitofp i64 %9 to double
%11 = load double, double* %4
%12 = fsub double %10, %11
%13 = fptosi double %12 to i64
%14 = call double @npitopi(i64 %13)
ret double %14
}

LLVM IR (-O2):
define double @f_msangle(double %0, double %1) {
%3 = tail call i64 @apparentmoon(double %0, i32 1)
%4 = tail call i64 @apparentsun(double %0, i32 1)
%5 = sub nsw i64 %3, %4
%6 = sitofp i64 %5 to double
%7 = fsub double %6, %1
%8 = fptosi double %7 to i64
%9 = tail call double @npitopi(i64 %8)
ret double %9
}
unsigned int bitdepth(unsigned int value) {
  unsigned int bitdepth = 1;
  while (value > 1) {
    bitdepth++;
    value >>= 1;
  }
  return bitdepth;
}


x86 assembly (clang, -O0):
<bitdepth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jbe    112f <bitdepth+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bitdepth+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitdepth>:
mov    $0x1,%eax
cmp    $0x2,%edi
jb     112c <bitdepth+0x2c>
mov    $0x1,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %ecx
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1120 <bitdepth+0x20>
ret

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

LLVM IR (-O2):
define i32 @bitdepth(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %10
}