xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ pat(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n == 0)
    printf("0");
  else
    pat(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    116a <main+0x3a>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1172 <main+0x42>
mov    -0x8(%rbp),%edi
call   1040 <pat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
test   %edi,%edi
je     1151 <main+0x21>
call   1040 <pat@plt>
jmp    115b <main+0x2b>
mov    $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @putchar(i32 48)
br label %10
8: ; preds = %0
%9 = call i32 @pat(i32 %4)
br label %10
10: ; preds = %8, %6
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void rpl_free(void *p) {
  if (p)
    free(p);
}


x86 assembly (clang, -O0):
<rpl_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <rpl_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpl_free>:
test   %rdi,%rdi
je     111a <rpl_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @rpl_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @rpl_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
char *malloc(size_t);
char *memcpy(char *, char const *, size_t);
size_t strnlen(char const *, size_t);
char *strndup(const char *s, size_t n) {
  size_t len = strnlen(s, n);
  char *new = malloc(len + 1);
  if (new == NULL)
    return NULL;
  new[len] = '\0';
  return memcpy(new, s, len);
}


x86 assembly (clang, -O0):
<strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strnlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    117a <strndup+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    119b <strndup+0x6b>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strndup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strnlen@plt>
mov    %rax,%r15
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1164 <strndup+0x34>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = call i64 @strnlen(i8* %8, i64 %9)
store i64 %10, i64* %6
%11 = load i64, i64* %6
%12 = add i64 %11, 1
%13 = call i8* @malloc(i64 %12)
store i8* %13, i8** %7
%14 = load i8*, i8** %7
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %2
store i8* null, i8** %3
br label %25
17: ; preds = %2
%18 = load i8*, i8** %7
%19 = load i64, i64* %6
%20 = getelementptr inbounds i8, i8* %18, i64 %19
store i8 0, i8* %20
%21 = load i8*, i8** %7
%22 = load i8*, i8** %4
%23 = load i64, i64* %6
%24 = call i8* @memcpy(i8* %21, i8* %22, i64 %23)
store i8* %24, i8** %3
br label %25
25: ; preds = %17, %16
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define noalias i8* @strndup(i8* nocapture %0, i64 %1) {
%3 = tail call i64 @strnlen(i8* %0, i64 %1)
%4 = add i64 %3, 1
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %5, i64 %3
store i8 0, i8* %8
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 %0, i64 %3, i1 false)
br label %9
9: ; preds = %2, %7
ret i8* %5
}
int max(int num1, int num2) {
  int result;
  if (num1 > num2)
    result = num1;
  else
    result = num2;
  return result;
}


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

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

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int a(int argc, char *argv[]) {}


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

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

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

