xunge/DecIR huggingface dataset:
unsigned long int net2long(const unsigned char **bufp) {
  unsigned long int l;
  l = **bufp;
  l <<= 8;
  l |= *(*bufp + 1);
  l <<= 8;
  l |= *(*bufp + 2);
  l <<= 8;
  l |= *(*bufp + 3);
  *bufp += 4;
  return l;
}


x86 assembly (clang, -O0):
<net2long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl 0x1(%rax),%eax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl 0x2(%rax),%eax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl 0x3(%rax),%eax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<net2long>:
mov    (%rdi),%rcx
mov    (%rcx),%eax
shl    $0x20,%rax
bswap  %rax
add    $0x4,%rcx
mov    %rcx,(%rdi)
ret

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

LLVM IR (-O2):
define i64 @net2long(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %4, 16
%9 = shl nuw nsw i64 %7, 8
%10 = or i64 %9, %8
%11 = getelementptr inbounds i8, i8* %2, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = or i64 %10, %13
%15 = shl nuw nsw i64 %14, 8
%16 = getelementptr inbounds i8, i8* %2, i64 3
%17 = load i8, i8* %16
%18 = zext i8 %17 to i64
%19 = or i64 %15, %18
%20 = getelementptr inbounds i8, i8* %2, i64 4
store i8* %20, i8** %0
ret i64 %19
}
/* Variables and functions */
void *s1(size_t);
void *s2(size_t n) { return s1(n); }


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

x86 assembly (clang, -O2):
<s2>:
jmp    1030 <s1@plt>

