xunge/DecIR huggingface dataset:
int test_imm_F8uint16_reg(unsigned short val) {
  return ((val) & (-0xF8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F8uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff08,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F8uint16_reg>:
test   $0xff08,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F8uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -248
%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_F8uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -248
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
void version() {
  printf("'ga_calc_dist' in genome analysis tools version: %d.%d.%d\n", 1, 0,
         0);
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"'ga_calc_dist' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [59 x i8] c"'ga_calc_dist' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void nl_dvector_free(double *v) { free(v); }


x86 assembly (clang, -O0):
<nl_dvector_free>:
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):
<nl_dvector_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @nl_dvector_free(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ absolutelongx();
int /*<<< orphan*/ readmemw65816(int /*<<< orphan*/);
int /*<<< orphan*/ sbc16(int /*<<< orphan*/);
void sbcLongx16(void) { sbc16(readmemw65816(absolutelongx())); }


x86 assembly (clang, -O0):
<sbcLongx16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <absolutelongx@plt>
mov    %eax,%edi
call   1030 <readmemw65816@plt>
mov    %eax,%edi
call   1050 <sbc16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbcLongx16>:
push   %rax
xor    %eax,%eax
call   1040 <absolutelongx@plt>
mov    %eax,%edi
call   1030 <readmemw65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <sbc16@plt>

LLVM IR (-O0):
define void @sbcLongx16() {
%1 = call i32 (...) @absolutelongx()
%2 = call i32 @readmemw65816(i32 %1)
%3 = call i32 @sbc16(i32 %2)
ret void
}

LLVM IR (-O2):
define void @sbcLongx16() {
%1 = tail call i32 (...) @absolutelongx()
%2 = tail call i32 @readmemw65816(i32 %1)
%3 = tail call i32 @sbc16(i32 %2)
ret void
}
void av_fft_calc() {}


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

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

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

LLVM IR (-O2):
define void @av_fft_calc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_panic__();
void die(const char *fmt, ...) { __coverity_panic__(); }


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

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

LLVM IR (-O0):
define void @die(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @__coverity_panic__()
ret void
}

LLVM IR (-O2):
define void @die(i8* nocapture readnone %0, ...) {
%2 = tail call i32 (...) @__coverity_panic__()
ret void
}
void gtk_accel_label_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_label_new() {
ret void
}
void Aflushlog(void) {}


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

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

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

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

/* Variables and functions */
void funlockfile(FILE *fp) {}


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

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

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

LLVM IR (-O2):
define void @funlockfile(i32* nocapture %0) {
ret void
}
/* Variables and functions */
void abort();
int f();
main() {
  int i;
  i = f() > 2;
  ((i == 1) ? (void)0 : abort());
  int a = 5, b = 2;
  (((a && b) == 1) ? (void)0 : abort());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
cmp    $0x2,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1153 <main+0x33>
jmp    1158 <main+0x38>
call   1030 <abort@plt>
movl   $0x5,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
je     117f <main+0x5f>
cmpl   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
jne    1195 <main+0x75>
jmp    119a <main+0x7a>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
cmp    $0x2,%eax
jle    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @f()
%6 = icmp sgt i32 %5, 2
%7 = zext i1 %6 to i32
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %0
br label %13
11: ; preds = %0
unreachable
12: ; No predecessors!
br label %13
13: ; preds = %12, %10
store i32 5, i32* %3
store i32 2, i32* %4
%14 = load i32, i32* %3
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 0
br label %19
19: ; preds = %16, %13
%20 = phi i1 [ false, %13 ], [ %18, %16 ]
%21 = zext i1 %20 to i32
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %24
23: ; preds = %19
br label %26
24: ; preds = %19
unreachable
25: ; No predecessors!
br label %26
26: ; preds = %25, %23
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp sgt i32 %1, 2
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ push(char *);
void push_nil() { push(L"nil"); }


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

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

LLVM IR (-O0):
@.str = [4 x i32] [i32 110, i32 105, i32 108, i32 0]
define void @push_nil() {
%1 = call i32 @push(i8* bitcast ([4 x i32]* @.str to i8*))
ret void
}

LLVM IR (-O2):
@.str = [4 x i32] [i32 110, i32 105, i32 108, i32 0]
define void @push_nil() {
%1 = tail call i32 @push(i8* bitcast ([4 x i32]* @.str to i8*))
ret void
}
/* Variables and functions */
int CHAR_BIT;
unsigned rightrot(unsigned x, int n) {
  unsigned x_right = x >> n;
  unsigned x_left = x << ((sizeof(unsigned) * CHAR_BIT) - n);
  x = x_right | x_left;
  return x;
}


x86 assembly (clang, -O0):
<rightrot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec1(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
movslq -0x8(%rbp),%rdx
sub    %rdx,%rcx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightrot>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
mov    0x2ed3(%rip),%rdx
mov    (%rdx),%edx
shl    $0x2,%edx
sub    %esi,%edx
mov    %edx,%ecx
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @rightrot(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = lshr i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* @CHAR_BIT
%12 = sext i32 %11 to i64
%13 = mul i64 4, %12
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = sub i64 %13, %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %10, %17
store i32 %18, i32* %6
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = or i32 %19, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @rightrot(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = load i32, i32* @CHAR_BIT
%5 = shl i32 %4, 2
%6 = sub i32 %5, %1
%7 = shl i32 %0, %6
%8 = or i32 %7, %3
ret i32 %8
}
void named_back_reference2nbrStart_inNbr_nbrEnd() {}


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

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

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

LLVM IR (-O2):
define void @named_back_reference2nbrStart_inNbr_nbrEnd() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_86() {
  Assert_real((isqrt(86) == 9),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              435, ("Integer square root of 86 should be 9"));
}


x86 assembly (clang, -O0):
<t_sqrt_86>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56,%edi
call   1030 <isqrt@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x1b3,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_86>:
push   %rax
mov    $0x56,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x1b3,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 86 should be 9\00"
define void @t_sqrt_86() {
%1 = call i32 @isqrt(i32 86)
%2 = icmp eq i32 %1, 9
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 86 should be 9\00"
define void @t_sqrt_86() {
%1 = tail call i32 @isqrt(i32 86)
%2 = icmp eq i32 %1, 9
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void MyFunc() { printf("\nDid it"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\0ADid it\00"
define void @MyFunc() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0ADid it\00"
define void @MyFunc() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
void ExttConfigurationAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttConfigurationAuxTable() {
ret void
}
int st_strhash(char *string, int modulus) {
  int val = 0;
  int c;
  while ((c = *string++) != '\0') {
    val = val * 997 + c;
  }
  return ((val < 0) ? -val : val) % modulus;
}


x86 assembly (clang, -O0):
<st_strhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1142 <st_strhash+0x42>
imul   $0x3e5,-0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <st_strhash+0x12>
cmpl   $0x0,-0x10(%rbp)
jge    1159 <st_strhash+0x59>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115f <st_strhash+0x5f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_strhash>:
mov    (%rdi),%al
test   %al,%al
je     1128 <st_strhash+0x28>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
imul   $0x3e5,%ecx,%ecx
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <st_strhash+0x10>
jmp    112a <st_strhash+0x2a>
xor    %ecx,%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @st_strhash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i32 [ %12, %5 ], [ 0, %2 ]
%9 = sext i8 %6 to i32
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = mul nsw i32 %8, 997
%12 = add nsw i32 %11, %9
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %12, %5 ]
%17 = tail call i32 @llvm.abs.i32(i32 %16, i1 true)
%18 = srem i32 %17, %1
ret i32 %18
}
int bfun(y, per)
double y;
int per;
{
  if (y < .333334)
    return (0);
  return ((int)(2.79 * 255 * sqrt((1.05 - y) * (y - .333333333))));
}


x86 assembly (clang, -O0):
<bfun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  0xed8(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113f <bfun+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    117c <bfun+0x6c>
movsd  0xed1(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xeb7(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe97(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfun>:
push   %rax
xor    %eax,%eax
movsd  0xee5(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     115a <bfun+0x4a>
movsd  0xedf(%rip),%xmm1
subsd  %xmm0,%xmm1
addsd  0xedb(%rip),%xmm0
mulsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1149 <bfun+0x39>
sqrtsd %xmm0,%xmm0
jmp    114e <bfun+0x3e>
call   1030 <sqrt@plt>
mulsd  0xec2(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bfun(double %0, i32 %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
%6 = load double, double* %4
%7 = fcmp olt double %6, 3.333340e-01
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %18
9: ; preds = %2
%10 = load double, double* %4
%11 = fsub double 1.050000e+00, %10
%12 = load double, double* %4
%13 = fsub double %12, 0x3FD5555554F9B516
%14 = fmul double %11, %13
%15 = call double @sqrt(double %14)
%16 = fmul double 7.114500e+02, %15
%17 = fptosi double %16 to i32
store i32 %17, i32* %3
br label %18
18: ; preds = %9, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @bfun(double %0, i32 %1) {
%3 = fcmp olt double %0, 3.333340e-01
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = fsub double 1.050000e+00, %0
%6 = fadd double %0, 0xBFD5555554F9B516
%7 = fmul double %5, %6
%8 = tail call double @sqrt(double %7)
%9 = fmul double %8, 7.114500e+02
%10 = fptosi double %9 to i32
br label %11
11: ; preds = %2, %4
%12 = phi i32 [ %10, %4 ], [ 0, %2 ]
ret i32 %12
}
void SDIO_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @SDIO_IRQHandler() {
ret void
}
int test_imm_3Bint16_mem(short *val) {
  return ((*val) & (0x3B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_3Bint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 59
%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_3Bint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 59
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned item_hash(int item) { return (unsigned)item; }


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

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

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

LLVM IR (-O2):
define i32 @item_hash(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
main(int argc, char **argv) { exit(1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct vlan_dev_info {
  int dummy;
};
struct net_device {
  int dummy;
};

/* Variables and functions */
struct vlan_dev_info *netdev_priv(struct net_device const *);
struct vlan_dev_info *vlan_dev_info(const struct net_device *dev) {
  return netdev_priv(dev);
}


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

x86 assembly (clang, -O2):
<vlan_dev_info>:
jmp    1030 <netdev_priv@plt>

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

LLVM IR (-O2):
%struct.vlan_dev_info = type { i32 }
%struct.net_device = type { i32 }
define %struct.vlan_dev_info* @vlan_dev_info(%struct.net_device* %0) {
%2 = tail call %struct.vlan_dev_info* @netdev_priv(%struct.net_device* %0)
ret %struct.vlan_dev_info* %2
}
void quociresto(int dividendo, int divisor, int *quociente, int *resto) {
  *quociente = 0;
  *resto = dividendo;
  while (*resto >= divisor) {
    *resto -= divisor;
    ++(*quociente);
  }
}


x86 assembly (clang, -O0):
<quociresto>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x4(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     1151 <quociresto+0x51>
mov    -0x8(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1125 <quociresto+0x25>
pop    %rbp
ret

x86 assembly (clang, -O2):
<quociresto>:
movl   $0x0,(%rdx)
mov    %edi,(%rcx)
cmp    %esi,%edi
jl     111d <quociresto+0x1d>
nopl   0x0(%rax)
sub    %esi,%edi
mov    %edi,(%rcx)
addl   $0x1,(%rdx)
mov    (%rcx),%edi
cmp    %esi,%edi
jge    1110 <quociresto+0x10>
ret

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

LLVM IR (-O2):
define void @quociresto(i32 %0, i32 %1, i32* nocapture %2, i32* nocapture %3) {
store i32 0, i32* %2
store i32 %0, i32* %3
%5 = icmp slt i32 %0, %1
br i1 %5, label %13, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %11, %6 ], [ %0, %4 ]
%8 = sub nsw i32 %7, %1
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, %1
br i1 %12, label %13, label %6
13: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_ContentDirectory_GetTransferProgress(void *,
                                                                     char *,
                                                                     char *,
                                                                     char *);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPContentDirectory_GetTransferProgress(void *upnptoken,
                                              unsigned int TransferID) {
  printf("Invoke: UPnPContentDirectory_GetTransferProgress(%u);\r\n",
         TransferID);
  UPnPResponse_ContentDirectory_GetTransferProgress(
      upnptoken, "Sample String", "Sample String", "Sample String");
}


x86 assembly (clang, -O0):
<UPnPContentDirectory_GetTransferProgress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeef(%rip),%rcx
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1040 <UPnPResponse_ContentDirectory_GetTransferProgress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPContentDirectory_GetTransferProgress>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf01(%rip),%rcx
mov    %rbx,%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
pop    %rbx
jmp    1040 <UPnPResponse_ContentDirectory_GetTransferProgress@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Invoke: UPnPContentDirectory_GetTransferProgress(%u);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UPnPContentDirectory_GetTransferProgress(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_ContentDirectory_GetTransferProgress(i8* %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Invoke: UPnPContentDirectory_GetTransferProgress(%u);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UPnPContentDirectory_GetTransferProgress(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_ContentDirectory_GetTransferProgress(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int read4FromEco(unsigned char *);
void conv4FromEcoToNative(unsigned char *p) {
  unsigned int data;
  data = read4FromEco(p);
  *(unsigned int *)p = data;
}


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

x86 assembly (clang, -O2):
<conv4FromEcoToNative>:
push   %rbx
mov    %rdi,%rbx
call   1030 <read4FromEco@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @conv4FromEcoToNative(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @read4FromEco(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @conv4FromEcoToNative(i8* %0) {
%2 = tail call i32 @read4FromEco(i8* %0)
%3 = bitcast i8* %0 to i32*
store i32 %2, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ A_REVERSE;
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ stub1(int /*<<< orphan*/);
void nc_highlight(int on) { (on ? attron : attroff)(A_REVERSE); }


x86 assembly (clang, -O0):
<nc_highlight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    0x2eb3(%rip),%rax
mov    0x2ebc(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    0x2eb6(%rip),%rcx
mov    (%rcx),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc_highlight>:
test   %edi,%edi
jne    110d <nc_highlight+0xd>
mov    0x2ebd(%rip),%rax
jmp    1114 <nc_highlight+0x14>
mov    0x2ec4(%rip),%rax
mov    0x2ec5(%rip),%rcx
mov    (%rcx),%edi
jmp    *%rax

LLVM IR (-O0):
@A_REVERSE = global i32 0
define void @nc_highlight(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 (i32)* @attron, i32 (i32)* @attroff
%7 = load i32, i32* @A_REVERSE
%8 = call i32 %6(i32 %7)
ret void
}

LLVM IR (-O2):
@A_REVERSE = global i32 0
define void @nc_highlight(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 (i32)* @attroff, i32 (i32)* @attron
%4 = load i32, i32* @A_REVERSE
%5 = tail call i32 %3(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(void) { fprintf(stderr, "%s:\n\n", "convert_config"); }


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xedb(%rip),%rdx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xedf(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%s:\0A\0A\00"
@.str.1 = [15 x i8] c"convert_config\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%s:\0A\0A\00"
@.str.1 = [15 x i8] c"convert_config\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t get_tag_size(unsigned number) {
  if (number < (1 << 4))
    return 1;
  else if (number < (1 << 11))
    return 2;
  else if (number < (1 << 18))
    return 3;
  else if (number < (1 << 25))
    return 4;
  else
    return 5;
}


x86 assembly (clang, -O0):
<get_tag_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jae    111e <get_tag_size+0x1e>
movq   $0x1,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
cmpl   $0x800,-0xc(%rbp)
jae    1138 <get_tag_size+0x38>
movq   $0x2,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
cmpl   $0x40000,-0xc(%rbp)
jae    1152 <get_tag_size+0x52>
movq   $0x3,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
cmpl   $0x2000000,-0xc(%rbp)
jae    116c <get_tag_size+0x6c>
movq   $0x4,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
movq   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tag_size>:
mov    $0x1,%eax
cmp    $0x10,%edi
jb     1133 <get_tag_size+0x33>
mov    $0x2,%eax
cmp    $0x800,%edi
jb     1133 <get_tag_size+0x33>
mov    $0x3,%eax
cmp    $0x40000,%edi
jb     1133 <get_tag_size+0x33>
cmp    $0x2000000,%edi
mov    $0x5,%eax
sbb    $0x0,%rax
ret

LLVM IR (-O0):
define i64 @get_tag_size(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 16
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %20
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ult i32 %8, 2048
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 2, i64* %2
br label %20
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp ult i32 %12, 262144
br i1 %13, label %14, label %15
14: ; preds = %11
store i64 3, i64* %2
br label %20
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp ult i32 %16, 33554432
br i1 %17, label %18, label %19
18: ; preds = %15
store i64 4, i64* %2
br label %20
19: ; preds = %15
store i64 5, i64* %2
br label %20
20: ; preds = %19, %18, %14, %10, %6
%21 = load i64, i64* %2
ret i64 %21
}

LLVM IR (-O2):
define i64 @get_tag_size(i32 %0) {
%2 = icmp ult i32 %0, 16
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 2048
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 262144
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 33554432
%9 = select i1 %8, i64 4, i64 5
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i64 [ 1, %1 ], [ 2, %3 ], [ 3, %5 ], [ %9, %7 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("\n"
       "****************************************************************\n"
       " This example program was compiled without libsndfile \n"
       " (http://www.zip.com.au/~erikd/libsndfile/).\n"
       " It is therefore completely broken and non-functional.\n"
       "****************************************************************\n"
       "\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [288 x i8] c"\0A****************************************************************\0A This example program was compiled without libsndfile \0A (http://www.zip.com.au/~erikd/libsndfile/).\0A It is therefore completely broken and non-functional.\0A****************************************************************\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([288 x i8], [288 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [288 x i8] c"\0A****************************************************************\0A This example program was compiled without libsndfile \0A (http://www.zip.com.au/~erikd/libsndfile/).\0A It is therefore completely broken and non-functional.\0A****************************************************************\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([288 x i8], [288 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
double fd2mjd(string)
char *string;
{ return (fd2jd(string) - 2400000.5); }


x86 assembly (clang, -O0):
<fd2mjd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  0xecd(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd2mjd>:
push   %rax
xor    %eax,%eax
call   1030 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
addsd  0xedc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fd2mjd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %3)
%5 = sitofp i32 %4 to double
%6 = fsub double %5, 0x41424F8040000000
ret double %6
}

LLVM IR (-O2):
define double @fd2mjd(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %0)
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 0xC1424F8040000000
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ si475x_set_property(int, int);
void si475xFMRX_hardware_cfg(void) { si475x_set_property(0x0000, 0x0005); }


x86 assembly (clang, -O0):
<si475xFMRX_hardware_cfg>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <si475x_set_property@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<si475xFMRX_hardware_cfg>:
xor    %edi,%edi
mov    $0x5,%esi
jmp    1030 <si475x_set_property@plt>

LLVM IR (-O0):
define void @si475xFMRX_hardware_cfg() {
%1 = call i32 @si475x_set_property(i32 0, i32 5)
ret void
}

LLVM IR (-O2):
define void @si475xFMRX_hardware_cfg() {
%1 = tail call i32 @si475x_set_property(i32 0, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file1();
int /*<<< orphan*/ file2();
int /*<<< orphan*/ file3();
int /*<<< orphan*/ file4();
int /*<<< orphan*/ file5();
int /*<<< orphan*/ printf(char *);
int main() {
  file1();
  file2();
  file3();
  file4();
  file5();
  printf("All Functions Executed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <file1@plt>
mov    $0x0,%al
call   1030 <file2@plt>
mov    $0x0,%al
call   1060 <file3@plt>
mov    $0x0,%al
call   1040 <file4@plt>
mov    $0x0,%al
call   1080 <file5@plt>
lea    0xe67(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <file1@plt>
xor    %eax,%eax
call   1040 <file2@plt>
xor    %eax,%eax
call   1060 <file3@plt>
xor    %eax,%eax
call   1050 <file4@plt>
xor    %eax,%eax
call   1080 <file5@plt>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"All Functions Executed\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @file1()
%3 = call i32 (...) @file2()
%4 = call i32 (...) @file3()
%5 = call i32 (...) @file4()
%6 = call i32 (...) @file5()
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"All Functions Executed\00"
define i32 @main() {
%1 = tail call i32 (...) @file1()
%2 = tail call i32 (...) @file2()
%3 = tail call i32 (...) @file3()
%4 = tail call i32 (...) @file4()
%5 = tail call i32 (...) @file5()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, float);
int main() {
  int save1 = 5, save2 = 2;
  float average;
  int total;
  total = save1 + save2;
  average = total / 2.0;
  printf("Total of %d and %d = %d", save1, save2, total);
  printf("\nAverage of %d and %d = %.1f", save1, save2, average);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xebd(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
cvtsi2ssl -0x14(%rbp),%xmm0
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movss  -0x10(%rbp),%xmm0
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movss  0xee0(%rip),%xmm0
mov    $0x5,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
movss  0xec6(%rip),%xmm0
mov    $0x5,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Total of %d and %d = %d\00"
@.str.1 = [29 x i8] c"\0AAverage of %d and %d = %.1f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 2.000000e+00
%12 = fptrunc double %11 to float
store float %12, float* %4
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = sitofp i32 %15 to float
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, float %16)
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load float, float* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %19, float %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Total of %d and %d = %d\00"
@.str.1 = [29 x i8] c"\0AAverage of %d and %d = %.1f\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 5, i32 2, float 7.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 2, float 3.500000e+00)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

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


x86 assembly (clang, -O0):
<rgph_u32_xxh32s_u32a>:
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_xxh32s_data32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32_xxh32s_u32a>:
jmp    1030 <rgph_u32_xxh32s_data32@plt>

LLVM IR (-O0):
define i32 @rgph_u32_xxh32s_u32a(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_xxh32s_data32(i32* %7, i64 %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @rgph_u32_xxh32s_u32a(i32* %0, i64 %1, i64 %2) {
%4 = tail call i32 @rgph_u32_xxh32s_data32(i32* %0, i64 %1, i64 %2)
ret i32 %4
}
void gtk_clipboard_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_clipboard_get_type() {
ret void
}
void debug_show_all_locks(void) {}


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

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

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

LLVM IR (-O2):
define void @debug_show_all_locks() {
ret void
}
double JHKeyframeAnimationFunctionEaseInBack(double t, double b, double c,
                                             double d) {
  const double s = 1.70158;
  return c * (t /= d) * t * ((s + 1) * t - s) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseInBack>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,-0x8(%rbp)
mulsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xead(%rip),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xea9(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseInBack>:
divsd  %xmm3,%xmm0
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  0xeec(%rip),%xmm0
addsd  0xeec(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionEaseInBack(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
store double 1.701580e+00, double* %9
%10 = load double, double* %7
%11 = load double, double* %8
%12 = load double, double* %5
%13 = fdiv double %12, %11
store double %13, double* %5
%14 = fmul double %10, %13
%15 = load double, double* %5
%16 = fmul double %14, %15
%17 = load double, double* %5
%18 = call double @llvm.fmuladd.f64(double 2.701580e+00, double %17, double -1.701580e+00)
%19 = load double, double* %6
%20 = call double @llvm.fmuladd.f64(double %16, double %18, double %19)
ret double %20
}

LLVM IR (-O2):
define double @JHKeyframeAnimationFunctionEaseInBack(double %0, double %1, double %2, double %3) {
%5 = fdiv double %0, %3
%6 = fmul double %5, %2
%7 = fmul double %5, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double 2.701580e+00, double -1.701580e+00)
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %1)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ findtarget(int, char *);
xltoplevel(void) { findtarget(64, "no top level"); }


x86 assembly (clang, -O0):
<xltoplevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x40,%edi
lea    0xedc(%rip),%rsi
call   1030 <findtarget@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xltoplevel>:
lea    0xee9(%rip),%rsi
mov    $0x40,%edi
jmp    1030 <findtarget@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"no top level\00"
define i32 @xltoplevel() {
%1 = alloca i32
%2 = call i32 @findtarget(i32 64, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [13 x i8] c"no top level\00"
define i32 @xltoplevel() {
%1 = tail call i32 @findtarget(i32 64, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("&\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"&\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [2 x i8] c"&\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}