xunge/DecIR huggingface dataset:
/* Variables and functions */
int factrec(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, f;
  printf("Enter n:");
  scanf("%d", &n);
  printf("%d! = %d\n", n, factrec(n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1040 <factrec@plt>
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"Enter n:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"%d! = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%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 @factrec(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void hello(const char *name) { printf("Hello %s!/n", name); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Hello %s!/n\00"
define void @hello(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, void *);
int check_removed(size_t *idx, size_t *end, void *item, void *strings) {
  return strcmp(((char **)strings)[*idx + (*idx >= 1)], item) != 0;
  (void)end;
}


x86 assembly (clang, -O0):
<check_removed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x8(%rbp),%rdx
cmpq   $0x1,(%rdx)
setae  %dl
and    $0x1,%dl
movzbl %dl,%edx
movslq %edx,%rdx
add    %rdx,%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_removed>:
push   %rax
mov    (%rdi),%rax
cmp    $0x1,%rax
sbb    $0xffffffffffffffff,%rax
mov    (%rcx,%rax,8),%rdi
mov    %rdx,%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @check_removed(i64* %0, i64* %1, i8* %2, i8* %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i8*
store i64* %0, i64** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = bitcast i8* %9 to i8**
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = load i64*, i64** %5
%14 = load i64, i64* %13
%15 = icmp uge i64 %14, 1
%16 = zext i1 %15 to i32
%17 = sext i32 %16 to i64
%18 = add i64 %12, %17
%19 = getelementptr inbounds i8*, i8** %10, i64 %18
%20 = load i8*, i8** %19
%21 = load i8*, i8** %7
%22 = call i64 @strcmp(i8* %20, i8* %21)
%23 = icmp ne i64 %22, 0
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @check_removed(i64* nocapture %0, i64* nocapture readnone %1, i8* %2, i8* nocapture %3) {
%5 = bitcast i8* %3 to i8**
%6 = load i64, i64* %0
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = add i64 %6, %8
%10 = getelementptr inbounds i8*, i8** %5, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i64 @strcmp(i8* %11, i8* %2)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}
void gtk_scale_set_value_pos() {}


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

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

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

LLVM IR (-O2):
define void @gtk_scale_set_value_pos() {
ret void
}
void __embox_register_eh_frame_once(void) {}


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

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

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

LLVM IR (-O2):
define void @__embox_register_eh_frame_once() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_alrm(int signo) { printf("call sig_alrm\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"call sig_alrm\00"
define void @sig_alrm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
int main() {
  char *p1 = "data";
  const char *p2 = "data";
  char *const p3 = "data";
  const char *const p4 = "data";
  p1[0] = 'x';
  p1 = "data1";
  p2 = "data2";
  p3[0] = 'x';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xee3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xed8(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x78,(%rax)
lea    0xec0(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xebb(%rip),%rax
mov    %rax,-0x18(%rbp)
movb   $0x78,0xea5(%rip)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"data\00"
@.str.1 = [6 x i8] c"data1\00"
@.str.2 = [6 x i8] c"data2\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
store i8 120, i8* %7
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %3
store i8 120, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gaudio_play_pwm_stop(void) {}


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

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

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

LLVM IR (-O2):
define void @gaudio_play_pwm_stop() {
ret void
}
int test_imm_A3uint32_reg(unsigned int val) {
  return ((val) & (0xA3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A3uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xa3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_A3uint32_reg(i32 %0) {
%2 = and i32 %0, 163
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int safe_socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int safe_socket_udp() { return safe_socket(AF_INET, SOCK_DGRAM, 0); }


x86 assembly (clang, -O0):
<safe_socket_udp>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <safe_socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_socket_udp>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <safe_socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @safe_socket_udp() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = call i32 @safe_socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @safe_socket_udp() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @safe_socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
int *allocateVector(int size) {
  int *v = (int *)malloc(size * sizeof(int));
  if (v == NULL) {
    printf("Allocation error: vector\n");
    exit(-1);
  }
  return v;
}


x86 assembly (clang, -O0):
<allocateVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116f <allocateVector+0x3f>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocateVector>:
push   %rax
shl    $0x2,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <allocateVector+0x10>
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Allocation error: vector\0A\00"
define i32* @allocateVector(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 -1)
unreachable
15: ; preds = %1
%16 = load i32*, i32** %3
ret i32* %16
}

LLVM IR (-O2):
@str = [25 x i8] c"Allocation error: vector\00"
define i32* @allocateVector(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %3 to i32*
ret i32* %9
}
void test_non_identifiers() {
  int i, x;
#pragma omp parallel
#pragma omp master taskloop;
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp master taskloop linear(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp master taskloop private(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp master taskloop, private(x);
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_non_identifiers+0x28>
jmp    111a <test_non_identifiers+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_non_identifiers+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_non_identifiers+0x4c>
jmp    113e <test_non_identifiers+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_non_identifiers+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_non_identifiers+0x70>
jmp    1162 <test_non_identifiers+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_non_identifiers+0x53>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1194 <test_non_identifiers+0x94>
jmp    1186 <test_non_identifiers+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <test_non_identifiers+0x77>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_non_identifiers() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %3
10: ; preds = %3
store i32 0, i32* %1
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %1
%13 = icmp slt i32 %12, 16
br i1 %13, label %14, label %18
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %11
18: ; preds = %11
store i32 0, i32* %1
br label %19
19: ; preds = %23, %18
%20 = load i32, i32* %1
%21 = icmp slt i32 %20, 16
br i1 %21, label %22, label %26
22: ; preds = %19
br label %23
23: ; preds = %22
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %19
26: ; preds = %19
store i32 0, i32* %1
br label %27
27: ; preds = %31, %26
%28 = load i32, i32* %1
%29 = icmp slt i32 %28, 16
br i1 %29, label %30, label %34
30: ; preds = %27
br label %31
31: ; preds = %30
%32 = load i32, i32* %1
%33 = add nsw i32 %32, 1
store i32 %33, i32* %1
br label %27
34: ; preds = %27
ret void
}

LLVM IR (-O2):
define void @test_non_identifiers() {
ret void
}
void foo392() {}


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

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

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

LLVM IR (-O2):
define void @foo392() {
ret void
}
int zsize_data_put_size(int size, char *buf) {
  int ch, left = size, len = 0;
  do {
    ch = left & 0177;
    left >>= 7;
    if (!left) {
      ch |= 0200;
    }
    ((unsigned char *)buf)[len++] = ch;
  } while (left);
  return len;
}


x86 assembly (clang, -O0):
<zsize_data_put_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x7f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
sar    $0x7,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    113f <zsize_data_put_size+0x3f>
mov    -0x14(%rbp),%eax
or     $0x80,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x1c(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
cmpl   $0x0,-0x18(%rbp)
jne    1118 <zsize_data_put_size+0x18>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zsize_data_put_size>:
xor    %eax,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sar    $0x7,%ecx
mov    %edi,%r8d
and    $0x7f,%r8b
mov    %edi,%edx
or     $0x80,%dl
cmp    $0x80,%edi
movzbl %dl,%r9d
movzbl %r8b,%edx
cmovb  %r9d,%edx
mov    %dl,(%rsi,%rax,1)
add    $0x1,%rax
cmp    $0x7f,%edi
mov    %ecx,%edi
ja     1110 <zsize_data_put_size+0x10>
ret

LLVM IR (-O0):
define i32 @zsize_data_put_size(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%8 = load i32, i32* %3
store i32 %8, i32* %6
store i32 0, i32* %7
br label %9
9: ; preds = %27, %2
%10 = load i32, i32* %6
%11 = and i32 %10, 127
store i32 %11, i32* %5
%12 = load i32, i32* %6
%13 = ashr i32 %12, 7
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %9
%17 = load i32, i32* %5
%18 = or i32 %17, 128
store i32 %18, i32* %5
br label %19
19: ; preds = %16, %9
%20 = load i32, i32* %5
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %4
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
%25 = sext i32 %23 to i64
%26 = getelementptr inbounds i8, i8* %22, i64 %25
store i8 %21, i8* %26
br label %27
27: ; preds = %19
%28 = load i32, i32* %6
%29 = icmp ne i32 %28, 0
br i1 %29, label %9, label %30
30: ; preds = %27
%31 = load i32, i32* %7
ret i32 %31
}

LLVM IR (-O2):
define i32 @zsize_data_put_size(i32 %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %12, %3 ], [ 0, %2 ]
%5 = phi i32 [ %7, %3 ], [ %0, %2 ]
%6 = and i32 %5, 127
%7 = ashr i32 %5, 7
%8 = icmp ult i32 %5, 128
%9 = or i32 %5, 128
%10 = select i1 %8, i32 %9, i32 %6
%11 = trunc i32 %10 to i8
%12 = add nuw i64 %4, 1
%13 = getelementptr inbounds i8, i8* %1, i64 %4
store i8 %11, i8* %13
br i1 %8, label %14, label %3
14: ; preds = %3
%15 = trunc i64 %12 to i32
ret i32 %15
}
int myisalnum(c)
char c;
{ return isalph(c) || isnum(c); }


x86 assembly (clang, -O0):
<myisalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <isalph@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    115d <myisalnum+0x3d>
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1040 <isnum@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myisalnum>:
push   %rbx
movsbl %dil,%ebx
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <isalph@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     113b <myisalnum+0x1b>
pop    %rbx
ret
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <isnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @myisalnum(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 (i32, ...) bitcast (i32 (...)* @isalph to i32 (i32, ...)*)(i32 %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = call i32 (i32, ...) bitcast (i32 (...)* @isnum to i32 (i32, ...)*)(i32 %10)
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %8, %1
%14 = phi i1 [ true, %1 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @myisalnum(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @isalph to i32 (i32, ...)*)(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @isnum to i32 (i32, ...)*)(i32 %3)
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ 1, %1 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int readu2(unsigned char *);
char *zip_entry_name(unsigned char *entry, int *lenp) {
  *lenp = readu2(entry + 28);
  return (char *)(entry + 46);
}


x86 assembly (clang, -O0):
<zip_entry_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1c,%rdi
call   1030 <readu2@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x2e,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zip_entry_name>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1c,%rdi
call   1030 <readu2@plt>
mov    %eax,(%r14)
add    $0x2e,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @zip_entry_name(i8* %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 28
%4 = tail call i32 @readu2(i8* %3)
store i32 %4, i32* %1
%5 = getelementptr inbounds i8, i8* %0, i64 46
ret i8* %5
}
int unlink(char *name) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @unlink(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ destruct_object(int /*<<< orphan*/);
int /*<<< orphan*/ this_object();
void self_destruct() { destruct_object(this_object()); }


x86 assembly (clang, -O0):
<self_destruct>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <this_object@plt>
mov    %eax,%edi
call   1030 <destruct_object@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<self_destruct>:
push   %rax
xor    %eax,%eax
call   1040 <this_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <destruct_object@plt>

LLVM IR (-O0):
define void @self_destruct() {
%1 = call i32 (...) @this_object()
%2 = call i32 @destruct_object(i32 %1)
ret void
}

LLVM IR (-O2):
define void @self_destruct() {
%1 = tail call i32 (...) @this_object()
%2 = tail call i32 @destruct_object(i32 %1)
ret void
}
void func_misc1() {}


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

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

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

LLVM IR (-O2):
define void @func_misc1() {
ret void
}
/* Variables and functions */
size_t TestingDescending(size_t index, size_t total) { return total - index; }


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

x86 assembly (clang, -O2):
<TestingDescending>:
mov    %rsi,%rax
sub    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @TestingDescending(i64 %0, i64 %1) {
%3 = sub i64 %1, %0
ret i64 %3
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int random();
int *create_vector(int length) {
  int *vec, i;
  vec = (int *)calloc(length, sizeof(int));
  for (i = 0; i < length; i++)
    vec[i] = random() % 101;
  return vec;
}


x86 assembly (clang, -O0):
<create_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1177 <create_vector+0x57>
mov    $0x0,%al
call   1040 <random@plt>
mov    $0x65,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1143 <create_vector+0x23>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_vector>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,%r14
test   %ebp,%ebp
jle    116f <create_vector+0x4f>
mov    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <random@plt>
cltq
imul   $0x288df0cb,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x65,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <create_vector+0x20>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32* @create_vector(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i64 @calloc(i32 %5, i32 4)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %3
store i32 0, i32* %4
br label %8
8: ; preds = %19, %1
%9 = load i32, i32* %4
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = call i32 (...) @random()
%14 = srem i32 %13, 101
%15 = load i32*, i32** %3
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 %14, i32* %18
br label %19
19: ; preds = %12
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %8
22: ; preds = %8
%23 = load i32*, i32** %3
ret i32* %23
}

LLVM IR (-O2):
define i32* @create_vector(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 4)
%3 = inttoptr i64 %2 to i32*
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = tail call i32 (...) @random()
%10 = srem i32 %9, 101
%11 = getelementptr inbounds i32, i32* %3, i64 %8
store i32 %10, i32* %11
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %1
ret i32* %3
}
main() { return "a" == "a"; }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_add_fallback_vtable(void *bus, void **slot, const char *prefix,
                           const char *interface, const void *vtable,
                           void *find, void *userdata) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_add_fallback_vtable>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
mov    0x2eb7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_add_fallback_vtable>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_add_fallback_vtable(i8* %0, i8** %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8**
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
store i8* %0, i8** %8
store i8** %1, i8*** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%15 = load i32, i32* @EINVAL
%16 = sub nsw i32 0, %15
ret i32 %16
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_add_fallback_vtable(i8* nocapture readnone %0, i8** nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i8* nocapture readnone %6) {
%8 = load i32, i32* @EINVAL
%9 = sub nsw i32 0, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ihevca_aligned_free(void *pv_buf) {
  free(pv_buf);
  return;
}


x86 assembly (clang, -O0):
<ihevca_aligned_free>:
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):
<ihevca_aligned_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ihevca_aligned_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int _getpid();
int getpid(void) { return _getpid(); }


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

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

LLVM IR (-O0):
define i32 @getpid() {
%1 = call i32 (...) @_getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getpid() {
%1 = tail call i32 (...) @_getpid()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int smap_smep_enabled();
void check_smep_smap() {
  int rv = smap_smep_enabled();
  if (rv >= 2) {
    printf("[-] SMAP detected, no bypass available\n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_smep_smap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <smap_smep_enabled@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     1166 <check_smep_smap+0x36>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_smep_smap>:
push   %rax
xor    %eax,%eax
call   1040 <smap_smep_enabled@plt>
cmp    $0x2,%eax
jge    113f <check_smep_smap+0xf>
pop    %rax
ret
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"[-] SMAP detected, no bypass available\0A\00"
@EXIT_FAILURE = global i32 0
define void @check_smep_smap() {
%1 = alloca i32
%2 = call i32 (...) @smap_smep_enabled()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp sge i32 %3, 2
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [39 x i8] c"[-] SMAP detected, no bypass available\00"
define void @check_smep_smap() {
%1 = tail call i32 (...) @smap_smep_enabled()
%2 = icmp sgt i32 %1, 1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %0
ret void
}
unsigned char get_byte(unsigned char **p) {
  *p += 1;
  return ((unsigned char)*(*p - 1));
}


x86 assembly (clang, -O0):
<get_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl -0x1(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_byte>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
mov    (%rax),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @get_byte(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
%4 = load i8, i8* %2
ret i8 %4
}
int isascii(int c) { return c >= 0 && c <= 255; }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1123 <isascii+0x23>
cmpl   $0xff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x100,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 255
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 256
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
void WUR(ssize_t x) { x = x; }


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

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

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

LLVM IR (-O2):
define void @WUR(i32 %0) {
ret void
}
void g_build_filename() {}


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

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

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

LLVM IR (-O2):
define void @g_build_filename() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ derivative(int);
int /*<<< orphan*/ highPass(int);
int /*<<< orphan*/ lowPass(int *, int, int);
int /*<<< orphan*/ movingWindowIntegration(int *, int, int);
int /*<<< orphan*/ squared(int);
void dataFilter(int x[], int xSize, int y[], int ySize, int n) {
  lowPass(x, xSize, n);
  highPass(n);
  derivative(n);
  squared(n);
  movingWindowIntegration(y, ySize, n);
}


x86 assembly (clang, -O0):
<dataFilter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1070 <lowPass@plt>
mov    -0x20(%rbp),%edi
call   1050 <highPass@plt>
mov    -0x20(%rbp),%edi
call   1030 <derivative@plt>
mov    -0x20(%rbp),%edi
call   1060 <squared@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1040 <movingWindowIntegration@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dataFilter>:
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %rdx,%rbp
mov    %r8d,%edx
call   1070 <lowPass@plt>
mov    %ebx,%edi
call   1050 <highPass@plt>
mov    %ebx,%edi
call   1030 <derivative@plt>
mov    %ebx,%edi
call   1060 <squared@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <movingWindowIntegration@plt>

LLVM IR (-O0):
define void @dataFilter(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %10
%14 = call i32 @lowPass(i32* %11, i32 %12, i32 %13)
%15 = load i32, i32* %10
%16 = call i32 @highPass(i32 %15)
%17 = load i32, i32* %10
%18 = call i32 @derivative(i32 %17)
%19 = load i32, i32* %10
%20 = call i32 @squared(i32 %19)
%21 = load i32*, i32** %8
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = call i32 @movingWindowIntegration(i32* %21, i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
define void @dataFilter(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 @lowPass(i32* %0, i32 %1, i32 %4)
%7 = tail call i32 @highPass(i32 %4)
%8 = tail call i32 @derivative(i32 %4)
%9 = tail call i32 @squared(i32 %4)
%10 = tail call i32 @movingWindowIntegration(i32* %2, i32 %3, i32 %4)
ret void
}
void test_builtin_conj(_Complex double d) {
  if (__builtin_conj(d) != __builtin_conj(d))
    link_failure_builtin_conj();
}


x86 assembly (clang, -O0):
<test_builtin_conj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm3,%xmm2
setne  %al
setp   %cl
or     %cl,%al
ucomisd %xmm1,%xmm0
setne  %cl
setp   %dl
or     %dl,%cl
or     %cl,%al
test   $0x1,%al
jne    118b <test_builtin_conj+0x7b>
jmp    1192 <test_builtin_conj+0x82>
mov    $0x0,%al
call   1030 <link_failure_builtin_conj@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_conj>:
ucomisd %xmm1,%xmm0
jp     1117 <test_builtin_conj+0x7>
ret
xor    %eax,%eax
jmp    1030 <link_failure_builtin_conj@plt>

LLVM IR (-O0):
define void @test_builtin_conj(double %0, double %1) {
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%9 = load double, double* %8
%10 = fneg double %9
%11 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%12 = load double, double* %11
%13 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%14 = load double, double* %13
%15 = fneg double %14
%16 = fcmp une double %7, %12
%17 = fcmp une double %10, %15
%18 = or i1 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 (...) @link_failure_builtin_conj()
br label %21
21: ; preds = %19, %2
ret void
}

LLVM IR (-O2):
define void @test_builtin_conj(double %0, double %1) {
%3 = fcmp uno double %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @link_failure_builtin_conj()
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int age = 10;
  int height = 72;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  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)
movl   $0xa,-0x14(%rbp)
movl   $0x48,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x48,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\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
store i32 10, i32* %6
store i32 72, i32* %7
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ StrDump(char *);
void Separator() { StrDump("\n------------------------------"); }


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

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

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

LLVM IR (-O2):
@.str = [32 x i8] c"\0A------------------------------\00"
define void @Separator() {
%1 = tail call i32 @StrDump(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
int IS_AGPHEADER_INV(unsigned int data) {
  switch (data & 0xFFFF0000) {
  case 0xFE000000:
  case 0xFE010000:
  case 0xFE020000:
  case 0xFE030000:
  case 0xFE040000:
  case 0xFE050000:
  case 0xFE060000:
  case 0xFE070000:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<IS_AGPHEADER_INV>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0xc(%rbp)
sub    $0xfe000000,%eax
je     11a6 <IS_AGPHEADER_INV+0xa6>
jmp    1121 <IS_AGPHEADER_INV+0x21>
mov    -0xc(%rbp),%eax
sub    $0xfe010000,%eax
je     11a6 <IS_AGPHEADER_INV+0xa6>
jmp    1134 <IS_AGPHEADER_INV+0x34>
mov    -0xc(%rbp),%eax
sub    $0xfe020000,%eax
je     11a6 <IS_AGPHEADER_INV+0xa6>
jmp    1147 <IS_AGPHEADER_INV+0x47>
mov    -0xc(%rbp),%eax
sub    $0xfe030000,%eax
je     11a6 <IS_AGPHEADER_INV+0xa6>
jmp    115a <IS_AGPHEADER_INV+0x5a>
mov    -0xc(%rbp),%eax
sub    $0xfe040000,%eax
je     11a6 <IS_AGPHEADER_INV+0xa6>
jmp    116d <IS_AGPHEADER_INV+0x6d>
mov    -0xc(%rbp),%eax
sub    $0xfe050000,%eax
je     11a6 <IS_AGPHEADER_INV+0xa6>
jmp    1180 <IS_AGPHEADER_INV+0x80>
mov    -0xc(%rbp),%eax
sub    $0xfe060000,%eax
je     11a6 <IS_AGPHEADER_INV+0xa6>
jmp    1193 <IS_AGPHEADER_INV+0x93>
mov    -0xc(%rbp),%eax
sub    $0xfe070000,%eax
jne    11b2 <IS_AGPHEADER_INV+0xb2>
jmp    11a6 <IS_AGPHEADER_INV+0xa6>
movl   $0x1,-0x4(%rbp)
jmp    11b9 <IS_AGPHEADER_INV+0xb9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_AGPHEADER_INV>:
and    $0xfff80000,%edi
xor    %eax,%eax
cmp    $0xfe000000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @IS_AGPHEADER_INV(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, -65536
switch i32 %5, label %7 [
i32 -33554432, label %6
i32 -33488896, label %6
i32 -33423360, label %6
i32 -33357824, label %6
i32 -33292288, label %6
i32 -33226752, label %6
i32 -33161216, label %6
i32 -33095680, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @IS_AGPHEADER_INV(i32 %0) {
%2 = and i32 %0, -524288
%3 = icmp eq i32 %2, -33554432
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_embedded_null() {
  if (strncasecmp("ab\0zz", "ab\0yy", 4) != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strncasecmp_embedded_null>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee4(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
je     1136 <strncasecmp_embedded_null+0x26>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"ab\00zz\00"
@.str.1 = [6 x i8] c"ab\00yy\00"
define void @strncasecmp_embedded_null() {
%1 = call i64 @strncasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 4)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = load i8, i8* null
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @strncasecmp_embedded_null() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char const *, int);
uint32_t read_uint3(const char *buf) {
  uint32_t tmp = 0;
  memcpy(&tmp, buf, 3);
  return tmp;
}


x86 assembly (clang, -O0):
<read_uint3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x3,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_uint3>:
push   %rax
mov    %rdi,%rsi
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x3,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @read_uint3(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 3)
%5 = load i32, i32* %2
ret i32 %5
}
int f_lt_mm2(float *a1, float *a2) { return !(((*a1) < (*a2))); }


x86 assembly (clang, -O0):
<f_lt_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_lt_mm2>:
movss  (%rsi),%xmm0
xor    %eax,%eax
ucomiss (%rdi),%xmm0
setbe  %al
ret

LLVM IR (-O0):
define i32 @f_lt_mm2(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fcmp olt float %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @f_lt_mm2(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fcmp uge float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}