xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ kore_proctitle(char const *);
void kore_platform_proctitle(const char *title) { kore_proctitle(title); }


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

x86 assembly (clang, -O2):
<kore_platform_proctitle>:
jmp    1030 <kore_proctitle@plt>

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

LLVM IR (-O2):
define void @kore_platform_proctitle(i8* %0) {
%2 = tail call i32 @kore_proctitle(i8* %0)
ret void
}
void build_symtbl() {}


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

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

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

LLVM IR (-O2):
define void @build_symtbl() {
ret void
}
long __syscall_ret(unsigned long r) { return r; }


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

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

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

LLVM IR (-O2):
define i64 @__syscall_ret(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void c(int x, int y) {
  if (x == y)
    abort();
}


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1131 <c+0x21>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
cmp    %esi,%edi
je     1115 <c+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @c(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XFocusOutEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XFocusOutEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XFocusOutEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XFocusOutEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XFocusOutEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XFocusOutEvent>:
test   %rdi,%rdi
je     112a <free_XFocusOutEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

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

LLVM IR (-O2):
define void @free_XFocusOutEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char const *, int);
void exitFatal(char const msg[], size_t len) {
  (void)write(2, msg, len);
  (void)write(2, "\n", 1);
  exit(2);
}


x86 assembly (clang, -O0):
<exitFatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xeb0(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitFatal>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x2,%edi
call   1030 <write@plt>
lea    0xec8(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @exitFatal(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = call i32 @write(i32 2, i8* %5, i32 %7)
%9 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%10 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @exitFatal(i8* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = tail call i32 @write(i32 2, i8* %0, i32 %3)
%5 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i32 @exit(i32 2)
unreachable
}
void put_unsigned_short_le(unsigned short data, unsigned char **bufptr) {
  *(*bufptr)++ = (unsigned char)(data & 0xff);
  *(*bufptr)++ = (unsigned char)((data >> 8) & 0xff);
}


x86 assembly (clang, -O0):
<put_unsigned_short_le>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_unsigned_short_le>:
mov    %edi,%eax
mov    (%rsi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rsi)
mov    %al,(%rcx)
mov    (%rsi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rsi)
mov    %ah,(%rcx)
ret

LLVM IR (-O0):
define void @put_unsigned_short_le(i16 zeroext %0, i8** %1) {
%3 = alloca i16
%4 = alloca i8**
store i16 %0, i16* %3
store i8** %1, i8*** %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8**, i8*** %4
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %9
store i8 %8, i8* %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = ashr i32 %13, 8
%15 = and i32 %14, 255
%16 = trunc i32 %15 to i8
%17 = load i8**, i8*** %4
%18 = load i8*, i8** %17
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %17
store i8 %16, i8* %18
ret void
}

LLVM IR (-O2):
define void @put_unsigned_short_le(i16 zeroext %0, i8** nocapture %1) {
%3 = trunc i16 %0 to i8
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %1
store i8 %3, i8* %4
%6 = lshr i16 %0, 8
%7 = trunc i16 %6 to i8
%8 = load i8*, i8** %1
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %1
store i8 %7, i8* %8
ret void
}
__attribute__((always_)) int register_trace_mm_page_pcpu_drain(
    void (*probe)(void *__data, struct page *page, unsigned int order,
                  int migratetype),
    void *data) {
  return -38;
}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define i32 @register_trace_mm_page_pcpu_drain(void (i8*, %struct.page*, i32, i32)* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -38
}
void rcu_unregister_thread_bp(void) {}


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

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

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

LLVM IR (-O2):
define void @rcu_unregister_thread_bp() {
ret void
}
/* Variables and functions */
int foo();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int x;
  printf("Hello World\n");
  x = foo();
  printf("Result is %d\n", x);
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <foo@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <foo@plt>
mov    %eax,%ebx
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
@.str.1 = [14 x i8] c"Result is %d\0A\00"
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
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @foo()
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Result is %d\0A\00"
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @foo()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cgior();
int /*<<< orphan*/ cgpop2();
int /*<<< orphan*/ gentext();
void genior(void) {
  gentext();
  cgpop2();
  cgior();
}


x86 assembly (clang, -O0):
<genior>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <gentext@plt>
mov    $0x0,%al
call   1040 <cgpop2@plt>
mov    $0x0,%al
call   1030 <cgior@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<genior>:
push   %rax
xor    %eax,%eax
call   1050 <gentext@plt>
xor    %eax,%eax
call   1040 <cgpop2@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <cgior@plt>

LLVM IR (-O0):
define void @genior() {
%1 = call i32 (...) @gentext()
%2 = call i32 (...) @cgpop2()
%3 = call i32 (...) @cgior()
ret void
}

LLVM IR (-O2):
define void @genior() {
%1 = tail call i32 (...) @gentext()
%2 = tail call i32 (...) @cgpop2()
%3 = tail call i32 (...) @cgior()
ret void
}
double jerry_port_get_current_time() { return 0; }


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

x86 assembly (clang, -O2):
<jerry_port_get_current_time>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @jerry_port_get_current_time() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @jerry_port_get_current_time() {
ret double 0.000000e+00
}
/* Variables and functions */
void *task(void *argument) { return (NULL); }


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

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

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

LLVM IR (-O2):
define noalias i8* @task(i8* nocapture readnone %0) {
ret i8* null
}
const char *skipSpaces(const char *p) {
  while (*p == ' ' || *p == '\t')
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skipSpaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <skipSpaces+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skipSpaces+0x3d>
jmp    114e <skipSpaces+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipSpaces+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipSpaces>:
mov    %rdi,%rax
jmp    1114 <skipSpaces+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skipSpaces+0x10>
cmp    $0x9,%cl
je     1110 <skipSpaces+0x10>
ret

LLVM IR (-O0):
define i8* @skipSpaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skipSpaces(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
int comp(const void *a, const void *b) { return (*((int *)a) - *((int *)b)); }


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

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

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

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int test_int(int a) { return a * 2; }


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

x86 assembly (clang, -O2):
<test_int>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @test_int(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
max(v1, v2) int v1;
int v2;
{ return ((v1 > v2) ? v1 : v2); }


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

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

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int strlen0(char *str) {
  int count = 0;
  while (str[count] != '\0')
    ++count;
  return count;
}


x86 assembly (clang, -O0):
<strlen0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strlen0+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen0+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen0>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen0+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen0(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef unsigned long idx;

/* Variables and functions */
int /*<<< orphan*/ dpaa_clear_bits(unsigned long, unsigned long volatile *);
void dpaa_clear_bit(int idx, volatile unsigned long *bits) {
  dpaa_clear_bits(
      (1UL << ((idx) & ((sizeof(unsigned long) << 3) - 1))),
      bits + ((idx) >> (((1 << 5) == (sizeof(unsigned long) << 3)) ? 5 : 6)));
}


x86 assembly (clang, -O0):
<dpaa_clear_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%edi
shl    %cl,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%eax
sar    $0x6,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
call   1030 <dpaa_clear_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpaa_clear_bit>:
mov    %edi,%ecx
mov    $0x1,%edi
shl    %cl,%rdi
sar    $0x6,%ecx
movslq %ecx,%rax
lea    (%rsi,%rax,8),%rsi
jmp    1030 <dpaa_clear_bits@plt>

LLVM IR (-O0):
define void @dpaa_clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = and i64 %6, 63
%8 = shl i64 1, %7
%9 = load i64*, i64** %4
%10 = load i32, i32* %3
%11 = ashr i32 %10, 6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i64, i64* %9, i64 %12
%14 = call i32 @dpaa_clear_bits(i64 %8, i64* %13)
ret void
}

LLVM IR (-O2):
define void @dpaa_clear_bit(i32 %0, i64* %1) {
%3 = and i32 %0, 63
%4 = zext i32 %3 to i64
%5 = shl nuw i64 1, %4
%6 = ashr i32 %0, 6
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = tail call i32 @dpaa_clear_bits(i64 %5, i64* %8)
ret void
}
int swap(int *data, int r, int s) {
  int temp = *(data + r);
  *(data + r) = *(data + s);
  *(data + s) = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define i32 @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
store i32 %13, i32* %8
%14 = load i32*, i32** %5
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = load i32*, i32** %5
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
store i32 %18, i32* %22
%23 = load i32, i32* %8
%24 = load i32*, i32** %5
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
store i32 %23, i32* %27
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret i32 undef
}
int siracusa(long unsigned int n) {
  int incr = 0;
  if (n == 1)
    return 3;
  while (n != 1) {
    if (n % 2 == 0)
      n = n / 2;
    else
      n = n * 3 + 1;
    incr++;
  }
  return incr;
}


x86 assembly (clang, -O0):
<siracusa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x1,-0x10(%rbp)
jne    1126 <siracusa+0x26>
movl   $0x3,-0x4(%rbp)
jmp    117a <siracusa+0x7a>
jmp    112b <siracusa+0x2b>
cmpq   $0x1,-0x10(%rbp)
je     1174 <siracusa+0x74>
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1159 <siracusa+0x59>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1166 <siracusa+0x66>
imul   $0x3,-0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <siracusa+0x2b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<siracusa>:
mov    $0x3,%eax
cmp    $0x1,%rdi
je     112c <siracusa+0x2c>
xor    %eax,%eax
nopl   (%rax)
mov    %rdi,%rcx
shr    %rcx
test   $0x1,%dil
lea    0x1(%rdi,%rdi,2),%rdi
cmove  %rcx,%rdi
add    $0x1,%eax
cmp    $0x1,%rdi
jne    1110 <siracusa+0x10>
ret

LLVM IR (-O0):
define i32 @siracusa(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 0, i32* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 3, i32* %2
br label %28
8: ; preds = %1
br label %9
9: ; preds = %23, %8
%10 = load i64, i64* %3
%11 = icmp ne i64 %10, 1
br i1 %11, label %12, label %26
12: ; preds = %9
%13 = load i64, i64* %3
%14 = urem i64 %13, 2
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i64, i64* %3
%18 = udiv i64 %17, 2
store i64 %18, i64* %3
br label %23
19: ; preds = %12
%20 = load i64, i64* %3
%21 = mul i64 %20, 3
%22 = add i64 %21, 1
store i64 %22, i64* %3
br label %23
23: ; preds = %19, %16
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %9
26: ; preds = %9
%27 = load i32, i32* %4
store i32 %27, i32* %2
br label %28
28: ; preds = %26, %7
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @siracusa(i64 %0) {
%2 = icmp eq i64 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %12, %3 ], [ 0, %1 ]
%5 = phi i64 [ %11, %3 ], [ %0, %1 ]
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
%8 = lshr i64 %5, 1
%9 = mul i64 %5, 3
%10 = add i64 %9, 1
%11 = select i1 %7, i64 %8, i64 %10
%12 = add nuw nsw i32 %4, 1
%13 = icmp eq i64 %11, 1
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi i32 [ 3, %1 ], [ %12, %3 ]
ret i32 %15
}
void foo142(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo142(i32 %0) {
ret void
}
void tcp_westwood_info(struct tcp_sock *sk, unsigned long ext,
                       struct sk_buff *skb) {}


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

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

LLVM IR (-O0):
%struct.tcp_sock = type opaque
%struct.sk_buff = type opaque
define void @tcp_westwood_info(%struct.tcp_sock* %0, i64 %1, %struct.sk_buff* %2) {
%4 = alloca %struct.tcp_sock*
%5 = alloca i64
%6 = alloca %struct.sk_buff*
store %struct.tcp_sock* %0, %struct.tcp_sock** %4
store i64 %1, i64* %5
store %struct.sk_buff* %2, %struct.sk_buff** %6
ret void
}

LLVM IR (-O2):
%struct.tcp_sock = type opaque
%struct.sk_buff = type opaque
define void @tcp_westwood_info(%struct.tcp_sock* nocapture %0, i64 %1, %struct.sk_buff* nocapture %2) {
ret void
}
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_ft(int akm) { return !!(akm & (BIT(6) | BIT(5) | BIT(11))); }


x86 assembly (clang, -O0):
<wpa_key_mgmt_ft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x6,%edi
call   1030 <BIT@plt>
mov    %eax,-0x10(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0xb,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_ft>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x6,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    $0xb,%edi
call   1030 <BIT@plt>
or     %ebx,%eax
xor    %ecx,%ecx
test   %r14d,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_ft(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 6)
%5 = call i32 @BIT(i32 5)
%6 = or i32 %4, %5
%7 = call i32 @BIT(i32 11)
%8 = or i32 %6, %7
%9 = and i32 %3, %8
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_ft(i32 %0) {
%2 = tail call i32 @BIT(i32 6)
%3 = tail call i32 @BIT(i32 5)
%4 = or i32 %3, %2
%5 = tail call i32 @BIT(i32 11)
%6 = or i32 %4, %5
%7 = and i32 %6, %0
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ dibujar(char *, int, int);
int getRandomNum(int);
void getStance() {
  int randomNum = getRandomNum(5);
  dibujar("stance.png", 80 * randomNum, 81);
}


x86 assembly (clang, -O0):
<getStance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1030 <getRandomNum@plt>
mov    %eax,-0x4(%rbp)
imul   $0x50,-0x4(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x51,%edx
call   1040 <dibujar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getStance>:
push   %rax
mov    $0x5,%edi
call   1030 <getRandomNum@plt>
shl    $0x4,%eax
lea    (%rax,%rax,4),%esi
lea    0xec8(%rip),%rdi
mov    $0x51,%edx
pop    %rax
jmp    1040 <dibujar@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"stance.png\00"
define void @getStance() {
%1 = alloca i32
%2 = call i32 @getRandomNum(i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = mul nsw i32 80, %3
%5 = call i32 @dibujar(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4, i32 81)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"stance.png\00"
define void @getStance() {
%1 = tail call i32 @getRandomNum(i32 5)
%2 = mul nsw i32 %1, 80
%3 = tail call i32 @dibujar(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2, i32 81)
ret void
}
void wifi_rsp_dfu_reset(const void *nul) {}


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

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

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

LLVM IR (-O2):
define void @wifi_rsp_dfu_reset(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct io_uring_params {
  int dummy;
};

/* Variables and functions */
int syscall(int, unsigned int, struct io_uring_params *);
int io_uring_setup(unsigned entries, struct io_uring_params *p) {
  return syscall(425, entries, p);
}


x86 assembly (clang, -O0):
<io_uring_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x1a9,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_uring_setup>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1a9,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
%struct.io_uring_params = type { i32 }
define i32 @io_uring_setup(i32 %0, %struct.io_uring_params* %1) {
%3 = tail call i32 @syscall(i32 425, i32 %0, %struct.io_uring_params* %1)
ret i32 %3
}
int getLeft(int idx) { return idx * 2; }


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

x86 assembly (clang, -O2):
<getLeft>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @getLeft(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
int getButtons() { return 0; }


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

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

LLVM IR (-O0):
define i32 @getButtons() {
ret i32 0
}

LLVM IR (-O2):
define i32 @getButtons() {
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int verif_protocole(char *prot) {
  if (strcmp(prot, "HTTP/1.1") || strcmp(prot, "HTTP/1.0"))
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<verif_protocole>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1150 <verif_protocole+0x40>
mov    -0x10(%rbp),%rdi
lea    0xec8(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     115c <verif_protocole+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <verif_protocole+0x53>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verif_protocole>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112f <verif_protocole+0x1f>
pop    %rbx
ret
lea    0xed3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"HTTP/1.1\00"
@.str.1 = [9 x i8] c"HTTP/1.0\00"
define i32 @verif_protocole(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 -1, i32 1
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int intComp(const void *a, const void *b) {
  return *(const int *)a - *(const int *)b;
}


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

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

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

LLVM IR (-O2):
define i32 @intComp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int lower(int c) { return ((c >= 'A') && (c <= 'z')) ? (c + 'a' - 'A') : (c); }


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     112c <lower+0x2c>
cmpl   $0x7a,-0x4(%rbp)
jg     112c <lower+0x2c>
mov    -0x4(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <lower+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x3a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @lower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 97
%11 = sub nsw i32 %10, 65
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @lower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 58
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
const char *zlibVersion() { return "1.0.4P"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"1.0.4P\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"1.0.4P\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
__attribute__((always_)) void XRayStartFrame() { ; }


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

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

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

LLVM IR (-O2):
define void @XRayStartFrame() {
ret void
}
/* Variables and functions */
int traverse(int (*)(void *, char *), void *, char *, int);
int pop_retr(int msgno, int (*action)(void *, char *), void *closure) {
  return traverse(action, closure, "RETR %d", msgno);
}


x86 assembly (clang, -O0):
<pop_retr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x4(%rbp),%ecx
lea    0xecb(%rip),%rdx
call   1030 <traverse@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop_retr>:
mov    %edi,%ecx
lea    0xee7(%rip),%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <traverse@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"RETR %d\00"
define i32 @pop_retr(i32 %0, i32 (i8*, i8*)* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32 (i8*, i8*)*
%6 = alloca i8*
store i32 %0, i32* %4
store i32 (i8*, i8*)* %1, i32 (i8*, i8*)** %5
store i8* %2, i8** %6
%7 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %5
%8 = load i8*, i8** %6
%9 = load i32, i32* %4
%10 = call i32 @traverse(i32 (i8*, i8*)* %7, i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"RETR %d\00"
define i32 @pop_retr(i32 %0, i32 (i8*, i8*)* %1, i8* %2) {
%4 = tail call i32 @traverse(i32 (i8*, i8*)* %1, i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %4
}
char *encodeInt(int *input) {
  char ans[80] = "i";
  char num[80];
  sprintf(num, "%d", input);
  strncat(ans, num, 10000);
  strncat(ans, "e", 10000);
  return ans;
}


x86 assembly (clang, -O0):
<encodeInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1030 <memset@plt>
movb   $0x69,-0x60(%rbp)
lea    -0xb0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe9b(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
lea    -0x60(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
mov    $0x2710,%edx
call   1040 <strncat@plt>
lea    -0x60(%rbp),%rdi
lea    0xe77(%rip),%rsi
mov    $0x2710,%edx
call   1040 <strncat@plt>
lea    -0x60(%rbp),%rax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encodeInt>:
sub    $0xa8,%rsp
mov    %rdi,%rdx
lea    0xedf(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0x50(%rsp),%rax
add    $0xa8,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"e\00"
define i8* @encodeInt(i32* %0) {
%2 = alloca i32*
%3 = alloca [80 x i8]
%4 = alloca [80 x i8]
store i32* %0, i32** %2
%5 = bitcast [80 x i8]* %3 to i8*
%6 = bitcast i8* %5 to [80 x i8]*
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i32 0, i32 0
store i8 105, i8* %7
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%9 = load i32*, i32** %2
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%13 = call i8* @strncat(i8* %11, i8* %12, i64 10000)
%14 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%15 = call i8* @strncat(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i64 10000)
%16 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
ret i8* %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @encodeInt(i32* %0) {
%2 = alloca [80 x i8]
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int low;
  int mid;
  int high;
  if (!(low == 0 && mid >= 1 && high == 2 * mid))
    return 0;
  while (mid > 0) {
    low = low + 1;
    high = high - 1;
    mid = mid - 1;
  }
  assert(low == high);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1144 <main+0x34>
cmpl   $0x1,-0xc(%rbp)
jl     1144 <main+0x34>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
je     1150 <main+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1199 <main+0x89>
jmp    1155 <main+0x45>
cmpl   $0x0,-0xc(%rbp)
jle    117f <main+0x6f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1155 <main+0x45>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: "
          "zapdisk [-BSE] [-Z] <diskdev>\n"
          " -p <pnum>   operate only on the given partition\n"
          " -B          zap MBR/GPT and partition boot programs\n"
          " -S          zap possible superblocks in all partitions\n"
          " -E          erase (TRIM) the partition or disk\n"
          " -Z          really do the zap and don't just talk about it\n"
          " <diskdev>   disk special file to operate on\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [349 x i8] c"usage: zapdisk [-BSE] [-Z] <diskdev>\0A -p <pnum> operate only on the given partition\0A -B zap MBR/GPT and partition boot programs\0A -S zap possible superblocks in all partitions\0A -E erase (TRIM) the partition or disk\0A -Z really do the zap and don't just talk about it\0A <diskdev> disk special file to operate on\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([349 x i8], [349 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [349 x i8] c"usage: zapdisk [-BSE] [-Z] <diskdev>\0A -p <pnum> operate only on the given partition\0A -B zap MBR/GPT and partition boot programs\0A -S zap possible superblocks in all partitions\0A -E erase (TRIM) the partition or disk\0A -Z really do the zap and don't just talk about it\0A <diskdev> disk special file to operate on\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([349 x i8], [349 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) __m128i xor_128(__m128i a, __m128i b) {
  return _mm_xor_si128(a, b);
}


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

x86 assembly (clang, -O2):
<xor_128>:
jmp    1030 <_mm_xor_si128@plt>

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

LLVM IR (-O2):
define i32 @xor_128(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_xor_si128(i32 %0, i32 %1)
ret i32 %3
}
void tddfunc8(void) { int printf; }


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

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

LLVM IR (-O0):
define void @tddfunc8() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @tddfunc8() {
ret void
}
int test_02(char x, char y) { return x & y ? -40 : 60; }


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

x86 assembly (clang, -O2):
<test_02>:
test   %dil,%sil
mov    $0x3c,%ecx
mov    $0xffffffd8,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_02(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 -40, i32 60
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_02(i8 signext %0, i8 signext %1) {
%3 = and i8 %1, %0
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 60, i32 -40
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: mkfs [-X] [-b blocksize] device isize fsize\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"Usage: mkfs [-X] [-b blocksize] device isize fsize\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [51 x i8] c"Usage: mkfs [-X] [-b blocksize] device isize fsize\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int bar5() { return 0; }


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

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

LLVM IR (-O0):
define i32 @bar5() {
ret i32 0
}

LLVM IR (-O2):
define i32 @bar5() {
ret i32 0
}