xunge/DecIR huggingface dataset:
/* Type definitions */
struct t_relay_dogechat_msg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ relay_dogechat_msg_add_bytes(struct t_relay_dogechat_msg *,
                                                char *, int);
void relay_dogechat_msg_add_char(struct t_relay_dogechat_msg *msg, char c) {
  relay_dogechat_msg_add_bytes(msg, &c, 1);
}


x86 assembly (clang, -O0):
<relay_dogechat_msg_add_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <relay_dogechat_msg_add_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<relay_dogechat_msg_add_char>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <relay_dogechat_msg_add_bytes@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.t_relay_dogechat_msg = type { i32 }
define void @relay_dogechat_msg_add_char(%struct.t_relay_dogechat_msg* %0, i8 signext %1) {
%3 = alloca %struct.t_relay_dogechat_msg*
%4 = alloca i8
store %struct.t_relay_dogechat_msg* %0, %struct.t_relay_dogechat_msg** %3
store i8 %1, i8* %4
%5 = load %struct.t_relay_dogechat_msg*, %struct.t_relay_dogechat_msg** %3
%6 = call i32 @relay_dogechat_msg_add_bytes(%struct.t_relay_dogechat_msg* %5, i8* %4, i32 1)
ret void
}

LLVM IR (-O2):
%struct.t_relay_dogechat_msg = type { i32 }
define void @relay_dogechat_msg_add_char(%struct.t_relay_dogechat_msg* %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @relay_dogechat_msg_add_bytes(%struct.t_relay_dogechat_msg* %0, i8* %3, i32 1)
ret void
}
/* Variables and functions */
scalar_t__ Bar();
int main() { return Bar() != 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Bar@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Bar@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @Bar()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @Bar()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void rop3_19_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk1 = S | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_19_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_19_1_0>:
mov    (%rdi),%al
and    %al,%dl
or     %sil,%dl
not    %dl
and    %sil,%al
or     %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_19_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = trunc i32 %38 to i8
%40 = load i8*, i8** %4
store i8 %39, i8* %40
ret void
}

LLVM IR (-O2):
define void @rop3_19_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  long i = 0, max = 10000000000;
  printf("Start Perf Test in C");
  for (int i = 0; i < max; i++) {
  }
  printf("End Perf Test in C");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movabs $0x2540be400,%rax
mov    %rax,-0x18(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1169 <main+0x59>
jmp    115b <main+0x4b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1148 <main+0x38>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Start Perf Test in C\00"
@.str.1 = [19 x i8] c"End Perf Test in C\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i32 0, i32* %1
store i64 0, i64* %2
store i64 10000000000, i64* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %6
6: ; preds = %12, %0
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = load i64, i64* %3
%10 = icmp slt i64 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %6
br label %12
12: ; preds = %11
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
br label %6
15: ; preds = %6
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str = [21 x i8] c"Start Perf Test in C\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int main() {
  char buff[12];
  gets(buff);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xc(%rsp),%rdi
call   1030 <gets@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
ret i32 0
}
void unused_internal_func2(void) {}


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

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

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

LLVM IR (-O2):
define void @unused_internal_func2() {
ret void
}
void null_intr(void) {}


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

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

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

