xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void stack(int *n) {
  if (*n) {
    stack(n + 1);
    printf("%d ", *n);
  }
}


x86 assembly (clang, -O0):
<stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1158 <stack+0x38>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
call   1040 <stack@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack>:
push   %rbx
cmpl   $0x0,(%rdi)
je     1141 <stack+0x21>
mov    %rdi,%rbx
add    $0x4,%rdi
call   1040 <stack@plt>
mov    (%rbx),%esi
lea    0xec5(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

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

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


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

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

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

LLVM IR (-O2):
define void @INT_Excep_ICU_GROUP6() {
ret void
}
double sample_mean(double x, double n) { return x / n; }


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

x86 assembly (clang, -O2):
<sample_mean>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sample_mean(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @sample_mean(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ ConfigurePortPins();
int /*<<< orphan*/ EnablePeripheralModules();
int /*<<< orphan*/ InitialiseDisplay();
int /*<<< orphan*/ io_set_cpg();
void HardwareSetup(void) {
  io_set_cpg();
  ConfigurePortPins();
  EnablePeripheralModules();
  InitialiseDisplay();
}


x86 assembly (clang, -O0):
<HardwareSetup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <io_set_cpg@plt>
mov    $0x0,%al
call   1040 <ConfigurePortPins@plt>
mov    $0x0,%al
call   1050 <EnablePeripheralModules@plt>
mov    $0x0,%al
call   1030 <InitialiseDisplay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HardwareSetup>:
push   %rax
xor    %eax,%eax
call   1060 <io_set_cpg@plt>
xor    %eax,%eax
call   1040 <ConfigurePortPins@plt>
xor    %eax,%eax
call   1050 <EnablePeripheralModules@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <InitialiseDisplay@plt>

LLVM IR (-O0):
define void @HardwareSetup() {
%1 = call i32 (...) @io_set_cpg()
%2 = call i32 (...) @ConfigurePortPins()
%3 = call i32 (...) @EnablePeripheralModules()
%4 = call i32 (...) @InitialiseDisplay()
ret void
}

LLVM IR (-O2):
define void @HardwareSetup() {
%1 = tail call i32 (...) @io_set_cpg()
%2 = tail call i32 (...) @ConfigurePortPins()
%3 = tail call i32 (...) @EnablePeripheralModules()
%4 = tail call i32 (...) @InitialiseDisplay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void sigroutine(int signo) {
  printf("Catch a signal -- SIGALRM \n");
  alarm(3);
  signal(SIGALRM, sigroutine);
}


x86 assembly (clang, -O0):
<sigroutine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <alarm@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
mov    0x2e97(%rip),%rsi
call   1050 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigroutine>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <alarm@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    0x2ea1(%rip),%rsi
pop    %rax
jmp    1050 <signal@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Catch a signal -- SIGALRM \0A\00"
@SIGALRM = global i32 0
define void @sigroutine(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @alarm(i32 3)
%5 = load i32, i32* @SIGALRM
%6 = call i32 @signal(i32 %5, void (i32)* @sigroutine)
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@str = [27 x i8] c"Catch a signal -- SIGALRM \00"
define void @sigroutine(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @alarm(i32 3)
%4 = load i32, i32* @SIGALRM
%5 = tail call i32 @signal(i32 %4, void (i32)* @sigroutine)
ret void
}
void gdk_x11_screen_get_xscreen() {}


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

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

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

LLVM IR (-O2):
define void @gdk_x11_screen_get_xscreen() {
ret void
}
void XtToolkitThreadInitialize() {}


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

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

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

LLVM IR (-O2):
define void @XtToolkitThreadInitialize() {
ret void
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ perror(char *);
int chat_exit(int fd) {
  if (close(fd) < 0) {
    perror("chat_exit, close");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<chat_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
jge    1155 <chat_exit+0x35>
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <chat_exit+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chat_exit>:
push   %rax
call   1030 <close@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1132 <chat_exit+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"chat_exit, close\00"
define i32 @chat_exit(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
scalar_t__ sqrt(int);
int check_prime(int number) {
  for (int i = 2; i < (int)(sqrt(number)); ++i) {
    if (number % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116d <check_prime+0x5d>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    115a <check_prime+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1174 <check_prime+0x64>
jmp    115f <check_prime+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <check_prime+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
call   1030 <sqrt@plt>
mov    $0x1,%r14d
cmp    $0x3,%eax
jl     114c <check_prime+0x3c>
mov    $0x2,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebp,%eax
cltd
idiv   %ebx
test   %edx,%edx
je     1149 <check_prime+0x39>
add    $0x1,%ebx
mov    %ebp,%edi
call   1030 <sqrt@plt>
cmp    %eax,%ebx
jl     1130 <check_prime+0x20>
jmp    114c <check_prime+0x3c>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @check_prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
br label %5
5: ; preds = %18, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = call i64 @sqrt(i32 %7)
%9 = trunc i64 %8 to i32
%10 = icmp slt i32 %6, %9
br i1 %10, label %11, label %21
11: ; preds = %5
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = srem i32 %12, %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 0, i32* %2
br label %22
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %5
21: ; preds = %5
store i32 1, i32* %2
br label %22
22: ; preds = %21, %16
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = tail call i64 @sqrt(i32 %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 2
br i1 %4, label %9, label %14
5: ; preds = %9
%6 = tail call i64 @sqrt(i32 %0)
%7 = trunc i64 %6 to i32
%8 = icmp slt i32 %13, %7
br i1 %8, label %9, label %14
9: ; preds = %1, %5
%10 = phi i32 [ %13, %5 ], [ 2, %1 ]
%11 = srem i32 %0, %10
%12 = icmp eq i32 %11, 0
%13 = add nuw nsw i32 %10, 1
br i1 %12, label %14, label %5
14: ; preds = %5, %9, %1
%15 = phi i32 [ 1, %1 ], [ 0, %9 ], [ 1, %5 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void check_printf(const char *a, int x, double y) {
  if (x != 3)
    abort();
  if (y != 1)
    abort();
}


x86 assembly (clang, -O0):
<check_printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x3,-0xc(%rbp)
je     1135 <check_printf+0x25>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1157 <check_printf+0x47>
jp     1157 <check_printf+0x47>
jmp    115e <check_printf+0x4e>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_printf>:
push   %rax
cmp    $0x3,%esi
jne    1124 <check_printf+0x14>
ucomisd 0xee2(%rip),%xmm0
jne    1124 <check_printf+0x14>
jp     1124 <check_printf+0x14>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check_printf(i8* %0, i32 %1, double %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
store i8* %0, i8** %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 3
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %3
%12 = load double, double* %6
%13 = fcmp une double %12, 1.000000e+00
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @check_printf(i8* nocapture readnone %0, i32 %1, double %2) {
%4 = icmp eq i32 %1, 3
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %3
%8 = fcmp une double %2, 1.000000e+00
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %7
ret void
}
void gtk_text_view_set_indent() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_set_indent() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_54(int /*<<< orphan*/);
int gen_54() { handle_54(0); }


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

x86 assembly (clang, -O2):
<gen_54>:
xor    %edi,%edi
jmp    1030 <handle_54@plt>

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

LLVM IR (-O2):
define i32 @gen_54() {
%1 = tail call i32 @handle_54(i32 0)
ret i32 undef
}
int _atoi(const char *str) {
  int value = 0;
  while (*str && *str >= '0' && *str <= '9') {
    value = value * 10 + *str++ - '0';
  }
  return value;
}


x86 assembly (clang, -O0):
<_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1149 <_atoi+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     1149 <_atoi+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1159 <_atoi+0x59>
jmp    117c <_atoi+0x7c>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <_atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <_atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <_atoi+0x20>
ret

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

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

/* Variables and functions */
uint64_t test_tagged_nonint_bitmask3(uint64_t val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @test_tagged_nonint_bitmask3(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void signed_zero_inf(void) {
  double x = 0.0, y = -0.0;
  if (x == y)
    printf("Test 1.0 / 0.0 != 1.0 / -0.0 returns %d (should be 1).\n",
           1.0 / x != 1.0 / y);
  else
    printf("0.0 != -0.0; this is wrong!\n");
}


x86 assembly (clang, -O0):
<signed_zero_inf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1181 <signed_zero_inf+0x71>
jp     1181 <signed_zero_inf+0x71>
movsd  0xebd(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118f <signed_zero_inf+0x7f>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_zero_inf>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Test 1.0 / 0.0 != 1.0 / -0.0 returns %d (should be 1).\0A\00"
@.str.1 = [29 x i8] c"0.0 != -0.0; this is wrong!\0A\00"
define void @signed_zero_inf() {
%1 = alloca double
%2 = alloca double
store double 0.000000e+00, double* %1
store double -0.000000e+00, double* %2
%3 = load double, double* %1
%4 = load double, double* %2
%5 = fcmp oeq double %3, %4
br i1 %5, label %6, label %14
6: ; preds = %0
%7 = load double, double* %1
%8 = fdiv double 1.000000e+00, %7
%9 = load double, double* %2
%10 = fdiv double 1.000000e+00, %9
%11 = fcmp une double %8, %10
%12 = zext i1 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %16
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %6
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Test 1.0 / 0.0 != 1.0 / -0.0 returns %d (should be 1).\0A\00"
define void @signed_zero_inf() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int vect_mus_audio_open_output(int, int, int, int, int);
int mus_audio_open_output(int ur_dev, int srate, int chans, int format,
                          int size) {
  return (vect_mus_audio_open_output(ur_dev, srate, chans, format, size));
}


x86 assembly (clang, -O0):
<mus_audio_open_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <vect_mus_audio_open_output@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_audio_open_output>:
jmp    1030 <vect_mus_audio_open_output@plt>

LLVM IR (-O0):
define i32 @mus_audio_open_output(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @vect_mus_audio_open_output(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @mus_audio_open_output(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @vect_mus_audio_open_output(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 %6
}
main() {
  int(*p)[2] = (int[][2]){1, 2, {3, 4, 5}};
  return p[1][1];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x4,-0x14(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]*
%3 = alloca [2 x [2 x i32]]
store i32 0, i32* %1
%4 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 1, i32* %5
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 2, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 1
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 3, i32* %8
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 4, i32* %9
%10 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0
store [2 x i32]* %10, [2 x i32]** %2
%11 = load [2 x i32]*, [2 x i32]** %2
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 1
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 1
%14 = load i32, i32* %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ fabs(double);
int pow(int /*<<< orphan*/, int);
double f_prime3(double x) { return 3 * pow(fabs((x - 1)), 2); }


x86 assembly (clang, -O0):
<f_prime3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
imul   $0x3,%eax,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_prime3>:
push   %rax
addsd  0xed7(%rip),%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f_prime3(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 1.000000e+00
%5 = call i32 @fabs(double %4)
%6 = call i32 @pow(i32 %5, i32 2)
%7 = mul nsw i32 3, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @f_prime3(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = tail call i32 @fabs(double %2)
%4 = tail call i32 @pow(i32 %3, i32 2)
%5 = mul nsw i32 %4, 3
%6 = sitofp i32 %5 to double
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Program started\n");
  printf("Program exited\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%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>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Program started\0A\00"
@.str.1 = [16 x i8] c"Program exited\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Program started\00"
@str.2 = [15 x i8] c"Program exited\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
char HSum(char A, char B) { return (char)(A ^ B); }


x86 assembly (clang, -O0):
<HSum>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
xor    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @HSum(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = xor i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @HSum(i8 signext %0, i8 signext %1) {
%3 = xor i8 %1, %0
ret i8 %3
}
int verificar_validade(int x, int y, int tabuleiro[8][8]) {
  return x >= 0 && x < 8 && y >= 0 && y < 8 && tabuleiro[x][y] == 0;
}


x86 assembly (clang, -O0):
<verificar_validade>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jl     1167 <verificar_validade+0x67>
xor    %eax,%eax
cmpl   $0x8,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jge    1167 <verificar_validade+0x67>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jl     1167 <verificar_validade+0x67>
xor    %eax,%eax
cmpl   $0x8,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jge    1167 <verificar_validade+0x67>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verificar_validade>:
mov    %esi,%ecx
or     %edi,%ecx
xor    %eax,%eax
cmp    $0x7,%ecx
ja     111f <verificar_validade+0x1f>
mov    %edi,%eax
mov    %esi,%ecx
shl    $0x5,%rax
add    %rax,%rdx
xor    %eax,%eax
cmpl   $0x0,(%rdx,%rcx,4)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @verificar_validade(i32 %0, i32 %1, [8 x i32]* nocapture %2) {
%4 = or i32 %1, %0
%5 = icmp ult i32 %4, 8
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = zext i32 %0 to i64
%8 = zext i32 %1 to i64
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 %7, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %6, %3
%14 = phi i32 [ 0, %3 ], [ %12, %6 ]
ret i32 %14
}
/* Type definitions */
struct usergetkey_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
usergetkey_cmdline_parser_release(struct usergetkey_args_info *);
void usergetkey_cmdline_parser_free(struct usergetkey_args_info *args_info) {
  usergetkey_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<usergetkey_cmdline_parser_free>:
jmp    1030 <usergetkey_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.usergetkey_args_info = type { i32 }
define void @usergetkey_cmdline_parser_free(%struct.usergetkey_args_info* %0) {
%2 = tail call i32 @usergetkey_cmdline_parser_release(%struct.usergetkey_args_info* %0)
ret void
}
int ti_dm_start(double const *options) { return (int)options[0] - 1; }


x86 assembly (clang, -O0):
<ti_dm_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_dm_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_dm_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_dm_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ testList();
int /*<<< orphan*/ testSnippsDB();
int main() {
  testList();
  testSnippsDB();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @testList()
%3 = call i32 (...) @testSnippsDB()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testList()
%2 = tail call i32 (...) @testSnippsDB()
ret i32 0
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_describe_spi(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_describe_spi() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_describe_spi() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
int cfg_processor_get_hex_int_attr(void *attr, const char *name) {
  const char *str_attr;
  int value = -1;
  str_attr = mxml_get_attr_value(attr, name);
  if (((void *)0) != str_attr) {
    value = mvp_htoi(str_attr);
    mxml_release_string(str_attr);
  }
  return value;
}


x86 assembly (clang, -O0):
<cfg_processor_get_hex_int_attr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <mxml_get_attr_value@plt>
cltq
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     1181 <cfg_processor_get_hex_int_attr+0x51>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <mvp_htoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <mxml_release_string@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_processor_get_hex_int_attr>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <mxml_get_attr_value@plt>
test   %eax,%eax
je     115b <cfg_processor_get_hex_int_attr+0x2b>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <mvp_htoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <mxml_release_string@plt>
mov    %ebp,%eax
jmp    1160 <cfg_processor_get_hex_int_attr+0x30>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 -1, i32* %6
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @mxml_get_attr_value to i32 (i8*, i8*, ...)*)(i8* %7, i8* %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp ne i8* null, %12
br i1 %13, label %14, label %19
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @mvp_htoi to i32 (i8*, ...)*)(i8* %15)
store i32 %16, i32* %6
%17 = load i8*, i8** %5
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @mxml_release_string to i32 (i8*, ...)*)(i8* %17)
br label %19
19: ; preds = %14, %2
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
define i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @mxml_get_attr_value to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i32 %3, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mvp_htoi to i32 (i8*, ...)*)(i8* %5)
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mxml_release_string to i32 (i8*, ...)*)(i8* %5)
br label %10
10: ; preds = %7, %2
%11 = phi i32 [ %8, %7 ], [ -1, %2 ]
ret i32 %11
}
void oer_c_source_h_decode_inner(struct decoder_t *decoder_p,
                                 struct oer_c_source_h_t *dst_p) {
  (void)decoder_p;
  (void)dst_p;
}


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

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

LLVM IR (-O0):
%struct.decoder_t = type opaque
%struct.oer_c_source_h_t = type opaque
define void @oer_c_source_h_decode_inner(%struct.decoder_t* %0, %struct.oer_c_source_h_t* %1) {
%3 = alloca %struct.decoder_t*
%4 = alloca %struct.oer_c_source_h_t*
store %struct.decoder_t* %0, %struct.decoder_t** %3
store %struct.oer_c_source_h_t* %1, %struct.oer_c_source_h_t** %4
%5 = load %struct.decoder_t*, %struct.decoder_t** %3
%6 = load %struct.oer_c_source_h_t*, %struct.oer_c_source_h_t** %4
ret void
}

LLVM IR (-O2):
%struct.decoder_t = type opaque
%struct.oer_c_source_h_t = type opaque
define void @oer_c_source_h_decode_inner(%struct.decoder_t* nocapture %0, %struct.oer_c_source_h_t* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CAN_ISR();
int /*<<< orphan*/ CEC_ISR();
void CEC_CAN_ISR(void) {
  CEC_ISR();
  CAN_ISR();
}


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

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

LLVM IR (-O0):
define void @CEC_CAN_ISR() {
%1 = call i32 (...) @CEC_ISR()
%2 = call i32 (...) @CAN_ISR()
ret void
}

LLVM IR (-O2):
define void @CEC_CAN_ISR() {
%1 = tail call i32 (...) @CEC_ISR()
%2 = tail call i32 (...) @CAN_ISR()
ret void
}
int even_bit_toggle(int e_num) {
  int bit_length;
  int mask;
  mask = 2;
  bit_length = 4 * sizeof(void *);
  for (; bit_length >= 1; bit_length--) {
    e_num = e_num ^ mask;
    mask = mask << 2;
  }
  return e_num;
}


x86 assembly (clang, -O0):
<even_bit_toggle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x20,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     113f <even_bit_toggle+0x3f>
mov    -0x4(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <even_bit_toggle+0x15>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<even_bit_toggle>:
mov    %edi,%eax
xor    $0xaaaaaaaa,%eax
ret

LLVM IR (-O0):
define i32 @even_bit_toggle(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 2, i32* %4
store i32 32, i32* %3
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 1
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %4
%11 = xor i32 %9, %10
store i32 %11, i32* %2
%12 = load i32, i32* %4
%13 = shl i32 %12, 2
store i32 %13, i32* %4
br label %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @even_bit_toggle(i32 %0) {
%2 = xor i32 %0, -1431655766
ret i32 %2
}
/* Type definitions */
struct SSH_CHAN {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ssh_free(struct SSH_CHAN *);
void ssh_chan_free(struct SSH_CHAN *chan) { ssh_free(chan); }


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

x86 assembly (clang, -O2):
<ssh_chan_free>:
jmp    1030 <ssh_free@plt>

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

LLVM IR (-O2):
%struct.SSH_CHAN = type { i32 }
define void @ssh_chan_free(%struct.SSH_CHAN* %0) {
%2 = tail call i32 @ssh_free(%struct.SSH_CHAN* %0)
ret void
}
__attribute__((always_)) void rcu_exit_nohz(void) {}


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

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

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

LLVM IR (-O2):
define void @rcu_exit_nohz() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
void print_option(const char *c, const char *def, const char *desc) {
  fprintf(stderr, "%-8s %-12s %s\n", c, def, desc);
}


x86 assembly (clang, -O0):
<print_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_option>:
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"%-8s %-12s %s\0A\00"
define void @print_option(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"%-8s %-12s %s\0A\00"
define void @print_option(i8* %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret void
}
char *hash_plugin_summary(void) {
  return ("luks \t\tLUKS encrypted block device plugin");
}


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [42 x i8] c"luks \09\09LUKS encrypted block device plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [42 x i8] c"luks \09\09LUKS encrypted block device plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0)
}
int adis16240_configure_ring(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @adis16240_configure_ring(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
struct pcg_state_64 {
  int dummy;
};

/* Variables and functions */
int pcg_unique_64_xsl_rr_32_random_r(struct pcg_state_64 *);
uint32_t pcg_unique_64_xsl_rr_32_boundedrand_r(struct pcg_state_64 *rng,
                                               uint32_t bound) {
  uint32_t threshold = -bound % bound;
  for (;;) {
    uint32_t r = pcg_unique_64_xsl_rr_32_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_unique_64_xsl_rr_32_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_unique_64_xsl_rr_32_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_unique_64_xsl_rr_32_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_unique_64_xsl_rr_32_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_unique_64_xsl_rr_32_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_unique_64_xsl_rr_32_random_r@plt>
test   %eax,%eax
js     1120 <pcg_unique_64_xsl_rr_32_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_unique_64_xsl_rr_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
%3 = alloca %struct.pcg_state_64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_64* %0, %struct.pcg_state_64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_64*, %struct.pcg_state_64** %3
%13 = call i32 @pcg_unique_64_xsl_rr_32_random_r(%struct.pcg_state_64* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_unique_64_xsl_rr_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_unique_64_xsl_rr_32_random_r(%struct.pcg_state_64* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ unpackGame();
int /*<<< orphan*/ unpackHtds();
int /*<<< orphan*/ unpackItems();
int /*<<< orphan*/ unpackPics();
int /*<<< orphan*/ unpackSave();
int main(void) {
  printf("Converting original data files for hacked EXE...\n");
  unpackPics();
  unpackHtds();
  unpackGame();
  unpackItems();
  unpackSave();
  printf("Finished\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <unpackPics@plt>
mov    $0x0,%al
call   1070 <unpackHtds@plt>
mov    $0x0,%al
call   1080 <unpackGame@plt>
mov    $0x0,%al
call   1060 <unpackItems@plt>
mov    $0x0,%al
call   1030 <unpackSave@plt>
lea    0xe8d(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <unpackPics@plt>
xor    %eax,%eax
call   1070 <unpackHtds@plt>
xor    %eax,%eax
call   1080 <unpackGame@plt>
xor    %eax,%eax
call   1060 <unpackItems@plt>
xor    %eax,%eax
call   1030 <unpackSave@plt>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Converting original data files for hacked EXE...\0A\00"
@.str.1 = [10 x i8] c"Finished\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @unpackPics()
%4 = call i32 (...) @unpackHtds()
%5 = call i32 (...) @unpackGame()
%6 = call i32 (...) @unpackItems()
%7 = call i32 (...) @unpackSave()
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"Converting original data files for hacked EXE...\00"
@str.2 = [9 x i8] c"Finished\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @unpackPics()
%3 = tail call i32 (...) @unpackHtds()
%4 = tail call i32 (...) @unpackGame()
%5 = tail call i32 (...) @unpackItems()
%6 = tail call i32 (...) @unpackSave()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int is_space(char c) {
  if (c == ' ' || c == '\t')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1124 <is_space+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    1130 <is_space+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <is_space+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}