xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void array_matching_types() {
  int array[10];
  int *a = &array[2];
  int *b = &array[5];
  clang_analyzer_eval(a != b);
  clang_analyzer_eval(a < b);
  clang_analyzer_eval(a <= b);
  clang_analyzer_eval((b - a) != 0);
}


x86 assembly (clang, -O0):
<array_matching_types>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x40(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x38(%rbp),%rax
cmp    -0x40(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x38(%rbp),%rax
cmp    -0x40(%rbp),%rax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_matching_types>:
push   %rax
mov    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @array_matching_types() {
%1 = alloca [10 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32* %4, i32** %2
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
store i32* %5, i32** %3
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = icmp ne i32* %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 @clang_analyzer_eval(i32 %9)
%11 = load i32*, i32** %2
%12 = load i32*, i32** %3
%13 = icmp ult i32* %11, %12
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
%16 = load i32*, i32** %2
%17 = load i32*, i32** %3
%18 = icmp ule i32* %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
%21 = load i32*, i32** %3
%22 = load i32*, i32** %2
%23 = ptrtoint i32* %21 to i64
%24 = ptrtoint i32* %22 to i64
%25 = sub i64 %23, %24
%26 = sdiv exact i64 %25, 4
%27 = icmp ne i64 %26, 0
%28 = zext i1 %27 to i32
%29 = call i32 @clang_analyzer_eval(i32 %28)
ret void
}

LLVM IR (-O2):
define void @array_matching_types() {
%1 = tail call i32 @clang_analyzer_eval(i32 1)
%2 = tail call i32 @clang_analyzer_eval(i32 1)
%3 = tail call i32 @clang_analyzer_eval(i32 1)
%4 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printall(struct Node *, int /*<<< orphan*/);
void printAllPaths(struct Node *root) { printall(root, 0); }


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

x86 assembly (clang, -O2):
<printAllPaths>:
xor    %esi,%esi
jmp    1030 <printall@plt>

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

LLVM IR (-O2):
%struct.Node = type { i32 }
define void @printAllPaths(%struct.Node* %0) {
%2 = tail call i32 @printall(%struct.Node* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_scalblnl();
scalar_t__ scalblnl(long double, long);
void test_scalblnl(long double ld, long int x) {
  if (scalblnl(ld, x) != scalblnl(ld, x))
    link_failure_scalblnl();
}


x86 assembly (clang, -O0):
<test_scalblnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <scalblnl@plt>
mov    %rax,-0x20(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <scalblnl@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
je     116f <test_scalblnl+0x4f>
mov    $0x0,%al
call   1030 <link_failure_scalblnl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_scalblnl>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
fldt   0x40(%rsp)
fld    %st(0)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
call   1040 <scalblnl@plt>
mov    %rax,%r14
fldt   0x1c(%rsp)
fstpt  (%rsp)
mov    %rbx,%rdi
call   1040 <scalblnl@plt>
cmp    %rax,%r14
jne    115b <test_scalblnl+0x3b>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
jmp    1030 <link_failure_scalblnl@plt>

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

LLVM IR (-O2):
define void @test_scalblnl(x86_fp80 %0, i64 %1) {
%3 = tail call i64 @scalblnl(x86_fp80 %0, i64 %1)
%4 = tail call i64 @scalblnl(x86_fp80 %0, i64 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_scalblnl()
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpacklo_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_unpacklo_pi32(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_unpacklo_pi32@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpacklo_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
double sqrt(double);
double df_crc(double x) { return sqrt(1.0 - x * x); }


x86 assembly (clang, -O0):
<df_crc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<df_crc>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1133 <df_crc+0x23>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @df_crc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fneg double %3
%6 = call double @llvm.fmuladd.f64(double %5, double %4, double 1.000000e+00)
%7 = call double @sqrt(double %6)
ret double %7
}

LLVM IR (-O2):
define double @df_crc(double %0) {
%2 = fneg double %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%4 = tail call double @sqrt(double %3)
ret double %4
}
int do_559() { return 559; }


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

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

LLVM IR (-O0):
define i32 @do_559() {
ret i32 559
}

LLVM IR (-O2):
define i32 @do_559() {
ret i32 559
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFL;
int /*<<< orphan*/ IPPROTO_UDP;
int /*<<< orphan*/ O_NONBLOCK;
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int sck_udp4(void) {
  int s;
  s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
  if (s == -1)
    return -1;
  return fcntl(s, F_SETFL, O_NONBLOCK);
}


x86 assembly (clang, -O0):
<sck_udp4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    0x2e77(%rip),%rax
mov    (%rax),%edx
call   1040 <socket@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1161 <sck_udp4+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <sck_udp4+0x5e>
mov    -0x8(%rbp),%edi
mov    0x2e65(%rip),%rax
mov    (%rax),%esi
mov    0x2e74(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sck_udp4>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
call   1040 <socket@plt>
cmp    $0xffffffff,%eax
je     1160 <sck_udp4+0x40>
mov    0x2e83(%rip),%rcx
mov    (%rcx),%esi
mov    0x2e92(%rip),%rcx
mov    (%rcx),%edx
mov    %eax,%edi
pop    %rax
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @sck_udp4() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @PF_INET
%4 = load i32, i32* @SOCK_DGRAM
%5 = load i32, i32* @IPPROTO_UDP
%6 = call i32 @socket(i32 %3, i32 %4, i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 -1, i32* %1
br label %15
10: ; preds = %0
%11 = load i32, i32* %2
%12 = load i32, i32* @F_SETFL
%13 = load i32, i32* @O_NONBLOCK
%14 = call i32 @fcntl(i32 %11, i32 %12, i32 %13)
store i32 %14, i32* %1
br label %15
15: ; preds = %10, %9
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @sck_udp4() {
%1 = load i32, i32* @PF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = load i32, i32* @IPPROTO_UDP
%4 = tail call i32 @socket(i32 %1, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %0
%7 = load i32, i32* @F_SETFL
%8 = load i32, i32* @O_NONBLOCK
%9 = tail call i32 @fcntl(i32 %4, i32 %7, i32 %8)
br label %10
10: ; preds = %0, %6
%11 = phi i32 [ %9, %6 ], [ -1, %0 ]
ret i32 %11
}
/* Type definitions */
struct s_map {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mapGetKeySize(struct s_map *);
void *mapGetN(struct s_map *, void const *, int /*<<< orphan*/);
void *mapGet(struct s_map *map, const void *key) {
  return mapGetN(map, key, mapGetKeySize(map));
}


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

x86 assembly (clang, -O2):
<mapGet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <mapGetKeySize@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mapGetN@plt>

LLVM IR (-O0):
%struct.s_map = type { i32 }
define i8* @mapGet(%struct.s_map* %0, i8* %1) {
%3 = alloca %struct.s_map*
%4 = alloca i8*
store %struct.s_map* %0, %struct.s_map** %3
store i8* %1, i8** %4
%5 = load %struct.s_map*, %struct.s_map** %3
%6 = load i8*, i8** %4
%7 = load %struct.s_map*, %struct.s_map** %3
%8 = call i32 @mapGetKeySize(%struct.s_map* %7)
%9 = call i8* @mapGetN(%struct.s_map* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct.s_map = type { i32 }
define i8* @mapGet(%struct.s_map* %0, i8* %1) {
%3 = tail call i32 @mapGetKeySize(%struct.s_map* %0)
%4 = tail call i8* @mapGetN(%struct.s_map* %0, i8* %1, i32 %3)
ret i8* %4
}
void INT_Excep_PERIA_INTA211(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA211() {
ret void
}
/* Variables and functions */
char *memcpy(char *, char const *, size_t);
char *mp_malloc(size_t);
int strlen(char const *);
char *mp_strdup(const char *source) {
  size_t str_len;
  char *new;
  str_len = strlen(source) + 1;
  new = mp_malloc(str_len + 1);
  return memcpy(new, source, str_len);
}


x86 assembly (clang, -O0):
<mp_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <mp_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rdi
lea    0x1(%rdi),%r14
add    $0x2,%rdi
call   1050 <mp_malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define i8* @mp_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = add i64 %9, 1
%11 = call i8* @mp_malloc(i64 %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = load i8*, i8** %2
%14 = load i64, i64* %3
%15 = call i8* @memcpy(i8* %12, i8* %13, i64 %14)
ret i8* %15
}

LLVM IR (-O2):
define i8* @mp_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = add nsw i64 %4, 1
%6 = tail call i8* @mp_malloc(i64 %5)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %6, i8* align 1 %0, i64 %4, i1 false)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int bar(int /*<<< orphan*/, double);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  if (bar(0, 2.0) != 26)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
movsd  0xeb7(%rip),%xmm0
call   1040 <bar@plt>
cmp    $0x1a,%eax
je     115e <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xec7(%rip),%xmm0
xor    %edi,%edi
call   1040 <bar@plt>
cmp    $0x1a,%eax
jne    114c <main+0x1c>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @bar(i32 0, double 2.000000e+00)
%3 = icmp ne i32 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bar(i32 0, double 2.000000e+00)
%2 = icmp eq i32 %1, 26
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
int sum_c(int a, int b, int c) {
  if (a + b + c > 9)
    return (a + b + c) / 10;
  return 0;
}


x86 assembly (clang, -O0):
<sum_c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    $0x9,%eax
jle    1138 <sum_c+0x38>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    113f <sum_c+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_c>:
add    %esi,%edi
add    %edx,%edi
xor    %eax,%eax
cmp    $0xa,%edi
jl     1122 <sum_c+0x22>
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @sum_c(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
%6 = icmp sgt i32 %5, 9
%7 = sdiv i32 %5, 10
%8 = select i1 %6, i32 %7, i32 0
ret i32 %8
}
/* Variables and functions */
scalar_t__ get_pid_from_proc_self();
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("/proc/self reports process id %d\n", (int)get_pid_from_proc_self());
  printf("getpid() reports process id %d\n", (int)getpid());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <get_pid_from_proc_self@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <get_pid_from_proc_self@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"/proc/self reports process id %d\0A\00"
@.str.1 = [32 x i8] c"getpid() reports process id %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @get_pid_from_proc_self()
%3 = trunc i64 %2 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i64 (...) @getpid()
%6 = trunc i64 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"/proc/self reports process id %d\0A\00"
@.str.1 = [32 x i8] c"getpid() reports process id %d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @get_pid_from_proc_self()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i64 (...) @getpid()
%5 = trunc i64 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ clear_screen();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void die(const char *s) {
  clear_screen();
  perror(s);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clear_screen@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clear_screen@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @clear_screen()
%4 = load i8*, i8** %2
%5 = call i32 @perror(i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @die(i8* nocapture %0) {
%2 = tail call i32 (...) @clear_screen()
%3 = tail call i32 @perror(i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int test_imm_B2int8_reg(signed char val) {
  return ((val) & (0xB2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B2int8_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, 178
%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_B2int8_reg(i8 signext %0) {
%2 = and i8 %0, -78
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned xrop3_126_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = D ^ S;
  stk1 = stk1 | stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_126_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_126_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    %eax,%ecx
mov    %eax,%edx
xor    $0xff,%edx
or     %ecx,%edx
not    %eax
and    %edx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_126_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %5
%26 = load i32, i32* %6
%27 = xor i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_126_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
%8 = xor i32 %4, 255
%9 = or i32 %7, %8
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
void telemetry(void *_) {}


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

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

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

LLVM IR (-O2):
define void @telemetry(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void _start() {
  bar();
  foo();
}


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

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

LLVM IR (-O0):
define void @_start() {
%1 = call i32 (...) @bar()
%2 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ TCSBRK;
int __ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int tcsendbreak(int fd, int duration) {
  if (duration <= 0)
    return __ioctl(fd, TCSBRK, 0);
  __set_errno(EINVAL);
  return -1;
}


x86 assembly (clang, -O0):
<tcsendbreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1153 <tcsendbreak+0x33>
mov    -0x8(%rbp),%edi
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <__ioctl@plt>
mov    %eax,-0x4(%rbp)
jmp    1168 <tcsendbreak+0x48>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcsendbreak>:
push   %rax
test   %esi,%esi
jle    113a <tcsendbreak+0x1a>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
pop    %rax
jmp    1040 <__ioctl@plt>

LLVM IR (-O0):
@TCSBRK = global i32 0
@EINVAL = global i32 0
define i32 @tcsendbreak(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* %5
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* @TCSBRK
%11 = call i32 @__ioctl(i32 %9, i32 %10, i32 0)
store i32 %11, i32* %3
br label %15
12: ; preds = %2
%13 = load i32, i32* @EINVAL
%14 = call i32 @__set_errno(i32 %13)
store i32 -1, i32* %3
br label %15
15: ; preds = %12, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@TCSBRK = global i32 0
@EINVAL = global i32 0
define i32 @tcsendbreak(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @TCSBRK
%6 = tail call i32 @__ioctl(i32 %0, i32 %5, i32 0)
br label %10
7: ; preds = %2
%8 = load i32, i32* @EINVAL
%9 = tail call i32 @__set_errno(i32 %8)
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ %6, %4 ], [ -1, %7 ]
ret i32 %11
}
void WriteMemoryBarrier() { __asm__ __volatile__("sfence" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @WriteMemoryBarrier() {
tail call void asm sideeffect "sfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x5b() {
  Assert_real((isascii(91)),
              "/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_isascii.c",
              460, ("isascii should be 1 for ["));
}


x86 assembly (clang, -O0):
<t_isascii_0x5b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5b,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1cc,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x5b>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x1cc,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for [\00"
define void @t_isascii_0x5b() {
%1 = call i32 @isascii(i32 91)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 460, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for [\00"
define void @t_isascii_0x5b() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 460, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int S_IRWXG;
int S_IRWXO;
int S_IRWXU;
int mkdir(char const *, int);
int touchstone_os_mkdir(const char *path) {
  int result;
  result = mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO);
  return result;
}


x86 assembly (clang, -O0):
<touchstone_os_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
or     (%rax),%esi
mov    0x2eb7(%rip),%rax
or     (%rax),%esi
call   1030 <mkdir@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touchstone_os_mkdir>:
mov    0x2ec9(%rip),%rax
mov    0x2eba(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ec7(%rip),%rax
or     (%rax),%esi
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
define i32 @touchstone_os_mkdir(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @S_IRWXU
%6 = load i32, i32* @S_IRWXG
%7 = or i32 %5, %6
%8 = load i32, i32* @S_IRWXO
%9 = or i32 %7, %8
%10 = call i32 @mkdir(i8* %4, i32 %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
define i32 @touchstone_os_mkdir(i8* nocapture %0) {
%2 = load i32, i32* @S_IRWXU
%3 = load i32, i32* @S_IRWXG
%4 = or i32 %3, %2
%5 = load i32, i32* @S_IRWXO
%6 = or i32 %4, %5
%7 = tail call i32 @mkdir(i8* %0, i32 %6)
ret i32 %7
}
int csCloseLibrary(void *library) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @csCloseLibrary(i8* nocapture readnone %0) {
ret i32 0
}
void l1(int a) {}


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

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

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

LLVM IR (-O2):
define void @l1(i32 %0) {
ret void
}
double OP_Sub(double op1, double op2) { return op1 - op2; }


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

x86 assembly (clang, -O2):
<OP_Sub>:
subsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @OP_Sub(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ GBA_CheckKeypadInterrupt();
int /*<<< orphan*/ GBA_RunFor(int);
void GBA_RunForOneFrame(void) {
  GBA_CheckKeypadInterrupt();
  GBA_RunFor(280896);
}


x86 assembly (clang, -O0):
<GBA_RunForOneFrame>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <GBA_CheckKeypadInterrupt@plt>
mov    $0x44940,%edi
call   1030 <GBA_RunFor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GBA_RunForOneFrame>:
push   %rax
xor    %eax,%eax
call   1040 <GBA_CheckKeypadInterrupt@plt>
mov    $0x44940,%edi
pop    %rax
jmp    1030 <GBA_RunFor@plt>

LLVM IR (-O0):
define void @GBA_RunForOneFrame() {
%1 = call i32 (...) @GBA_CheckKeypadInterrupt()
%2 = call i32 @GBA_RunFor(i32 280896)
ret void
}

LLVM IR (-O2):
define void @GBA_RunForOneFrame() {
%1 = tail call i32 (...) @GBA_CheckKeypadInterrupt()
%2 = tail call i32 @GBA_RunFor(i32 280896)
ret void
}
int bar(int *a) { return *a; }


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

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

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

LLVM IR (-O2):
define i32 @bar(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ iinit();
void initialise_bss() { iinit(); }


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

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

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

LLVM IR (-O2):
define void @initialise_bss() {
%1 = tail call i32 (...) @iinit()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void Encrypt(uint8_t *state, uint8_t *stream, uint16_t length) {}


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

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

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

LLVM IR (-O2):
define void @Encrypt(i32* nocapture %0, i32* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CL_ClearDlights();
int /*<<< orphan*/ CL_ClearLightStyles();
int /*<<< orphan*/ CL_ClearParticles();
void CL_ClearEffects(void) {
  CL_ClearParticles();
  CL_ClearDlights();
  CL_ClearLightStyles();
}


x86 assembly (clang, -O0):
<CL_ClearEffects>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <CL_ClearParticles@plt>
mov    $0x0,%al
call   1040 <CL_ClearDlights@plt>
mov    $0x0,%al
call   1050 <CL_ClearLightStyles@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_ClearEffects>:
push   %rax
xor    %eax,%eax
call   1030 <CL_ClearParticles@plt>
xor    %eax,%eax
call   1040 <CL_ClearDlights@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <CL_ClearLightStyles@plt>

LLVM IR (-O0):
define void @CL_ClearEffects() {
%1 = call i32 (...) @CL_ClearParticles()
%2 = call i32 (...) @CL_ClearDlights()
%3 = call i32 (...) @CL_ClearLightStyles()
ret void
}

LLVM IR (-O2):
define void @CL_ClearEffects() {
%1 = tail call i32 (...) @CL_ClearParticles()
%2 = tail call i32 (...) @CL_ClearDlights()
%3 = tail call i32 (...) @CL_ClearLightStyles()
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int *intPtr;
  intPtr = malloc(sizeof(int));
  *intPtr = 42;
  printf("The value is %d", *intPtr);
  free(intPtr);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movl   $0x2a,(%rax)
lea    0xeb5(%rip),%rdi
mov    $0x2a,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"The value is %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @malloc(i32 4)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
store i32 42, i32* %4
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %2
%9 = call i32 @free(i32* %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@.str = [16 x i8] c"The value is %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
store i32 42, i32* %1
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 42)
%3 = tail call i32 @free(i32* %1)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x6_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x6_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x6_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x6_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x6_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
void foo778() {}


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

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

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

LLVM IR (-O2):
define void @foo778() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ V_DrawPatchDirect(int, int, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
int /*<<< orphan*/ W_CacheLumpName(char *, int);
void M_DrawEpisode(void) {
  V_DrawPatchDirect(54, 38, 0, W_CacheLumpName("M_EPISOD", 101));
}


x86 assembly (clang, -O0):
<M_DrawEpisode>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x65,%esi
call   1040 <W_CacheLumpName@plt>
mov    %eax,%ecx
mov    $0x36,%edi
mov    $0x26,%esi
xor    %edx,%edx
call   1030 <V_DrawPatchDirect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<M_DrawEpisode>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x65,%esi
call   1040 <W_CacheLumpName@plt>
mov    $0x36,%edi
mov    $0x26,%esi
xor    %edx,%edx
mov    %eax,%ecx
pop    %rax
jmp    1030 <V_DrawPatchDirect@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"M_EPISOD\00"
define void @M_DrawEpisode() {
%1 = call i32 @W_CacheLumpName(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 101)
%2 = call i32 @V_DrawPatchDirect(i32 54, i32 38, i32 0, i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"M_EPISOD\00"
define void @M_DrawEpisode() {
%1 = tail call i32 @W_CacheLumpName(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 101)
%2 = tail call i32 @V_DrawPatchDirect(i32 54, i32 38, i32 0, i32 %1)
ret void
}
/* Variables and functions */
float I_GetMusicPosition();
float S_GetMusicPosition(void) { return I_GetMusicPosition(); }


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

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

LLVM IR (-O0):
define float @S_GetMusicPosition() {
%1 = call float (...) @I_GetMusicPosition()
ret float %1
}

LLVM IR (-O2):
define float @S_GetMusicPosition() {
%1 = tail call float (...) @I_GetMusicPosition()
ret float %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ towersOfHanoi(int, char, char, char);
void main() {
  printf("Number of discs?\n");
  int n = 0;
  scanf("%d", &n);
  towersOfHanoi(n, 'A', 'B', 'C');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
lea    0xec0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1030 <towersOfHanoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecb(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,0x4(%rsp)
lea    0xeb4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1030 <towersOfHanoi@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Number of discs?\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @towersOfHanoi(i32 %4, i8 signext 65, i8 signext 66, i8 signext 67)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [17 x i8] c"Number of discs?\00"
define void @main() {
%1 = alloca i32
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @towersOfHanoi(i32 %5, i8 signext 65, i8 signext 66, i8 signext 67)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double difftime(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  time_t start;
  time_t current;
  time(&start);
  printf("delay for 5 seconds.\n");
  do {
    time(&current);
  } while (difftime(current, start) < 5.0);
  printf("Finished delay.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <time@plt>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    -0xc(%rbp),%rdi
call   1050 <time@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <difftime@plt>
movaps %xmm0,%xmm1
movsd  0xe8d(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1154 <main+0x24>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
call   1050 <time@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    0x8(%rsp),%edi
mov    0xc(%rsp),%esi
call   1040 <difftime@plt>
movsd  0xe93(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1150 <main+0x20>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"delay for 5 seconds.\0A\00"
@.str.1 = [17 x i8] c"Finished delay.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @time(i32* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %8, %0
%7 = call i32 @time(i32* %3)
br label %8
8: ; preds = %6
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = call double @difftime(i32 %9, i32 %10)
%12 = fcmp olt double %11, 5.000000e+00
br i1 %12, label %6, label %13
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"delay for 5 seconds.\00"
@str.2 = [16 x i8] c"Finished delay.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @time(i32* %1)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %7, %0
%8 = call i32 @time(i32* %2)
%9 = load i32, i32* %2
%10 = load i32, i32* %1
%11 = call double @difftime(i32 %9, i32 %10)
%12 = fcmp olt double %11, 5.000000e+00
br i1 %12, label %7, label %13
13: ; preds = %7
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}