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

/* Variables and functions */
int ht_delete_ind_a(struct hashtable *, char *, int /*<<< orphan*/);
int ht_delete_a(struct hashtable *ht, char *altkey) {
  return ht_delete_ind_a(ht, altkey, 0);
}


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

x86 assembly (clang, -O2):
<ht_delete_a>:
xor    %edx,%edx
jmp    1030 <ht_delete_ind_a@plt>

LLVM IR (-O0):
%struct.hashtable = type { i32 }
define i32 @ht_delete_a(%struct.hashtable* %0, i8* %1) {
%3 = alloca %struct.hashtable*
%4 = alloca i8*
store %struct.hashtable* %0, %struct.hashtable** %3
store i8* %1, i8** %4
%5 = load %struct.hashtable*, %struct.hashtable** %3
%6 = load i8*, i8** %4
%7 = call i32 @ht_delete_ind_a(%struct.hashtable* %5, i8* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.hashtable = type { i32 }
define i32 @ht_delete_a(%struct.hashtable* %0, i8* %1) {
%3 = tail call i32 @ht_delete_ind_a(%struct.hashtable* %0, i8* %1, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_mullo_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_mullo_epi16(__m128i A, __m128i B) {
  return _mm_mullo_epi16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_mullo_epi16>:
jmp    1030 <_mm_mullo_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_mullo_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mullo_epi16(i32 %0, i32 %1)
ret i32 %3
}
char *string_copy_max(char *destination, const char *source,
                      unsigned int count) {
  int esi, edi, ecx, eax;
  asm volatile("cld\n"
               "1:  decl %2\n"
               "js 2f\n"
               "lodsb\n"
               "stosb\n"
               "testb %%al, %%al\n"
               "jne 1b\n"
               "rep\n"
               "stosb\n"
               "2:"
               : "=&S"(esi), "=&D"(edi), "=&c"(ecx), "=&a"(eax)
               : "0"(source), "1"(destination), "2"(count)
               : "memory");
  return destination;
}


x86 assembly (clang, -O0):
<string_copy_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%ecx
cld
dec    %ecx
js     112f <string_copy_max+0x2f>
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    111b <string_copy_max+0x1b>
rep stos %al,%es:(%rdi)
mov    %esi,%edx
mov    %edx,-0x18(%rbp)
mov    %edi,%edx
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_copy_max>:
mov    %edx,%ecx
mov    %rdi,%rdx
cld
dec    %ecx
js     1112 <string_copy_max+0x12>
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1106 <string_copy_max+0x6>
rep stos %al,%es:(%rdi)
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i8* @string_copy_max(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%11 = load i8*, i8** %5
%12 = load i8*, i8** %4
%13 = load i32, i32* %6
%14 = call { i8*, i8*, i32, i32 } asm sideeffect "cld\0A1: decl $2\0Ajs 2f\0Alodsb\0Astosb\0Atestb %al, %al\0Ajne 1b\0Arep\0Astosb\0A2:", "=&{si},=&{di},=&{cx},=&{ax},0,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %11, i8* %12, i32 %13)
%15 = extractvalue { i8*, i8*, i32, i32 } %14, 0
%16 = extractvalue { i8*, i8*, i32, i32 } %14, 1
%17 = extractvalue { i8*, i8*, i32, i32 } %14, 2
%18 = extractvalue { i8*, i8*, i32, i32 } %14, 3
%19 = ptrtoint i8* %15 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %7
%21 = ptrtoint i8* %16 to i64
%22 = trunc i64 %21 to i32
store i32 %22, i32* %8
store i32 %17, i32* %9
store i32 %18, i32* %10
%23 = load i8*, i8** %4
ret i8* %23
}

LLVM IR (-O2):
define i8* @string_copy_max(i8* returned %0, i8* %1, i32 %2) {
%4 = tail call { i8*, i8*, i32, i32 } asm sideeffect "cld\0A1: decl $2\0Ajs 2f\0Alodsb\0Astosb\0Atestb %al, %al\0Ajne 1b\0Arep\0Astosb\0A2:", "=&{si},=&{di},=&{cx},=&{ax},0,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %1, i8* %0, i32 %2)
ret i8* %0
}
/* Variables and functions */
char *strcpy(char *, char const *);
size_t strlen(char *);
char *strcat(char *s1, const char *s2) { return strcpy(&s1[strlen(s1)], s2); }


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
add    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8*, i8** %4
%10 = call i8* @strcpy(i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %1)
ret i8* %4
}
unsigned int f(unsigned int a) { return a % -8; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xfffffff8,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
sub    $0xfffffff8,%eax
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp ult i32 %0, -8
%3 = add i32 %0, 8
%4 = select i1 %2, i32 %0, i32 %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ shell();
int main() {
  shell();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @shell()
ret i32 0
}
void free_f4tensor(float ****m) {
  free(m[0][0][0]);
  free(m[0][0]);
  free(m[0]);
  free(m);
}


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

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

LLVM IR (-O0):
define void @free_f4tensor(float**** %0) {
%2 = alloca float****
store float**** %0, float***** %2
%3 = load float****, float***** %2
%4 = getelementptr inbounds float***, float**** %3, i64 0
%5 = load float***, float**** %4
%6 = getelementptr inbounds float**, float*** %5, i64 0
%7 = load float**, float*** %6
%8 = getelementptr inbounds float*, float** %7, i64 0
%9 = load float*, float** %8
%10 = bitcast float* %9 to i8*
%11 = load float****, float***** %2
%12 = getelementptr inbounds float***, float**** %11, i64 0
%13 = load float***, float**** %12
%14 = getelementptr inbounds float**, float*** %13, i64 0
%15 = load float**, float*** %14
%16 = bitcast float** %15 to i8*
%17 = load float****, float***** %2
%18 = getelementptr inbounds float***, float**** %17, i64 0
%19 = load float***, float**** %18
%20 = bitcast float*** %19 to i8*
%21 = load float****, float***** %2
%22 = bitcast float**** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @free_f4tensor(float**** nocapture %0) {
%2 = bitcast float**** %0 to i8****
%3 = load i8***, i8**** %2
%4 = load i8**, i8*** %3
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = bitcast float**** %0 to i8***
%7 = load i8**, i8*** %6
%8 = load i8*, i8** %7
tail call void @free(i8* %8)
%9 = bitcast float**** %0 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = bitcast float**** %0 to i8*
tail call void @free(i8* %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int x;
  assume(x == 1 || x == 2);
  while (1) {
    if (x == 1)
      x = 2;
    else if (x == 2)
      x = 1;
    assert(x <= 8);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1148 <main+0x28>
cmpl   $0x2,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x1,-0x8(%rbp)
jne    116b <main+0x4b>
movl   $0x2,-0x8(%rbp)
jmp    1181 <main+0x61>
cmpl   $0x2,-0x8(%rbp)
jne    117c <main+0x5c>
movl   $0x1,-0x8(%rbp)
jmp    1181 <main+0x61>
cmpl   $0x8,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1155 <main+0x35>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %edi,%edi
call   1040 <assume@plt>
mov    $0x1,%r14d
mov    $0x2,%ebp
mov    %eax,%ebx
nopl   0x0(%rax,%rax,1)
cmp    $0x2,%eax
cmove  %r14d,%ebx
cmp    $0x1,%eax
cmove  %ebp,%ebx
xor    %edi,%edi
cmp    $0x9,%ebx
setl   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
jmp    1140 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 2
br label %8
8: ; preds = %5, %0
%9 = phi i1 [ true, %0 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assume(i32 %10)
br label %12
12: ; preds = %8, %21
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 2, i32* %2
br label %21
16: ; preds = %12
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 2
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 1, i32* %2
br label %20
20: ; preds = %19, %16
br label %21
21: ; preds = %20, %15
%22 = load i32, i32* %2
%23 = icmp sle i32 %22, 8
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
br label %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ undef, %0 ], [ %7, %2 ]
%4 = icmp eq i32 %3, 1
%5 = icmp eq i32 %3, 2
%6 = select i1 %5, i32 1, i32 %3
%7 = select i1 %4, i32 2, i32 %6
%8 = icmp slt i32 %7, 9
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ cat_strings(char *, char *, char *, char *,
                               int /*<<< orphan*/ *);
int main() {
  cat_strings("Hello", ", wor", "ld.", "\n", NULL);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee7(%rip),%rsi
lea    0xee6(%rip),%rdx
lea    0xee3(%rip),%rcx
xor    %r8d,%r8d
call   1030 <cat_strings@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [6 x i8] c", wor\00"
@.str.2 = [4 x i8] c"ld.\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @cat_strings(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ios_delay();
int ipc_read(int);
void ipc_wait_reply(void) {
  while (!(ipc_read(1) & 0x4))
    ;
  ios_delay();
}


x86 assembly (clang, -O0):
<ipc_wait_reply>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <ipc_wait_reply+0x9>
mov    $0x1,%edi
call   1040 <ipc_read@plt>
and    $0x4,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114b <ipc_wait_reply+0x2b>
jmp    1150 <ipc_wait_reply+0x30>
jmp    1129 <ipc_wait_reply+0x9>
mov    $0x0,%al
call   1030 <ios_delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_wait_reply>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <ipc_read@plt>
test   $0x4,%al
je     1130 <ipc_wait_reply+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ios_delay@plt>

LLVM IR (-O0):
define void @ipc_wait_reply() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @ipc_read(i32 1)
%3 = and i32 %2, 4
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
%8 = call i32 (...) @ios_delay()
ret void
}

LLVM IR (-O2):
define void @ipc_wait_reply() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @ipc_read(i32 1)
%3 = and i32 %2, 4
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = tail call i32 (...) @ios_delay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void shutdown_clean(int sig) { exit(0); }


x86 assembly (clang, -O0):
<shutdown_clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<shutdown_clean>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @shutdown_clean(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @shutdown_clean(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void rpiPrint(char *str) { printf("%s", str); }


x86 assembly (clang, -O0):
<rpiPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpiPrint>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @rpiPrint(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DifferingObjectSize0(void *const);
int /*<<< orphan*/ DifferingObjectSize1(void *const);
int /*<<< orphan*/ DifferingObjectSize2(void *const);
int /*<<< orphan*/ DifferingObjectSize3(void *const);
void test9(void *const p __attribute__((pass_object_size(0)))) {
  DifferingObjectSize2(p);
  DifferingObjectSize0(p);
  DifferingObjectSize1(p);
  DifferingObjectSize3(p);
}


x86 assembly (clang, -O0):
<test9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <DifferingObjectSize2@plt>
mov    -0x8(%rbp),%rdi
call   1050 <DifferingObjectSize0@plt>
mov    -0x8(%rbp),%rdi
call   1030 <DifferingObjectSize1@plt>
mov    -0x8(%rbp),%rdi
call   1040 <DifferingObjectSize3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test9>:
push   %rbx
mov    %rdi,%rbx
call   1060 <DifferingObjectSize2@plt>
mov    %rbx,%rdi
call   1050 <DifferingObjectSize0@plt>
mov    %rbx,%rdi
call   1030 <DifferingObjectSize1@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <DifferingObjectSize3@plt>

LLVM IR (-O0):
define void @test9(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @DifferingObjectSize2(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @DifferingObjectSize0(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @DifferingObjectSize1(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @DifferingObjectSize3(i8* %11)
ret void
}

LLVM IR (-O2):
define void @test9(i8* %0, i64 %1) {
%3 = tail call i32 @DifferingObjectSize2(i8* %0)
%4 = tail call i32 @DifferingObjectSize0(i8* %0)
%5 = tail call i32 @DifferingObjectSize1(i8* %0)
%6 = tail call i32 @DifferingObjectSize3(i8* %0)
ret void
}
void XtAppUnlock() {}


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

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

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

LLVM IR (-O2):
define void @XtAppUnlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_FLASH_OUT_OUTPUT() { set_io_bit(0x36, 7); }


x86 assembly (clang, -O0):
<TOSH_MAKE_FLASH_OUT_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x36,%edi
mov    $0x7,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_FLASH_OUT_OUTPUT>:
mov    $0x36,%edi
mov    $0x7,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_FLASH_OUT_OUTPUT() {
%1 = call i32 @set_io_bit(i32 54, i32 7)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_FLASH_OUT_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 54, i32 7)
ret void
}
void XkbAllocGeomShapes() {}


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

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

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

LLVM IR (-O2):
define void @XkbAllocGeomShapes() {
ret void
}
/* Type definitions */
struct parser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ next(struct parser *);
int peek(struct parser *);
int skip_to_eol(struct parser *p) {
  int ch;
  while ((ch = peek(p)) != (-1) && ch != '\n')
    next(p);
  return ch;
}


x86 assembly (clang, -O0):
<skip_to_eol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <peek@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0xd(%rbp)
je     1152 <skip_to_eol+0x32>
cmpl   $0xa,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1162 <skip_to_eol+0x42>
jmp    1170 <skip_to_eol+0x50>
mov    -0x8(%rbp),%rdi
call   1040 <next@plt>
jmp    112c <skip_to_eol+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_to_eol>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <peek@plt>
cmp    $0xffffffff,%eax
je     114c <skip_to_eol+0x2c>
cmp    $0xa,%eax
je     114c <skip_to_eol+0x2c>
mov    %rbx,%rdi
call   1040 <next@plt>
jmp    1130 <skip_to_eol+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.parser = type { i32 }
define i32 @skip_to_eol(%struct.parser* %0) {
%2 = alloca %struct.parser*
%3 = alloca i32
store %struct.parser* %0, %struct.parser** %2
br label %4
4: ; preds = %13, %1
%5 = load %struct.parser*, %struct.parser** %2
%6 = call i32 @peek(%struct.parser* %5)
store i32 %6, i32* %3
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 10
br label %11
11: ; preds = %8, %4
%12 = phi i1 [ false, %4 ], [ %10, %8 ]
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = load %struct.parser*, %struct.parser** %2
%15 = call i32 @next(%struct.parser* %14)
br label %4
16: ; preds = %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.parser = type { i32 }
define i32 @skip_to_eol(%struct.parser* %0) {
br label %2
2: ; preds = %4, %1
%3 = tail call i32 @peek(%struct.parser* %0)
switch i32 %3, label %4 [
i32 -1, label %6
i32 10, label %6
]
4: ; preds = %2
%5 = tail call i32 @next(%struct.parser* %0)
br label %2
6: ; preds = %2, %2
ret i32 %3
}
/* Variables and functions */
int cpuid_simple(int);
int cpuinfo_has_mmx() { return (cpuid_simple(1) & 0x00800000); }


x86 assembly (clang, -O0):
<cpuinfo_has_mmx>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <cpuid_simple@plt>
and    $0x800000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuinfo_has_mmx>:
push   %rax
mov    $0x1,%edi
call   1030 <cpuid_simple@plt>
and    $0x800000,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cpuinfo_has_mmx() {
%1 = call i32 @cpuid_simple(i32 1)
%2 = and i32 %1, 8388608
ret i32 %2
}

LLVM IR (-O2):
define i32 @cpuinfo_has_mmx() {
%1 = tail call i32 @cpuid_simple(i32 1)
%2 = and i32 %1, 8388608
ret i32 %2
}
unsigned char inb(unsigned short p) {
  unsigned char v;
  asm volatile("inb %1,%0" : "=a"(v) : "d"(p));
  return v;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
/* Variables and functions */
int foo(int);
int main(void) { return foo(42); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x2a,%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 42)
ret i32 %1
}
int popcount3(unsigned *array, int len) {
  int i, result = 0;
  unsigned x;
  for (i = 0; i < len; i++) {
    x = array[i];
    asm("\n"
        "ini3:                   \n\t"
        "   shr          %[x]    \n\t"
        "   adc      $0, %[r]    \n\t"
        "   test   %[x], %[x]    \n\t"
        "   jne        ini3      \n\t"
        : [r] "+r"(result)
        : [x] "r"(x)
        : "edx");
  }
  return result;
}


x86 assembly (clang, -O0):
<popcount3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <ini3+0x1e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx

x86 assembly (clang, -O2):
<popcount3>:
test   %esi,%esi
jle    1126 <ini3+0x13>
mov    %esi,%r8d
xor    %esi,%esi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
mov    (%rdi,%rsi,4),%ecx

LLVM IR (-O0):
define i32 @popcount3(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %6
store i32 0, i32* %5
br label %8
8: ; preds = %21, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = call i32 asm "\0Aini3: \0A\09 shr $1 \0A\09 adc $$0, $0 \0A\09 test $1, $1 \0A\09 jne ini3 \0A\09", "=r,r,0,~{edx},~{dirflag},~{fpsr},~{flags}"(i32 %19, i32 %18)
store i32 %20, i32* %6
br label %21
21: ; preds = %12
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %8
24: ; preds = %8
%25 = load i32, i32* %6
ret i32 %25
}

LLVM IR (-O2):
define i32 @popcount3(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = phi i32 [ 0, %4 ], [ %11, %6 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %7
%10 = load i32, i32* %9
%11 = tail call i32 asm "\0Aini3: \0A\09 shr $1 \0A\09 adc $$0, $0 \0A\09 test $1, $1 \0A\09 jne ini3 \0A\09", "=r,r,0,~{edx},~{dirflag},~{fpsr},~{flags}"(i32 %10, i32 %8)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = phi i32 [ 0, %2 ], [ %11, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ SetFontWeight108(unsigned long);
void setfontweight(unsigned long wg) { SetFontWeight108(wg); }


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

x86 assembly (clang, -O2):
<setfontweight>:
jmp    1030 <SetFontWeight108@plt>

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

LLVM IR (-O2):
define void @setfontweight(i64 %0) {
%2 = tail call i32 @SetFontWeight108(i64 %0)
ret void
}
int gtty(fildes, argp)
int fildes;
struct sgttyb *argp;
{
  return ioctl(fildes, 0x40067408, argp);
}


x86 assembly (clang, -O0):
<gtty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x40067408,%esi
mov    $0x0,%al
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtty>:
mov    %rsi,%rdx
mov    $0x40067408,%esi
xor    %eax,%eax
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
%struct.sgttyb = type opaque
define i32 @gtty(i32 %0, %struct.sgttyb* %1) {
%3 = alloca i32
%4 = alloca %struct.sgttyb*
store i32 %0, i32* %3
store %struct.sgttyb* %1, %struct.sgttyb** %4
%5 = load i32, i32* %3
%6 = load %struct.sgttyb*, %struct.sgttyb** %4
%7 = call i32 (i32, i32, %struct.sgttyb*, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, %struct.sgttyb*, ...)*)(i32 %5, i32 1074164744, %struct.sgttyb* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.sgttyb = type opaque
define i32 @gtty(i32 %0, %struct.sgttyb* %1) {
%3 = tail call i32 (i32, i32, %struct.sgttyb*, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, %struct.sgttyb*, ...)*)(i32 %0, i32 1074164744, %struct.sgttyb* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test37_Test_targetInit__I() { printf("Test init\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Test init\0A\00"
define void @test37_Test_targetInit__I() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"Test init\00"
define void @test37_Test_targetInit__I() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isbadanswer(char *);
int /*<<< orphan*/ msg_badinput();
int /*<<< orphan*/ newline();
int /*<<< orphan*/ scanf(char *, char *);
char *fixbadanswer(char *answer, void (*func)()) {
  while (isbadanswer(answer)) {
    msg_badinput();
    newline();
    func();
    scanf("%s", answer);
  }
  return answer;
}


x86 assembly (clang, -O0):
<fixbadanswer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <isbadanswer@plt>
cmp    $0x0,%rax
je     118b <fixbadanswer+0x4b>
mov    $0x0,%al
call   1040 <msg_badinput@plt>
mov    $0x0,%al
call   1030 <newline@plt>
mov    $0x0,%al
call   *-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe7f(%rip),%rdi
call   1050 <scanf@plt>
jmp    1150 <fixbadanswer+0x10>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixbadanswer>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1060 <isbadanswer@plt>
test   %rax,%rax
je     118b <fixbadanswer+0x4b>
lea    0xea4(%rip),%r15
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <msg_badinput@plt>
xor    %eax,%eax
call   1030 <newline@plt>
xor    %eax,%eax
call   *%r14
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1060 <isbadanswer@plt>
test   %rax,%rax
jne    1160 <fixbadanswer+0x20>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i8* @fixbadanswer(i8* returned %0, void (...)* nocapture %1) {
%3 = tail call i64 @isbadanswer(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %2, %5
%6 = tail call i32 (...) @msg_badinput()
%7 = tail call i32 (...) @newline()
tail call void (...) %1()
%8 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i64 @isbadanswer(i8* %0)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %5
11: ; preds = %5, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int main(void) {
  foo();
  foo();
  foo();
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @foo()
ret i32 0
}
/* Variables and functions */
int LZ4_compress_fast(char const *, char *, int, int, int);
int LZ4_compress_default(const char *src, char *dst, int srcSize,
                         int maxOutputSize) {
  return LZ4_compress_fast(src, dst, srcSize, maxOutputSize, 1);
}


x86 assembly (clang, -O0):
<LZ4_compress_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0x1,%r8d
call   1030 <LZ4_compress_fast@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compress_default>:
mov    $0x1,%r8d
jmp    1030 <LZ4_compress_fast@plt>

LLVM IR (-O0):
define i32 @LZ4_compress_default(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @LZ4_compress_fast(i8* %9, i8* %10, i32 %11, i32 %12, i32 1)
ret i32 %13
}

LLVM IR (-O2):
define i32 @LZ4_compress_default(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @LZ4_compress_fast(i8* %0, i8* %1, i32 %2, i32 %3, i32 1)
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_quaddobl_target_solutions_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(265, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_target_solutions_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x109,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_target_solutions_to_container>:
mov    $0x109,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_target_solutions_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 265, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_target_solutions_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 265, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ SIGSTOP;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  kill(getpid(), SIGSTOP);
  getpid();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGSTOP = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = load i32, i32* @SIGSTOP
%4 = call i32 @kill(i32 %2, i32 %3)
%5 = call i32 (...) @getpid()
ret i32 0
}

LLVM IR (-O2):
@SIGSTOP = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = load i32, i32* @SIGSTOP
%3 = tail call i32 @kill(i32 %1, i32 %2)
%4 = tail call i32 (...) @getpid()
ret i32 0
}
void g8() {}


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

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

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

LLVM IR (-O2):
define void @g8() {
ret void
}
int func1_in_obj(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @func1_in_obj() {
ret i32 0
}

LLVM IR (-O2):
define i32 @func1_in_obj() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ foo(int *);
int *malloc(int);
int main() {
  int *loc;
  loc = malloc(sizeof(int));
  *loc = 0;
  foo(loc);
  assert(*loc == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1050 <foo@plt>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
mov    %rax,%rdi
call   1050 <foo@plt>
xor    %edi,%edi
cmpl   $0x1,(%rbx)
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @malloc(i32 4)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
store i32 0, i32* %4
%5 = load i32*, i32** %2
%6 = call i32 @foo(i32* %5)
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
store i32 0, i32* %1
%2 = tail call i32 @foo(i32* %1)
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print_array(int ar[], int len) {
  for (int i = 0; i < len; i++) {
    printf("ia[%d] = %d\n", i, ar[i]);
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <print_array+0x4a>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <print_array+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"ia[%d] = %d\0A\00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
int _nhpc_get_int_code(int opt) {
  int i;
  i = 0;
  while (opt > 1) {
    i++;
    opt = opt / 2;
  }
  return i;
}


x86 assembly (clang, -O0):
<_nhpc_get_int_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1134 <_nhpc_get_int_code+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <_nhpc_get_int_code+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nhpc_get_int_code>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111c <_nhpc_get_int_code+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %ecx
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <_nhpc_get_int_code+0x10>
ret

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

LLVM IR (-O2):
define i32 @_nhpc_get_int_code(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/"
             "LibFontConfig/src/fc-validate/.libs/lt-fc-validate.c",
             311, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x137,%esi
lea    0xf57(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf72(%rip),%rdx
mov    $0x137,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/LibFontConfig/src/fc-validate/.libs/lt-fc-validate.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/LibFontConfig/src/fc-validate/.libs/lt-fc-validate.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *, char *);
char *strerror(int /*<<< orphan*/);
void chkerr(int error, const char *message) {
  if (error < 0) {
    printf("%s\nError: %s\n", message, strerror(errno));
    exit(1);
  }
}


x86 assembly (clang, -O0):
<chkerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    117c <chkerr+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chkerr>:
test   %edi,%edi
js     1135 <chkerr+0x5>
ret
push   %rbx
mov    %rsi,%rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s\0AError: %s\0A\00"
@errno = global i32 0
define void @chkerr(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 = icmp slt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = load i32, i32* @errno
%10 = call i8* @strerror(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s\0AError: %s\0A\00"
@errno = global i32 0
define void @chkerr(i32 %0, i8* %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
void BIO_int_ctrl(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_int_ctrl() {
ret void
}
f(a) char *a;
{ return a ? 1 : 0; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i8* readnone %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}