xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void printLoadAvg15Info(const char *cmd) {
  (void)cmd;
  output("Load average 15 min\t0\t0\t\n");
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Load average 15 min\090\090\09\0A\00"
define void @printLoadAvg15Info(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Load average 15 min\090\090\09\0A\00"
define void @printLoadAvg15Info(i8* nocapture readnone %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
__attribute__((weak)) int __real_accept(int fd, struct sockaddr *addr,
                                        socklen_t *addrlen) {
  return accept(fd, addr, addrlen);
}


x86 assembly (clang, -O0):
<__real_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <accept@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__real_accept>:
jmp    1030 <accept@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define weak i32 @__real_accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32*, i32** %6
%10 = call i32 @accept(i32 %7, %struct.sockaddr* %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define weak i32 @__real_accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @accept(i32 %0, %struct.sockaddr* %1, i32* %2)
ret i32 %4
}
void fc102(int n) {
a : {
  typedef int(*b)[n];
  {
    typedef int(*c)[n];
    0;
  }
  {
    typedef int(*d)[n];
    0;
  };
  typedef int(*e)[n];
  goto a;
  0;
};
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc102>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc102+0x7>

x86 assembly (clang, -O2):
<fc102>:
jmp    1100 <fc102>

LLVM IR (-O0):
define void @fc102(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
br label %3
12: ; No predecessors!
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc102(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ fd_w25q16dw_chip_erase();
int /*<<< orphan*/ fd_w25q16dw_enable_write();
int /*<<< orphan*/ fd_w25q16dw_sleep();
int /*<<< orphan*/ fd_w25q16dw_wake();
void erase_flash(void) {
  fd_w25q16dw_wake();
  fd_w25q16dw_enable_write();
  fd_w25q16dw_chip_erase();
  fd_w25q16dw_sleep();
}


x86 assembly (clang, -O0):
<erase_flash>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <fd_w25q16dw_wake@plt>
mov    $0x0,%al
call   1040 <fd_w25q16dw_enable_write@plt>
mov    $0x0,%al
call   1060 <fd_w25q16dw_chip_erase@plt>
mov    $0x0,%al
call   1030 <fd_w25q16dw_sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<erase_flash>:
push   %rax
xor    %eax,%eax
call   1050 <fd_w25q16dw_wake@plt>
xor    %eax,%eax
call   1040 <fd_w25q16dw_enable_write@plt>
xor    %eax,%eax
call   1060 <fd_w25q16dw_chip_erase@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <fd_w25q16dw_sleep@plt>

LLVM IR (-O0):
define void @erase_flash() {
%1 = call i32 (...) @fd_w25q16dw_wake()
%2 = call i32 (...) @fd_w25q16dw_enable_write()
%3 = call i32 (...) @fd_w25q16dw_chip_erase()
%4 = call i32 (...) @fd_w25q16dw_sleep()
ret void
}

LLVM IR (-O2):
define void @erase_flash() {
%1 = tail call i32 (...) @fd_w25q16dw_wake()
%2 = tail call i32 (...) @fd_w25q16dw_enable_write()
%3 = tail call i32 (...) @fd_w25q16dw_chip_erase()
%4 = tail call i32 (...) @fd_w25q16dw_sleep()
ret void
}
/* Type definitions */
struct estimate {
  int dummy;
};

/* Variables and functions */
unsigned int estimate_calc_absolute(struct estimate *, unsigned int,
                                    int /*<<< orphan*/ *);
unsigned int estimate_calc(struct estimate *est, unsigned int value) {
  return estimate_calc_absolute(est, value, NULL);
}


x86 assembly (clang, -O0):
<estimate_calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <estimate_calc_absolute@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estimate_calc>:
xor    %edx,%edx
jmp    1030 <estimate_calc_absolute@plt>

LLVM IR (-O0):
%struct.estimate = type { i32 }
define i32 @estimate_calc(%struct.estimate* %0, i32 %1) {
%3 = alloca %struct.estimate*
%4 = alloca i32
store %struct.estimate* %0, %struct.estimate** %3
store i32 %1, i32* %4
%5 = load %struct.estimate*, %struct.estimate** %3
%6 = load i32, i32* %4
%7 = call i32 @estimate_calc_absolute(%struct.estimate* %5, i32 %6, i32* null)
ret i32 %7
}

LLVM IR (-O2):
%struct.estimate = type { i32 }
define i32 @estimate_calc(%struct.estimate* %0, i32 %1) {
%3 = tail call i32 @estimate_calc_absolute(%struct.estimate* %0, i32 %1, i32* null)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, char const *argv[]) {
  char name[40];
  printf("what 's your name\n");
  scanf("%s", name);
  printf("Hello,%s. %s\n", name, "What a super marvelous name!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xec4(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x40(%rbp),%rsi
lea    0xeb7(%rip),%rdi
lea    0xebe(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xea9(%rip),%rdi
lea    0xeb0(%rip),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"what 's your name\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [14 x i8] c"Hello,%s. %s\0A\00"
@.str.3 = [29 x i8] c"What a super marvelous name!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [40 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [40 x i8], [40 x i8]* %6, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %6, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [14 x i8] c"Hello,%s. %s\0A\00"
@.str.3 = [29 x i8] c"What a super marvelous name!\00"
@str = [18 x i8] c"what 's your name\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [40 x i8]
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
void func2(int i, void *arg) { printf("%d arg %s\n", i, arg); }


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

x86 assembly (clang, -O2):
<func2>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%d arg %s\0A\00"
define void @func2(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d arg %s\0A\00"
define void @func2(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
void test() {
  __asm__("push %rax");
  __asm__("push $0x123");
  __asm__("jmp 0x123");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
push   %rax
push   $0x123
jmp    123 <_init-0xedd>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
push   $0x123
jmp    123 <_init-0xedd>
ret

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

LLVM IR (-O2):
define void @test() {
tail call void asm sideeffect "push %rax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "push $$0x123", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "jmp 0x123", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __syscall(int, unsigned long, unsigned long,
                             int /*<<< orphan*/);
void *__get_memtop(void) {
  unsigned long totmem = 0, topmem = 0;
  int numbanks;
  __syscall(1001, (unsigned long)&totmem, (unsigned long)&topmem, 0);
  return (void *)topmem;
}


x86 assembly (clang, -O0):
<__get_memtop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x3e9,%edi
xor    %ecx,%ecx
call   1030 <__syscall@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_memtop>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x3e9,%edi
xor    %ecx,%ecx
call   1030 <__syscall@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i8* @__get_memtop() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
store i64 0, i64* %1
store i64 0, i64* %2
%4 = ptrtoint i64* %1 to i64
%5 = ptrtoint i64* %2 to i64
%6 = call i32 @__syscall(i32 1001, i64 %4, i64 %5, i32 0)
%7 = load i64, i64* %2
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @__get_memtop() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = ptrtoint i64* %1 to i64
%6 = ptrtoint i64* %2 to i64
%7 = call i32 @__syscall(i32 1001, i64 %5, i64 %6, i32 0)
%8 = load i64, i64* %2
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}
/* Variables and functions */
int tx_write(unsigned char *, int);
int tx_writeb(unsigned char val) { return tx_write(&val, 1); }


x86 assembly (clang, -O0):
<tx_writeb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <tx_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_writeb>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <tx_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tx_writeb(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @tx_write(i8* %2, i32 1)
ret i32 %3
}

LLVM IR (-O2):
define i32 @tx_writeb(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @tx_write(i8* %2, i32 1)
ret i32 %3
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compar_str(const void *a, const void *b, void *param) {
  return strcmp((*(const char **)(a)), (*(const char **)(b)));
}


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

x86 assembly (clang, -O2):
<compar_str>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @compar_str(i8* %0, i8* %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 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
%13 = call i32 @strcmp(i8* %9, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @compar_str(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i8**
%5 = load i8*, i8** %4
%6 = bitcast i8* %1 to i8**
%7 = load i8*, i8** %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
unsigned long lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
unsigned long fo_size(int fd) { return lseek(fd, 0, SEEK_END); }


x86 assembly (clang, -O0):
<fo_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@SEEK_END = global i32 0
define i64 @fo_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SEEK_END
%5 = call i64 @lseek(i32 %3, i32 0, i32 %4)
ret i64 %5
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i64 @fo_size(i32 %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i64 @lseek(i32 %0, i32 0, i32 %2)
ret i64 %3
}
/* Variables and functions */
float __nv_fsub_rd(float, float);
float __fsub_rd(float __a, float __b) { return __nv_fsub_rd(__a, __b); }


x86 assembly (clang, -O0):
<__fsub_rd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nv_fsub_rd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fsub_rd>:
jmp    1030 <__nv_fsub_rd@plt>

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

LLVM IR (-O2):
define float @__fsub_rd(float %0, float %1) {
%3 = tail call float @__nv_fsub_rd(float %0, float %1)
ret float %3
}
int test_imm_F9int8_reg(signed char val) {
  return ((val) & (0xF9 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F9int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 249
%6 = icmp ne i32 %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_F9int8_reg(i8 signext %0) {
%2 = and i8 %0, -7
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ getLine(char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pushLineEntriesToTable(char *);
int main() {
  char str[80];
  printf("Enter sentence: ");
  getLine(str, 80);
  pushLineEntriesToTable(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    $0x50,%esi
call   1040 <getLine@plt>
lea    -0x60(%rbp),%rdi
call   1050 <pushLineEntriesToTable@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1040 <getLine@plt>
mov    %rbx,%rdi
call   1050 <pushLineEntriesToTable@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter sentence: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i32 @getLine(i8* %4, i32 80)
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%7 = call i32 @pushLineEntriesToTable(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter sentence: \00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @getLine(i8* %2, i32 80)
%5 = call i32 @pushLineEntriesToTable(i8* %2)
ret i32 0
}
/* Variables and functions */
void *xnrealloc_inline(void *, size_t, size_t);
void *xnrealloc(void *p, size_t n, size_t s) {
  return xnrealloc_inline(p, n, s);
}


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

x86 assembly (clang, -O2):
<xnrealloc>:
jmp    1030 <xnrealloc_inline@plt>

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

LLVM IR (-O2):
define i8* @xnrealloc(i8* %0, i64 %1, i64 %2) {
%4 = tail call i8* @xnrealloc_inline(i8* %0, i64 %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
double frand();
int rand();
double sfrand() { return rand() % 2 ? frand() : -frand(); }


x86 assembly (clang, -O0):
<sfrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1151 <sfrand+0x31>
mov    $0x0,%al
call   1030 <frand@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1174 <sfrand+0x54>
mov    $0x0,%al
call   1030 <frand@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfrand>:
push   %rbx
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <frand@plt>
test   $0x1,%bl
jne    113d <sfrand+0x1d>
xorps  0xec3(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @sfrand() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 2
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call double (...) @frand()
br label %9
6: ; preds = %0
%7 = call double (...) @frand()
%8 = fneg double %7
br label %9
9: ; preds = %6, %4
%10 = phi double [ %5, %4 ], [ %8, %6 ]
ret double %10
}

LLVM IR (-O2):
define double @sfrand() {
%1 = tail call i32 (...) @rand()
%2 = and i32 %1, 1
%3 = icmp eq i32 %2, 0
%4 = tail call double (...) @frand()
%5 = fneg double %4
%6 = select i1 %3, double %5, double %4
ret double %6
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void h264avcc_set_length_size_1(uint8_t *p, uint8_t val) { p[4] = 0xfc | val; }


x86 assembly (clang, -O0):
<h264avcc_set_length_size_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
or     $0xfc,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264avcc_set_length_size_1>:
or     $0xfc,%esi
mov    %esi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @h264avcc_set_length_size_1(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = or i32 252, %5
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 4
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @h264avcc_set_length_size_1(i32* nocapture writeonly %0, i32 %1) {
%3 = or i32 %1, 252
%4 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %3, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  int A[1024];
  int i;
  A[1024 - 1] = 0;
  for (i = 0; A[i] != 0; i++) {
  }
  __VERIFIER_assert(i <= 1024);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x1014(%rbp)
movslq -0x1014(%rbp),%rax
cmpl   $0x0,-0x1010(%rbp,%rax,4)
je     1161 <main+0x51>
jmp    114d <main+0x3d>
mov    -0x1014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1014(%rbp)
jmp    1133 <main+0x23>
cmpl   $0x400,-0x1014(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1008,%rsp
movl   $0x0,0xffc(%rsp)
mov    $0xffffffff,%eax
mov    %rsp,%rcx
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpl   $0x0,(%rcx)
lea    0x4(%rcx),%rcx
jne    1130 <main+0x20>
xor    %edi,%edi
cmp    $0x401,%eax
setb   %dil
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x1008,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [1024 x i32], [1024 x i32]* %2, i64 0, i64 1023
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [1024 x i32], [1024 x i32]* %2, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %5
br label %12
12: ; preds = %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 1024
%18 = zext i1 %17 to i32
%19 = call i32 @__VERIFIER_assert(i32 %18)
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1024 x i32]
%2 = bitcast [1024 x i32]* %1 to i8*
%3 = getelementptr inbounds [1024 x i32], [1024 x i32]* %1, i64 0, i64 1023
store i32 0, i32* %3
br label %4
4: ; preds = %4, %0
%5 = phi i64 [ %9, %4 ], [ 0, %0 ]
%6 = getelementptr inbounds [1024 x i32], [1024 x i32]* %1, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 0
%9 = add nuw i64 %5, 1
br i1 %8, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
%12 = icmp ult i32 %11, 1025
%13 = zext i1 %12 to i32
%14 = tail call i32 @__VERIFIER_assert(i32 %13)
ret i32 0
}
int division(int x, int y) { return x - y; }


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

x86 assembly (clang, -O2):
<division>:
mov    %edi,%eax
sub    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @division(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
double M_PI;
double cos(double);
double drho_dz(double L, double a_rhoz, double rho_z, double z) {
  return M_PI * a_rhoz * rho_z * cos(M_PI * a_rhoz * z / L) / L;
}


x86 assembly (clang, -O0):
<drho_dz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e9b(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drho_dz>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mulsd  (%rax),%xmm1
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
mulsd  %xmm3,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @drho_dz(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* @M_PI
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = load double, double* %7
%13 = fmul double %11, %12
%14 = load double, double* @M_PI
%15 = load double, double* %6
%16 = fmul double %14, %15
%17 = load double, double* %8
%18 = fmul double %16, %17
%19 = load double, double* %5
%20 = fdiv double %18, %19
%21 = call double @cos(double %20)
%22 = fmul double %13, %21
%23 = load double, double* %5
%24 = fdiv double %22, %23
ret double %24
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @drho_dz(double %0, double %1, double %2, double %3) {
%5 = load double, double* @M_PI
%6 = fmul double %5, %1
%7 = fmul double %6, %2
%8 = fmul double %6, %3
%9 = fdiv double %8, %0
%10 = tail call double @cos(double %9)
%11 = fmul double %10, %7
%12 = fdiv double %11, %0
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void lettura_numero(int *numeroPtr) {
  scanf("%u", numeroPtr);
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define void @lettura_numero(i32* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ KeyBrd_Hit();
int Key_Proc(void) {
  char Key_Data;
  if (KeyBrd_Hit()) {
    if (Key_Data == 'q')
      return 1;
    if (Key_Data == 10)
      Key_Data = 13;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Key_Proc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <KeyBrd_Hit@plt>
cmp    $0x0,%rax
je     1158 <Key_Proc+0x48>
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
jne    1142 <Key_Proc+0x32>
movl   $0x1,-0x4(%rbp)
jmp    115f <Key_Proc+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    1153 <Key_Proc+0x43>
movb   $0xd,-0x5(%rbp)
jmp    1158 <Key_Proc+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Key_Proc() {
%1 = tail call i64 (...) @KeyBrd_Hit()
ret i32 0
}
jump(label) int label;
{
  debug_ol("; jump");
  ot("jmp	");
  printlabel(label);
  nl();
}


x86 assembly (clang, -O0):
<jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1050 <debug_ol@plt>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <ot@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1060 <printlabel@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jump>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1050 <debug_ol@plt>
lea    0xeaf(%rip),%rdi
xor    %eax,%eax
call   1040 <ot@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1060 <printlabel@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"; jump\00"
@.str.1 = [5 x i8] c"jmp\09\00"
define i32 @jump(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %6)
%8 = call i32 (...) @nl()
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"; jump\00"
@.str.1 = [5 x i8] c"jmp\09\00"
define i32 @jump(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %0)
%5 = tail call i32 (...) @nl()
ret i32 undef
}
unsigned long detect_cpu() {
  unsigned long ebx, unused;
  __asm__("cpuid"
          : "=a"(unused), "=b"(ebx), "=c"(unused), "=d"(unused)
          : "a"(0));
  ;
  return ebx;
}


x86 assembly (clang, -O0):
<detect_cpu>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
xor    %eax,%eax
cpuid
mov    %rax,-0x18(%rbp)
mov    %rbx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<detect_cpu>:
push   %rbx
xor    %eax,%eax
cpuid
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @detect_cpu() {
%1 = alloca i64
%2 = alloca i64
%3 = call { i64, i64, i64, i64 } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 0)
%4 = extractvalue { i64, i64, i64, i64 } %3, 0
%5 = extractvalue { i64, i64, i64, i64 } %3, 1
%6 = extractvalue { i64, i64, i64, i64 } %3, 2
%7 = extractvalue { i64, i64, i64, i64 } %3, 3
store i64 %4, i64* %2
store i64 %5, i64* %1
store i64 %6, i64* %2
store i64 %7, i64* %2
%8 = load i64, i64* %1
ret i64 %8
}

LLVM IR (-O2):
define i64 @detect_cpu() {
%1 = tail call { i64, i64, i64, i64 } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 0)
%2 = extractvalue { i64, i64, i64, i64 } %1, 1
ret i64 %2
}
int pdf_rc4_read(void *ctx, unsigned char *in, unsigned char *obuf,
                 int request) {
  int tmplen = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pdf_rc4_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pdf_rc4_read(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
store i32 0, i32* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @pdf_rc4_read(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
void foo470() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"catch SIGUSR1\00"
define void @sigusr1_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int *rodCutTopDownMemo(int *, int);
int main(void) {
  int prices[11] = {0, 1, 5, 8, 9, 10, 17, 17, 20, 24, 30};
  int *r = rodCutTopDownMemo(prices, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <rodCutTopDownMemo@plt>
mov    %rax,-0x38(%rbp)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movups 0xf01(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <rodCutTopDownMemo@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.prices = [11 x i32] [i32 0, i32 1, i32 5, i32 8, i32 9, i32 10, i32 17, i32 17, i32 20, i32 24, i32 30]
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i32]
%3 = alloca i32*
store i32 0, i32* %1
%4 = bitcast [11 x i32]* %2 to i8*
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%6 = call i32* @rodCutTopDownMemo(i32* %5, i32 10)
store i32* %6, i32** %3
ret i32 0
}

LLVM IR (-O2):
@__const.main.prices = [11 x i32] [i32 0, i32 1, i32 5, i32 8, i32 9, i32 10, i32 17, i32 17, i32 20, i32 24, i32 30]
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32* @rodCutTopDownMemo(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
int ata_get_bits(unsigned char const *, int, int, int);
bool ata_get_bit(const unsigned char *buf, int word, int bit) {
  return ata_get_bits(buf, word, bit, bit);
}


x86 assembly (clang, -O0):
<ata_get_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <ata_get_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ata_get_bit>:
mov    %edx,%ecx
jmp    1030 <ata_get_bits@plt>

LLVM IR (-O0):
define i32 @ata_get_bit(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 = load i32, i32* %6
%11 = call i32 @ata_get_bits(i8* %7, i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @ata_get_bit(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @ata_get_bits(i8* %0, i32 %1, i32 %2, i32 %2)
ret i32 %4
}
int clockevents_notify(unsigned long reason, void *arg) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @clockevents_notify(i64 %0, i8* nocapture readnone %1) {
ret i32 0
}
char *incr(char *mp, char *mem, char *end, int a) {
  mp += a;
  if (mp >= end)
    mp = mem + (end - mp);
  return mp;
}


x86 assembly (clang, -O0):
<incr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jb     1148 <incr+0x48>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rdx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<incr>:
movslq %ecx,%rcx
add    %rdi,%rcx
mov    %rdx,%rax
sub    %rcx,%rax
add    %rsi,%rax
cmp    %rcx,%rdx
cmova  %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @incr(i8* %0, i8* readnone %1, i8* %2, i32 %3) {
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = icmp ult i8* %6, %2
%8 = ptrtoint i8* %2 to i64
%9 = ptrtoint i8* %6 to i64
%10 = sub i64 %8, %9
%11 = getelementptr inbounds i8, i8* %1, i64 %10
%12 = select i1 %7, i8* %6, i8* %11
ret i8* %12
}
/* Variables and functions */
int istrsenvisx(char *, size_t *, char const *, size_t, int, char const *,
                int *);
int strsenvisx(char *mbdst, size_t dlen, const char *mbsrc, size_t len,
               int flags, const char *mbextra, int *cerr_ptr) {
  return istrsenvisx(mbdst, &dlen, mbsrc, len, flags, mbextra, cerr_ptr);
}


x86 assembly (clang, -O0):
<strsenvisx>:
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    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
lea    -0x10(%rbp),%rsi
mov    %rax,(%rsp)
call   1030 <istrsenvisx@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsenvisx>:
sub    $0x18,%rsp
mov    0x20(%rsp),%rax
mov    %rsi,0x10(%rsp)
mov    %rax,(%rsp)
lea    0x10(%rsp),%rsi
call   1030 <istrsenvisx@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @strsenvisx(i8* %0, i64 %1, i8* %2, i64 %3, i32 %4, i8* %5, i32* %6) {
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32*
store i8* %0, i8** %8
store i64 %1, i64* %9
store i8* %2, i8** %10
store i64 %3, i64* %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store i32* %6, i32** %14
%15 = load i8*, i8** %8
%16 = load i8*, i8** %10
%17 = load i64, i64* %11
%18 = load i32, i32* %12
%19 = load i8*, i8** %13
%20 = load i32*, i32** %14
%21 = call i32 @istrsenvisx(i8* %15, i64* %9, i8* %16, i64 %17, i32 %18, i8* %19, i32* %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @strsenvisx(i8* %0, i64 %1, i8* %2, i64 %3, i32 %4, i8* %5, i32* %6) {
%8 = alloca i64
store i64 %1, i64* %8
%9 = call i32 @istrsenvisx(i8* %0, i64* %8, i8* %2, i64 %3, i32 %4, i8* %5, i32* %6)
ret i32 %9
}
void main() {
  int x;
  int p1;
  int p2;
  int p3;
  if (p1) {
  L1a:
    x = 0;
  } else {
  L1b:
    x = 1;
  }
  while (0) {
    if (p2) {
      goto L2;
    }
  }
L2:
  if (p3) {
    goto L1a;
  } else {
    goto L1b;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,-0x8(%rbp)
je     111f <main+0x1f>
jmp    1113 <main+0x13>
movl   $0x0,-0x4(%rbp)
jmp    112b <main+0x2b>
jmp    1124 <main+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1130 <main+0x30>
xor    %eax,%eax
test   $0x1,%al
jne    113f <main+0x3f>
jmp    1153 <main+0x53>
cmpl   $0x0,-0xc(%rbp)
je     114e <main+0x4e>
jmp    1158 <main+0x58>
jmp    1130 <main+0x30>
jmp    1158 <main+0x58>
cmpl   $0x0,-0x10(%rbp)
je     1167 <main+0x67>
jmp    1113 <main+0x13>
jmp    1124 <main+0x24>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
br label %8
8: ; preds = %22, %7
store i32 0, i32* %1
br label %11
9: ; preds = %0
br label %10
10: ; preds = %23, %9
store i32 1, i32* %1
br label %11
11: ; preds = %10, %8
br label %12
12: ; preds = %17, %11
br i1 false, label %13, label %18
13: ; preds = %12
%14 = load i32, i32* %3
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
br label %19
17: ; preds = %13
br label %12
18: ; preds = %12
br label %19
19: ; preds = %18, %16
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19
br label %8
23: ; preds = %19
br label %10
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
long double longdouble_ignoring_unsignedlonglong(long double x,
                                                 unsigned long long y) {
  return x;
}


x86 assembly (clang, -O0):
<longdouble_ignoring_unsignedlonglong>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<longdouble_ignoring_unsignedlonglong>:
fldt   0x8(%rsp)
ret

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

LLVM IR (-O2):
define x86_fp80 @longdouble_ignoring_unsignedlonglong(x86_fp80 returned %0, i64 %1) {
ret x86_fp80 %0
}
/* Variables and functions */
size_t strlcpy(char *, void const *, size_t);
size_t convert_str_out(const void *str, size_t str_len, char *out,
                       size_t out_len) {
  return strlcpy(out, str, out_len);
}


x86 assembly (clang, -O0):
<convert_str_out>:
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    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strlcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_str_out>:
mov    %rdi,%rsi
mov    %rdx,%rdi
mov    %rcx,%rdx
jmp    1030 <strlcpy@plt>

LLVM IR (-O0):
define i64 @convert_str_out(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** %7
%10 = load i8*, i8** %5
%11 = load i64, i64* %8
%12 = call i64 @strlcpy(i8* %9, i8* %10, i64 %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @convert_str_out(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i64 @strlcpy(i8* %2, i8* %0, i64 %3)
ret i64 %5
}
struct bst_test_list *test_mics_install(struct bst_test_list *tests) {
  return tests;
}


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

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

LLVM IR (-O0):
%struct.bst_test_list = type opaque
define %struct.bst_test_list* @test_mics_install(%struct.bst_test_list* %0) {
%2 = alloca %struct.bst_test_list*
store %struct.bst_test_list* %0, %struct.bst_test_list** %2
%3 = load %struct.bst_test_list*, %struct.bst_test_list** %2
ret %struct.bst_test_list* %3
}

LLVM IR (-O2):
%struct.bst_test_list = type opaque
define %struct.bst_test_list* @test_mics_install(%struct.bst_test_list* readnone returned %0) {
ret %struct.bst_test_list* %0
}
int isodigit(int c) {
  if ('0' <= c && c <= '7')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isodigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x30,%eax
cmp    -0x8(%rbp),%eax
jg     112b <isodigit+0x2b>
cmpl   $0x37,-0x8(%rbp)
jg     112b <isodigit+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1132 <isodigit+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isodigit>:
and    $0xfffffff8,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isodigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 55
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @isodigit(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}