xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ write_console(char *, int);
void linenoiseClearScreen(void) { write_console("\x1b[H\x1b[2J", 7); }


x86 assembly (clang, -O0):
<linenoiseClearScreen>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x7,%esi
call   1030 <write_console@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<linenoiseClearScreen>:
lea    0xee9(%rip),%rdi
mov    $0x7,%esi
jmp    1030 <write_console@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @linenoiseClearScreen() {
%1 = call i32 @write_console(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @linenoiseClearScreen() {
%1 = tail call i32 @write_console(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
ret void
}
void test_23_2(int *mem) { __atomic_fetch_add(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_23_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
lock xadd %eax,(%rcx)
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_23_2>:
lock addl $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_23_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw add i32* %5, i32 %6 acq_rel
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test_23_2(i32* nocapture %0) {
%2 = atomicrmw add i32* %0, i32 1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f4(unsigned long int s) {
  if ((unsigned char)s == 0)
    return;
  if (s == 0)
    link_error();
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl %al,%eax
cmp    $0x0,%eax
jne    1131 <f4+0x21>
jmp    1143 <f4+0x33>
cmpq   $0x0,-0x8(%rbp)
jne    1143 <f4+0x33>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f4(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %13
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @link_error()
br label %13
13: ; preds = %7, %11, %8
ret void
}

LLVM IR (-O2):
define void @f4(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kdAssert(int, char const *);
void kdAssertCharEquals(const char expected, const char actual,
                        const char *message) {
  kdAssert(expected == actual, message);
}


x86 assembly (clang, -O0):
<kdAssertCharEquals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x10(%rbp),%rsi
call   1030 <kdAssert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kdAssertCharEquals>:
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
mov    %eax,%edi
mov    %rdx,%rsi
jmp    1030 <kdAssert@plt>

LLVM IR (-O0):
define void @kdAssertCharEquals(i8 signext %0, i8 signext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %8, %10
%12 = zext i1 %11 to i32
%13 = load i8*, i8** %6
%14 = call i32 @kdAssert(i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @kdAssertCharEquals(i8 signext %0, i8 signext %1, i8* %2) {
%4 = icmp eq i8 %0, %1
%5 = zext i1 %4 to i32
%6 = tail call i32 @kdAssert(i32 %5, i8* %2)
ret void
}
/* Variables and functions */
unsigned int tolower(int /*<<< orphan*/);
unsigned int hash(const char *str) {
  unsigned int hash = 5381;
  while (*str)
    hash = ((hash << 5) + hash) + tolower(*(str++));
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1162 <hash+0x52>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <hash+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%cl
test   %cl,%cl
je     114e <hash+0x3e>
mov    %rdi,%rbx
add    $0x1,%rbx
mov    $0x1505,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%ebp
shl    $0x5,%ebp
add    %eax,%ebp
movsbl %cl,%edi
call   1030 <tolower@plt>
add    %ebp,%eax
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <hash+0x20>
jmp    1153 <hash+0x43>
mov    $0x1505,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 33
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = tail call i32 @tolower(i32 %10)
%12 = add i32 %11, %8
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 5381, %1 ], [ %12, %4 ]
ret i32 %16
}
/* Variables and functions */
scalar_t__ strpbrk(char const *, char *);
int is_date_abbreviated(const char *fdate) {
  if (strpbrk(fdate, "cDF"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_date_abbreviated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strpbrk@plt>
cmp    $0x0,%rax
je     1142 <is_date_abbreviated+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <is_date_abbreviated+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_date_abbreviated>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strpbrk@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"cDF\00"
define i32 @is_date_abbreviated(i8* %0) {
%2 = tail call i64 @strpbrk(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ifdivert(void) {
  printf(".ds #d .d\n");
  printf(".if \\(ts\\n(.z\\(ts\\(ts .ds #d nl\n");
}


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

x86 assembly (clang, -O2):
<ifdivert>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c".ds #d .d\0A\00"
@.str.1 = [33 x i8] c".if \\(ts\\n(.z\\(ts\\(ts .ds #d nl\0A\00"
define void @ifdivert() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c".ds #d .d\00"
@str.2 = [32 x i8] c".if \\(ts\\n(.z\\(ts\\(ts .ds #d nl\00"
define void @ifdivert() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int read(int, void *, int);
int osslib_read(int fd, void *buf, int count) { return read(fd, buf, count); }


x86 assembly (clang, -O0):
<osslib_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osslib_read>:
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @osslib_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @read(i32 %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @osslib_read(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
cisync(long src) { return src; }


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

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

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

LLVM IR (-O2):
define i32 @cisync(i64 %0) {
%2 = trunc i64 %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf("Usage: tst_getconf variable\n\n");
  printf("       variable: can be PAGESIZE/PAGE_SIZE");
  printf(" or _NPROCESSORS_ONLN (for the moment)\n\n");
  printf("example: tst_getconf PAGESIZE\n");
}


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

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: tst_getconf variable\0A\0A\00"
@.str.1 = [43 x i8] c" variable: can be PAGESIZE/PAGE_SIZE\00"
@.str.2 = [41 x i8] c" or _NPROCESSORS_ONLN (for the moment)\0A\0A\00"
@.str.3 = [31 x i8] c"example: tst_getconf PAGESIZE\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [43 x i8] c" variable: can be PAGESIZE/PAGE_SIZE\00"
@str = [29 x i8] c"Usage: tst_getconf variable\0A\00"
@str.4 = [40 x i8] c" or _NPROCESSORS_ONLN (for the moment)\0A\00"
@str.5 = [30 x i8] c"example: tst_getconf PAGESIZE\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.5, i64 0, i64 0))
ret void
}
/* Type definitions */
struct gs_socket_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct gs_socket_t *);
void gs_socket_destroy(struct gs_socket_t *gsocket) { free(gsocket); }


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

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

LLVM IR (-O2):
%struct.gs_socket_t = type { i32 }
define void @gs_socket_destroy(%struct.gs_socket_t* nocapture %0) {
%2 = tail call i32 @free(%struct.gs_socket_t* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ patternr();
void loop() { patternr(); }


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

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

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

LLVM IR (-O2):
define void @loop() {
%1 = tail call i32 (...) @patternr()
ret void
}
void gtk_arrow_set() {}


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

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

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

LLVM IR (-O2):
define void @gtk_arrow_set() {
ret void
}
regx0adrreg1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[x0]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x28(%rbp),%rcx
cmp    0x10f444(%rcx),%eax
jg     113f <regx0adrreg1+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <regx0adrreg1+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adrreg1>:
movslq %edx,%rax
mov    (%r8,%rax,4),%ecx
xor    %eax,%eax
cmp    0x10f444(%r9),%ecx
setle  %al
ret

LLVM IR (-O0):
define i32 @regx0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %12
%15 = load i32, i32* %10
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = load i32*, i32** %13
%20 = getelementptr inbounds i32, i32* %19, i64 277777
%21 = load i32, i32* %20
%22 = icmp sle i32 %18, %21
br i1 %22, label %23, label %24
23: ; preds = %6
store i32 1, i32* %7
br label %25
24: ; preds = %6
store i32 0, i32* %7
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @regx0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %5, i64 277777
%11 = load i32, i32* %10
%12 = icmp sle i32 %9, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
float ldexpf(float x, int exp) { return 0.0; }


x86 assembly (clang, -O0):
<ldexpf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @ldexpf(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
store i32 %1, i32* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @ldexpf(float %0, i32 %1) {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char **argv) {
  printf("%i %i %i", (int)sizeof(void *), (int)sizeof(int), (int)sizeof(long));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x8,%ecx
mov    $0x4,%edx
mov    %ecx,%esi
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    $0x8,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%i %i %i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8, i32 4, i32 8)
ret i32 0
}
int file_unlock(int fd) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @file_unlock(i32 %0) {
ret i32 -1
}
unsigned xrop3_195_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = T ^ S;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_195_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i32 %8, %3
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t h265hvcc_get_min_spatial_segmentation_idc(const uint8_t *p) {
  return p[13] & 0xf;
}


x86 assembly (clang, -O0):
<h265hvcc_get_min_spatial_segmentation_idc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265hvcc_get_min_spatial_segmentation_idc>:
mov    0x34(%rdi),%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @h265hvcc_get_min_spatial_segmentation_idc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 13
%5 = load i32, i32* %4
%6 = and i32 %5, 15
ret i32 %6
}

LLVM IR (-O2):
define i32 @h265hvcc_get_min_spatial_segmentation_idc(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 13
%3 = load i32, i32* %2
%4 = and i32 %3, 15
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ process_free(void *, int, int /*<<< orphan*/ *);
void free(void *buf) {
  if (buf == NULL)
    return;
  (void)process_free(buf, 1, NULL);
}


x86 assembly (clang, -O0):
<free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <free+0x1c>
jmp    113e <free+0x2e>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <process_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free>:
test   %rdi,%rdi
je     1121 <free+0x11>
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <process_free@plt>
ret

LLVM IR (-O0):
define void @free(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 %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @process_free(i8* %7, i32 1, i32* null)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @process_free(i8* %0, i32 1, i32* null)
br label %5
5: ; preds = %1, %3
ret void
}
int fun242() { return 242; }


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

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

LLVM IR (-O0):
define i32 @fun242() {
ret i32 242
}

LLVM IR (-O2):
define i32 @fun242() {
ret i32 242
}
/* Variables and functions */
int compare(const void *d1, const size_t l1, const void *d2, const size_t l2) {
  return (int)(long)d1 == (int)(long)d2;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
xor    %eax,%eax
cmp    %edx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @compare(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 = ptrtoint i8* %9 to i64
%11 = trunc i64 %10 to i32
%12 = load i8*, i8** %7
%13 = ptrtoint i8* %12 to i64
%14 = trunc i64 %13 to i32
%15 = icmp eq i32 %11, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @compare(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = ptrtoint i8* %0 to i64
%6 = trunc i64 %5 to i32
%7 = ptrtoint i8* %2 to i64
%8 = trunc i64 %7 to i32
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_ST62(void) { DeinitFields(); }


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

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

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

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

/* Variables and functions */
scalar_t__ DisplayHeight(int /*<<< orphan*/ *, int);
scalar_t__ DisplayHeightMM(int /*<<< orphan*/ *, int);
int XDefaultScreen(int /*<<< orphan*/ *);
scalar_t__ iupdrvGetDisplay();
float iupdrvGetScreenDpi(void) {
  float dpi;
  Display *drv_display = (Display *)iupdrvGetDisplay();
  int screen = XDefaultScreen(drv_display);
  dpi = ((float)DisplayHeight(drv_display, screen) /
         (float)DisplayHeightMM(drv_display, screen));
  return dpi * 25.4f;
}


x86 assembly (clang, -O0):
<iupdrvGetScreenDpi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1060 <iupdrvGetDisplay@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <XDefaultScreen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <DisplayHeight@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <DisplayHeightMM@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xe64(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupdrvGetScreenDpi>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <iupdrvGetDisplay@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <XDefaultScreen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <DisplayHeight@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <DisplayHeightMM@plt>
cvtsi2ss %rax,%xmm1
movss  0x4(%rsp),%xmm0
divss  %xmm1,%xmm0
mulss  0xe73(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @iupdrvGetScreenDpi() {
%1 = alloca float
%2 = alloca i32*
%3 = alloca i32
%4 = call i64 (...) @iupdrvGetDisplay()
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @XDefaultScreen(i32* %6)
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = call i64 @DisplayHeight(i32* %8, i32 %9)
%11 = sitofp i64 %10 to float
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = call i64 @DisplayHeightMM(i32* %12, i32 %13)
%15 = sitofp i64 %14 to float
%16 = fdiv float %11, %15
store float %16, float* %1
%17 = load float, float* %1
%18 = fmul float %17, 0x4039666660000000
ret float %18
}

LLVM IR (-O2):
define float @iupdrvGetScreenDpi() {
%1 = tail call i64 (...) @iupdrvGetDisplay()
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @XDefaultScreen(i32* %2)
%4 = tail call i64 @DisplayHeight(i32* %2, i32 %3)
%5 = sitofp i64 %4 to float
%6 = tail call i64 @DisplayHeightMM(i32* %2, i32 %3)
%7 = sitofp i64 %6 to float
%8 = fdiv float %5, %7
%9 = fmul float %8, 0x4039666660000000
ret float %9
}
/* Variables and functions */
int checker_read_unsigned_int(int, char const *, int, unsigned int *);
int checker_read_team_unsigned_int(const char *name, int eof_error_flag,
                                   unsigned int *p_val) {
  return checker_read_unsigned_int(1, name, eof_error_flag, p_val);
}


x86 assembly (clang, -O0):
<checker_read_team_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%edi
call   1030 <checker_read_unsigned_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker_read_team_unsigned_int>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <checker_read_unsigned_int@plt>

LLVM IR (-O0):
define i32 @checker_read_team_unsigned_int(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 @checker_read_unsigned_int(i32 1, i8* %7, i32 %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @checker_read_team_unsigned_int(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @checker_read_unsigned_int(i32 1, i8* %0, i32 %1, i32* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t __stdio_read(void *, size_t, size_t, int /*<<< orphan*/ *);
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) {
  return __stdio_read(ptr, size, nmemb, stream);
}


x86 assembly (clang, -O0):
<fread>:
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),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <__stdio_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fread>:
jmp    1030 <__stdio_read@plt>

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

LLVM IR (-O2):
define i64 @fread(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i64 @__stdio_read(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
void __l2_flush_purge_region(void *start, int size) {}


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

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

LLVM IR (-O0):
define void @__l2_flush_purge_region(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @__l2_flush_purge_region(i8* nocapture %0, i32 %1) {
ret void
}
void TOSH_wait() {
  asm volatile("nop");
  asm volatile("nop");
}


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

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

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

LLVM IR (-O2):
define void @TOSH_wait() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ address;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int TCPaccept(int fd) {
  int fd_accept;
  struct sockaddr address;
  socklen_t addrlen = sizeof(address);
  fd_accept = accept(fd, &address, &addrlen);
  if (fd_accept == -1) {
    return -1;
  }
  return fd_accept;
}


x86 assembly (clang, -O0):
<TCPaccept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    114b <TCPaccept+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <TCPaccept+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TCPaccept>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @TCPaccept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr
%6 = alloca i32
store i32 %0, i32* %3
store i32 4, i32* %6
%7 = load i32, i32* %3
%8 = call i32 @accept(i32 %7, %struct.sockaddr* %5, i32* %6)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %4
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %11
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @TCPaccept(i32 %0) {
%2 = alloca %struct.sockaddr
%3 = alloca i32
%4 = bitcast %struct.sockaddr* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = call i32 @accept(i32 %0, %struct.sockaddr* %2, i32* %3)
ret i32 %6
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_gettimeofday;
int syscall(int /*<<< orphan*/, struct timeval *, struct timezone *);
int gettimeofday_syscall_wrapper(struct timeval *tv, struct timezone *tz) {
  return syscall(SYS_gettimeofday, tv, tz);
}


x86 assembly (clang, -O0):
<gettimeofday_syscall_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofday_syscall_wrapper>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
@SYS_gettimeofday = global i32 0
define i32 @gettimeofday_syscall_wrapper(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load i32, i32* @SYS_gettimeofday
%6 = load %struct.timeval*, %struct.timeval** %3
%7 = load %struct.timezone*, %struct.timezone** %4
%8 = call i32 @syscall(i32 %5, %struct.timeval* %6, %struct.timezone* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
@SYS_gettimeofday = global i32 0
define i32 @gettimeofday_syscall_wrapper(%struct.timeval* %0, %struct.timezone* %1) {
%3 = load i32, i32* @SYS_gettimeofday
%4 = tail call i32 @syscall(i32 %3, %struct.timeval* %0, %struct.timezone* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int spaces(int n) {
  int i;
  for (i = 0; i < n; i++)
    putchar(' ');
  return i < 0 ? 0 : i;
}


x86 assembly (clang, -O0):
<spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1146 <spaces+0x36>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <spaces+0x12>
cmpl   $0x0,-0x8(%rbp)
jge    115a <spaces+0x4a>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1160 <spaces+0x50>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spaces>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1131 <spaces+0x21>
mov    %edi,%ebx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1120 <spaces+0x10>
jmp    1133 <spaces+0x23>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @spaces(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @putchar(i8 signext 32)
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
br label %19
17: ; preds = %13
%18 = load i32, i32* %3
br label %19
19: ; preds = %17, %16
%20 = phi i32 [ 0, %16 ], [ %18, %17 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @spaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i8 signext 32)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %0, %3 ]
ret i32 %9
}
/* Type definitions */
struct event_base {
  int dummy;
};
struct ev_loop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ev_run(struct ev_loop *, int);
int event_base_loop(struct event_base *base, int flags) {
  struct ev_loop *loop = (struct ev_loop *)base;
  ev_run(loop, flags);
  return 0;
}


x86 assembly (clang, -O0):
<event_base_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <ev_run@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<event_base_loop>:
push   %rax
call   1030 <ev_run@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.event_base = type { i32 }
%struct.ev_loop = type { i32 }
define i32 @event_base_loop(%struct.event_base* %0, i32 %1) {
%3 = alloca %struct.event_base*
%4 = alloca i32
%5 = alloca %struct.ev_loop*
store %struct.event_base* %0, %struct.event_base** %3
store i32 %1, i32* %4
%6 = load %struct.event_base*, %struct.event_base** %3
%7 = bitcast %struct.event_base* %6 to %struct.ev_loop*
store %struct.ev_loop* %7, %struct.ev_loop** %5
%8 = load %struct.ev_loop*, %struct.ev_loop** %5
%9 = load i32, i32* %4
%10 = call i32 @ev_run(%struct.ev_loop* %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
%struct.event_base = type { i32 }
%struct.ev_loop = type { i32 }
define i32 @event_base_loop(%struct.event_base* %0, i32 %1) {
%3 = bitcast %struct.event_base* %0 to %struct.ev_loop*
%4 = tail call i32 @ev_run(%struct.ev_loop* %3, i32 %1)
ret i32 0
}
int setSMB1357Charger(int usb_state) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setSMB1357Charger(i32 %0) {
ret i32 0
}
/* Variables and functions */
char EOF;
char getchar();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char c;
  while (1) {
    c = getchar();
    printf("c est %s EOF\n", c == EOF ? "égal à" : "différent de");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%ecx
mov    0x2ea4(%rip),%rax
movsbl (%rax),%edx
lea    0xec9(%rip),%rsi
lea    0xeb9(%rip),%rax
cmp    %edx,%ecx
cmove  %rax,%rsi
mov    %rsi,-0x10(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2eb9(%rip),%r14
lea    0xed8(%rip),%r15
lea    0xeda(%rip),%r12
lea    0xebc(%rip),%rbx
jmp    1158 <main+0x38>
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %r15,%rsi
cmp    (%r14),%al
je     1150 <main+0x30>
mov    %r12,%rsi
jmp    1150 <main+0x30>

LLVM IR (-O0):
@.str = [14 x i8] c"c est %s EOF\0A\00"
@EOF = global i8 0
@.str.1 = [9 x i8] c"\C3\A9gal \C3\A0\00"
@.str.2 = [14 x i8] c"diff\C3\A9rent de\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* @EOF
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0)
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"c est %s EOF\0A\00"
@EOF = global i8 0
@.str.1 = [9 x i8] c"\C3\A9gal \C3\A0\00"
@.str.2 = [14 x i8] c"diff\C3\A9rent de\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = load i8, i8* @EOF
%4 = icmp eq i8 %2, %3
%5 = select i1 %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int numbersGetAmount(FILE *fp) {
  FILE *input;
  int val;
  int count = 0;
  input = fp;
  rewind(input);
  while (fscanf(input, "%d", &val) != EOF) {
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<numbersGetAmount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%rdi
lea    0xeb1(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <fscanf@plt>
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%rax
je     1176 <numbersGetAmount+0x56>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1144 <numbersGetAmount+0x24>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numbersGetAmount>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <rewind@plt>
mov    $0xffffffff,%ebp
lea    0xec0(%rip),%r14
lea    0xc(%rsp),%r15
mov    0x2e9c(%rip),%r12
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <fscanf@plt>
add    $0x1,%ebp
cmp    (%r12),%rax
jne    1150 <numbersGetAmount+0x30>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @numbersGetAmount(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %5
%6 = load i32*, i32** %2
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 @rewind(i32* %7)
br label %9
9: ; preds = %14, %1
%10 = load i32*, i32** %3
%11 = call i64 @fscanf(i32* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%12 = load i64, i64* @EOF
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
store i32 %16, i32* %5
br label %9
17: ; preds = %9
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @numbersGetAmount(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @rewind(i32* %0)
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ 0, %1 ], [ %10, %5 ]
%7 = call i64 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
%10 = add nuw nsw i32 %6, 1
br i1 %9, label %11, label %5
11: ; preds = %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ dsyr_(char *, int *, double *, double *, int *, double *,
                         int *);
void wcc_dsyr_(char *UPLO, int *N, char *ALPHA, char *X, int *INCX, char *A,
               int *LDA) {
  dsyr_(UPLO, N, (double *)ALPHA, (double *)X, INCX, (double *)A, LDA);
}


x86 assembly (clang, -O0):
<wcc_dsyr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <dsyr_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dsyr_>:
jmp    1030 <dsyr_@plt>

LLVM IR (-O0):
define void @wcc_dsyr_(i8* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i32* %6) {
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i8*
%14 = alloca i32*
store i8* %0, i8** %8
store i32* %1, i32** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i32* %4, i32** %12
store i8* %5, i8** %13
store i32* %6, i32** %14
%15 = load i8*, i8** %8
%16 = load i32*, i32** %9
%17 = load i8*, i8** %10
%18 = bitcast i8* %17 to double*
%19 = load i8*, i8** %11
%20 = bitcast i8* %19 to double*
%21 = load i32*, i32** %12
%22 = load i8*, i8** %13
%23 = bitcast i8* %22 to double*
%24 = load i32*, i32** %14
%25 = call i32 @dsyr_(i8* %15, i32* %16, double* %18, double* %20, i32* %21, double* %23, i32* %24)
ret void
}

LLVM IR (-O2):
define void @wcc_dsyr_(i8* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i32* %6) {
%8 = bitcast i8* %2 to double*
%9 = bitcast i8* %3 to double*
%10 = bitcast i8* %5 to double*
%11 = tail call i32 @dsyr_(i8* %0, i32* %1, double* %8, double* %9, i32* %4, double* %10, i32* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ set_pixel_xy_rgb8(int /*<<< orphan*/, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int /*<<< orphan*/);
void set_pixel_xy_rgb16(uint32_t hdr, uint16_t r, uint16_t g, uint16_t b,
                        uint16_t x, uint16_t y) {
  set_pixel_xy_rgb8(hdr, r, g, b, x, y);
}


x86 assembly (clang, -O0):
<set_pixel_xy_rgb16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <set_pixel_xy_rgb8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pixel_xy_rgb16>:
jmp    1030 <set_pixel_xy_rgb8@plt>

LLVM IR (-O0):
define void @set_pixel_xy_rgb16(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @set_pixel_xy_rgb8(i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @set_pixel_xy_rgb16(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @set_pixel_xy_rgb8(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
ret void
}
char *hash_plugin_summary(void) {
  return ("a51 \t\tA5/1 (GSM encryption) plugin");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"a51 \09\09A5/1 (GSM encryption) plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [35 x i8] c"a51 \09\09A5/1 (GSM encryption) plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0)
}