xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xd0() {
  Assert_real((isodigit(208) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              1045, ("isodigit should be 0 for 0xd0"));
}


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

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

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

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


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_exit(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int x;
  printf("Unitialized x = %i\n", x);
  x = 1 + 2;
  printf("x with 1 + 2 = %i\n", x);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Unitialized x = %i\0A\00"
@.str.1 = [19 x i8] c"x with 1 + 2 = %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 3, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Unitialized x = %i\0A\00"
@.str.1 = [19 x i8] c"x with 1 + 2 = %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ target;

/* Variables and functions */
scalar_t__ memcmp(int *, int *, int);
int yatzy_hand_score_straight1(int dice[], int count[]) {
  int target[] = {1, 1, 1, 1, 1, 0};
  if (memcmp(count, target, sizeof(target)) == 0) {
    return 15;
  }
  return 0;
}


x86 assembly (clang, -O0):
<yatzy_hand_score_straight1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x18,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    1169 <yatzy_hand_score_straight1+0x59>
movl   $0xf,-0x4(%rbp)
jmp    1170 <yatzy_hand_score_straight1+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yatzy_hand_score_straight1>:
sub    $0x18,%rsp
mov    %rsi,%rdi
mov    0xef2(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x18,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
mov    $0xf,%eax
cmovne %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.yatzy_hand_score_straight1.target = [6 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 0]
define i32 @yatzy_hand_score_straight1(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca [6 x i32]
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = bitcast [6 x i32]* %6 to i8*
%8 = load i32*, i32** %5
%9 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%10 = call i64 @memcmp(i32* %8, i32* %9, i32 24)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 15, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@__const.yatzy_hand_score_straight1.target = [6 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 0]
define i32 @yatzy_hand_score_straight1(i32* nocapture readnone %0, i32* %1) {
%3 = alloca [6 x i32]
%4 = bitcast [6 x i32]* %3 to i8*
%5 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%6 = call i64 @memcmp(i32* %1, i32* %5, i32 24)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i32 15, i32 0
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Estou funcionando!\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 = [20 x i8] c"Estou funcionando!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Estou funcionando!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int getsecuritylevel() { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @getsecuritylevel() {
ret i32 -1
}
void free_2d(float **array) {
  free(array[0]);
  free(array);
}


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

x86 assembly (clang, -O2):
<free_2d>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_2d(float** %0) {
%2 = alloca float**
store float** %0, float*** %2
%3 = load float**, float*** %2
%4 = getelementptr inbounds float*, float** %3, i64 0
%5 = load float*, float** %4
%6 = bitcast float* %5 to i8*
%7 = load float**, float*** %2
%8 = bitcast float** %7 to i8*
ret void
}

LLVM IR (-O2):
define void @free_2d(float** nocapture %0) {
%2 = bitcast float** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast float** %0 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bad_mode(void) {
  printf("error :  in bad mode!!!!\n\r");
  return;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"error : in bad mode!!!!\0A\0D\00"
define void @bad_mode() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"error : in bad mode!!!!\0A\0D\00"
define void @bad_mode() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void aligned_free(void *memory) { free(((char **)memory)[-1]); }


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

x86 assembly (clang, -O2):
<aligned_free>:
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @aligned_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i8**
%5 = getelementptr inbounds i8*, i8** %4, i64 -1
%6 = load i8*, i8** %5
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @aligned_free(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -8
%3 = bitcast i8* %2 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @free(i8* %4)
ret void
}
double bessel_j(x, y)
double x, y;
{
  int n = (int)x;
  return (jn(n, y));
}


x86 assembly (clang, -O0):
<bessel_j>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <jn@plt>
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessel_j>:
push   %rax
cvttsd2si %xmm0,%edi
movaps %xmm1,%xmm0
mov    $0x1,%al
call   1030 <jn@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @bessel_j(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = fptosi double %6 to i32
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load double, double* %4
%10 = call i32 (i32, double, ...) bitcast (i32 (...)* @jn to i32 (i32, double, ...)*)(i32 %8, double %9)
%11 = sitofp i32 %10 to double
ret double %11
}

LLVM IR (-O2):
define double @bessel_j(double %0, double %1) {
%3 = fptosi double %0 to i32
%4 = tail call i32 (i32, double, ...) bitcast (i32 (...)* @jn to i32 (i32, double, ...)*)(i32 %3, double %1)
%5 = sitofp i32 %4 to double
ret double %5
}
initw(int_ptr, string) int *int_ptr;
char *string;
{
  int n;
  while ((n = getval(&string)) != -32760)
    *int_ptr++ = n;
}


x86 assembly (clang, -O0):
<initw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <getval@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffff8008,%eax
je     1152 <initw+0x42>
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
jmp    1120 <initw+0x10>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initw>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsi,(%rsp)
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <getval@plt>
cmp    $0xffff8008,%eax
je     1147 <initw+0x37>
mov    %rsp,%r14
nop
mov    %eax,(%rbx)
add    $0x4,%rbx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <getval@plt>
cmp    $0xffff8008,%eax
jne    1130 <initw+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @initw(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
br label %7
7: ; preds = %10, %2
%8 = call i32 (i8**, ...) bitcast (i32 (...)* @getval to i32 (i8**, ...)*)(i8** %5)
store i32 %8, i32* %6
%9 = icmp ne i32 %8, -32760
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %6
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i32 1
store i32* %13, i32** %4
store i32 %11, i32* %12
br label %7
14: ; preds = %7
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @initw(i32* nocapture writeonly %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = call i32 (i8**, ...) bitcast (i32 (...)* @getval to i32 (i8**, ...)*)(i8** %3)
%5 = icmp eq i32 %4, -32760
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %10, %6 ], [ %4, %2 ]
%8 = phi i32* [ %9, %6 ], [ %0, %2 ]
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %7, i32* %8
%10 = call i32 (i8**, ...) bitcast (i32 (...)* @getval to i32 (i8**, ...)*)(i8** %3)
%11 = icmp eq i32 %10, -32760
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ lb_strlen(char *);
int /*<<< orphan*/ lb_strnrev(char *, int /*<<< orphan*/);
void lb_strrev(char *str) { lb_strnrev(str, lb_strlen(str)); }


x86 assembly (clang, -O0):
<lb_strrev>:
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   1040 <lb_strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <lb_strnrev@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @lb_strrev(i8* %0) {
%2 = tail call i32 @lb_strlen(i8* %0)
%3 = tail call i32 @lb_strnrev(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __test_print_vasp_strain(unsigned int);
void test_print_vasp_uniaxial_strain() {
  __test_print_vasp_strain((unsigned)1);
}


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

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

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

LLVM IR (-O2):
define void @test_print_vasp_uniaxial_strain() {
%1 = tail call i32 @__test_print_vasp_strain(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_snprint_verbose() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_snprint_verbose"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_cvolume_snprint_verbose\00"
define i32 @pa_cvolume_snprint_verbose() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ barrier();
void putc(int c) {
  while ((*(volatile unsigned char *)0x101FB018) & (1 << 5))
    barrier();
  (*(volatile unsigned char *)0x101FB000) = c;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x101fb018,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     113d <putc+0x2d>
mov    $0x0,%al
call   1030 <barrier@plt>
jmp    111b <putc+0xb>
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    $0x101fb000,%eax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbx
mov    %edi,%ebx
testb  $0x20,0x101fb018
20
je     1131 <putc+0x21>
nopl   (%rax)
xor    %eax,%eax
call   1030 <barrier@plt>
testb  $0x20,0x101fb018
20
jne    1120 <putc+0x10>
mov    %bl,0x101fb000
pop    %rbx
ret

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %8, %1
%4 = load volatile i8, i8* inttoptr (i64 270512152 to i8*)
%5 = zext i8 %4 to i32
%6 = and i32 %5, 32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 (...) @barrier()
br label %3
10: ; preds = %3
%11 = load i32, i32* %2
%12 = trunc i32 %11 to i8
store volatile i8 %12, i8* inttoptr (i64 270512128 to i8*)
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = load volatile i8, i8* inttoptr (i64 270512152 to i8*)
%3 = and i8 %2, 32
%4 = icmp eq i8 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1, %5
%6 = tail call i32 (...) @barrier()
%7 = load volatile i8, i8* inttoptr (i64 270512152 to i8*)
%8 = and i8 %7, 32
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %1
%11 = trunc i32 %0 to i8
store volatile i8 %11, i8* inttoptr (i64 270512128 to i8*)
ret void
}
void soft_halt() {
  while (1)
    asm volatile("hlt");
}


x86 assembly (clang, -O0):
<soft_halt>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <soft_halt+0x9>
hlt
jmp    1109 <soft_halt+0x9>

x86 assembly (clang, -O2):
<soft_halt>:
hlt
jmp    1100 <soft_halt>

LLVM IR (-O0):
define void @soft_halt() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @soft_halt() {
br label %1
1: ; preds = %0, %1
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void putchars(int c, int q) {
  while (q--)
    putchar(c);
}


x86 assembly (clang, -O0):
<putchars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     113f <putchars+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
jmp    111e <putchars+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchars>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
je     112c <putchars+0x1c>
mov    %esi,%ebx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <putchars+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @putchars(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @putchar(i32 %0)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hal_cc25xx_init_gpio();
int /*<<< orphan*/ hal_spi_init();
void hal_cc25xx_init(void) {
  hal_spi_init();
  hal_cc25xx_init_gpio();
}


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

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

LLVM IR (-O0):
define void @hal_cc25xx_init() {
%1 = call i32 (...) @hal_spi_init()
%2 = call i32 (...) @hal_cc25xx_init_gpio()
ret void
}

LLVM IR (-O2):
define void @hal_cc25xx_init() {
%1 = tail call i32 (...) @hal_spi_init()
%2 = tail call i32 (...) @hal_cc25xx_init_gpio()
ret void
}
int main() { int x = 5; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 5, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void glIsSampler(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glIsSampler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int p0(void) {
  foo();
  foo();
  return 2;
}


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

x86 assembly (clang, -O2):
<p0>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @p0() {
%1 = call i32 (...) @foo()
%2 = call i32 (...) @foo()
ret i32 2
}

LLVM IR (-O2):
define i32 @p0() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
ret i32 2
}
int iInRing(int *ring, int end, int p) {
  int i = 0;
  while (i <= end) {
    if (ring[i] == p)
      return (1);
    i = i + 1;
  }
  return (0);
}


x86 assembly (clang, -O0):
<iInRing>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     114f <iInRing+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1141 <iInRing+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1156 <iInRing+0x56>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <iInRing+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iInRing>:
test   %esi,%esi
js     111e <iInRing+0x1e>
add    $0x1,%esi
xor    %eax,%eax
nopl   0x0(%rax)
cmp    %edx,(%rdi,%rax,4)
je     1121 <iInRing+0x21>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <iInRing+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @iInRing(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = add nuw i32 %1, 1
%7 = zext i32 %6 to i64
br label %11
8: ; preds = %11
%9 = add nuw nsw i64 %12, 1
%10 = icmp eq i64 %9, %7
br i1 %10, label %16, label %11
11: ; preds = %5, %8
%12 = phi i64 [ 0, %5 ], [ %9, %8 ]
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, %2
br i1 %15, label %16, label %8
16: ; preds = %11, %8, %3
%17 = phi i32 [ 0, %3 ], [ 0, %8 ], [ 1, %11 ]
ret i32 %17
}
/* Type definitions */
struct block {
  int dummy;
};
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int sys_sigfillset(int /*<<< orphan*/ *);
int sys_sigunblock(int /*<<< orphan*/ *);
int block_child_sig(struct block *block) {
  sigset_t set;
  int err;
  err = sys_sigfillset(&set);
  if (err)
    return err;
  return sys_sigunblock(&set);
}


x86 assembly (clang, -O0):
<block_child_sig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <sys_sigfillset@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     114d <block_child_sig+0x2d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <block_child_sig+0x39>
lea    -0x14(%rbp),%rdi
call   1030 <sys_sigunblock@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block_child_sig>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <sys_sigfillset@plt>
test   %eax,%eax
je     1131 <block_child_sig+0x11>
pop    %rcx
ret
lea    0x4(%rsp),%rdi
call   1030 <sys_sigunblock@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.block = type { i32 }
define i32 @block_child_sig(%struct.block* %0) {
%2 = alloca i32
%3 = alloca %struct.block*
%4 = alloca i32
%5 = alloca i32
store %struct.block* %0, %struct.block** %3
%6 = call i32 @sys_sigfillset(i32* %4)
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %5
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = call i32 @sys_sigunblock(i32* %4)
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.block = type { i32 }
define i32 @block_child_sig(%struct.block* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sys_sigfillset(i32* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @sys_sigunblock(i32* %2)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ %4, %1 ]
ret i32 %9
}
void ls_memory_free_indirect(void *const *const pptr) {}


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

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

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

LLVM IR (-O2):
define void @ls_memory_free_indirect(i8** nocapture %0) {
ret void
}
/* Variables and functions */
int fscan_hex(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int scan_hex() { return fscan_hex(stdin); }


x86 assembly (clang, -O0):
<scan_hex>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <fscan_hex@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_hex>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fscan_hex@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @scan_hex() {
%1 = load i32, i32* @stdin
%2 = call i32 @fscan_hex(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @scan_hex() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @fscan_hex(i32 %1)
ret i32 %2
}
int thirdBits(void) {
  int x = 2, y = 73;
  x = x << 8 | y;
  x = x << 12 | x;
  x = y << 24 | x;
  return x;
}


x86 assembly (clang, -O0):
<thirdBits>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2,-0x4(%rbp)
movl   $0x49,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x18,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @thirdBits() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
store i32 73, i32* %2
%3 = load i32, i32* %1
%4 = shl i32 %3, 8
%5 = load i32, i32* %2
%6 = or i32 %4, %5
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = shl i32 %7, 12
%9 = load i32, i32* %1
%10 = or i32 %8, %9
store i32 %10, i32* %1
%11 = load i32, i32* %2
%12 = shl i32 %11, 24
%13 = load i32, i32* %1
%14 = or i32 %12, %13
store i32 %14, i32* %1
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @thirdBits() {
ret i32 1227133513
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
struct btp_strbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ btp_strbuf_append_str(struct btp_strbuf *, char *);
char *btp_vasprintf(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
struct btp_strbuf *btp_strbuf_append_strfv(struct btp_strbuf *strbuf,
                                           const char *format, va_list p) {
  char *string_ptr = btp_vasprintf(format, p);
  btp_strbuf_append_str(strbuf, string_ptr);
  free(string_ptr);
  return strbuf;
}


x86 assembly (clang, -O0):
<btp_strbuf_append_strfv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <btp_vasprintf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <btp_strbuf_append_str@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btp_strbuf_append_strfv>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %edx,%esi
call   1040 <btp_vasprintf@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <btp_strbuf_append_str@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.btp_strbuf = type { i32 }
define %struct.btp_strbuf* @btp_strbuf_append_strfv(%struct.btp_strbuf* %0, i8* %1, i32 %2) {
%4 = alloca %struct.btp_strbuf*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store %struct.btp_strbuf* %0, %struct.btp_strbuf** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i8* @btp_vasprintf(i8* %8, i32 %9)
store i8* %10, i8** %7
%11 = load %struct.btp_strbuf*, %struct.btp_strbuf** %4
%12 = load i8*, i8** %7
%13 = call i32 @btp_strbuf_append_str(%struct.btp_strbuf* %11, i8* %12)
%14 = load i8*, i8** %7
%15 = call i32 @free(i8* %14)
%16 = load %struct.btp_strbuf*, %struct.btp_strbuf** %4
ret %struct.btp_strbuf* %16
}

LLVM IR (-O2):
%struct.btp_strbuf = type { i32 }
define %struct.btp_strbuf* @btp_strbuf_append_strfv(%struct.btp_strbuf* returned %0, i8* %1, i32 %2) {
%4 = tail call i8* @btp_vasprintf(i8* %1, i32 %2)
%5 = tail call i32 @btp_strbuf_append_str(%struct.btp_strbuf* %0, i8* %4)
%6 = tail call i32 @free(i8* %4)
ret %struct.btp_strbuf* %0
}
void foo_2_2_1_1_1_2_2_2_1() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ clearerr(int /*<<< orphan*/ *);
void c_clearerr(void *stream) {
  clearerr((FILE *)stream);
  return;
}


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

x86 assembly (clang, -O2):
<c_clearerr>:
jmp    1030 <clearerr@plt>

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

LLVM IR (-O2):
define void @c_clearerr(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @clearerr(i32* %2)
ret void
}
/* Type definitions */
struct core_counter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ core_counter_reset(struct core_counter *);
void core_counter_destroy(struct core_counter *self) {
  core_counter_reset(self);
}


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

x86 assembly (clang, -O2):
<core_counter_destroy>:
jmp    1030 <core_counter_reset@plt>

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

LLVM IR (-O2):
%struct.core_counter = type { i32 }
define void @core_counter_destroy(%struct.core_counter* %0) {
%2 = tail call i32 @core_counter_reset(%struct.core_counter* %0)
ret void
}
cbuf27(f, n) { return (cbuf(f, n, 27)); }


x86 assembly (clang, -O0):
<cbuf27>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1b,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf27>:
mov    $0x1b,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf27(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 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 27)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf27(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 27)
ret i32 %3
}
long double foo_long_double(_Complex long double x) { return creall(x); }


x86 assembly (clang, -O0):
<foo_long_double>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_long_double>:
fldt   0x8(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @foo_long_double({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @foo_long_double({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %3
}
void handle_event(int only_passive_events, int allow_delay, int passive_mode) {}


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

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

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

LLVM IR (-O2):
define void @handle_event(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ e_phoff;
};
typedef int /*<<< orphan*/ Elf32_Phdr;
typedef scalar_t__ Elf32_Off;
typedef TYPE_1__ Elf32_Ehdr;

/* Variables and functions */
TYPE_1__ *elf_get_header(void *);
Elf32_Phdr *elf_get_pht(void *elf_image) {
  Elf32_Ehdr *elf_hdr = elf_get_header(elf_image);
  return (Elf32_Phdr *)((Elf32_Off)elf_hdr + elf_hdr->e_phoff);
}


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

x86 assembly (clang, -O2):
<elf_get_pht>:
push   %rax
call   1030 <elf_get_header@plt>
add    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64 }
define i32* @elf_get_pht(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.TYPE_3__*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.TYPE_3__* @elf_get_header(i8* %4)
store %struct.TYPE_3__* %5, %struct.TYPE_3__** %3
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%7 = ptrtoint %struct.TYPE_3__* %6 to i64
%8 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = add nsw i64 %7, %10
%12 = inttoptr i64 %11 to i32*
ret i32* %12
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
define i32* @elf_get_pht(i8* %0) {
%2 = tail call %struct.TYPE_3__* @elf_get_header(i8* %0)
%3 = ptrtoint %struct.TYPE_3__* %2 to i64
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i64 0, i32 0
%5 = load i64, i64* %4
%6 = add nsw i64 %5, %3
%7 = inttoptr i64 %6 to i32*
ret i32* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_float_min_to_all(float *target, float *source, int nreduce,
                                   int PE_start, int logPE_stride, int PE_size,
                                   float *pWrk, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_float_min_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_float_min_to_all(float* %0, float* %1, i32 %2, i32 %3, i32 %4, i32 %5, float* %6, i64* %7) {
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca float*
%16 = alloca i64*
store float* %0, float** %9
store float* %1, float** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store float* %6, float** %15
store i64* %7, i64** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_float_min_to_all(float* nocapture readnone %0, float* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, float* nocapture readnone %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_1Fint8_mem(signed char *val) {
  return ((*val) & (-0x1F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_1Fint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -31
%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_1Fint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -31
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void criaVetorAleatorio(int *vetor) {
  int i;
  srand(time(NULL));
  for (i = 0; i < 100000; i++) {
    vetor[i] = rand() % 100;
  }
}


x86 assembly (clang, -O0):
<criaVetorAleatorio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x186a0,-0xc(%rbp)
jge    1188 <criaVetorAleatorio+0x58>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <criaVetorAleatorio+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<criaVetorAleatorio>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x186a0,%rbx
jne    1150 <criaVetorAleatorio+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @criaVetorAleatorio(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
store i32 0, i32* %3
br label %6
6: ; preds = %16, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 100000
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = call i32 (...) @rand()
%11 = srem i32 %10, 100
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
store i32 %11, i32* %15
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @criaVetorAleatorio(i32* nocapture writeonly %0) {
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
br label %4
4: ; preds = %1, %4
%5 = phi i64 [ 0, %1 ], [ %9, %4 ]
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 100
%8 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %7, i32* %8
%9 = add nuw nsw i64 %5, 1
%10 = icmp eq i64 %9, 100000
br i1 %10, label %11, label %4
11: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int warterm_clrtoeol() {
  puts("E\01");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"E\01\00"
define i32 @warterm_clrtoeol() {
%1 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"E\01\00"
define i32 @warterm_clrtoeol() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strlen(char *);
void gbcode_capitalize(char *pinyin) {
  if (strlen(pinyin) > 0) {
    if (pinyin[0] >= 'a' && pinyin[0] <= 'z') {
      pinyin[0] += 'A' - 'a';
    }
  }
}


x86 assembly (clang, -O0):
<gbcode_capitalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    1160 <gbcode_capitalize+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     115b <gbcode_capitalize+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     115b <gbcode_capitalize+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0xffffffe0,%ecx
mov    %cl,(%rax)
jmp    1160 <gbcode_capitalize+0x50>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gbcode_capitalize>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
jle    112c <gbcode_capitalize+0x1c>
mov    (%rbx),%al
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     112c <gbcode_capitalize+0x1c>
add    $0xe0,%al
mov    %al,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @gbcode_capitalize(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i8, i8* %0
%6 = add i8 %5, -97
%7 = icmp ult i8 %6, 26
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = add nsw i8 %5, -32
store i8 %9, i8* %0
br label %10
10: ; preds = %4, %8, %1
ret void
}