LLVM IR (-O2):
define i32 @a(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void pi_conf_dispose_string(char *str) { free(str); }


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

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

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

LLVM IR (-O2):
define void @pi_conf_dispose_string(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nearly_main();
int main(void) {
  nearly_main();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nearly_main()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_nextafterl();
scalar_t__ nextafterl(long double, long double);
void test_nextafterl(long double ld1, long double ld2) {
  if (nextafterl(ld1, ld2) != nextafterl(ld1, ld2))
    link_failure_nextafterl();
}


x86 assembly (clang, -O0):
<test_nextafterl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <nextafterl@plt>
mov    %rax,-0x28(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <nextafterl@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     1175 <test_nextafterl+0x55>
mov    $0x0,%al
call   1040 <link_failure_nextafterl@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nextafterl>:
push   %rbx
sub    $0x40,%rsp
fldt   0x50(%rsp)
fld    %st(0)
fstpt  0x34(%rsp)
fldt   0x60(%rsp)
fld    %st(0)
fstpt  0x28(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <nextafterl@plt>
mov    %rax,%rbx
fldt   0x28(%rsp)
fstpt  0x10(%rsp)
fldt   0x34(%rsp)
fstpt  (%rsp)
call   1030 <nextafterl@plt>
cmp    %rax,%rbx
jne    1167 <test_nextafterl+0x47>
add    $0x40,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
jmp    1040 <link_failure_nextafterl@plt>

LLVM IR (-O0):
define void @test_nextafterl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @nextafterl(x86_fp80 %5, x86_fp80 %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = load x86_fp80, x86_fp80* %4
%10 = call i64 @nextafterl(x86_fp80 %8, x86_fp80 %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_nextafterl()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_nextafterl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @nextafterl(x86_fp80 %0, x86_fp80 %1)
%4 = tail call i64 @nextafterl(x86_fp80 %0, x86_fp80 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_nextafterl()
br label %8
8: ; preds = %6, %2
ret void
}
void insert_edge(unsigned edge[2], unsigned a, unsigned b) {
  edge[0] = a;
  edge[1] = b;
}


x86 assembly (clang, -O0):
<insert_edge>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_edge>:
mov    %esi,(%rdi)
mov    %edx,0x4(%rdi)
ret

LLVM IR (-O0):
define void @insert_edge(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
%7 = load i32, i32* %5
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %6
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @insert_edge(i32* nocapture writeonly %0, i32 %1, i32 %2) {
store i32 %1, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %2, i32* %4
ret void
}
void autonSkills() {}


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

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

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

LLVM IR (-O2):
define void @autonSkills() {
ret void
}
/* Variables and functions */
int core4_safe(char const *);
int U_EMREXCLUDECLIPRECT_safe(const char *record) {
  return (core4_safe(record));
}


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

x86 assembly (clang, -O2):
<U_EMREXCLUDECLIPRECT_safe>:
jmp    1030 <core4_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMREXCLUDECLIPRECT_safe(i8* %0) {
%2 = tail call i32 @core4_safe(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b, c;
  printf("Input your numbers please\n");
  scanf("%d %d", &a, &b);
  printf("Here is your Ans %d.4\n", a / b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xea6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Input your numbers please\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [23 x i8] c"Here is your Ans %d.4\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = sdiv i32 %7, %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [23 x i8] c"Here is your Ans %d.4\0A\00"
@str = [26 x i8] c"Input your numbers please\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = sdiv i32 %7, %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
char *strtok(char *restrict s, const char *restrict delim) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strtok(i8* noalias nocapture readnone %0, i8* noalias nocapture readnone %1) {
ret i8* null
}
void INT_Excep_TMR0_CMIB0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR0_CMIB0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_send(int, char *);
int /*<<< orphan*/ send_idlist(int, char *);
void japi_delete_grammar(int sd, char *idlist) {
  do_send(sd, "DELGRAM\n");
  send_idlist(sd, idlist);
}


x86 assembly (clang, -O0):
<japi_delete_grammar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    0xec7(%rip),%rsi
call   1040 <do_send@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <send_idlist@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<japi_delete_grammar>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xed1(%rip),%rsi
call   1040 <do_send@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <send_idlist@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"DELGRAM\0A\00"
define void @japi_delete_grammar(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @do_send(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @send_idlist(i32 %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"DELGRAM\0A\00"
define void @japi_delete_grammar(i32 %0, i8* %1) {
%3 = tail call i32 @do_send(i32 %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @send_idlist(i32 %0, i8* %1)
ret void
}
void NV21ToABGR() {}


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

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

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

LLVM IR (-O2):
define void @NV21ToABGR() {
ret void
}
/* Variables and functions */
int fptr_capi20_isinstalled();
scalar_t__ loadlib();
unsigned capi20_isinstalled(void) {
  if (loadlib() < 0)
    return 0x1009;
  return fptr_capi20_isinstalled();
}


x86 assembly (clang, -O0):
<capi20_isinstalled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <loadlib@plt>
cmp    $0x0,%rax
jge    1145 <capi20_isinstalled+0x25>
movl   $0x1009,-0x4(%rbp)
jmp    114f <capi20_isinstalled+0x2f>
mov    $0x0,%al
call   1030 <fptr_capi20_isinstalled@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capi20_isinstalled>:
push   %rax
xor    %eax,%eax
call   1040 <loadlib@plt>
test   %rax,%rax
js     1135 <capi20_isinstalled+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <fptr_capi20_isinstalled@plt>
mov    $0x1009,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @capi20_isinstalled() {
%1 = alloca i32
%2 = call i64 (...) @loadlib()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 4105, i32* %1
br label %7
5: ; preds = %0
%6 = call i32 (...) @fptr_capi20_isinstalled()
store i32 %6, i32* %1
br label %7
7: ; preds = %5, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @capi20_isinstalled() {
%1 = tail call i64 (...) @loadlib()
%2 = icmp slt i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @fptr_capi20_isinstalled()
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 4105, %0 ]
ret i32 %6
}
void *__attribute__((section("trampoline"))) f3(void) { return (void *)f3; }


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

x86 assembly (clang, -O2):
<f3>:
mov    0x2ed9(%rip),%rax
ret

LLVM IR (-O0):
define i8* @f3() section "trampoline" {
ret i8* bitcast (i8* ()* @f3 to i8*)
}

LLVM IR (-O2):
define i8* @f3() section "trampoline" {
ret i8* bitcast (i8* ()* @f3 to i8*)
}
/* Variables and functions */
int inb(int);
void wait_kbc_sendready(void) {
  for (;;) {
    if ((inb(0x0064) & 0x02) == 0) {
      return;
    }
  }
}


x86 assembly (clang, -O0):
<wait_kbc_sendready>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <wait_kbc_sendready+0x9>
mov    $0x64,%edi
call   1030 <inb@plt>
and    $0x2,%eax
cmp    $0x0,%eax
jne    1131 <wait_kbc_sendready+0x21>
pop    %rbp
ret
jmp    1119 <wait_kbc_sendready+0x9>

x86 assembly (clang, -O2):
<wait_kbc_sendready>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x64,%edi
call   1030 <inb@plt>
test   $0x2,%al
jne    1120 <wait_kbc_sendready+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @wait_kbc_sendready() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @inb(i32 100)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
ret void
6: ; preds = %1
br label %1
}

LLVM IR (-O2):
define void @wait_kbc_sendready() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @inb(i32 100)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main() {
  while (1) {
    sleep(1);
    printf("alive\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [7 x i8] c"alive\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @sleep(i32 1)
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %2
}

LLVM IR (-O2):
@str = [6 x i8] c"alive\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
br label %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ delta;
};
typedef TYPE_1__ XmbTextItem;

/* Variables and functions */
int get_XmbTextItem_delta(void *_p) { return (int)((XmbTextItem *)_p)->delta; }


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

x86 assembly (clang, -O2):
<get_XmbTextItem_delta>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XmbTextItem_delta(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XmbTextItem_delta(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
float fahr2cel(float);
int /*<<< orphan*/ printf(char *, float, float);
main() {
  float tf, tc;
  tf = 451;
  tc = fahr2cel(tf);
  printf("%fF = %fC\n", tf, tc);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <fahr2cel@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
call   1040 <fahr2cel@plt>
movaps %xmm0,%xmm1
lea    0xecc(%rip),%rdi
movss  0xec0(%rip),%xmm0
call   1030 <printf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%fF = %fC\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 4.510000e+02, float* %2
%4 = load float, float* %2
%5 = call float @fahr2cel(float %4)
store float %5, float* %3
%6 = load float, float* %2
%7 = load float, float* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %6, float %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [11 x i8] c"%fF = %fC\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call float @fahr2cel(float 4.510000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float 4.510000e+02, float %1)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ get_port(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
uint8_t read_port(uint8_t address, uint8_t port) {
  return get_port(address, port, 0x12, 0x13);
}


x86 assembly (clang, -O0):
<read_port>:
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    $0x12,%edx
mov    $0x13,%ecx
call   1030 <get_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_port>:
mov    $0x12,%edx
mov    $0x13,%ecx
jmp    1030 <get_port@plt>

LLVM IR (-O0):
define i32 @read_port(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 @get_port(i32 %5, i32 %6, i32 18, i32 19)
ret i32 %7
}

LLVM IR (-O2):
define i32 @read_port(i32 %0, i32 %1) {
%3 = tail call i32 @get_port(i32 %0, i32 %1, i32 18, i32 19)
ret i32 %3
}
/* Type definitions */
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mg_printf(struct mg_connection *, char *, char const *,
                             unsigned long);
scalar_t__ time(int /*<<< orphan*/ *);
void mg_send_digest_auth_request(struct mg_connection *c, const char *domain) {
  mg_printf(c,
            "HTTP/1.1 401 Unauthorized\r\n"
            "WWW-Authenticate: Digest qop=\"auth\", "
            "realm=\"%s\", nonce=\"%lu\"\r\n"
            "Content-Length: 0\r\n\r\n",
            domain, (unsigned long)time(NULL));
}


x86 assembly (clang, -O0):
<mg_send_digest_auth_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xea5(%rip),%rsi
call   1030 <mg_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mg_send_digest_auth_request>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mg_printf@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
@.str = [111 x i8] c"HTTP/1.1 401 Unauthorized\0D\0AWWW-Authenticate: Digest qop=\22auth\22, realm=\22%s\22, nonce=\22%lu\22\0D\0AContent-Length: 0\0D\0A\0D\0A\00"
define void @mg_send_digest_auth_request(%struct.mg_connection* %0, i8* %1) {
%3 = alloca %struct.mg_connection*
%4 = alloca i8*
store %struct.mg_connection* %0, %struct.mg_connection** %3
store i8* %1, i8** %4
%5 = load %struct.mg_connection*, %struct.mg_connection** %3
%6 = load i8*, i8** %4
%7 = call i64 @time(i32* null)
%8 = call i32 @mg_printf(%struct.mg_connection* %5, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str, i64 0, i64 0), i8* %6, i64 %7)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
@.str = [111 x i8] c"HTTP/1.1 401 Unauthorized\0D\0AWWW-Authenticate: Digest qop=\22auth\22, realm=\22%s\22, nonce=\22%lu\22\0D\0AContent-Length: 0\0D\0A\0D\0A\00"
define void @mg_send_digest_auth_request(%struct.mg_connection* %0, i8* %1) {
%3 = tail call i64 @time(i32* null)
%4 = tail call i32 @mg_printf(%struct.mg_connection* %0, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str, i64 0, i64 0), i8* %1, i64 %3)
ret void
}
int beginigAcceptConnections(struct World *world) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.World = type opaque
define i32 @beginigAcceptConnections(%struct.World* nocapture readnone %0) {
ret i32 0
}
int argCount(const char **aArgs) {
  int cnt = 0;
  while (aArgs[cnt++])
    ;
  return cnt - 1;
}


x86 assembly (clang, -O0):
<argCount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1131 <argCount+0x31>
jmp    110f <argCount+0xf>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<argCount>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <argCount+0x10>
ret

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

LLVM IR (-O2):
define i32 @argCount(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ 0, %1 ]
%4 = add nuw i64 %3, 1
%5 = getelementptr inbounds i8*, i8** %0, i64 %3
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int __sec_reduce_add();
int foo2() {
  int a;
  a = __sec_reduce_add();
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__sec_reduce_add@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo2() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @__sec_reduce_add()
store i32 %3, i32* %2
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo2() {
%1 = tail call i32 (...) @__sec_reduce_add()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ __assert_func(char *, int, char *, char *);
void force_error() {
  __assert_func("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/yangxi/omap4m3/refs/heads/"
                "master/testsuites/sptests/spfatal10/testcase.h",
                21, "Init", "forced");
}


x86 assembly (clang, -O0):
<force_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x15,%esi
lea    0xf7c(%rip),%rdx
lea    0xf7a(%rip),%rcx
call   1030 <__assert_func@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<force_error>:
lea    0xee9(%rip),%rdi
lea    0xf85(%rip),%rdx
lea    0xf83(%rip),%rcx
mov    $0x15,%esi
jmp    1030 <__assert_func@plt>

LLVM IR (-O0):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/yangxi/omap4m3/refs/heads/master/testsuites/sptests/spfatal10/testcase.h\00"
@.str.1 = [5 x i8] c"Init\00"
@.str.2 = [7 x i8] c"forced\00"
define void @force_error() {
%1 = call i32 @__assert_func(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/yangxi/omap4m3/refs/heads/master/testsuites/sptests/spfatal10/testcase.h\00"
@.str.1 = [5 x i8] c"Init\00"
@.str.2 = [7 x i8] c"forced\00"
define void @force_error() {
%1 = tail call i32 @__assert_func(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int pios_window_control_activate(int hwnd, int controlId) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @pios_window_control_activate(i32 %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
void *malloc(size_t);
void *v(size_t n) { return malloc(n); }


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

x86 assembly (clang, -O2):
<v>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @v(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @v(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int gpio_pin_exists(int port) {
  int pin[] = {135, 136, 137, 138, 139, 143, 144, 145, 146};
  int i;
  for (i = 0; i < 9; i++)
    if (port == pin[i])
      return 0;
  return -1;
}


x86 assembly (clang, -O0):
<gpio_pin_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeda(%rip),%rsi
mov    $0x24,%edx
call   1030 <memcpy@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x9,-0x34(%rbp)
jge    1171 <gpio_pin_exists+0x61>
mov    -0x8(%rbp),%eax
movslq -0x34(%rbp),%rcx
cmp    -0x30(%rbp,%rcx,4),%eax
jne    115e <gpio_pin_exists+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1178 <gpio_pin_exists+0x68>
jmp    1163 <gpio_pin_exists+0x53>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1137 <gpio_pin_exists+0x27>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_pin_exists>:
add    $0xffffff79,%edi
mov    $0xffffffff,%eax
cmp    $0xb,%edi
ja     111d <gpio_pin_exists+0x1d>
movslq %edi,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@__const.gpio_pin_exists.pin = [9 x i32] [i32 135, i32 136, i32 137, i32 138, i32 139, i32 143, i32 144, i32 145, i32 146]
define i32 @gpio_pin_exists(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [9 x i32]
%5 = alloca i32
store i32 %0, i32* %3
%6 = bitcast [9 x i32]* %4 to i8*
store i32 0, i32* %5
br label %7
7: ; preds = %19, %1
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 9
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = icmp eq i32 %11, %15
br i1 %16, label %17, label %18
17: ; preds = %10
store i32 0, i32* %2
br label %23
18: ; preds = %10
br label %19
19: ; preds = %18
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %7
22: ; preds = %7
store i32 -1, i32* %2
br label %23
23: ; preds = %22, %17
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
@switch.table.gpio_pin_exists = [12 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0, i32 -1, i32 -1, i32 -1, i32 0, i32 0, i32 0, i32 0]
define i32 @gpio_pin_exists(i32 %0) {
%2 = add i32 %0, -135
%3 = icmp ult i32 %2, 12
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [12 x i32], [12 x i32]* @switch.table.gpio_pin_exists, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int count(int *, int);
int count_opt(int *, int);
int test_inversions() {
  int array[] = {1, 5, 2, 4, 3};
  return 4 == count(array, 5) && 4 == count_opt(array, 5);
}


x86 assembly (clang, -O0):
<test_inversions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1030 <count@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x4,%ecx
cmp    %edx,%ecx
mov    %al,-0x21(%rbp)
jne    1186 <test_inversions+0x66>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <count_opt@plt>
mov    %eax,%ecx
mov    $0x4,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_inversions>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <count@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4,%ecx
jne    1166 <test_inversions+0x46>
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <count_opt@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4,%ecx
sete   %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_inversions.array = [5 x i32] [i32 1, i32 5, i32 2, i32 4, i32 3]
define i32 @test_inversions() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @count(i32* %3, i32 5)
%5 = icmp eq i32 4, %4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%8 = call i32 @count_opt(i32* %7, i32 5)
%9 = icmp eq i32 4, %8
br label %10
10: ; preds = %6, %0
%11 = phi i1 [ false, %0 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@__const.test_inversions.array = [5 x i32] [i32 1, i32 5, i32 2, i32 4, i32 3]
define i32 @test_inversions() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @count(i32* %3, i32 5)
%5 = icmp eq i32 %4, 4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i32 @count_opt(i32* %3, i32 5)
%8 = icmp eq i32 %7, 4
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %0
%11 = phi i32 [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printInt(int a) { printf("%d\n", a); }


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

x86 assembly (clang, -O2):
<printInt>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printInt(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AUDIO_PLAY;
int ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int audioPlay(int fd, char *arg) {
  if (arg)
    return -1;
  if (ioctl(fd, AUDIO_PLAY) == -1)
    perror("AUDIO_PLAY");
  return 0;
}


x86 assembly (clang, -O0):
<audioPlay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <audioPlay+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <audioPlay+0x53>
mov    -0x8(%rbp),%edi
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    116c <audioPlay+0x4c>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audioPlay>:
push   %rbx
mov    $0xffffffff,%ebx
test   %rsi,%rsi
jne    1140 <audioPlay+0x20>
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
je     1144 <audioPlay+0x24>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
call   1040 <perror@plt>
jmp    1140 <audioPlay+0x20>

LLVM IR (-O0):
@AUDIO_PLAY = global i32 0
@.str = [11 x i8] c"AUDIO_PLAY\00"
define i32 @audioPlay(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* @AUDIO_PLAY
%12 = call i32 @ioctl(i32 %10, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
store i32 0, i32* %3
br label %17
17: ; preds = %16, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@AUDIO_PLAY = global i32 0
@.str = [11 x i8] c"AUDIO_PLAY\00"
define i32 @audioPlay(i32 %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = load i32, i32* @AUDIO_PLAY
%6 = tail call i32 @ioctl(i32 %0, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %4, %8, %2
%11 = phi i32 [ -1, %2 ], [ 0, %8 ], [ 0, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xce() {
  Assert_real((iscntrl(206) == 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_iscntrl.c",
              1035, ("iscntrl should be 0 for 0xce"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xce\00"
define void @t_iscntrl_0xce() {
%1 = tail call i64 @iscntrl(i32 206)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1035, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
char *md_gln(void) {
  struct passwd *t;
  t = getpwuid(getuid());
  return (t->pw_name);
}


x86 assembly (clang, -O0):
<md_gln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_gln>:
push   %rax
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
define i8* @md_gln() {
%1 = alloca %struct.passwd*
%2 = call i32 (...) @getuid()
%3 = call %struct.passwd* @getpwuid(i32 %2)
store %struct.passwd* %3, %struct.passwd** %1
%4 = load %struct.passwd*, %struct.passwd** %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %4, i32 0, i32 0
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
define i8* @md_gln() {
%1 = tail call i32 (...) @getuid()
%2 = tail call %struct.passwd* @getpwuid(i32 %1)
%3 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%4 = load i8*, i8** %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
double volumeForRadius(double);
void calculateVolume(double radius) {
  printf("The volume of a sphere with radius %2.3f is %f\n", radius,
         volumeForRadius(radius));
}


x86 assembly (clang, -O0):
<calculateVolume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <volumeForRadius@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateVolume>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <volumeForRadius@plt>
movaps %xmm0,%xmm1
lea    0xecb(%rip),%rdi
movsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"The volume of a sphere with radius %2.3f is %f\0A\00"
define void @calculateVolume(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @volumeForRadius(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %3, double %5)
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"The volume of a sphere with radius %2.3f is %f\0A\00"
define void @calculateVolume(double %0) {
%2 = tail call double @volumeForRadius(double %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %0, double %2)
ret void
}
void direct_check_item(struct item_head *ih, char *item) {}


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

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

LLVM IR (-O0):
%struct.item_head = type opaque
define void @direct_check_item(%struct.item_head* %0, i8* %1) {
%3 = alloca %struct.item_head*
%4 = alloca i8*
store %struct.item_head* %0, %struct.item_head** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.item_head = type opaque
define void @direct_check_item(%struct.item_head* nocapture %0, i8* nocapture %1) {
ret void
}
__attribute__((always_)) void pm_runtime_put_noidle(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @pm_runtime_put_noidle(%struct.device* nocapture %0) {
ret void
}