xunge/DecIR huggingface dataset:
__attribute__((no, noclone)) unsigned __int128 t161_5add(signed __int128 x) {
  unsigned __int128 r;
  if (__builtin_add_overflow(x, (signed __int128)(5), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t161_5add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rcx,%r9
sar    $0x3f,%r9
add    $0x5,%rdx
adc    $0x0,%rcx
mov    %r9,%r8
adc    $0x0,%r8
adc    $0x0,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1187 <t161_5add+0x77>
jmp    118e <t161_5add+0x7e>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t161_5add>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
add    $0x5,%r14
mov    %rsi,%rbx
adc    $0x0,%rbx
mov    $0xfffffffffffffffa,%rax
cmp    %rdi,%rax
mov    $0xffffffffffffffff,%rax
sbb    %rsi,%rax
jl     113f <t161_5add+0x2f>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t161_5add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.sadd.with.overflow.i129(i129 %12, i129 5)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t161_5add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = add nuw i129 %7, 5
%9 = icmp slt i128 %6, -5
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int BIO_write(void *, void const *, int);
int send_bio_chars(void *arg, const void *buf, int len) {
  if (!arg)
    return 1;
  if (BIO_write(arg, buf, len) != len)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<send_bio_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113a <send_bio_chars+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1166 <send_bio_chars+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <BIO_write@plt>
cmp    -0x1c(%rbp),%eax
je     115f <send_bio_chars+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1166 <send_bio_chars+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_bio_chars>:
test   %rdi,%rdi
je     1128 <send_bio_chars+0x18>
push   %rbx
mov    %edx,%ebx
call   1030 <BIO_write@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @send_bio_chars(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %3
store i32 1, i32* %4
br label %20
11: ; preds = %3
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = call i32 @BIO_write(i8* %12, i8* %13, i32 %14)
%16 = load i32, i32* %7
%17 = icmp ne i32 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %11
store i32 0, i32* %4
br label %20
19: ; preds = %11
store i32 1, i32* %4
br label %20
20: ; preds = %19, %18, %10
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @send_bio_chars(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = tail call i32 @BIO_write(i8* %0, i8* %1, i32 %2)
%7 = icmp eq i32 %6, %2
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %3
%10 = phi i32 [ 1, %3 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
_Bool runtime_lockedOSThread();
_Bool LockedOSThread(void) { return runtime_lockedOSThread(); }


x86 assembly (clang, -O0):
<LockedOSThread>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <runtime_lockedOSThread@plt>
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @LockedOSThread() {
%1 = call zeroext i1 (...) @runtime_lockedOSThread()
ret i1 %1
}

LLVM IR (-O2):
define zeroext i1 @LockedOSThread() {
%1 = tail call zeroext i1 (...) @runtime_lockedOSThread()
ret i1 %1
}
/* Variables and functions */
int first_larger_prime(int);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int larger_prime = first_larger_prime(n);
  printf("%d - %d = %d\n", larger_prime, n, larger_prime - n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <first_larger_prime@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <first_larger_prime@plt>
mov    0x4(%rsp),%edx
mov    %eax,%ecx
sub    %edx,%ecx
lea    0xea9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"%d - %d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @first_larger_prime(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"%d - %d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @first_larger_prime(i32 %4)
%6 = load i32, i32* %1
%7 = sub nsw i32 %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int climbStairs(int);
int climbStairs2(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  int steps = climbStairs(10);
  int steps2 = climbStairs2(10);
  printf("步行的楼梯步数:%d---%d\n", steps, steps2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <climbStairs@plt>
mov    %eax,-0x14(%rbp)
mov    $0xa,%edi
call   1030 <climbStairs2@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1060 <climbStairs@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1030 <climbStairs2@plt>
lea    0xe96(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@.str.1 = [31 x i8] c"\E6\AD\A5\E8\A1\8C\E7\9A\84\E6\A5\BC\E6\A2\AF\E6\AD\A5\E6\95\B0:%d---%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @climbStairs(i32 10)
store i32 %9, i32* %6
%10 = call i32 @climbStairs2(i32 10)
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"\E6\AD\A5\E8\A1\8C\E7\9A\84\E6\A5\BC\E6\A2\AF\E6\AD\A5\E6\95\B0:%d---%d\0A\00"
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @climbStairs(i32 10)
%5 = tail call i32 @climbStairs2(i32 10)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xdf() {
  Assert_real((isodigit(223) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              1120, ("isodigit should be 0 for 0xdf"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xdf\00"
define void @t_isodigit_0xdf() {
%1 = call i64 @isodigit(i32 223)
%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 1120, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xdf\00"
define void @t_isodigit_0xdf() {
%1 = tail call i64 @isodigit(i32 223)
%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 1120, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void perf_measure_unmap(void) {}


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

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

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

LLVM IR (-O2):
define void @perf_measure_unmap() {
ret void
}
__complex__ long int ctest_long_int(__complex__ long int x) {
  __complex__ long int res;
  res = ~x;
  return res;
}


x86 assembly (clang, -O0):
<ctest_long_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
neg    %rax
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctest_long_int>:
mov    %rsi,%rdx
mov    %rdi,%rax
neg    %rdx
ret

LLVM IR (-O0):
define { i64, i64 } @ctest_long_int(i64 %0, i64 %1) {
%3 = alloca { i64, i64 }
%4 = alloca { i64, i64 }
%5 = alloca { i64, i64 }
%6 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 0
store i64 %0, i64* %6
%7 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 1
store i64 %1, i64* %7
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 0
%9 = load i64, i64* %8
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 1
%11 = load i64, i64* %10
%12 = sub i64 0, %11
%13 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %5, i32 0, i32 0
%14 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %5, i32 0, i32 1
store i64 %9, i64* %13
store i64 %12, i64* %14
%15 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %5, i32 0, i32 0
%16 = load i64, i64* %15
%17 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %5, i32 0, i32 1
%18 = load i64, i64* %17
%19 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %3, i32 0, i32 0
%20 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %3, i32 0, i32 1
store i64 %16, i64* %19
store i64 %18, i64* %20
%21 = load { i64, i64 }, { i64, i64 }* %3
ret { i64, i64 } %21
}

LLVM IR (-O2):
define { i64, i64 } @ctest_long_int(i64 %0, i64 %1) {
%3 = sub i64 0, %1
%4 = insertvalue { i64, i64 } poison, i64 %0, 0
%5 = insertvalue { i64, i64 } %4, i64 %3, 1
ret { i64, i64 } %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *, ...);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void Error(const char *str, const char *file) {
  fprintf(stderr, "Error: ");
  fprintf(stderr, str, file);
  perror(file);
  exit(1);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<Error>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2e9e(%rip),%r15
mov    (%r15),%edi
lea    0xeb4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"Error: \00"
define void @Error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* %0, i8* %1)
%7 = tail call i32 @perror(i8* %1)
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
void f(int n) {
  if (n < 3)
    return;
  n--;
  f(n);
  __VERIFIER_error();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    113a <f+0x1a>
jmp    1152 <f+0x32>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x2,%edi
jg     1126 <f+0x6>
ret
push   %rax
add    $0xffffffff,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>

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

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %3, label %4
3: ; preds = %1, %4
ret void
4: ; preds = %1
%5 = add nsw i32 %0, -1
tail call void @f(i32 %5)
%6 = tail call i32 (...) @__VERIFIER_error()
br label %3
}
/* Type definitions */
struct mallinfo {
  int arena;
};

/* Variables and functions */
struct mallinfo mallinfo();
int /*<<< orphan*/ printf(char *, int);
void mem_info(void) {
  struct mallinfo m;
  m = mallinfo();
  printf("** Used Memory: %d KBytes\n", m.arena / 1024);
}


x86 assembly (clang, -O0):
<mem_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <mallinfo@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_info>:
push   %rax
xor    %eax,%eax
call   1040 <mallinfo@plt>
lea    0x3ff(%rax),%esi
test   %eax,%eax
cmovns %eax,%esi
sar    $0xa,%esi
lea    0xec3(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.mallinfo = type { i32 }
@.str = [27 x i8] c"** Used Memory: %d KBytes\0A\00"
define void @mem_info() {
%1 = alloca %struct.mallinfo
%2 = alloca %struct.mallinfo
%3 = call i32 (...) @mallinfo()
%4 = getelementptr inbounds %struct.mallinfo, %struct.mallinfo* %2, i32 0, i32 0
store i32 %3, i32* %4
%5 = bitcast %struct.mallinfo* %1 to i8*
%6 = bitcast %struct.mallinfo* %2 to i8*
%7 = getelementptr inbounds %struct.mallinfo, %struct.mallinfo* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1024
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"** Used Memory: %d KBytes\0A\00"
define void @mem_info() {
%1 = tail call i32 (...) @mallinfo()
%2 = sdiv i32 %1, 1024
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
int nisserver_del(const char *ifname, const int ifindex,
                  const char *addrPlain) {
  return 0;
}


x86 assembly (clang, -O0):
<nisserver_del>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nisserver_del(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int dwarf_get_TAG_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_TAG_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_TAG_name(val_in, &v);
  return ellipname(res, val_in, v, "TAG", printonerr);
}


x86 assembly (clang, -O0):
<get_TAG_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <dwarf_get_TAG_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1030 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_TAG_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1040 <dwarf_get_TAG_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1030 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"TAG\00"
define i8* @get_TAG_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_TAG_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"TAG\00"
define i8* @get_TAG_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_TAG_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
void virtio_mb(void) {}


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

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

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

LLVM IR (-O2):
define void @virtio_mb() {
ret void
}
/* Variables and functions */
void SNDDMA_Submit(void) {}


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

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

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

LLVM IR (-O2):
define void @SNDDMA_Submit() {
ret void
}
/* Variables and functions */
void onWrite(int fd, char *message, size_t message_length) { return; }


x86 assembly (clang, -O0):
<onWrite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @onWrite(i32 %0, i8* nocapture %1, i64 %2) {
ret void
}
void f() {
  for (; "";) {
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f+0x9>
mov    $0x1,%al
test   $0x1,%al
jne    1118 <f+0x18>
jmp    111d <f+0x1d>
jmp    1109 <f+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @f() {
br label %1
1: ; preds = %2, %0
br i1 true, label %2, label %3
2: ; preds = %1
br label %1
3: ; preds = %1
ret void
}

LLVM IR (-O2):
void debug_yield_write(void) {}


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

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

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

LLVM IR (-O2):
define void @debug_yield_write() {
ret void
}
void ft_swap(int *a, int *b) {
  int swap;
  swap = *a;
  *a = *b;
  *b = swap;
}


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

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

LLVM IR (-O0):
define void @ft_swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @ft_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned short *);
void C_Utils_free_ushort_ptr(unsigned short *item) { free(item); }


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

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

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

LLVM IR (-O2):
define void @C_Utils_free_ushort_ptr(i16* nocapture %0) {
%2 = tail call i32 @free(i16* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int whatIsThis(int *, int);
int main() {
  int x;
  int a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  x = whatIsThis(a, 10);
  printf("Result is %d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <whatIsThis@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <whatIsThis@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [14 x i8] c"Result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = call i32 @whatIsThis(i32* %5, i32 10)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [14 x i8] c"Result is %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @whatIsThis(i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
char *CTP() {
  static char str[50];
  sprintf(str, "t\n");
  return str;
}


x86 assembly (clang, -O0):
<CTP>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
lea    0xede(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f12(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CTP>:
movb   $0x0,0x2f2b(%rip)
movw   $0xa74,0x2f20(%rip)
74 0a
lea    0x2f19(%rip),%rax
ret

LLVM IR (-O0):
@CTP.str = internal global [50 x i8] zeroinitializer
@.str = [3 x i8] c"t\0A\00"
define i8* @CTP() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @CTP.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @CTP.str, i64 0, i64 0)
}

LLVM IR (-O2):
@CTP.str = internal global [50 x i8] zeroinitializer
@.str = [3 x i8] c"t\0A\00"
define i8* @CTP() {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(3) getelementptr inbounds ([50 x i8], [50 x i8]* @CTP.str, i64 0, i64 0), i8* align 1 dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 3, i1 false)
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @CTP.str, i64 0, i64 0)
}
int test_imm_91int8_mem(signed char *val) {
  return ((*val) & (0x91 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_91int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 145
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_91int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -111
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_5Eint8_reg(signed char val) {
  return ((val) & (-0x5E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Eint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffa2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Eint8_reg>:
test   $0xa2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Eint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -94
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_5Eint8_reg(i8 signext %0) {
%2 = and i8 %0, -94
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ shm_unlink(char *);
char *strformat(char *, char const *);
int /*<<< orphan*/ strfree(char *);
void platformUnlink(const char *name) {
  char *fullname = strformat("/%s", name);
  shm_unlink(fullname);
  strfree(fullname);
}


x86 assembly (clang, -O0):
<platformUnlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <strformat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <shm_unlink@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<platformUnlink>:
push   %rbx
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1030 <strformat@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <shm_unlink@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strfree@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"/%s\00"
define void @platformUnlink(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strformat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @shm_unlink(i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @strfree(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"/%s\00"
define void @platformUnlink(i8* %0) {
%2 = tail call i8* @strformat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @shm_unlink(i8* %2)
%4 = tail call i32 @strfree(i8* %2)
ret void
}
void ScaleRowDown2Linear_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Linear_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void quit(void) {
  printf("\nBYE\n");
  exit(0);
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0ABYE\0A\00"
define void @quit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [5 x i8] c"\0ABYE\00"
define void @quit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
unsigned GetFieldW4(unsigned *A, register unsigned index) {
  register unsigned i = index / 8, j = (index & 0x7) << 2;
  return (A[i] << (28 - j)) >> (28);
}


x86 assembly (clang, -O0):
<GetFieldW4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7,%eax
shl    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    $0x1c,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%eax
shr    $0x1c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetFieldW4>:
lea    0x0(,%rsi,4),%ecx
shr    $0x3,%esi
mov    (%rdi,%rsi,4),%eax
not    %cl
and    $0x1c,%cl
shl    %cl,%eax
shr    $0x1c,%eax
ret

LLVM IR (-O0):
define i32 @GetFieldW4(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = udiv i32 %7, 8
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 7
%11 = shl i32 %10, 2
store i32 %11, i32* %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %6
%18 = sub i32 28, %17
%19 = shl i32 %16, %18
%20 = lshr i32 %19, 28
ret i32 %20
}

LLVM IR (-O2):
define i32 @GetFieldW4(i32* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 3
%4 = shl i32 %1, 2
%5 = zext i32 %3 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = and i32 %4, 28
%9 = xor i32 %8, 28
%10 = shl i32 %7, %9
%11 = lshr i32 %10, 28
ret i32 %11
}
/* Type definitions */
struct umsgpack_packer_buf {
  int dummy;
};

/* Variables and functions */
int umsgpack_pack_uint32(struct umsgpack_packer_buf *, unsigned int);
int umsgpack_pack_uint(struct umsgpack_packer_buf *buf, unsigned int val) {
  return umsgpack_pack_uint32(buf, val);
}


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

x86 assembly (clang, -O2):
<umsgpack_pack_uint>:
jmp    1030 <umsgpack_pack_uint32@plt>

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

LLVM IR (-O2):
%struct.umsgpack_packer_buf = type { i32 }
define i32 @umsgpack_pack_uint(%struct.umsgpack_packer_buf* %0, i32 %1) {
%3 = tail call i32 @umsgpack_pack_uint32(%struct.umsgpack_packer_buf* %0, i32 %1)
ret i32 %3
}
main() {
  int i = 0;
  i++;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ is_encoding_utf8(char const *);
int /*<<< orphan*/ strcasecmp(char const *, char const *);
int same_encoding(const char *src, const char *dst) {
  if (is_encoding_utf8(src) && is_encoding_utf8(dst))
    return 1;
  return !strcasecmp(src, dst);
}


x86 assembly (clang, -O0):
<same_encoding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <is_encoding_utf8@plt>
cmp    $0x0,%rax
je     1162 <same_encoding+0x42>
mov    -0x18(%rbp),%rdi
call   1040 <is_encoding_utf8@plt>
cmp    $0x0,%rax
je     1162 <same_encoding+0x42>
movl   $0x1,-0x4(%rbp)
jmp    117f <same_encoding+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<same_encoding>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <is_encoding_utf8@plt>
test   %rax,%rax
je     1149 <same_encoding+0x29>
mov    %r14,%rdi
call   1040 <is_encoding_utf8@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    115d <same_encoding+0x3d>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @same_encoding(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 @is_encoding_utf8(i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = call i64 @is_encoding_utf8(i8* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %3
br label %21
14: ; preds = %9, %2
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = call i32 @strcasecmp(i8* %15, i8* %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
store i32 %20, i32* %3
br label %21
21: ; preds = %14, %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @same_encoding(i8* %0, i8* %1) {
%3 = tail call i64 @is_encoding_utf8(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i64 @is_encoding_utf8(i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5, %2
%9 = tail call i32 @strcasecmp(i8* %0, i8* %1)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %5, %8
%13 = phi i32 [ %11, %8 ], [ 1, %5 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ poll(int /*<<< orphan*/, int /*<<< orphan*/, int);
long zmillisecond();
void zsleep_millisecond(int delay) {
  int left = delay;
  long end = zmillisecond() + left + 1;
  while (left > 0) {
    poll(0, 0, left);
    left = end - zmillisecond();
  }
}


x86 assembly (clang, -O0):
<zsleep_millisecond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <zmillisecond@plt>
movslq -0x8(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    117e <zsleep_millisecond+0x5e>
mov    -0x8(%rbp),%edx
xor    %esi,%esi
mov    %esi,%edi
call   1040 <poll@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <zmillisecond@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
jmp    1147 <zsleep_millisecond+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zsleep_millisecond>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <zmillisecond@plt>
test   %ebx,%ebx
jle    115b <zsleep_millisecond+0x3b>
mov    %ebx,%ecx
lea    (%rcx,%rax,1),%r14
add    $0x1,%r14
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
xor    %esi,%esi
mov    %ebx,%edx
call   1040 <poll@plt>
xor    %eax,%eax
call   1030 <zmillisecond@plt>
mov    %r14d,%ebx
sub    %eax,%ebx
test   %ebx,%ebx
jg     1140 <zsleep_millisecond+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @zsleep_millisecond(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
%6 = call i64 (...) @zmillisecond()
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = add nsw i64 %6, %8
%10 = add nsw i64 %9, 1
store i64 %10, i64* %4
br label %11
11: ; preds = %14, %1
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %3
%16 = call i32 @poll(i32 0, i32 0, i32 %15)
%17 = load i64, i64* %4
%18 = call i64 (...) @zmillisecond()
%19 = sub nsw i64 %17, %18
%20 = trunc i64 %19 to i32
store i32 %20, i32* %3
br label %11
21: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @zsleep_millisecond(i32 %0) {
%2 = tail call i64 (...) @zmillisecond()
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %15
4: ; preds = %1
%5 = zext i32 %0 to i64
%6 = add nuw nsw i64 %5, 1
%7 = add i64 %6, %2
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ %0, %4 ], [ %13, %8 ]
%10 = tail call i32 @poll(i32 0, i32 0, i32 %9)
%11 = tail call i64 (...) @zmillisecond()
%12 = sub i64 %7, %11
%13 = trunc i64 %12 to i32
%14 = icmp sgt i32 %13, 0
br i1 %14, label %8, label %15
15: ; preds = %8, %1
ret void
}
void notifyKeyspaceEvent(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               94, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<notifyKeyspaceEvent>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x5e,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<notifyKeyspaceEvent>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x5e,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.notifyKeyspaceEvent = [20 x i8] c"notifyKeyspaceEvent\00"
define void @notifyKeyspaceEvent() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 94, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.notifyKeyspaceEvent, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.notifyKeyspaceEvent = [20 x i8] c"notifyKeyspaceEvent\00"
define void @notifyKeyspaceEvent() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 94, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.notifyKeyspaceEvent, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(char const *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int IsThisSection(const char *line, const char *section) {
  return !memcmp(line + 1, section, strlen(section));
}


x86 assembly (clang, -O0):
<IsThisSection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsThisSection>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @IsThisSection(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 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @memcmp(i8* %6, i8* %7, i32 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @IsThisSection(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @memcmp(i8* %3, i8* %1, i32 %4)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}