LLVM IR (-O0):
define i8* @s2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @s1(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @s2(i64 %0) {
%2 = tail call i8* @s1(i64 %0)
ret i8* %2
}
void XDrawLine() {}


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

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

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

LLVM IR (-O2):
define void @XDrawLine() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outw(unsigned short, unsigned int);
void nsp32_write2(unsigned int base, unsigned int index, unsigned short val) {
  outw(val, (base + index));
}


x86 assembly (clang, -O0):
<nsp32_write2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
movzwl %ax,%edi
call   1030 <outw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsp32_write2>:
add    %edi,%esi
mov    %edx,%edi
jmp    1030 <outw@plt>

LLVM IR (-O0):
define void @nsp32_write2(i32 %0, i32 %1, i16 zeroext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i16
store i32 %0, i32* %4
store i32 %1, i32* %5
store i16 %2, i16* %6
%7 = load i16, i16* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = add i32 %8, %9
%11 = call i32 @outw(i16 zeroext %7, i32 %10)
ret void
}

LLVM IR (-O2):
define void @nsp32_write2(i32 %0, i32 %1, i16 zeroext %2) {
%4 = add i32 %1, %0
%5 = tail call i32 @outw(i16 zeroext %2, i32 %4)
ret void
}
int get_screen_offset(int row, int col) { return (row * 80 + col) * 2; }


x86 assembly (clang, -O0):
<get_screen_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x50,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_screen_offset>:
lea    (%rdi,%rdi,4),%eax
shl    $0x4,%eax
add    %esi,%eax
add    %eax,%eax
ret

LLVM IR (-O0):
define i32 @get_screen_offset(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 = mul nsw i32 %5, 80
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = mul nsw i32 %8, 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @get_screen_offset(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 80
%4 = add nsw i32 %3, %1
%5 = shl nsw i32 %4, 1
ret i32 %5
}
/* Variables and functions */
char *append_plaintext(char *);
char *read_from_file(char *);
void encrypt(char *input_filename, char *key) {
  char *plaintext = read_from_file(input_filename);
  plaintext = append_plaintext(plaintext);
}


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

x86 assembly (clang, -O2):
<encrypt>:
push   %rax
call   1030 <read_from_file@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <append_plaintext@plt>

LLVM IR (-O0):
define void @encrypt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @read_from_file(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i8* @append_plaintext(i8* %8)
store i8* %9, i8** %5
ret void
}

LLVM IR (-O2):
define void @encrypt(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i8* @read_from_file(i8* %0)
%4 = tail call i8* @append_plaintext(i8* %3)
ret void
}
/* Type definitions */
struct grecs_match_buf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct grecs_match_buf *);
int /*<<< orphan*/ grecs_match_buf_free_contents(struct grecs_match_buf *);
void grecs_match_buf_free(struct grecs_match_buf *buf) {
  if (buf) {
    grecs_match_buf_free_contents(buf);
    free(buf);
  }
}


x86 assembly (clang, -O0):
<grecs_match_buf_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <grecs_match_buf_free+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <grecs_match_buf_free_contents@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grecs_match_buf_free>:
test   %rdi,%rdi
je     1137 <grecs_match_buf_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <grecs_match_buf_free_contents@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.grecs_match_buf = type { i32 }
define void @grecs_match_buf_free(%struct.grecs_match_buf* %0) {
%2 = alloca %struct.grecs_match_buf*
store %struct.grecs_match_buf* %0, %struct.grecs_match_buf** %2
%3 = load %struct.grecs_match_buf*, %struct.grecs_match_buf** %2
%4 = icmp ne %struct.grecs_match_buf* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load %struct.grecs_match_buf*, %struct.grecs_match_buf** %2
%7 = call i32 @grecs_match_buf_free_contents(%struct.grecs_match_buf* %6)
%8 = load %struct.grecs_match_buf*, %struct.grecs_match_buf** %2
%9 = call i32 @free(%struct.grecs_match_buf* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.grecs_match_buf = type { i32 }
define void @grecs_match_buf_free(%struct.grecs_match_buf* %0) {
%2 = icmp eq %struct.grecs_match_buf* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @grecs_match_buf_free_contents(%struct.grecs_match_buf* %0)
%5 = tail call i32 @free(%struct.grecs_match_buf* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delete_queue_t(void *);
void free_queue_list_handler(void *ptr) { delete_queue_t(ptr); }


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

x86 assembly (clang, -O2):
<free_queue_list_handler>:
jmp    1030 <delete_queue_t@plt>

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

LLVM IR (-O2):
define void @free_queue_list_handler(i8* %0) {
%2 = tail call i32 @delete_queue_t(i8* %0)
ret void
}
/* Variables and functions */
unsigned long wimaxll_swap_32(unsigned long);
unsigned long wimaxll_cpu_to_be32(unsigned long x) {
  unsigned long be32;
  be32 = wimaxll_swap_32(x);
  return be32;
}


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

x86 assembly (clang, -O2):
<wimaxll_cpu_to_be32>:
jmp    1030 <wimaxll_swap_32@plt>

LLVM IR (-O0):
define i64 @wimaxll_cpu_to_be32(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @wimaxll_swap_32(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @wimaxll_cpu_to_be32(i64 %0) {
%2 = tail call i64 @wimaxll_swap_32(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  printf("Hello, world!\n");
  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
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 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 ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void dzialania(int a, int b, int *sum, int *roz, int *ilo) {
  *sum = a + b;
  *roz = a - b;
  *ilo = a * b;
}


x86 assembly (clang, -O0):
<dzialania>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dzialania>:
lea    (%rsi,%rdi,1),%eax
mov    %eax,(%rdx)
mov    %edi,%eax
sub    %esi,%eax
mov    %eax,(%rcx)
imul   %edi,%esi
mov    %esi,(%r8)
ret

LLVM IR (-O0):
define void @dzialania(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
%14 = load i32*, i32** %8
store i32 %13, i32* %14
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = sub nsw i32 %15, %16
%18 = load i32*, i32** %9
store i32 %17, i32* %18
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = mul nsw i32 %19, %20
%22 = load i32*, i32** %10
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @dzialania(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = add nsw i32 %1, %0
store i32 %6, i32* %2
%7 = sub nsw i32 %0, %1
store i32 %7, i32* %3
%8 = mul nsw i32 %1, %0
store i32 %8, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int /*<<< orphan*/ sqlite3_snprintf(int, char *, char *);
void scmDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg) {
  sqlite3_snprintf(nByte, zErrMsg, "Loadable extensions are not supported");
  zErrMsg[nByte - 1] = '\0';
}


x86 assembly (clang, -O0):
<scmDlError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    0xecf(%rip),%rdx
call   1030 <sqlite3_snprintf@plt>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scmDlError>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
lea    0xee1(%rip),%rdx
mov    %esi,%edi
mov    %rbx,%rsi
call   1030 <sqlite3_snprintf@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Loadable extensions are not supported\00"
define void @scmDlError(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load i8*, i8** %6
%9 = call i32 @sqlite3_snprintf(i32 %7, i8* %8, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %6
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %10, i64 %13
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Loadable extensions are not supported\00"
define void @scmDlError(i32* nocapture readnone %0, i32 %1, i8* %2) {
%4 = tail call i32 @sqlite3_snprintf(i32 %1, i8* %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%5 = add nsw i32 %1, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %2, i64 %6
store i8 0, i8* %7
ret void
}
const char *Help_Definition(void) {
  return "struct Help {\n"
         "  int (*help_to)(var, int);\n"
         "};\n";
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"struct Help {\0A int (*help_to)(var, int);\0A};\0A\00"
define i8* @Help_Definition() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [46 x i8] c"struct Help {\0A int (*help_to)(var, int);\0A};\0A\00"
define i8* @Help_Definition() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}
int f_bge_cr2(float a1) { return !(__builtin_isgreaterequal(100, a1)); }


x86 assembly (clang, -O0):
<f_bge_cr2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bge_cr2>:
movss  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setb   %al
ret

LLVM IR (-O0):
define i32 @f_bge_cr2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float 1.000000e+02, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f_bge_cr2(float %0) {
%2 = fcmp ugt float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct core_instr {
  int dummy;
};

/* Variables and functions */
scalar_t__ instr_has_db(struct core_instr *);
scalar_t__ instr_has_dw(struct core_instr *);
int instr_has_data(struct core_instr *i) {
  return (instr_has_db(i) || instr_has_dw(i));
}


x86 assembly (clang, -O0):
<instr_has_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <instr_has_db@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <instr_has_data+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <instr_has_dw@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<instr_has_data>:
push   %rbx
mov    %rdi,%rbx
call   1040 <instr_has_db@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <instr_has_data+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <instr_has_dw@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.core_instr = type { i32 }
define i32 @instr_has_data(%struct.core_instr* %0) {
%2 = alloca %struct.core_instr*
store %struct.core_instr* %0, %struct.core_instr** %2
%3 = load %struct.core_instr*, %struct.core_instr** %2
%4 = call i64 @instr_has_db(%struct.core_instr* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load %struct.core_instr*, %struct.core_instr** %2
%8 = call i64 @instr_has_dw(%struct.core_instr* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.core_instr = type { i32 }
define i32 @instr_has_data(%struct.core_instr* %0) {
%2 = tail call i64 @instr_has_db(%struct.core_instr* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @instr_has_dw(%struct.core_instr* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Test();
int main() {
  Test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Test()
ret i32 0
}
/* Variables and functions */
int d17(int);
int d18(int a) { return d17(d17(a)); }


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

x86 assembly (clang, -O2):
<d18>:
push   %rax
call   1030 <d17@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d17@plt>

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

LLVM IR (-O2):
define i32 @d18(i32 %0) {
%2 = tail call i32 @d17(i32 %0)
%3 = tail call i32 @d17(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ compute_cross_distances_alt_nonpacked(int, int, int, int,
                                                         float const *, int,
                                                         float const *, int,
                                                         float *, int);
void compute_cross_distances_alt(int distance_type, int d, int na, int nb,
                                 const float *a, const float *b, float *dist2) {
  compute_cross_distances_alt_nonpacked(distance_type, d, na, nb, a, d, b, d,
                                        dist2, na);
}


x86 assembly (clang, -O0):
<compute_cross_distances_alt>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x10(%rbp),%r9d
mov    -0x28(%rbp),%rbx
mov    -0x10(%rbp),%r11d
mov    0x10(%rbp),%r10
mov    -0x14(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <compute_cross_distances_alt_nonpacked@plt>
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_cross_distances_alt>:
push   %rax
mov    %r9,%rax
mov    %esi,%r9d
push   %rdx
push   0x18(%rsp)
push   %rsi
push   %rax
call   1030 <compute_cross_distances_alt_nonpacked@plt>
add    $0x20,%rsp
pop    %rax
ret

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

LLVM IR (-O2):
define void @compute_cross_distances_alt(i32 %0, i32 %1, i32 %2, i32 %3, float* %4, float* %5, float* %6) {
%8 = tail call i32 @compute_cross_distances_alt_nonpacked(i32 %0, i32 %1, i32 %2, i32 %3, float* %4, i32 %1, float* %5, i32 %1, float* %6, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void ms(int space, int symbol) {
  while (space-- > 0)
    printf("%c", symbol);
}


x86 assembly (clang, -O0):
<ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1146 <ms+0x36>
mov    -0x8(%rbp),%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    111e <ms+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ms>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1142 <ms+0x32>
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebp
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <ms+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @ms(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_clear(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(clear());
}


x86 assembly (clang, -O0):
<cmd_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_clear+0x27>
jmp    117f <cmd_clear+0x3f>
mov    $0x1,%edi
call   1050 <report_count@plt>
mov    $0x0,%al
call   1060 <clear@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_clear>:
push   %rax
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_clear+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1050 <report_count@plt>
xor    %eax,%eax
call   1060 <clear@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <report_return@plt>

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

LLVM IR (-O2):
define void @cmd_clear(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @clear()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
int test_imm_21uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x21 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_21uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x21,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_21uint64_highword_reg>:
movabs $0x2100000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_21uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 141733920768
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ md5_hash(char *, unsigned char *);
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned char *);
void md5_hash_ascii(char *in, char *out, int size) {
  unsigned char digest[16];
  md5_hash(in, digest);
  snprintf(out, size, "%s", digest);
}


x86 assembly (clang, -O0):
<md5_hash_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <md5_hash@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x30(%rbp),%rcx
lea    0xeae(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_hash_ascii>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <md5_hash@plt>
lea    0xec1(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rcx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @md5_hash_ascii(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [16 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%10 = call i32 @md5_hash(i8* %8, i8* %9)
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%14 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @md5_hash_ascii(i8* %0, i8* %1, i32 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @md5_hash(i8* %0, i8* %5)
%7 = call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int tzero(int);
int main() {
  int a = 63;
  printf("a: %d, ", tzero(a));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3f,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <tzero@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"a: %d, \00"
define i32 @main() {
%1 = tail call i32 @tzero(i32 63)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
char *PBKDF2_HMAC_SHA_512Ex(char *, size_t, char *, int, int);
int /*<<< orphan*/ RAND_bytes(int /*<<< orphan*/ *, int);
char *PBKDF2_HMAC_SHA_512(char *In, size_t InLen) {
  uint8_t salt[64];
  RAND_bytes(salt, 64);
  return PBKDF2_HMAC_SHA_512Ex(In, InLen, (char *)salt, 64, 15000);
}


x86 assembly (clang, -O0):
<PBKDF2_HMAC_SHA_512>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0x40,%esi
call   1040 <RAND_bytes@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x110(%rbp),%rdx
mov    $0x40,%ecx
mov    $0x3a98,%r8d
call   1030 <PBKDF2_HMAC_SHA_512Ex@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PBKDF2_HMAC_SHA_512>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x40,%esi
call   1040 <RAND_bytes@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x40,%ecx
mov    $0x3a98,%r8d
call   1030 <PBKDF2_HMAC_SHA_512Ex@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @PBKDF2_HMAC_SHA_512(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [64 x i32]
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%7 = call i32 @RAND_bytes(i32* %6, i32 64)
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%11 = bitcast i32* %10 to i8*
%12 = call i8* @PBKDF2_HMAC_SHA_512Ex(i8* %8, i64 %9, i8* %11, i32 64, i32 15000)
ret i8* %12
}

LLVM IR (-O2):
define i8* @PBKDF2_HMAC_SHA_512(i8* %0, i64 %1) {
%3 = alloca [64 x i32]
%4 = bitcast [64 x i32]* %3 to i8*
%5 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 0
%6 = call i32 @RAND_bytes(i32* %5, i32 64)
%7 = call i8* @PBKDF2_HMAC_SHA_512Ex(i8* %0, i64 %1, i8* %4, i32 64, i32 15000)
ret i8* %7
}
/* Variables and functions */
scalar_t__ strtol(char *, char **, int);
int ED_strtoi(char *token, char *loc, int *val) {
  int ret = 0;
  char *endptr;
  *val = (int)strtol(token, &endptr, 10);
  if (*endptr != 0) {
    *val = 0;
    ret = 1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<ED_strtoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1166 <ED_strtoi+0x56>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ED_strtoi>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,(%rbx)
mov    0x8(%rsp),%rdx
xor    %esi,%esi
xor    %ecx,%ecx
cmpb   $0x0,(%rdx)
setne  %cl
cmove  %eax,%esi
mov    %esi,(%rbx)
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ED_strtoi(i8* %0, i8* nocapture readnone %1, i32* nocapture writeonly %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i64 @strtol(i8* %0, i8** %4, i32 10)
%7 = trunc i64 %6 to i32
store i32 %7, i32* %2
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = select i1 %10, i32 %7, i32 0
store i32 %11, i32* %2
%12 = xor i1 %10, true
%13 = zext i1 %12 to i32
ret i32 %13
}
int lastDigitOfNPowerN(int n) {
  int ret[20] = {0, 1, 4, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 4, 9};
  if (n == 0)
    return 1;
  return ret[n % 20];
}


x86 assembly (clang, -O0):
<lastDigitOfNPowerN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xeda(%rip),%rsi
mov    $0x50,%edx
call   1030 <memcpy@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1146 <lastDigitOfNPowerN+0x36>
movl   $0x1,-0x4(%rbp)
jmp    115b <lastDigitOfNPowerN+0x4b>
mov    -0x8(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x60(%rbp,%rax,4),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lastDigitOfNPowerN>:
test   %edi,%edi
je     1131 <lastDigitOfNPowerN+0x31>
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rax
add    %ecx,%eax
shl    $0x2,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edi
movslq %edi,%rax
lea    0xed3(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
@__const.lastDigitOfNPowerN.ret = [20 x i32] [i32 0, i32 1, i32 4, i32 7, i32 6, i32 5, i32 6, i32 3, i32 6, i32 9, i32 0, i32 1, i32 6, i32 3, i32 6, i32 5, i32 6, i32 7, i32 4, i32 9]
define i32 @lastDigitOfNPowerN(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [20 x i32]
store i32 %0, i32* %3
%5 = bitcast [20 x i32]* %4 to i8*
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = srem i32 %10, 20
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %12
%14 = load i32, i32* %13
store i32 %14, i32* %2
br label %15
15: ; preds = %9, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@__const.lastDigitOfNPowerN.ret = [20 x i32] [i32 0, i32 1, i32 4, i32 7, i32 6, i32 5, i32 6, i32 3, i32 6, i32 9, i32 0, i32 1, i32 6, i32 3, i32 6, i32 5, i32 6, i32 7, i32 4, i32 9]
define i32 @lastDigitOfNPowerN(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = srem i32 %0, 20
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [20 x i32], [20 x i32]* @__const.lastDigitOfNPowerN.ret, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 1, %1 ]
ret i32 %9
}
void pci_remove_firmware_label_files(struct pci_dev *pdev) { return; }


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_remove_firmware_label_files(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __ioctl(int fd, unsigned long int request) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__ioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ioctl>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__ioctl(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__ioctl(i32 %0, i64 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
void swap_with_pointers(int *ptr_iNum1, int *ptr_iNum2) {
  int temp;
  temp = *ptr_iNum1;
  *ptr_iNum1 = *ptr_iNum2;
  *ptr_iNum2 = temp;
}


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

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

LLVM IR (-O0):
define void @swap_with_pointers(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap_with_pointers(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
int f(int s, int c, int i) {
  int a1, a2, a3, x1, x2, x3, x;
  a1 = i * s;
  x1 = c + a1;
  i = i + 2;
  a2 = i * s;
  x2 = c + a2;
  if (x2 > 6)
    i = i + 2;
  i = i + 2;
  a3 = i * s;
  x3 = c + a3;
  x = x1 + x2 + x3;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x6,-0x20(%rbp)
jle    114f <f+0x4f>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0x2(%rdx),%r8d
mov    %r8d,%ecx
imul   %edi,%ecx
add    %esi,%ecx
lea    0x4(%rdx),%eax
cmp    $0x7,%ecx
cmovl  %r8d,%eax
add    %eax,%edx
add    $0x2,%edx
imul   %edi,%edx
lea    (%rcx,%rsi,2),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%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* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %4
%16 = mul nsw i32 %14, %15
store i32 %16, i32* %7
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = add nsw i32 %17, %18
store i32 %19, i32* %10
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 2
store i32 %21, i32* %6
%22 = load i32, i32* %6
%23 = load i32, i32* %4
%24 = mul nsw i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %5
%26 = load i32, i32* %8
%27 = add nsw i32 %25, %26
store i32 %27, i32* %11
%28 = load i32, i32* %11
%29 = icmp sgt i32 %28, 6
br i1 %29, label %30, label %33
30: ; preds = %3
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 2
store i32 %32, i32* %6
br label %33
33: ; preds = %30, %3
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 2
store i32 %35, i32* %6
%36 = load i32, i32* %6
%37 = load i32, i32* %4
%38 = mul nsw i32 %36, %37
store i32 %38, i32* %9
%39 = load i32, i32* %5
%40 = load i32, i32* %9
%41 = add nsw i32 %39, %40
store i32 %41, i32* %12
%42 = load i32, i32* %10
%43 = load i32, i32* %11
%44 = add nsw i32 %42, %43
%45 = load i32, i32* %12
%46 = add nsw i32 %44, %45
store i32 %46, i32* %13
%47 = load i32, i32* %13
ret i32 %47
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %2, 2
%5 = mul nsw i32 %4, %0
%6 = add nsw i32 %5, %1
%7 = icmp sgt i32 %6, 6
%8 = add nsw i32 %2, 4
%9 = select i1 %7, i32 %8, i32 %4
%10 = shl i32 %1, 1
%11 = add i32 %4, %9
%12 = mul i32 %11, %0
%13 = add i32 %6, %10
%14 = add i32 %13, %12
ret i32 %14
}
/* Type definitions */
struct rtpp_pearson_perfect {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct rtpp_pearson_perfect *);
void rtpp_pearson_perfect_dtor(struct rtpp_pearson_perfect *rppp) {
  free(rppp);
}


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

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

LLVM IR (-O2):
%struct.rtpp_pearson_perfect = type { i32 }
define void @rtpp_pearson_perfect_dtor(%struct.rtpp_pearson_perfect* nocapture %0) {
%2 = tail call i32 @free(%struct.rtpp_pearson_perfect* %0)
ret void
}
/* Variables and functions */
char *getStatusText(int const);
int init_fs();
int /*<<< orphan*/ printf(char *, char *);
int init_fs_log() {
  const int status = init_fs();
  printf("INIT FS: %s\n", getStatusText(status));
  return status;
}


x86 assembly (clang, -O0):
<init_fs_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <init_fs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <getStatusText@plt>
mov    %rax,%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_fs_log>:
push   %rbx
xor    %eax,%eax
call   1030 <init_fs@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <getStatusText@plt>
lea    0xeb8(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"INIT FS: %s\0A\00"
define i32 @init_fs_log() {
%1 = alloca i32
%2 = call i32 (...) @init_fs()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i8* @getStatusText(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [13 x i8] c"INIT FS: %s\0A\00"
define i32 @init_fs_log() {
%1 = tail call i32 (...) @init_fs()
%2 = tail call i8* @getStatusText(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 %1
}
void inthdc_close(void *priv) {}


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

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

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

LLVM IR (-O2):
define void @inthdc_close(i8* nocapture %0) {
ret void
}
int estbisextile(int annee) {
  if (((annee % 4 == 0) && (annee % 100 != 0)) || (annee % 400 == 0))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<estbisextile>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112f <estbisextile+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <estbisextile+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <estbisextile+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <estbisextile+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<estbisextile>:
test   $0x3,%dil
sete   %al
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
cmp    $0x28f5c29,%edx
setae  %dl
and    %al,%dl
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
setb   %al
or     %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @estbisextile(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = srem i32 %8, 100
%10 = icmp ne i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %7, %1
%12 = load i32, i32* %3
%13 = srem i32 %12, 400
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @estbisextile(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp ne i32 %4, 0
%6 = and i1 %3, %5
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}