xunge/DecIR huggingface dataset:
int test_imm_37int8_mem(signed char *val) {
  return ((*val) & (0x37 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_37int8_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, 55
%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_37int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 55
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int *lookUpInt(int /*<<< orphan*/);
void testZeroIsNotNull() {
  int *casted = lookUpInt(0);
  *casted = 1;
}


x86 assembly (clang, -O0):
<testZeroIsNotNull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <lookUpInt@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testZeroIsNotNull>:
push   %rax
xor    %edi,%edi
call   1030 <lookUpInt@plt>
movl   $0x1,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @testZeroIsNotNull() {
%1 = alloca i32*
%2 = call i32* @lookUpInt(i32 0)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
store i32 1, i32* %3
ret void
}

LLVM IR (-O2):
define void @testZeroIsNotNull() {
%1 = tail call i32* @lookUpInt(i32 0)
store i32 1, i32* %1
ret void
}
unsigned int roundup_pow_two(unsigned int v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v++;
  return (v);
}


x86 assembly (clang, -O0):
<roundup_pow_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundup_pow_two>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @roundup_pow_two(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = lshr i32 %6, 4
%8 = or i32 %7, %6
%9 = lshr i32 %8, 8
%10 = or i32 %9, %8
%11 = lshr i32 %10, 16
%12 = or i32 %11, %10
%13 = add i32 %12, 1
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long atol(int /*<<< orphan*/);
int /*<<< orphan*/ findLine(int /*<<< orphan*/ *, char *);
long parse_sender(FILE *plr_file) { return atol(findLine(plr_file, "Send:")); }


x86 assembly (clang, -O0):
<parse_sender>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <findLine@plt>
mov    %eax,%edi
call   1030 <atol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_sender>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <findLine@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <atol@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Send:\00"
define i64 @parse_sender(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @findLine(i32* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i64 @atol(i32 %4)
ret i64 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"Send:\00"
define i64 @parse_sender(i32* %0) {
%2 = tail call i32 @findLine(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @atol(i32 %2)
ret i64 %3
}
/* Variables and functions */
bool is_height_valid(double x) { return x > 0 && x <= 100; }


x86 assembly (clang, -O0):
<is_height_valid>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jbe    1133 <is_height_valid+0x33>
movsd  0xed8(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_height_valid>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
movsd  0xeed(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_height_valid(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp ole double %6, 1.000000e+02
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_height_valid(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp ole double %0, 1.000000e+02
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int execute_tuxcall() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_tuxcall() {
ret i32 0
}
/* Variables and functions */
float __ocml_round_f32(float);
float roundf(float x) { return __ocml_round_f32(x); }


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

x86 assembly (clang, -O2):
<roundf>:
jmp    1030 <__ocml_round_f32@plt>

LLVM IR (-O0):
define float @roundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__ocml_round_f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @roundf(float %0) {
%2 = tail call float @__ocml_round_f32(float %0)
ret float %2
}
int test_imm_F6int32_mem(int *val) {
  return ((*val) & (0xF6 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F6int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 246
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void error_compare(int a, int __attribute((unit("m"))) b) { a == b; }


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

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

LLVM IR (-O0):
define void @error_compare(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret void
}

LLVM IR (-O2):
define void @error_compare(i32 %0, i32 %1) {
ret void
}
call3b(ucp, usp, uip, ulp) unsigned char *ucp;
unsigned short *usp;
unsigned int *uip;
unsigned long *ulp;
{
  ucp = 0;
  usp = 0;
  uip = 0;
  ulp = 0;
}


x86 assembly (clang, -O0):
<call3b>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @call3b(i8* %0, i16* %1, i32* %2, i64* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i16*
%8 = alloca i32*
%9 = alloca i64*
store i8* %0, i8** %6
store i16* %1, i16** %7
store i32* %2, i32** %8
store i64* %3, i64** %9
store i8* null, i8** %6
store i16* null, i16** %7
store i32* null, i32** %8
store i64* null, i64** %9
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @call3b(i8* nocapture readnone %0, i16* nocapture readnone %1, i32* nocapture readnone %2, i64* nocapture readnone %3) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/
__softboundcets_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
int /*<<< orphan*/ __softboundcets_store_null_return_metadata();
char *strpbrk(char const *, char const *);
__attribute__((__weak__, __always___)) char *
softboundcets_strpbrk(const char *s, const char *accept) {
  char *ret_ptr = strpbrk(s, accept);
  if (ret_ptr != NULL) {
    __softboundcets_propagate_metadata_shadow_stack_from(1, 0);
  } else {
    __softboundcets_store_null_return_metadata();
  }
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundcets_strpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strpbrk@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116d <softboundcets_strpbrk+0x3d>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
jmp    1174 <softboundcets_strpbrk+0x44>
mov    $0x0,%al
call   1050 <__softboundcets_store_null_return_metadata@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_strpbrk>:
push   %rbx
call   1040 <strpbrk@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114c <softboundcets_strpbrk+0x1c>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
jmp    1153 <softboundcets_strpbrk+0x23>
xor    %eax,%eax
call   1050 <__softboundcets_store_null_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define weak i8* @softboundcets_strpbrk(i8* %0, i8* %1) {
%3 = tail call i8* @strpbrk(i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
br label %9
7: ; preds = %2
%8 = tail call i32 (...) @__softboundcets_store_null_return_metadata()
br label %9
9: ; preds = %7, %5
ret i8* %3
}
unsigned char *UINT32_TO_STREAM_f(unsigned char *p, unsigned long u32) {
  *(p)++ = (unsigned char)(u32);
  *(p)++ = (unsigned char)((u32) >> 8);
  *(p)++ = (unsigned char)((u32) >> 16);
  *(p)++ = (unsigned char)((u32) >> 24);
  return p;
}


x86 assembly (clang, -O0):
<UINT32_TO_STREAM_f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @UINT32_TO_STREAM_f(i8* writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %0
%5 = lshr i64 %1, 8
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %4
%8 = lshr i64 %1, 16
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %9, i8* %7
%11 = lshr i64 %1, 24
%12 = trunc i64 %11 to i8
%13 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %12, i8* %10
ret i8* %13
}
unsigned long sdbm_string_hash(const char *key) {
  unsigned long hashed_key = 0;
  int index = 0;
  unsigned int nextch;
  while (key[index] != '\0') {
    nextch = key[index];
    hashed_key = nextch + (hashed_key << 6) + (hashed_key << 16) - hashed_key;
    index++;
  }
  return hashed_key;
}


x86 assembly (clang, -O0):
<sdbm_string_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116a <sdbm_string_hash+0x6a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <sdbm_string_hash+0x17>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdbm_string_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <sdbm_string_hash+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbq %cl,%rcx
mov    %ecx,%ecx
imul   $0x1003f,%rax,%rax
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <sdbm_string_hash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @sdbm_string_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
store i64 0, i64* %3
store i32 0, i32* %4
br label %6
6: ; preds = %14, %1
%7 = load i8*, i8** %2
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %33
14: ; preds = %6
%15 = load i8*, i8** %2
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = zext i32 %21 to i64
%23 = load i64, i64* %3
%24 = shl i64 %23, 6
%25 = add i64 %22, %24
%26 = load i64, i64* %3
%27 = shl i64 %26, 16
%28 = add i64 %25, %27
%29 = load i64, i64* %3
%30 = sub i64 %28, %29
store i64 %30, i64* %3
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %6
33: ; preds = %6
%34 = load i64, i64* %3
ret i64 %34
}

LLVM IR (-O2):
define i64 @sdbm_string_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i64 [ %11, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i64
%9 = and i64 %8, 4294967295
%10 = mul i64 %7, 65599
%11 = add i64 %10, %9
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i64 [ 0, %1 ], [ %11, %4 ]
ret i64 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XGetGCValues() {
  printf("XGetGCVAlues called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"XGetGCVAlues called\0A\00"
define i32 @XGetGCValues() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"XGetGCVAlues called\00"
define i32 @XGetGCValues() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
pid_t octave_getppid_wrapper(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @octave_getppid_wrapper() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @octave_getppid_wrapper() {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ do_error(char *);
int pthread_mutex_lock(int /*<<< orphan*/ *);
int tw_pthread_mutex_lock(pthread_mutex_t *m) {
  int return_value;
  if ((return_value = pthread_mutex_lock(m)) == -1)
    do_error("pthread_mutex_lock");
  return (return_value);
}


x86 assembly (clang, -O0):
<tw_pthread_mutex_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_mutex_lock@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    114d <tw_pthread_mutex_lock+0x2d>
lea    0xeb8(%rip),%rdi
call   1040 <do_error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tw_pthread_mutex_lock>:
push   %rbx
call   1030 <pthread_mutex_lock@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <tw_pthread_mutex_lock+0x19>
lea    0xecc(%rip),%rdi
call   1040 <do_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"pthread_mutex_lock\00"
define i32 @tw_pthread_mutex_lock(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pthread_mutex_lock(i32* %4)
store i32 %5, i32* %3
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @do_error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [19 x i8] c"pthread_mutex_lock\00"
define i32 @tw_pthread_mutex_lock(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @do_error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
int bfq_update_next_active(struct bfq_sched_data *sd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.bfq_sched_data = type opaque
define i32 @bfq_update_next_active(%struct.bfq_sched_data* nocapture readnone %0) {
ret i32 0
}
void g_byte_array_sort() {}


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

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

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

LLVM IR (-O2):
define void @g_byte_array_sort() {
ret void
}
unsigned long Read16(unsigned char *pByte) {
  unsigned short value = 0;
  value |= (unsigned short)pByte[0];
  value |= (unsigned short)pByte[1] << 8;
  return value;
}


x86 assembly (clang, -O0):
<Read16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzwl %ax,%ecx
movzwl -0xa(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
movzwl %ax,%ecx
shl    $0x8,%ecx
movzwl -0xa(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read16>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i64 @Read16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = shl nuw nsw i64 %6, 8
%8 = or i64 %7, %3
ret i64 %8
}
int isGreater(int x, int y) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @isGreater(i32 %0, i32 %1) {
ret i32 2
}
/* Type definitions */
struct atom {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct atom *);
void free_atom(struct atom *a) { free(a); }


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

x86 assembly (clang, -O2):
<free_atom>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.atom = type { i32 }
define void @free_atom(%struct.atom* %0) {
%2 = alloca %struct.atom*
store %struct.atom* %0, %struct.atom** %2
%3 = load %struct.atom*, %struct.atom** %2
%4 = call i32 @free(%struct.atom* %3)
ret void
}

LLVM IR (-O2):
%struct.atom = type { i32 }
define void @free_atom(%struct.atom* nocapture %0) {
%2 = tail call i32 @free(%struct.atom* %0)
ret void
}
char *mbrk(address)
char *address;
{
  extern char *brk();
  if ((address = brk(address)) == (char *)-1)
    error(1, "Cannot reset memory", ((char *)0));
  return address;
}


x86 assembly (clang, -O0):
<mbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <brk@plt>
mov    %rax,-0x8(%rbp)
mov    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jne    1162 <mbrk+0x42>
mov    $0x1,%edi
lea    0xea9(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   1040 <error@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbrk>:
push   %rbx
xor    %eax,%eax
call   1030 <brk@plt>
mov    %rax,%rbx
cmp    $0xffffffffffffffff,%rax
jne    1146 <mbrk+0x26>
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Cannot reset memory\00"
define i8* @mbrk(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* (i8*, ...) bitcast (i8* (...)* @brk to i8* (i8*, ...)*)(i8* %3)
store i8* %4, i8** %2
%5 = icmp eq i8* %4, inttoptr (i64 -1 to i8*)
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* null)
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [20 x i8] c"Cannot reset memory\00"
define i8* @mbrk(i8* %0) {
%2 = tail call i8* (i8*, ...) bitcast (i8* (...)* @brk to i8* (i8*, ...)*)(i8* %0)
%3 = icmp eq i8* %2, inttoptr (i64 -1 to i8*)
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* null)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
unsigned char get_reg(unsigned char c) { return c = (c >> 4) & 0x01; }


x86 assembly (clang, -O0):
<get_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
and    $0x1,%eax
mov    %al,-0x1(%rbp)
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @get_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 4
%6 = and i32 %5, 1
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @get_reg(i8 zeroext %0) {
%2 = lshr i8 %0, 4
%3 = and i8 %2, 1
ret i8 %3
}
int isAddr(const char *op) { return op[0] == '&'; }


x86 assembly (clang, -O0):
<isAddr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x26,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAddr>:
xor    %eax,%eax
cmpb   $0x26,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @isAddr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 38
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @isAddr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 38
%4 = zext i1 %3 to i32
ret i32 %4
}
void *vrelptr(void *ptr) { return (void *)((unsigned int)ptr & ~0x90000000); }


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

x86 assembly (clang, -O2):
<vrelptr>:
mov    %rdi,%rax
and    $0x6fffffff,%eax
ret

LLVM IR (-O0):
define i8* @vrelptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = and i32 %4, 1879048191
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @vrelptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 1879048191
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct msg_buff {
  int dummy;
};

/* Variables and functions */
int nla_put(struct msg_buff *, int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int nla_put_flag(struct msg_buff *msg, int attrtype) {
  return nla_put(msg, attrtype, 0, NULL);
}


x86 assembly (clang, -O0):
<nla_put_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <nla_put@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_put_flag>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <nla_put@plt>

LLVM IR (-O0):
%struct.msg_buff = type { i32 }
define i32 @nla_put_flag(%struct.msg_buff* %0, i32 %1) {
%3 = alloca %struct.msg_buff*
%4 = alloca i32
store %struct.msg_buff* %0, %struct.msg_buff** %3
store i32 %1, i32* %4
%5 = load %struct.msg_buff*, %struct.msg_buff** %3
%6 = load i32, i32* %4
%7 = call i32 @nla_put(%struct.msg_buff* %5, i32 %6, i32 0, i32* null)
ret i32 %7
}

LLVM IR (-O2):
%struct.msg_buff = type { i32 }
define i32 @nla_put_flag(%struct.msg_buff* %0, i32 %1) {
%3 = tail call i32 @nla_put(%struct.msg_buff* %0, i32 %1, i32 0, i32* null)
ret i32 %3
}
void neural_layer_maxpool_rand(struct Layer *l) { (void)l; }


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

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

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

LLVM IR (-O2):
%struct.Layer = type opaque
define void @neural_layer_maxpool_rand(%struct.Layer* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __syscall(int /*<<< orphan*/, int, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/);
void exit(int status) {
  __syscall(0, (status), (0), (0), (0), (0), (0), (0), (0));
  while (1) {
  }
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <__syscall@plt>
jmp    1149 <exit+0x39>

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    %edi,%esi
sub    $0x8,%rsp
xor    %edi,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1030 <__syscall@plt>
add    $0x20,%rsp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1140 <exit+0x30>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__syscall(i32 0, i32 %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
br label %5
5: ; preds = %1, %5
br label %5
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @__syscall(i32 0, i32 %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
br label %3
3: ; preds = %1, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ japi_selectall(int);
void j_selectall(int arg0) { japi_selectall(arg0); }


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

x86 assembly (clang, -O2):
<j_selectall>:
jmp    1030 <japi_selectall@plt>

LLVM IR (-O0):
define void @j_selectall(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @japi_selectall(i32 %3)
ret void
}

LLVM IR (-O2):
define void @j_selectall(i32 %0) {
%2 = tail call i32 @japi_selectall(i32 %0)
ret void
}
/* Variables and functions */
float __nv_frcp_rn(float);
float __frcp_rn(float __a) { return __nv_frcp_rn(__a); }


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

x86 assembly (clang, -O2):
<__frcp_rn>:
jmp    1030 <__nv_frcp_rn@plt>

LLVM IR (-O0):
define float @__frcp_rn(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__nv_frcp_rn(float %3)
ret float %4
}

LLVM IR (-O2):
define float @__frcp_rn(float %0) {
%2 = tail call float @__nv_frcp_rn(float %0)
ret float %2
}
int __fswab32(int p1) { return __builtin_bswap32(p1); }


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

x86 assembly (clang, -O2):
<__fswab32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @__fswab32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.bswap.i32(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @__fswab32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
void *bar(const void *x, int y, int z) { return (void *)0; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @bar(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @bar(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* null
}
void foo_1_1_1_2_2_2_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_2_2_2_2_1() {
ret void
}
int strings_compare(char *s1, const char *s2) {
  int i;
  int tmp;
  i = 0;
  while (s1[i] != '\0' || s2[i] != '\0') {
    i++;
  }
}


x86 assembly (clang, -O0):
<strings_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x21(%rbp)
jne    1142 <strings_compare+0x42>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1152 <strings_compare+0x52>
jmp    1160 <strings_compare+0x60>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <strings_compare+0x13>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @strings_compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %6
br label %8
8: ; preds = %26, %2
%9 = load i8*, i8** %4
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %24, label %16
16: ; preds = %8
%17 = load i8*, i8** %5
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 0
br label %24
24: ; preds = %16, %8
%25 = phi i1 [ true, %8 ], [ %23, %16 ]
br i1 %25, label %26, label %29
26: ; preds = %24
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %8
29: ; preds = %24
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @strings_compare(i8* nocapture %0, i8* nocapture %1) {
ret i32 undef
}
void RTTimeSet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimeSet() {
ret void
}
void nextPut(unsigned int uartBase, char ch) {
  volatile unsigned char *uartp;
  int i;
  uartp = (volatile unsigned char *)(0x80000000 + uartBase);
  for (i = 0; (i < 0x10000); i++) {
    if (uartp[0x04] & 0x04)
      break;
  }
  uartp[0x0c] = ch;
}


x86 assembly (clang, -O0):
<nextPut>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80000000,%eax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x10000,-0x14(%rbp)
jge    115d <nextPut+0x5d>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%al
movzbl %al,%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     114a <nextPut+0x4a>
jmp    115d <nextPut+0x5d>
jmp    114f <nextPut+0x4f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1122 <nextPut+0x22>
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextPut>:
mov    %edi,%ecx
mov    $0x80000000,%eax
xor    %rcx,%rax
mov    $0xffff,%ecx
nop
sub    $0x1,%ecx
setb   %dl
testb  $0x4,0x4(%rax)
jne    1120 <nextPut+0x20>
test   %dl,%dl
je     1110 <nextPut+0x10>
mov    %sil,0xc(%rax)
ret

LLVM IR (-O0):
define void @nextPut(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i8 %1, i8* %4
%7 = load i32, i32* %3
%8 = add i32 -2147483648, %7
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %5
store i32 0, i32* %6
br label %11
11: ; preds = %23, %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 65536
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 4
%17 = load volatile i8, i8* %16
%18 = zext i8 %17 to i32
%19 = and i32 %18, 4
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %14
br label %26
22: ; preds = %14
br label %23
23: ; preds = %22
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %11
26: ; preds = %21, %11
%27 = load i8, i8* %4
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i64 12
store volatile i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @nextPut(i32 %0, i8 signext %1) {
%3 = xor i32 %0, -2147483648
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = getelementptr inbounds i8, i8* %5, i64 4
br label %7
7: ; preds = %7, %2
%8 = phi i32 [ 0, %2 ], [ %12, %7 ]
%9 = load volatile i8, i8* %6
%10 = and i8 %9, 4
%11 = icmp ne i8 %10, 0
%12 = add nuw nsw i32 %8, 1
%13 = icmp eq i32 %12, 65536
%14 = select i1 %11, i1 true, i1 %13
br i1 %14, label %15, label %7
15: ; preds = %7
%16 = getelementptr inbounds i8, i8* %5, i64 12
store volatile i8 %1, i8* %16
ret void
}
/* Variables and functions */
int /*<<< orphan*/ connectionClose();
int /*<<< orphan*/ fifoClose();
long SIO1close() {
  fifoClose();
  connectionClose();
  return 0;
}


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

x86 assembly (clang, -O2):
<SIO1close>:
push   %rax
xor    %eax,%eax
call   1030 <fifoClose@plt>
xor    %eax,%eax
call   1040 <connectionClose@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @SIO1close() {
%1 = call i32 (...) @fifoClose()
%2 = call i32 (...) @connectionClose()
ret i64 0
}

LLVM IR (-O2):
define i64 @SIO1close() {
%1 = tail call i32 (...) @fifoClose()
%2 = tail call i32 (...) @connectionClose()
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(int);
bell() { outbyte(7); }


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

x86 assembly (clang, -O2):
<bell>:
mov    $0x7,%edi
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define i32 @bell() {
%1 = alloca i32
%2 = call i32 @outbyte(i32 7)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @bell() {
%1 = tail call i32 @outbyte(i32 7)
ret i32 undef
}
int hash(char *key) {
  int i, res;
  res = 0;
  for (i = 0; key[i] != '\0'; i++) {
    res += key[i];
  }
  return res % 609;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114b <hash+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <hash+0x16>
mov    -0x10(%rbp),%eax
mov    $0x261,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     1140 <hash+0x40>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
movslq %ecx,%rax
imul   $0x6b9ccb75,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x28,%rcx
add    %edx,%ecx
imul   $0x261,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ 0, %1 ]
%6 = phi i8 [ %12, %4 ], [ %2, %1 ]
%7 = phi i32 [ %9, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = add nsw i32 %7, %8
%10 = add nuw nsw i64 %5, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %9, 609
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
void *__builtin_arm_rsrp(char *);
void *rsrp_3() { return __builtin_arm_rsrp("0:1:2"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"0:1:2\00"
define i8* @rsrp_3() {
%1 = call i8* @__builtin_arm_rsrp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [6 x i8] c"0:1:2\00"
define i8* @rsrp_3() {
%1 = tail call i8* @__builtin_arm_rsrp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ Xcoord(int);
int /*<<< orphan*/ Ycoord(int);
int floor(int /*<<< orphan*/);
scalar_t__ pow(int /*<<< orphan*/, int);
int /*<<< orphan*/ sqrt(scalar_t__);
int Distance(int zI) {
  return floor(sqrt(pow(Ycoord(zI), 2) + pow(Xcoord(zI), 2)));
}


x86 assembly (clang, -O0):
<Distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <Ycoord@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Xcoord@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    -0x10(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
mov    %eax,%edi
call   1070 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Distance>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <Ycoord@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <Xcoord@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1050 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1060 <sqrt@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1070 <floor@plt>

LLVM IR (-O0):
define i32 @Distance(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @Ycoord(i32 %3)
%5 = call i64 @pow(i32 %4, i32 2)
%6 = load i32, i32* %2
%7 = call i32 @Xcoord(i32 %6)
%8 = call i64 @pow(i32 %7, i32 2)
%9 = add nsw i64 %5, %8
%10 = call i32 @sqrt(i64 %9)
%11 = call i32 @floor(i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @Distance(i32 %0) {
%2 = tail call i32 @Ycoord(i32 %0)
%3 = tail call i64 @pow(i32 %2, i32 2)
%4 = tail call i32 @Xcoord(i32 %0)
%5 = tail call i64 @pow(i32 %4, i32 2)
%6 = add nsw i64 %5, %3
%7 = tail call i32 @sqrt(i64 %6)
%8 = tail call i32 @floor(i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ mdaq_pwm_start(int);
void mdaq_pwm_ZVSFB_start(void) {
  mdaq_pwm_start(0);
  mdaq_pwm_start(1);
  mdaq_pwm_start(2);
  mdaq_pwm_start(3);
}


x86 assembly (clang, -O0):
<mdaq_pwm_ZVSFB_start>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <mdaq_pwm_start@plt>
mov    $0x1,%edi
call   1030 <mdaq_pwm_start@plt>
mov    $0x2,%edi
call   1030 <mdaq_pwm_start@plt>
mov    $0x3,%edi
call   1030 <mdaq_pwm_start@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdaq_pwm_ZVSFB_start>:
push   %rax
xor    %edi,%edi
call   1030 <mdaq_pwm_start@plt>
mov    $0x1,%edi
call   1030 <mdaq_pwm_start@plt>
mov    $0x2,%edi
call   1030 <mdaq_pwm_start@plt>
mov    $0x3,%edi
pop    %rax
jmp    1030 <mdaq_pwm_start@plt>

LLVM IR (-O0):
define void @mdaq_pwm_ZVSFB_start() {
%1 = call i32 @mdaq_pwm_start(i32 0)
%2 = call i32 @mdaq_pwm_start(i32 1)
%3 = call i32 @mdaq_pwm_start(i32 2)
%4 = call i32 @mdaq_pwm_start(i32 3)
ret void
}

LLVM IR (-O2):
define void @mdaq_pwm_ZVSFB_start() {
%1 = tail call i32 @mdaq_pwm_start(i32 0)
%2 = tail call i32 @mdaq_pwm_start(i32 1)
%3 = tail call i32 @mdaq_pwm_start(i32 2)
%4 = tail call i32 @mdaq_pwm_start(i32 3)
ret void
}