xunge/DecIR huggingface dataset:
/* Variables and functions */
char shift_letter(char, int);
char vigenere_encrypt_char(char plainchar, char keychar) {
  int keychar_value = (int)keychar - 'a';
  return shift_letter(plainchar, keychar_value);
}


x86 assembly (clang, -O0):
<vigenere_encrypt_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
movsbl %al,%edi
call   1030 <shift_letter@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vigenere_encrypt_char>:
add    $0xffffff9f,%esi
jmp    1030 <shift_letter@plt>

LLVM IR (-O0):
define signext i8 @vigenere_encrypt_char(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 97
store i32 %8, i32* %5
%9 = load i8, i8* %3
%10 = load i32, i32* %5
%11 = call signext i8 @shift_letter(i8 signext %9, i32 %10)
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @vigenere_encrypt_char(i8 signext %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = add nsw i32 %3, -97
%5 = tail call signext i8 @shift_letter(i8 signext %0, i32 %4)
ret i8 %5
}
/* Variables and functions */
int arg_get_port();
char *arg_get_root();
int /*<<< orphan*/ printf(char *, ...);
void echoListening() {
  printf(" Server address: http://localhost:%d\n", arg_get_port());
  printf(" Server root path: %s\n", arg_get_root());
  printf(" Server running... press ctrl+c to stop.\n");
}


x86 assembly (clang, -O0):
<echoListening>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <arg_get_port@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <arg_get_root@plt>
mov    %rax,%rsi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<echoListening>:
push   %rax
xor    %eax,%eax
call   1030 <arg_get_port@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <arg_get_root@plt>
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec6(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c" Server address: http://localhost:%d\0A\00"
@.str.1 = [23 x i8] c" Server root path: %s\0A\00"
@.str.2 = [42 x i8] c" Server running... press ctrl+c to stop.\0A\00"
define void @echoListening() {
%1 = call i32 (...) @arg_get_port()
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i8* (...) @arg_get_root()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c" Server address: http://localhost:%d\0A\00"
@.str.1 = [23 x i8] c" Server root path: %s\0A\00"
@str = [41 x i8] c" Server running... press ctrl+c to stop.\00"
define void @echoListening() {
%1 = tail call i32 (...) @arg_get_port()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i8* (...) @arg_get_root()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret void
}
void test1(void) {
  int *p = __builtin_malloc(sizeof(int) * 4);
  *p++ = 4;
  __builtin_free(p);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movl   $0x4,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test1() {
ret void
}
int f0() { return 42; }


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

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

LLVM IR (-O0):
define i32 @f0() {
ret i32 42
}

LLVM IR (-O2):
define i32 @f0() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void emitln(const char *s) { printf("\t%s\n", s); }


x86 assembly (clang, -O0):
<emitln>:
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):
<emitln>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\09%s\0A\00"
define void @emitln(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ strcmp(char const *, char *);
int test_2(const char *str, char *ptr) {
  if (strcmp(str, "VALUE") == 0)
    free(ptr);
  free(ptr);
}


x86 assembly (clang, -O0):
<test_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1153 <test_2+0x33>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_2>:
push   %rbx
mov    %rsi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    113d <test_2+0x1d>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"VALUE\00"
define i32 @test_2(i8* %0, i8* nocapture %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %1)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @free(i8* %1)
ret i32 undef
}
int row_byte_uhc_1(int row) { return 0x81 + row; }


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

x86 assembly (clang, -O2):
<row_byte_uhc_1>:
lea    0x81(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @row_byte_uhc_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 129, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @row_byte_uhc_1(i32 %0) {
%2 = add nsw i32 %0, 129
ret i32 %2
}
void io_wait() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ assert(struct utest *);
int /*<<< orphan*/ free(struct utest *);
void utest_free(struct utest *ut) {
  assert(ut);
  free(ut);
}


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

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

LLVM IR (-O0):
%struct.utest = type { i32 }
define void @utest_free(%struct.utest* %0) {
%2 = alloca %struct.utest*
store %struct.utest* %0, %struct.utest** %2
%3 = load %struct.utest*, %struct.utest** %2
%4 = call i32 @assert(%struct.utest* %3)
%5 = load %struct.utest*, %struct.utest** %2
%6 = call i32 @free(%struct.utest* %5)
ret void
}

LLVM IR (-O2):
%struct.utest = type { i32 }
define void @utest_free(%struct.utest* %0) {
%2 = tail call i32 @assert(%struct.utest* %0)
%3 = tail call i32 @free(%struct.utest* %0)
ret void
}
double SFMSanitizeDegrees(double d) {
  while (d < 0.0)
    d += 360.0;
  while (d >= 360.0)
    d -= 360.0;
  return (d);
}


x86 assembly (clang, -O0):
<SFMSanitizeDegrees>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    112e <SFMSanitizeDegrees+0x2e>
movsd  0xee1(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1109 <SFMSanitizeDegrees+0x9>
jmp    1133 <SFMSanitizeDegrees+0x33>
movsd  -0x8(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1165 <SFMSanitizeDegrees+0x65>
movsd  -0x8(%rbp),%xmm0
movsd  0xea9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1133 <SFMSanitizeDegrees+0x33>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SFMSanitizeDegrees>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    112a <SFMSanitizeDegrees+0x2a>
movsd  0xeee(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     1120 <SFMSanitizeDegrees+0x20>
ucomisd 0xece(%rip),%xmm0
jb     115a <SFMSanitizeDegrees+0x5a>
movsd  0xecc(%rip),%xmm1
movsd  0xebc(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jae    1150 <SFMSanitizeDegrees+0x50>
ret

LLVM IR (-O0):
define double @SFMSanitizeDegrees(double %0) {
%2 = alloca double
store double %0, double* %2
br label %3
3: ; preds = %6, %1
%4 = load double, double* %2
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load double, double* %2
%8 = fadd double %7, 3.600000e+02
store double %8, double* %2
br label %3
9: ; preds = %3
br label %10
10: ; preds = %13, %9
%11 = load double, double* %2
%12 = fcmp oge double %11, 3.600000e+02
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load double, double* %2
%15 = fsub double %14, 3.600000e+02
store double %15, double* %2
br label %10
16: ; preds = %10
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @SFMSanitizeDegrees(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %6, %1
%4 = phi double [ %0, %1 ], [ %8, %6 ]
%5 = fcmp ult double %4, 3.600000e+02
br i1 %5, label %14, label %10
6: ; preds = %1, %6
%7 = phi double [ %8, %6 ], [ %0, %1 ]
%8 = fadd double %7, 3.600000e+02
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %6, label %3
10: ; preds = %3, %10
%11 = phi double [ %12, %10 ], [ %4, %3 ]
%12 = fadd double %11, -3.600000e+02
%13 = fcmp ult double %12, 3.600000e+02
br i1 %13, label %14, label %10
14: ; preds = %10, %3
%15 = phi double [ %4, %3 ], [ %12, %10 ]
ret double %15
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
char StringsEqual(const char *str1, const char *str2) {
  return strcmp(str1, str2) == 0;
}


x86 assembly (clang, -O0):
<StringsEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringsEqual>:
push   %rax
call   1030 <strcmp@plt>
test   %rax,%rax
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @StringsEqual(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** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @StringsEqual(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i8
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void checkMallocFailure(void *ptr, char *message) {
  if (ptr == NULL) {
    printf("malloc for %s fail\n", message);
  }
}


x86 assembly (clang, -O0):
<checkMallocFailure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113b <checkMallocFailure+0x2b>
mov    -0x10(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkMallocFailure>:
test   %rdi,%rdi
je     1116 <checkMallocFailure+0x6>
ret
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"malloc for %s fail\0A\00"
define void @checkMallocFailure(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 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"malloc for %s fail\0A\00"
define void @checkMallocFailure(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int are_equal(int *, int *, int);
int /*<<< orphan*/ flip(int *, int, int);
int test_flip() {
  int input[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  int expected[] = {0, 1, 2, 3, 4, 9, 8, 7, 6, 5};
  flip(input, 5, 10);
  return are_equal(input, expected, 10);
}


x86 assembly (clang, -O0):
<test_flip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xed8(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
mov    $0xa,%edx
call   1030 <flip@plt>
lea    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0xa,%edx
call   1050 <are_equal@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_flip>:
push   %rbx
sub    $0x60,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xf00(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0xa,%edx
call   1030 <flip@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <are_equal@plt>
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_flip.input = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
@__const.test_flip.expected = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 9, i32 8, i32 7, i32 6, i32 5]
define i32 @test_flip() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @flip(i32* %5, i32 5, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%9 = call i32 @are_equal(i32* %7, i32* %8, i32 10)
ret i32 %9
}

LLVM IR (-O2):
@__const.test_flip.input = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
@__const.test_flip.expected = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 9, i32 8, i32 7, i32 6, i32 5]
define i32 @test_flip() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @flip(i32* %5, i32 5, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%8 = call i32 @are_equal(i32* %5, i32* %7, i32 10)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_exception_1111();
void m68k_op_cpscc_32(void) {
  if (0) {

    ;
    return;
  }
  m68ki_exception_1111();
}


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

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

LLVM IR (-O0):
define void @m68k_op_cpscc_32() {
%1 = call i32 (...) @m68ki_exception_1111()
ret void
}

LLVM IR (-O2):
define void @m68k_op_cpscc_32() {
%1 = tail call i32 (...) @m68ki_exception_1111()
ret void
}
void foo_2_1_1_1_2_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_2_1_1_1_2() {
ret void
}
int min(int x, int y) {
  if (x < y) {
    return x;
  } else {
    return y;
  }
}


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

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

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int bmk_cpu_clock_now(void) {
  for (;;)
    ;
}


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

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

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

LLVM IR (-O2):
define i32 @bmk_cpu_clock_now() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ XErrorEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XErrorEvent(void) {
  XErrorEvent *_p = (XErrorEvent *)malloc(sizeof(XErrorEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XErrorEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XErrorEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XErrorEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XErrorEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XErrorEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XErrorEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
void __DELETE_java_util_Collections_EmptyList(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_util_Collections_EmptyList(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ socket_module_exit();
int /*<<< orphan*/ sp_module_exit();
int /*<<< orphan*/ transport_module_exit();
int /*<<< orphan*/ xpoll_module_exit();
void __attribute__((destructor)) __modules_exit(void) {
  sp_module_exit();
  xpoll_module_exit();
  socket_module_exit();
  transport_module_exit();
}


x86 assembly (clang, -O0):
<__modules_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <sp_module_exit@plt>
mov    $0x0,%al
call   1040 <xpoll_module_exit@plt>
mov    $0x0,%al
call   1050 <socket_module_exit@plt>
mov    $0x0,%al
call   1060 <transport_module_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__modules_exit>:
push   %rax
xor    %eax,%eax
call   1030 <sp_module_exit@plt>
xor    %eax,%eax
call   1040 <xpoll_module_exit@plt>
xor    %eax,%eax
call   1050 <socket_module_exit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <transport_module_exit@plt>

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__modules_exit, i8* null }]
define void @__modules_exit() {
%1 = call i32 (...) @sp_module_exit()
%2 = call i32 (...) @xpoll_module_exit()
%3 = call i32 (...) @socket_module_exit()
%4 = call i32 (...) @transport_module_exit()
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__modules_exit, i8* null }]
define void @__modules_exit() {
%1 = tail call i32 (...) @sp_module_exit()
%2 = tail call i32 (...) @xpoll_module_exit()
%3 = tail call i32 (...) @socket_module_exit()
%4 = tail call i32 (...) @transport_module_exit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void errorHalt(char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(0);
}


x86 assembly (clang, -O0):
<errorHalt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errorHalt>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @errorHalt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @errorHalt(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int);
void se_one_test(void **state) {
  assert_int_equal((((0x4000ul) >> 7) & ~0x0101010101010101ul), 0x80ul);
  assert_int_equal((((0x8040201008040201ul) >> 7) & ~0x0101010101010101ul),
                   0x0000804020100804ul);
}


x86 assembly (clang, -O0):
<se_one_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x80,%esi
mov    %esi,%edi
call   1030 <assert_int_equal@plt>
mov    $0x20100804,%esi
mov    %esi,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<se_one_test>:
push   %rax
mov    $0x80,%edi
mov    $0x80,%esi
call   1030 <assert_int_equal@plt>
mov    $0x20100804,%edi
mov    $0x20100804,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @se_one_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @assert_int_equal(i32 128, i32 128)
%4 = call i32 @assert_int_equal(i32 537921540, i32 537921540)
ret void
}

LLVM IR (-O2):
define void @se_one_test(i8** nocapture readnone %0) {
%2 = tail call i32 @assert_int_equal(i32 128, i32 128)
%3 = tail call i32 @assert_int_equal(i32 537921540, i32 537921540)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int send_event;
};
typedef TYPE_1__ XExposeEvent;

/* Variables and functions */
void set_XExposeEvent_send_event(void *_p, int _v) {
  ((XExposeEvent *)_p)->send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XExposeEvent_send_event>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XExposeEvent_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buff;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ trap_Cvar_VariableStringBuffer(char const *, char *, int);
int CG_Cvar_VariableInteger(const char *cvar) {
  char buff[128];
  memset(buff, 0, sizeof(buff));
  trap_Cvar_VariableStringBuffer(cvar, buff, sizeof(buff));
  return atoi(buff);
}


x86 assembly (clang, -O0):
<CG_Cvar_VariableInteger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x80,%edx
call   1040 <trap_Cvar_VariableStringBuffer@plt>
lea    -0x90(%rbp),%rdi
call   1050 <atoi@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_Cvar_VariableInteger>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x80,%edx
call   1040 <trap_Cvar_VariableStringBuffer@plt>
mov    %r14,%rdi
call   1050 <atoi@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @CG_Cvar_VariableInteger(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 128)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = call i32 @trap_Cvar_VariableStringBuffer(i8* %6, i8* %7, i32 128)
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%10 = call i32 @atoi(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @CG_Cvar_VariableInteger(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 128)
%5 = call i32 @trap_Cvar_VariableStringBuffer(i8* %0, i8* %3, i32 128)
%6 = call i32 @atoi(i8* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char const *);
void ERROR(const char *msg) { printf(msg); }


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

x86 assembly (clang, -O2):
<ERROR>:
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
define void @ERROR(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((__weak__, __always___)) void __softboundmpx_dummy() {
  printf("calling abort");
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"calling abort\00"
define weak void @__softboundmpx_dummy() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"calling abort\00"
define weak void @__softboundmpx_dummy() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int avl_max(int x, int y) { return x > y ? x : y; }


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

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

LLVM IR (-O0):
define i32 @avl_max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @avl_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int test_untagged_enum(int val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @test_untagged_enum(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int write(int, char *, int);
int hputc(char c, int fh) { return write(fh, &c, 1); }


x86 assembly (clang, -O0):
<hputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hputc>:
push   %rax
mov    %esi,%eax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @hputc(i8 signext %0, i32 %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = call i32 @write(i32 %1, i8* %3, i32 1)
ret i32 %4
}
/* Variables and functions */
void *realloc(void *, size_t);
void *jas_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<jas_realloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @jas_realloc(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 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @jas_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
void omap_hsi_allow_registration(void) { return; }


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

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

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

LLVM IR (-O2):
define void @omap_hsi_allow_registration() {
ret void
}
void matrix_vector_product_omp(double *a, double *b, double *c, int m, int n) {}


x86 assembly (clang, -O0):
<matrix_vector_product_omp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @matrix_vector_product_omp(double* %0, double* %1, double* %2, i32 %3, i32 %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
define void @matrix_vector_product_omp(double* nocapture %0, double* nocapture %1, double* nocapture %2, i32 %3, i32 %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *);
int getcpu_syscall_wrapper(unsigned int *, unsigned int *, void *);
void getcpu_syscall_nofail(unsigned *cpu, unsigned *node, void *tcache) {
  int err;
  err = getcpu_syscall_wrapper(cpu, node, tcache);
  if (err)
    error(EXIT_FAILURE, errno, "SYS_getcpu");
}


x86 assembly (clang, -O0):
<getcpu_syscall_nofail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <getcpu_syscall_wrapper@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1170 <getcpu_syscall_nofail+0x50>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
lea    0xe95(%rip),%rdx
call   1040 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcpu_syscall_nofail>:
push   %rax
call   1030 <getcpu_syscall_wrapper@plt>
test   %eax,%eax
je     1149 <getcpu_syscall_nofail+0x29>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
lea    0xebd(%rip),%rdx
pop    %rax
jmp    1040 <error@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@errno = global i32 0
@.str = [11 x i8] c"SYS_getcpu\00"
define void @getcpu_syscall_nofail(i32* %0, i32* %1, i8* %2) {
%4 = tail call i32 @getcpu_syscall_wrapper(i32* %0, i32* %1, i8* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = load i32, i32* @EXIT_FAILURE
%8 = load i32, i32* @errno
%9 = tail call i32 @error(i32 %7, i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xee() {
  Assert_real((isbdigit(238) == 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_isbdigit.c",
              1195, ("isbdigit should be 0 for 0xee"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xee\00"
define void @t_isbdigit_0xee() {
%1 = tail call i64 @isbdigit(i32 238)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1195, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int _default_auth_login_delay_needed(char const *username) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_default_auth_login_delay_needed(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t idiv64(int64_t num, int64_t den) { return (num << 12) / den; }


x86 assembly (clang, -O0):
<idiv64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<idiv64>:
mov    %edi,%eax
shl    $0xc,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @idiv64(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 = shl i32 %5, 12
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @idiv64(i32 %0, i32 %1) {
%3 = shl i32 %0, 12
%4 = sdiv i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print_message(char *);
void big_setup_fixture() {
  print_message("big hashset\n");
  print_message("-----------\n");
}


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

x86 assembly (clang, -O2):
<big_setup_fixture>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_message@plt>
lea    0xee9(%rip),%rdi
pop    %rax
jmp    1030 <print_message@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"big hashset\0A\00"
@.str.1 = [13 x i8] c"-----------\0A\00"
define void @big_setup_fixture() {
%1 = call i32 @print_message(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_message(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"big hashset\0A\00"
@.str.1 = [13 x i8] c"-----------\0A\00"
define void @big_setup_fixture() {
%1 = tail call i32 @print_message(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_message(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TwoFile();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Inside of one.c now\n");
  TwoFile();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <TwoFile@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"Inside of one.c now\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @TwoFile()
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"Inside of one.c now\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @TwoFile()
ret i32 0
}
void gtk_tree_selection_select_all() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_selection_select_all() {
ret void
}
/* Variables and functions */
int dev_clear(int);
int cleanup(int idx) { return dev_clear(idx); }


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

x86 assembly (clang, -O2):
<cleanup>:
jmp    1030 <dev_clear@plt>

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

LLVM IR (-O2):
define i32 @cleanup(i32 %0) {
%2 = tail call i32 @dev_clear(i32 %0)
ret i32 %2
}
long grib_op_ge(long a, long b) { return a >= b; }


x86 assembly (clang, -O0):
<grib_op_ge>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_op_ge>:
xor    %eax,%eax
cmp    %rsi,%rdi
setge  %al
ret

LLVM IR (-O0):
define i64 @grib_op_ge(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sge i64 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @grib_op_ge(i64 %0, i64 %1) {
%3 = icmp sge i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
int fun(int c, int d) {
  int e;
  int t1, t2;
  t1 = c;
  t2 = d;
  c = e;
  return t2;
}


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

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

LLVM IR (-O0):
define i32 @fun(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
%8 = load i32, i32* %3
store i32 %8, i32* %6
%9 = load i32, i32* %4
store i32 %9, i32* %7
%10 = load i32, i32* %5
store i32 %10, i32* %3
%11 = load i32, i32* %7
ret i32 %11
}

LLVM IR (-O2):
define i32 @fun(i32 %0, i32 returned %1) {
ret i32 %1
}
int cc_plus_one_c_asm(int *arg) {
  int value = 0;
  asm volatile("    movl (%1), %0\n"
               "    inc %0\n"
               "    jmp 1f\n"
               "    retq\n"
               "1:\n"
               : "=r"(value)
               : "r"(arg));
  return value;
}


x86 assembly (clang, -O0):
<cc_plus_one_c_asm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
inc    %eax
jmp    111d <cc_plus_one_c_asm+0x1d>
ret
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_plus_one_c_asm>:
mov    (%rdi),%eax
inc    %eax
jmp    1107 <cc_plus_one_c_asm+0x7>
ret
ret

LLVM IR (-O0):
define i32 @cc_plus_one_c_asm(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = load i32*, i32** %2
%5 = call i32 asm sideeffect " movl ($1), $0\0A inc $0\0A jmp 1f\0A retq\0A1:\0A", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @cc_plus_one_c_asm(i32* %0) {
%2 = tail call i32 asm sideeffect " movl ($1), $0\0A inc $0\0A jmp 1f\0A retq\0A1:\0A", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32* %0)
ret i32 %2
}
void SteamAPI_ISteamHTMLSurface_GoBack(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamHTMLSurface_GoBack>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_GoBack = [34 x i8] c"SteamAPI_ISteamHTMLSurface_GoBack\00"
define void @SteamAPI_ISteamHTMLSurface_GoBack(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_GoBack, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_GoBack = [34 x i8] c"SteamAPI_ISteamHTMLSurface_GoBack\00"
define void @SteamAPI_ISteamHTMLSurface_GoBack(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_GoBack, i64 0, i64 0), i8* %0)
ret void
}