xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((no)) void sys_exit() { printf("In sys_exit()\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"In sys_exit()\0A\00"
define void @sys_exit() {
%1 = 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"In sys_exit()\00"
define void @sys_exit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int sscanf(char *, char *, int *);
int str_to_hex(char *str, int *hex) {
  return (str[0] == '#') ? sscanf(str + 1, "%x", hex) : 0;
}


x86 assembly (clang, -O0):
<str_to_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1150 <str_to_hex+0x40>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <sscanf@plt>
mov    %eax,-0x14(%rbp)
jmp    115a <str_to_hex+0x4a>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    115a <str_to_hex+0x4a>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_to_hex>:
cmpb   $0x23,(%rdi)
jne    1128 <str_to_hex+0x18>
mov    %rsi,%rdx
add    $0x1,%rdi
lea    0xedd(%rip),%rsi
jmp    1030 <sscanf@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%x\00"
define i32 @str_to_hex(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 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 35
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i32*, i32** %4
%14 = call i32 @sscanf(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %10
%17 = phi i32 [ %14, %10 ], [ 0, %15 ]
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @str_to_hex(i8* nocapture %0, i32* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 35
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void carmen_test_alloc(void *v) {
  if (!v) {
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<carmen_test_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1131 <carmen_test_alloc+0x21>
mov    $0xffffffff,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carmen_test_alloc>:
test   %rdi,%rdi
je     1116 <carmen_test_alloc+0x6>
ret
push   %rax
mov    $0xffffffff,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @carmen_test_alloc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @carmen_test_alloc(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @exit(i32 -1)
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void fr(void *mem) { free(mem); }


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

LLVM IR (-O0):
define void @fr(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 @fr(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
void mutex_cleanup_routine(void *lock_) {
  pthread_mutex_unlock((pthread_mutex_t *)lock_);
}


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

x86 assembly (clang, -O2):
<mutex_cleanup_routine>:
jmp    1030 <pthread_mutex_unlock@plt>

LLVM IR (-O0):
define void @mutex_cleanup_routine(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @pthread_mutex_unlock(i32* %4)
ret void
}

LLVM IR (-O2):
define void @mutex_cleanup_routine(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @pthread_mutex_unlock(i32* %2)
ret void
}
char *test_read_full() { return 0; }


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

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

LLVM IR (-O0):
define i8* @test_read_full() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_read_full() {
ret i8* null
}
int fun227() { return 227; }


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

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

LLVM IR (-O0):
define i32 @fun227() {
ret i32 227
}

LLVM IR (-O2):
define i32 @fun227() {
ret i32 227
}
/* Variables and functions */
int /*<<< orphan*/ set_contenido_mem(int, int);
int /*<<< orphan*/ set_pc(int);
void load_rom() {
  set_contenido_mem(0x00, 0x04420002);
  set_contenido_mem(0x04, 0x04050005);
  set_contenido_mem(0x08, 0x0c0500C0);
  set_contenido_mem(0x0c, 0x28453000);
  set_contenido_mem(0x10, 0x10000000);
  set_pc(0x0);
}


x86 assembly (clang, -O0):
<load_rom>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x4420002,%esi
call   1030 <set_contenido_mem@plt>
mov    $0x4,%edi
mov    $0x4050005,%esi
call   1030 <set_contenido_mem@plt>
mov    $0x8,%edi
mov    $0xc0500c0,%esi
call   1030 <set_contenido_mem@plt>
mov    $0xc,%edi
mov    $0x28453000,%esi
call   1030 <set_contenido_mem@plt>
mov    $0x10,%edi
mov    $0x10000000,%esi
call   1030 <set_contenido_mem@plt>
xor    %edi,%edi
call   1040 <set_pc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_rom>:
push   %rax
xor    %edi,%edi
mov    $0x4420002,%esi
call   1030 <set_contenido_mem@plt>
mov    $0x4,%edi
mov    $0x4050005,%esi
call   1030 <set_contenido_mem@plt>
mov    $0x8,%edi
mov    $0xc0500c0,%esi
call   1030 <set_contenido_mem@plt>
mov    $0xc,%edi
mov    $0x28453000,%esi
call   1030 <set_contenido_mem@plt>
mov    $0x10,%edi
mov    $0x10000000,%esi
call   1030 <set_contenido_mem@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <set_pc@plt>

LLVM IR (-O0):
define void @load_rom() {
%1 = call i32 @set_contenido_mem(i32 0, i32 71434242)
%2 = call i32 @set_contenido_mem(i32 4, i32 67436549)
%3 = call i32 @set_contenido_mem(i32 8, i32 201654464)
%4 = call i32 @set_contenido_mem(i32 12, i32 675622912)
%5 = call i32 @set_contenido_mem(i32 16, i32 268435456)
%6 = call i32 @set_pc(i32 0)
ret void
}

LLVM IR (-O2):
define void @load_rom() {
%1 = tail call i32 @set_contenido_mem(i32 0, i32 71434242)
%2 = tail call i32 @set_contenido_mem(i32 4, i32 67436549)
%3 = tail call i32 @set_contenido_mem(i32 8, i32 201654464)
%4 = tail call i32 @set_contenido_mem(i32 12, i32 675622912)
%5 = tail call i32 @set_contenido_mem(i32 16, i32 268435456)
%6 = tail call i32 @set_pc(i32 0)
ret void
}
/* Variables and functions */
int unhexmem_full(char const *, size_t, int, void **, size_t *);
int unhexmem(const char *p, size_t l, void **mem, size_t *len) {
  return unhexmem_full(p, l, false, mem, len);
}


x86 assembly (clang, -O0):
<unhexmem>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
xor    %edx,%edx
call   1030 <unhexmem_full@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unhexmem>:
mov    %rcx,%r8
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <unhexmem_full@plt>

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

LLVM IR (-O2):
define i32 @unhexmem(i8* %0, i64 %1, i8** %2, i64* %3) {
%5 = tail call i32 @unhexmem_full(i8* %0, i64 %1, i32 0, i8** %2, i64* %3)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ int64_t;
typedef int /*<<< orphan*/ Z3_sort;
typedef int /*<<< orphan*/ Z3_context;

/* Variables and functions */
int /*<<< orphan*/ Z3_mk_int(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ Z3_mk_int_sort(int /*<<< orphan*/);
int64_t redz3_mkInt(int64_t ctx, int64_t v) {
  Z3_sort ty = Z3_mk_int_sort((Z3_context)ctx);
  return (int64_t)Z3_mk_int((Z3_context)ctx, (int)v, ty);
}


x86 assembly (clang, -O0):
<redz3_mkInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <Z3_mk_int_sort@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    -0x14(%rbp),%edx
call   1030 <Z3_mk_int@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redz3_mkInt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <Z3_mk_int_sort@plt>
mov    %ebx,%edi
mov    %r14d,%esi
mov    %eax,%edx
call   1030 <Z3_mk_int@plt>
cltq
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @redz3_mkInt(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = call i32 @Z3_mk_int_sort(i32 %7)
store i32 %8, i32* %5
%9 = load i64, i64* %3
%10 = trunc i64 %9 to i32
%11 = load i64, i64* %4
%12 = trunc i64 %11 to i32
%13 = load i32, i32* %5
%14 = call i32 @Z3_mk_int(i32 %10, i32 %12, i32 %13)
%15 = sext i32 %14 to i64
ret i64 %15
}

LLVM IR (-O2):
define i64 @redz3_mkInt(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = tail call i32 @Z3_mk_int_sort(i32 %3)
%5 = trunc i64 %1 to i32
%6 = tail call i32 @Z3_mk_int(i32 %3, i32 %5, i32 %4)
%7 = sext i32 %6 to i64
ret i64 %7
}
int main(int argc, char **argv) {
  int i = 0;
label:
  if (i == 0)
    goto done;
  i++;
  goto label;
done:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1128 <main+0x28>
jmp    1136 <main+0x36>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t);
void do_things(size_t action) { printf("%d", action); }


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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @do_things(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn48() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn48");
  return result;
}


x86 assembly (clang, -O0):
<fn48>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn48>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn48\00"
define i8* @fn48() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn48\00"
define i8* @fn48() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
void cw1200_debug_tx_ttl(struct cw1200_common *priv) {}


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

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
%struct.cw1200_common = type opaque
define void @cw1200_debug_tx_ttl(%struct.cw1200_common* %0) {
%2 = alloca %struct.cw1200_common*
store %struct.cw1200_common* %0, %struct.cw1200_common** %2
ret void
}

LLVM IR (-O2):
%struct.cw1200_common = type opaque
define void @cw1200_debug_tx_ttl(%struct.cw1200_common* nocapture %0) {
ret void
}
unsigned long f6(unsigned long x, unsigned long y) {
  return (x << (64 - (y & 63)));
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
and    $0x3f,%rdx
mov    $0x40,%ecx
sub    %rdx,%rcx
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
mov    %rsi,%rcx
mov    %rdi,%rax
and    $0x3f,%cl
neg    %cl
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @f6(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = and i64 %6, 63
%8 = sub i64 64, %7
%9 = shl i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @f6(i64 %0, i64 %1) {
%3 = and i64 %1, 63
%4 = sub nuw nsw i64 64, %3
%5 = shl i64 %0, %4
ret i64 %5
}
/* Variables and functions */
int __libc_allocate_rtsig(int /*<<< orphan*/);
int /*<<< orphan*/ die(char *);
int /*<<< orphan*/ printf(char *, int);
void cross_signum(void) {
  int i = __libc_allocate_rtsig(0);
  if (i <= 0)
    die("Unable to determine CR_SIGNUM\n");
  printf("cross_signum=%d\n", i);
}


x86 assembly (clang, -O0):
<cross_signum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <__libc_allocate_rtsig@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1158 <cross_signum+0x28>
lea    0xead(%rip),%rdi
call   1050 <die@plt>
mov    -0x4(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cross_signum>:
push   %rbx
xor    %edi,%edi
call   1030 <__libc_allocate_rtsig@plt>
mov    %eax,%ebx
test   %eax,%eax
jg     114a <cross_signum+0x1a>
lea    0xebb(%rip),%rdi
call   1050 <die@plt>
lea    0xece(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Unable to determine CR_SIGNUM\0A\00"
@.str.1 = [17 x i8] c"cross_signum=%d\0A\00"
define void @cross_signum() {
%1 = alloca i32
%2 = call i32 @__libc_allocate_rtsig(i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @die(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Unable to determine CR_SIGNUM\0A\00"
@.str.1 = [17 x i8] c"cross_signum=%d\0A\00"
define void @cross_signum() {
%1 = tail call i32 @__libc_allocate_rtsig(i32 0)
%2 = icmp slt i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @die(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
void Drv_Flash_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @Drv_Flash_Init() {
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, char, size_t);
void *calloc(size_t count, size_t size) {
  void *p = malloc(count * size);
  if (p == 0)
    return 0;
  memset(p, '\0', count * size);
  return p;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
imul   -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115a <calloc+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    1176 <calloc+0x56>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
imul   -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <calloc+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i8 signext 0, i64 %3)
br label %8
8: ; preds = %2, %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ send_http_error(int, char *, char const *);
void send_409_conflict(int clientsock, const char *msg) {
  send_http_error(clientsock, "409 Conflict", msg);
}


x86 assembly (clang, -O0):
<send_409_conflict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <send_http_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_409_conflict>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <send_http_error@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"409 Conflict\00"
define void @send_409_conflict(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @send_http_error(i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"409 Conflict\00"
define void @send_409_conflict(i32 %0, i8* %1) {
%3 = tail call i32 @send_http_error(i32 %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
int do_318() { return 318; }


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

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

LLVM IR (-O0):
define i32 @do_318() {
ret i32 318
}

LLVM IR (-O2):
define i32 @do_318() {
ret i32 318
}
/* Variables and functions */
int /*<<< orphan*/ set_wlan_advance(int);
int /*<<< orphan*/ set_wlan_basic(int);
int config_ssid(int radio) {
  set_wlan_basic(radio);
  set_wlan_advance(radio);
  return 0;
}


x86 assembly (clang, -O0):
<config_ssid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <set_wlan_basic@plt>
mov    -0x4(%rbp),%edi
call   1040 <set_wlan_advance@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_ssid>:
push   %rbx
mov    %edi,%ebx
call   1030 <set_wlan_basic@plt>
mov    %ebx,%edi
call   1040 <set_wlan_advance@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @config_ssid(i32 %0) {
%2 = tail call i32 @set_wlan_basic(i32 %0)
%3 = tail call i32 @set_wlan_advance(i32 %0)
ret i32 0
}
void BrzVariable_ackup(struct comp *comp, int port) {}


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

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

LLVM IR (-O0):
%struct.comp = type opaque
define void @BrzVariable_ackup(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.comp = type opaque
define void @BrzVariable_ackup(%struct.comp* nocapture %0, i32 %1) {
ret void
}
int xmlUCSIsCJKCompatibilityIdeographsSupplement(int code) {
  return (((code >= 0x2F800) && (code <= 0x2FA1F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsCJKCompatibilityIdeographsSupplement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2f800,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsCJKCompatibilityIdeographsSupplement+0x26>
cmpl   $0x2fa1f,-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):
<xmlUCSIsCJKCompatibilityIdeographsSupplement>:
add    $0xfffd0800,%edi
xor    %eax,%eax
cmp    $0x220,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCJKCompatibilityIdeographsSupplement(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 194560
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 195103
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 @xmlUCSIsCJKCompatibilityIdeographsSupplement(i32 %0) {
%2 = add i32 %0, -194560
%3 = icmp ult i32 %2, 544
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ beolv(char *, int *);
int /*<<< orphan*/ getSch();
int /*<<< orphan*/ kiir(char *, int /*<<< orphan*/);
int /*<<< orphan*/ setSch(int);
int secChance() {
  int l;
  kiir("Bekapcsolod a masodik eselyt?(1 - igen, 0 - nem)(Jelenleg %d): ",
       getSch());
  beolv("%d", &l);
  if (l >= 0 && l <= 1) {
    setSch(l);
  }
  return 1;
}


x86 assembly (clang, -O0):
<secChance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getSch@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
call   1030 <kiir@plt>
lea    0xedc(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <beolv@plt>
cmpl   $0x0,-0x4(%rbp)
jl     1189 <secChance+0x49>
cmpl   $0x1,-0x4(%rbp)
jg     1189 <secChance+0x49>
mov    -0x4(%rbp),%edi
call   1050 <setSch@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<secChance>:
push   %rax
xor    %eax,%eax
call   1040 <getSch@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <kiir@plt>
lea    0xee3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <beolv@plt>
mov    0x4(%rsp),%edi
cmp    $0x1,%edi
ja     1175 <secChance+0x35>
call   1050 <setSch@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [64 x i8] c"Bekapcsolod a masodik eselyt?(1 - igen, 0 - nem)(Jelenleg %d): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @secChance() {
%1 = alloca i32
%2 = call i32 (...) @getSch()
%3 = call i32 @kiir(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @beolv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp sle i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %1
%12 = call i32 @setSch(i32 %11)
br label %13
13: ; preds = %10, %7, %0
ret i32 1
}

LLVM IR (-O2):
@.str = [64 x i8] c"Bekapcsolod a masodik eselyt?(1 - igen, 0 - nem)(Jelenleg %d): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @secChance() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @getSch()
%4 = tail call i32 @kiir(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @beolv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp ult i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @setSch(i32 %6)
br label %10
10: ; preds = %8, %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int main() {
  char *s = "World";
  printf("%s, %s\n", "Hello", s);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeee(%rip),%rdi
lea    0xeef(%rip),%rsi
lea    0xeda(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"World\00"
@.str.1 = [8 x i8] c"%s, %s\0A\00"
@.str.2 = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct bytecode {
  int dummy;
};

/* Variables and functions */
struct bytecode *jq_compile_args(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ jv_array();
struct bytecode *jq_compile(const char *str) {
  return jq_compile_args(str, jv_array());
}


x86 assembly (clang, -O0):
<jq_compile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <jv_array@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <jq_compile_args@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jq_compile>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <jv_array@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <jq_compile_args@plt>

LLVM IR (-O0):
%struct.bytecode = type { i32 }
define %struct.bytecode* @jq_compile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @jv_array()
%5 = call %struct.bytecode* @jq_compile_args(i8* %3, i32 %4)
ret %struct.bytecode* %5
}

LLVM IR (-O2):
%struct.bytecode = type { i32 }
define %struct.bytecode* @jq_compile(i8* %0) {
%2 = tail call i32 (...) @jv_array()
%3 = tail call %struct.bytecode* @jq_compile_args(i8* %0, i32 %2)
ret %struct.bytecode* %3
}
void default_callback_info(void *ptr) { return; }


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

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

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

LLVM IR (-O2):
define void @default_callback_info(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMcs51GeneralIOC__P10__clr();
void ReverseGPIOP__0__In__clr(void) { HplMcs51GeneralIOC__P10__clr(); }


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

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

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

LLVM IR (-O2):
define void @ReverseGPIOP__0__In__clr() {
%1 = tail call i32 (...) @HplMcs51GeneralIOC__P10__clr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  printf("Please enter three integers:\n");
  scanf("%*d %*d %d", &n);
  printf("The last integer was %d\n", n);
  getchar();
  getchar();
  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    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Please enter three integers:\0A\00"
@.str.1 = [11 x i8] c"%*d %*d %d\00"
@.str.2 = [25 x i8] c"The last integer was %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @getchar()
%8 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"%*d %*d %d\00"
@.str.2 = [25 x i8] c"The last integer was %d\0A\00"
@str = [29 x i8] c"Please enter three integers:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @getchar()
%8 = call i32 (...) @getchar()
ret i32 0
}
void reiniciarVector(int array[], int length) {
  int i;
  for (i = 0; i < length; i++) {
    array[i] = 0;
  }
}


x86 assembly (clang, -O0):
<reiniciarVector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <reiniciarVector+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <reiniciarVector+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reiniciarVector>:
test   %esi,%esi
jle    1126 <reiniciarVector+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @reiniciarVector(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 0, i32* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @reiniciarVector(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
void menu_unload(void) {}


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

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

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

LLVM IR (-O2):
define void @menu_unload() {
ret void
}
__attribute__((always_)) void pci_msi_init_pci_dev(struct pci_dev *dev) {}


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

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

LLVM IR (-O0):
%struct.pci_dev = type opaque
define void @pci_msi_init_pci_dev(%struct.pci_dev* %0) {
%2 = alloca %struct.pci_dev*
store %struct.pci_dev* %0, %struct.pci_dev** %2
ret void
}

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_msi_init_pci_dev(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  printf("%d %d %d\n", 2, 4, 1000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
mov    $0x3e8,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i32 4, i32 1000)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i32 4, i32 1000)
ret i32 0
}
void init_des_cipher() {}


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

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

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

LLVM IR (-O2):
define void @init_des_cipher() {
ret void
}
/* Variables and functions */
void restore_stack(char *buf, size_t argc) {
  if (argc > 6) {
    buf[0] = 0xc9;
    buf = buf + 1;
  }
  buf[0] = 0xc3;
}


x86 assembly (clang, -O0):
<restore_stack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x6,-0x10(%rbp)
jbe    112a <restore_stack+0x2a>
mov    -0x8(%rbp),%rax
movb   $0xc9,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0xc3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_stack>:
cmp    $0x7,%rsi
jb     110d <restore_stack+0xd>
movb   $0xc9,(%rdi)
add    $0x1,%rdi
movb   $0xc3,(%rdi)
ret

LLVM IR (-O0):
define void @restore_stack(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp ugt i64 %5, 6
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 -55, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %3
br label %12
12: ; preds = %7, %2
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 0
store i8 -61, i8* %14
ret void
}

LLVM IR (-O2):
define void @restore_stack(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp ugt i64 %1, 6
br i1 %3, label %4, label %6
4: ; preds = %2
store i8 -55, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 1
br label %6
6: ; preds = %4, %2
%7 = phi i8* [ %5, %4 ], [ %0, %2 ]
store i8 -61, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xxx2(void) { printf("DSO2\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"DSO2\00"
define void @xxx2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
char *sh_get_home_dir() {
  char *home_dir;
  struct passwd *entry;
  home_dir = (char *)0;
  return (home_dir);
}


x86 assembly (clang, -O0):
<sh_get_home_dir>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.passwd = type opaque
define i8* @sh_get_home_dir() {
%1 = alloca i8*
%2 = alloca %struct.passwd*
store i8* null, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
%struct.passwd = type opaque
define noalias i8* @sh_get_home_dir() {
ret i8* null
}
void YUY2ToNV12() {}


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

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

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

LLVM IR (-O2):
define void @YUY2ToNV12() {
ret void
}
double drag(double cd, double rho, double speed, double surface) {
  return 0.5 * cd * rho * speed * speed * surface;
}


x86 assembly (clang, -O0):
<drag>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  0xee0(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<drag>:
mulsd  0xef8(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @drag(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = fmul double 5.000000e-01, %9
%11 = load double, double* %6
%12 = fmul double %10, %11
%13 = load double, double* %7
%14 = fmul double %12, %13
%15 = load double, double* %7
%16 = fmul double %14, %15
%17 = load double, double* %8
%18 = fmul double %16, %17
ret double %18
}

LLVM IR (-O2):
define double @drag(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, 5.000000e-01
%6 = fmul double %5, %1
%7 = fmul double %6, %2
%8 = fmul double %7, %2
%9 = fmul double %8, %3
ret double %9
}
void led_init() {
  *((volatile unsigned long *)0x56000010) =
      (1 << (5 * 2)) | (1 << (6 * 2)) | (1 << (7 * 2)) | (1 << (8 * 2));
}


x86 assembly (clang, -O0):
<led_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56000010,%eax
movq   $0x15400,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_init>:
movq   $0x15400,0x56000010
ret

LLVM IR (-O0):
define void @led_init() {
store volatile i64 87040, i64* inttoptr (i64 1442840592 to i64*)
ret void
}

LLVM IR (-O2):
define void @led_init() {
store volatile i64 87040, i64* inttoptr (i64 1442840592 to i64*)
ret void
}
char *g() { return ""; }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @g() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @g() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool DESDataWriteNonBlocking(uint32_t ui32Base, uint32_t *pui32Src) {
  ;
  if (!(0x00000002 & ((*((volatile uint32_t *)(ui32Base + 0x00000020)))))) {
    return (false);
  }
  (*((volatile uint32_t *)(0x44038000 + 0x00000028))) = pui32Src[0];
  (*((volatile uint32_t *)(0x44038000 + 0x0000002C))) = pui32Src[1];
  return (true);
}


x86 assembly (clang, -O0):
<DESDataWriteNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%eax
cltq
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    112d <DESDataWriteNonBlocking+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    114f <DESDataWriteNonBlocking+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    $0x44038028,%eax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    $0x4403802c,%eax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DESDataWriteNonBlocking>:
movslq %edi,%rcx
xor    %eax,%eax
testl  $0x2,0x20(%rcx)
je     1126 <DESDataWriteNonBlocking+0x26>
mov    (%rsi),%eax
mov    %eax,0x44038028
mov    0x4(%rsi),%eax
mov    %eax,0x4403802c
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @DESDataWriteNonBlocking(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 32
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 2, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %2
store i32 0, i32* %3
br label %21
14: ; preds = %2
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 0
%17 = load i32, i32* %16
store volatile i32 %17, i32* inttoptr (i64 1141080104 to i32*)
%18 = load i32*, i32** %5
%19 = getelementptr inbounds i32, i32* %18, i64 1
%20 = load i32, i32* %19
store volatile i32 %20, i32* inttoptr (i64 1141080108 to i32*)
store i32 1, i32* %3
br label %21
21: ; preds = %14, %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @DESDataWriteNonBlocking(i32 %0, i32* nocapture %1) {
%3 = add nsw i32 %0, 32
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* %1
store volatile i32 %10, i32* inttoptr (i64 1141080104 to i32*)
%11 = getelementptr inbounds i32, i32* %1, i64 1
%12 = load i32, i32* %11
store volatile i32 %12, i32* inttoptr (i64 1141080108 to i32*)
br label %13
13: ; preds = %2, %9
%14 = phi i32 [ 1, %9 ], [ 0, %2 ]
ret i32 %14
}