LLVM IR (-O2):
define void @null_intr() {
ret void
}
/* Variables and functions */
char *tgetstr(char *name, char **area) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @tgetstr(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @tgetstr(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret i8* null
}
unsigned int div_ceil(unsigned int a, unsigned int b) {
  if (!a)
    return 0;
  return ((a - 1) / b) + 1;
}


x86 assembly (clang, -O0):
<div_ceil>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <div_ceil+0x20>
movl   $0x0,-0x4(%rbp)
jmp    1131 <div_ceil+0x31>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
xor    %edx,%edx
divl   -0xc(%rbp)
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_ceil>:
test   %edi,%edi
je     1111 <div_ceil+0x11>
add    $0xffffffff,%edi
mov    %edi,%eax
xor    %edx,%edx
div    %esi
add    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @div_ceil(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = add i32 %0, -1
%6 = udiv i32 %5, %1
%7 = add nuw i32 %6, 1
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
ret i32 %9
}
int ld_lt_mm1(long double *a1, long double *a2) { return (((*a1) < (*a2))); }


x86 assembly (clang, -O0):
<ld_lt_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_lt_mm1>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
seta   %al
ret

LLVM IR (-O0):
define i32 @ld_lt_mm1(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp olt x86_fp80 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_lt_mm1(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp olt x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
unsigned char gf16_mul(unsigned char, unsigned char);
unsigned char gf16_squ(unsigned char);
unsigned char gf16_inv(unsigned char a) {
  unsigned char a2 = gf16_squ(a);
  unsigned char a4 = gf16_squ(a2);
  unsigned char a8 = gf16_squ(a4);
  unsigned char a6 = gf16_mul(a4, a2);
  return gf16_mul(a8, a6);
}


x86 assembly (clang, -O0):
<gf16_inv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <gf16_squ@plt>
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%edi
call   1030 <gf16_squ@plt>
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%edi
call   1030 <gf16_squ@plt>
mov    %al,-0x4(%rbp)
mov    -0x3(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1040 <gf16_mul@plt>
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%al
movzbl %al,%edi
movzbl -0x5(%rbp),%esi
call   1040 <gf16_mul@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf16_inv>:
push   %rbp
push   %r14
push   %rbx
call   1030 <gf16_squ@plt>
movzbl %al,%ebx
mov    %ebx,%edi
call   1030 <gf16_squ@plt>
movzbl %al,%ebp
mov    %ebp,%edi
call   1030 <gf16_squ@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <gf16_mul@plt>
movzbl %al,%esi
movzbl %r14b,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <gf16_mul@plt>

LLVM IR (-O0):
define zeroext i8 @gf16_inv(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %2
%7 = load i8, i8* %2
%8 = call zeroext i8 @gf16_squ(i8 zeroext %7)
store i8 %8, i8* %3
%9 = load i8, i8* %3
%10 = call zeroext i8 @gf16_squ(i8 zeroext %9)
store i8 %10, i8* %4
%11 = load i8, i8* %4
%12 = call zeroext i8 @gf16_squ(i8 zeroext %11)
store i8 %12, i8* %5
%13 = load i8, i8* %4
%14 = load i8, i8* %3
%15 = call zeroext i8 @gf16_mul(i8 zeroext %13, i8 zeroext %14)
store i8 %15, i8* %6
%16 = load i8, i8* %5
%17 = load i8, i8* %6
%18 = call zeroext i8 @gf16_mul(i8 zeroext %16, i8 zeroext %17)
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @gf16_inv(i8 zeroext %0) {
%2 = tail call zeroext i8 @gf16_squ(i8 zeroext %0)
%3 = tail call zeroext i8 @gf16_squ(i8 zeroext %2)
%4 = tail call zeroext i8 @gf16_squ(i8 zeroext %3)
%5 = tail call zeroext i8 @gf16_mul(i8 zeroext %3, i8 zeroext %2)
%6 = tail call zeroext i8 @gf16_mul(i8 zeroext %4, i8 zeroext %5)
ret i8 %6
}
int passes_loc_constraints_below_slope(int **walk_points, int curr_num_pts,
                                       double slope) {
  int x = walk_points[curr_num_pts - 1][0];
  int y = walk_points[curr_num_pts - 1][1];
  if (y <= slope * x - 1e-8)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<passes_loc_constraints_below_slope>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x28(%rbp)
cvtsi2sdl -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xea8(%rip),%xmm2
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1172 <passes_loc_constraints_below_slope+0x72>
movl   $0x1,-0x4(%rbp)
jmp    1179 <passes_loc_constraints_below_slope+0x79>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<passes_loc_constraints_below_slope>:
movslq %esi,%rax
mov    -0x8(%rdi,%rax,8),%rax
cvtsi2sdl 0x4(%rax),%xmm1
cvtsi2sdl (%rax),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xee3(%rip),%xmm2
xor    %eax,%eax
ucomisd %xmm1,%xmm2
setae  %al
ret

LLVM IR (-O0):
define i32 @passes_loc_constraints_below_slope(i32** %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32**
%6 = alloca i32
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
store i32** %0, i32*** %5
store i32 %1, i32* %6
store double %2, double* %7
%10 = load i32**, i32*** %5
%11 = load i32, i32* %6
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32*, i32** %10, i64 %13
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 0
%17 = load i32, i32* %16
store i32 %17, i32* %8
%18 = load i32**, i32*** %5
%19 = load i32, i32* %6
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32*, i32** %18, i64 %21
%23 = load i32*, i32** %22
%24 = getelementptr inbounds i32, i32* %23, i64 1
%25 = load i32, i32* %24
store i32 %25, i32* %9
%26 = load i32, i32* %9
%27 = sitofp i32 %26 to double
%28 = load double, double* %7
%29 = load i32, i32* %8
%30 = sitofp i32 %29 to double
%31 = call double @llvm.fmuladd.f64(double %28, double %30, double -1.000000e-08)
%32 = fcmp ole double %27, %31
br i1 %32, label %33, label %34
33: ; preds = %3
store i32 1, i32* %4
br label %35
34: ; preds = %3
store i32 0, i32* %4
br label %35
35: ; preds = %34, %33
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
define i32 @passes_loc_constraints_below_slope(i32** nocapture %0, i32 %1, double %2) {
%4 = add nsw i32 %1, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32*, i32** %0, i64 %5
%7 = load i32*, i32** %6
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %7, i64 1
%10 = load i32, i32* %9
%11 = sitofp i32 %10 to double
%12 = sitofp i32 %8 to double
%13 = tail call double @llvm.fmuladd.f64(double %2, double %12, double -1.000000e-08)
%14 = fcmp oge double %13, %11
%15 = zext i1 %14 to i32
ret i32 %15
}
int do_980() { return 980; }


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

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

LLVM IR (-O0):
define i32 @do_980() {
ret i32 980
}

LLVM IR (-O2):
define i32 @do_980() {
ret i32 980
}
int my_marker() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @my_marker() {
ret i32 1
}
float Linear(const float start, const float end, const float state) {
  return start + (end - start) * state;
}


x86 assembly (clang, -O0):
<Linear>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Linear>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Linear(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %6
%12 = call float @llvm.fmuladd.f32(float %10, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @Linear(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %4, float %2, float %0)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("This is a shared library test...");
  foo();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"This is a shared library test...\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"This is a shared library test...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @foo()
ret i32 0
}
/* Type definitions */
struct dirent {
  char *d_name;
};

/* Variables and functions */
int filter(const struct dirent *dir) { return (dir->d_name[0] == '.') ? 0 : 1; }


x86 assembly (clang, -O0):
<filter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x2e,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x2e,(%rcx)
setne  %al
ret

LLVM IR (-O0):
%struct.dirent = type { i8* }
define i32 @filter(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 46
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 0, i32 1
ret i32 %11
}

LLVM IR (-O2):
%struct.dirent = type { i8* }
define i32 @filter(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 46
%6 = zext i1 %5 to i32
ret i32 %6
}
int min2(int a, int b) {
  if (a > b)
    return b;
  return a;
}


x86 assembly (clang, -O0):
<min2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <min2+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min2+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min2>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min2(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct stat {
  int /*<<< orphan*/ st_mtime;
};

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, char const *);
int /*<<< orphan*/ stat(char *, struct stat *);
time_t get_file_last_modified_time(const char *dir, const char *file_name) {
  char f_path[1024];
  snprintf(f_path, 1024, "%s/%s", dir, file_name);
  struct stat new_FStat;
  stat(f_path, &new_FStat);
  return new_FStat.st_mtime;
}


x86 assembly (clang, -O0):
<get_file_last_modified_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    $0x400,%esi
lea    0xeb2(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x410(%rbp),%rdi
lea    -0x418(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x418(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_last_modified_time>:
push   %rbx
sub    $0x410,%rsp
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xecb(%rip),%rdx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1030 <snprintf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <stat@plt>
mov    0x8(%rsp),%eax
add    $0x410,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [6 x i8] c"%s/%s\00"
define i32 @get_file_last_modified_time(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
%6 = alloca %struct.stat
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @snprintf(i8* %7, i32 1024, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%12 = call i32 @stat(i8* %11, %struct.stat* %6)
%13 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%14 = load i32, i32* %13
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [6 x i8] c"%s/%s\00"
define i32 @get_file_last_modified_time(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = alloca %struct.stat
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 1024, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%7 = bitcast %struct.stat* %4 to i8*
%8 = call i32 @stat(i8* %5, %struct.stat* %4)
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%10 = load i32, i32* %9
ret i32 %10
}
short unsigned int deserializeShortUnsignedInt(void **buffer) {
  short unsigned int r = *(short unsigned int *)*buffer;
  *buffer += sizeof(short unsigned int);
  return r;
}


x86 assembly (clang, -O0):
<deserializeShortUnsignedInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<deserializeShortUnsignedInt>:
mov    (%rdi),%rcx
movzwl (%rcx),%eax
add    $0x2,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define zeroext i16 @deserializeShortUnsignedInt(i8** %0) {
%2 = alloca i8**
%3 = alloca i16
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i16*
%7 = load i16, i16* %6
store i16 %7, i16* %3
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = getelementptr i8, i8* %9, i64 2
store i8* %10, i8** %8
%11 = load i16, i16* %3
ret i16 %11
}

LLVM IR (-O2):
define zeroext i16 @deserializeShortUnsignedInt(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = bitcast i8* %2 to i16*
%4 = load i16, i16* %3
%5 = getelementptr i8, i8* %2, i64 2
store i8* %5, i8** %0
ret i16 %4
}
unsigned long StopStopwatch(unsigned long startticks) { return 1000; }


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

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

LLVM IR (-O0):
define i64 @StopStopwatch(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret i64 1000
}

LLVM IR (-O2):
define i64 @StopStopwatch(i64 %0) {
ret i64 1000
}
/* Variables and functions */
int listen(int, int);
int g_tcp_listen(int sck) { return listen(sck, 2); }


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

x86 assembly (clang, -O2):
<g_tcp_listen>:
mov    $0x2,%esi
jmp    1030 <listen@plt>

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

LLVM IR (-O2):
define i32 @g_tcp_listen(i32 %0) {
%2 = tail call i32 @listen(i32 %0, i32 2)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x02() {
  Assert_real((islower(2) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              15, ("islower should be 0 for 0x02"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x02\00"
define void @t_islower_0x02() {
%1 = tail call i64 @islower(i32 2)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 15, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EINTR;
int close(int);
int errno;
int safe_close(int fd) {
  while (close(fd) == -1) {
    if (errno != EINTR)
      return -errno;
  }
  return 0;
}


x86 assembly (clang, -O0):
<safe_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    115c <safe_close+0x4c>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    0x2e9c(%rip),%rcx
cmp    (%rcx),%eax
je     1157 <safe_close+0x47>
xor    %eax,%eax
mov    0x2e93(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <safe_close+0x53>
jmp    111b <safe_close+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_close>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%r14
mov    0x2eb3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1148 <safe_close+0x38>
mov    (%r14),%eax
cmp    (%r15),%eax
je     1130 <safe_close+0x20>
neg    %eax
jmp    114a <safe_close+0x3a>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i32 0
@EINTR = global i32 0
define i32 @safe_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %3
%6 = call i32 @close(i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i32, i32* @errno
%10 = load i32, i32* @EINTR
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* @errno
%14 = sub nsw i32 0, %13
store i32 %14, i32* %2
br label %17
15: ; preds = %8
br label %4
16: ; preds = %4
store i32 0, i32* %2
br label %17
17: ; preds = %16, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@errno = global i32 0
@EINTR = global i32 0
define i32 @safe_close(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i32 @close(i32 %0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = load i32, i32* @EINTR
%8 = icmp eq i32 %6, %7
br i1 %8, label %2, label %9
9: ; preds = %5
%10 = sub nsw i32 0, %6
br label %11
11: ; preds = %2, %9
%12 = phi i32 [ %10, %9 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ _s2priv_funab(float (*)(float *, float *), int, int, float,
                                 float, float, float, int /*<<< orphan*/, int,
                                 int, double, double);
void s2funxz(float (*fxz)(float *, float *), int nx, int nz, float xmin,
             float xmax, float zmin, float zmax, int ctl) {
  _s2priv_funab(fxz, nx, nz, xmin, xmax, zmin, zmax, 0, 2, ctl, 0.0, -1.0);
}


x86 assembly (clang, -O0):
<s2funxz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
movss  %xmm2,-0x1c(%rbp)
movss  %xmm3,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
mov    -0x24(%rbp),%r9d
xor    %ecx,%ecx
mov    $0x2,%r8d
xorps  %xmm4,%xmm4
movsd  0xe92(%rip),%xmm5
call   1030 <_s2priv_funab@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2funxz>:
mov    %ecx,%r9d
movsd  0xee5(%rip),%xmm5
xorps  %xmm4,%xmm4
xor    %ecx,%ecx
mov    $0x2,%r8d
jmp    1030 <_s2priv_funab@plt>

LLVM IR (-O0):
define void @s2funxz(float (float*, float*)* %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6, i32 %7) {
%9 = alloca float (float*, float*)*
%10 = alloca i32
%11 = alloca i32
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca i32
store float (float*, float*)* %0, float (float*, float*)** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store float %3, float* %12
store float %4, float* %13
store float %5, float* %14
store float %6, float* %15
store i32 %7, i32* %16
%17 = load float (float*, float*)*, float (float*, float*)** %9
%18 = load i32, i32* %10
%19 = load i32, i32* %11
%20 = load float, float* %12
%21 = load float, float* %13
%22 = load float, float* %14
%23 = load float, float* %15
%24 = load i32, i32* %16
%25 = call i32 @_s2priv_funab(float (float*, float*)* %17, i32 %18, i32 %19, float %20, float %21, float %22, float %23, i32 0, i32 2, i32 %24, double 0.000000e+00, double -1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @s2funxz(float (float*, float*)* %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6, i32 %7) {
%9 = tail call i32 @_s2priv_funab(float (float*, float*)* %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6, i32 0, i32 2, i32 %7, double 0.000000e+00, double -1.000000e+00)
ret void
}
void vmaxset(const void *ovmax) {}


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

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

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

LLVM IR (-O2):
define void @vmaxset(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t PWMIntStatus(uint32_t ui32Base, bool bMasked) {
  ASSERT((ui32Base == 0x40028000) || (ui32Base == 0x40029000));
  if (bMasked == true) {
    return ((*((volatile uint32_t *)(ui32Base + 0x0000001C))));
  } else {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000018))));
  }
}


x86 assembly (clang, -O0):
<PWMIntStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x40028000,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     113d <PWMIntStatus+0x2d>
cmpl   $0x40029000,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x1,-0xc(%rbp)
jne    1166 <PWMIntStatus+0x56>
mov    -0x8(%rbp),%eax
add    $0x1c,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <PWMIntStatus+0x63>
mov    -0x8(%rbp),%eax
add    $0x18,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMIntStatus>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40028000,%eax
sete   %dil
call   1030 <ASSERT@plt>
xor    %eax,%eax
cmp    $0x1,%ebx
sete   %al
lea    0x18(,%rax,4),%eax
movslq %ebp,%rcx
mov    (%rax,%rcx,1),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @PWMIntStatus(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp eq i32 %1, 1
%8 = select i1 %7, i32 28, i32 24
%9 = add nsw i32 %8, %0
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
ret i32 %12
}
void g2(void) { __typeof__(int[f2()]) x; }


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

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

LLVM IR (-O0):
define void @g2() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i32 (...) @f2()
%4 = zext i32 %3 to i64
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %1
%6 = alloca i32, i64 %4
store i64 %4, i64* %2
%7 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
define void @g2() {
%1 = tail call i32 (...) @f2()
ret void
}
void Host_HandlePrinterOutput(void) {}


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

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

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

LLVM IR (-O2):
define void @Host_HandlePrinterOutput() {
ret void
}
/* Variables and functions */
char *loggerStrNDup(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *loggerStrDup(const char *str_) {
  return loggerStrNDup(str_, strlen(str_));
}


x86 assembly (clang, -O0):
<loggerStrDup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <loggerStrNDup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loggerStrDup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <loggerStrNDup@plt>

LLVM IR (-O0):
define i8* @loggerStrDup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @loggerStrNDup(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @loggerStrDup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @loggerStrNDup(i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ _cxx__Unwind_Resume(void *);
void _Unwind_Resume(void *exc) { _cxx__Unwind_Resume(exc); }


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

x86 assembly (clang, -O2):
<_Unwind_Resume>:
jmp    1030 <_cxx__Unwind_Resume@plt>

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

LLVM IR (-O2):
define void @_Unwind_Resume(i8* %0) {
%2 = tail call i32 @_cxx__Unwind_Resume(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int _mm_comieq_sd(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_comieq_sd(__m128d A, __m128d B) { return _mm_comieq_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_comieq_sd>:
jmp    1030 <_mm_comieq_sd@plt>

LLVM IR (-O0):
define i32 @test_mm_comieq_sd(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 = call i32 @_mm_comieq_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_comieq_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_comieq_sd(i32 %0, i32 %1)
ret i32 %3
}
char *toupper_str(str)
char *str;
{
  static char temp_str[256];
  char *ptr;
  strcpy(temp_str, str);
  ptr = temp_str;
  while (*ptr = (char)toupper((int)*ptr))
    ptr++;
  return (temp_str);
}


x86 assembly (clang, -O0):
<toupper_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f09(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2efd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1172 <toupper_str+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1147 <toupper_str+0x27>
lea    0x2ec7(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper_str>:
push   %rbx
mov    %rdi,%rsi
lea    0x2f15(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rbx),%edi
call   1040 <toupper@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1140 <toupper_str+0x20>
lea    0x2ee7(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@toupper_str.temp_str = internal global [256 x i8] zeroinitializer
define i8* @toupper_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strcpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @toupper_str.temp_str, i64 0, i64 0), i8* %4)
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @toupper_str.temp_str, i64 0, i64 0), i8** %3
br label %6
6: ; preds = %14, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = call i32 @toupper(i32 %9)
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
store i8 %11, i8* %12
%13 = icmp ne i8 %11, 0
br i1 %13, label %14, label %17
14: ; preds = %6
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %6
17: ; preds = %6
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @toupper_str.temp_str, i64 0, i64 0)
}

LLVM IR (-O2):
@toupper_str.temp_str = internal global [256 x i8] zeroinitializer
define i8* @toupper_str(i8* nocapture %0) {
%2 = tail call i8* @strcpy(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @toupper_str.temp_str, i64 0, i64 0), i8* dereferenceable(1) %0)
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ getelementptr inbounds ([256 x i8], [256 x i8]* @toupper_str.temp_str, i64 0, i64 0), %1 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = tail call i32 @toupper(i32 %6)
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
%9 = icmp eq i8 %8, 0
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @toupper_str.temp_str, i64 0, i64 0)
}
void Uns_BS_TYPE_dummy__() { ; }


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

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

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

LLVM IR (-O2):
define void @Uns_BS_TYPE_dummy__() {
ret void
}
/* Variables and functions */
int nmea_has_checksum(const char *sentence, size_t length) {
  if ('*' == sentence[length - 5]) {
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<nmea_has_checksum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x5,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x2a,%eax
cmp    %ecx,%eax
jne    1135 <nmea_has_checksum+0x35>
movl   $0x0,-0x4(%rbp)
jmp    113c <nmea_has_checksum+0x3c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmea_has_checksum>:
xor    %eax,%eax
cmpb   $0x2a,-0x5(%rsi,%rdi,1)
setne  %al
neg    %eax
ret

LLVM IR (-O0):
define i32 @nmea_has_checksum(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = load i64, i64* %5
%8 = sub i64 %7, 5
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 42, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %15
14: ; preds = %2
store i32 -1, i32* %3
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @nmea_has_checksum(i8* nocapture %0, i64 %1) {
%3 = add i64 %1, -5
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 42
%7 = sext i1 %6 to i32
ret i32 %7
}
int omap_dvfs_register_device(struct device *dev, char *voltdm_name,
                              char *clk_name) {
  return 0;
}


x86 assembly (clang, -O0):
<omap_dvfs_register_device>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device = type opaque
define i32 @omap_dvfs_register_device(%struct.device* %0, i8* %1, i8* %2) {
%4 = alloca %struct.device*
%5 = alloca i8*
%6 = alloca i8*
store %struct.device* %0, %struct.device** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @omap_dvfs_register_device(%struct.device* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
__attribute__((no, noclone)) int f2(int x, int y) { return x - y; }


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

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

LLVM IR (-O0):
define i32 @f2(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printOct(int number) {
  if (number > 0 && number / 8 != 0)
    printOct(number / 8);
  printf("%i", number % 8);
}


x86 assembly (clang, -O0):
<printOct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    115b <printOct+0x3b>
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     115b <printOct+0x3b>
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <printOct@plt>
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printOct>:
push   %rbx
mov    %edi,%ebx
cmp    $0x8,%edi
jl     1132 <printOct+0x12>
mov    %ebx,%edi
shr    $0x3,%edi
call   1030 <printOct@plt>
lea    0x7(%rbx),%eax
test   %ebx,%ebx
cmovns %ebx,%eax
and    $0xfffffff8,%eax
sub    %eax,%ebx
lea    0xeba(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define void @printOct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 8
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 8
br label %12
12: ; preds = %9, %5, %1
%13 = load i32, i32* %2
%14 = srem i32 %13, 8
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @printOct(i32 %0) {
%2 = icmp slt i32 %0, 8
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = lshr i32 %0, 3
tail call void @printOct(i32 %4)
br label %5
5: ; preds = %3, %1
%6 = srem i32 %0, 8
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}