xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
int /*<<< orphan*/ halt(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void expected(char *exp) {
  assert(exp);
  char expected_str[32];
  snprintf(expected_str, 32, "%s expected", exp);
  halt(expected_str);
}


x86 assembly (clang, -O0):
<expected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x20,%esi
lea    0xea7(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x30(%rbp),%rdi
call   1050 <halt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expected>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
call   1040 <assert@plt>
lea    0xeba(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
mov    %rbx,%rcx
call   1030 <snprintf@plt>
mov    %r14,%rdi
call   1050 <halt@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%s expected\00"
define void @expected(i8* %0) {
%2 = alloca [32 x i8]
%3 = tail call i32 @assert(i8* %0)
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = call i32 @halt(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xfb() {
  Assert_real((ispunct(251) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              1260, ("ispunct should be 0 for 0xfb"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xfb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfb,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4ec,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xfb>:
push   %rax
mov    $0xfb,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ec,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xfb\00"
define void @t_ispunct_0xfb() {
%1 = call i64 @ispunct(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xfb\00"
define void @t_ispunct_0xfb() {
%1 = tail call i64 @ispunct(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double log(double);
int /*<<< orphan*/ printf(char *, double, double);
double sin(double);
int main(void) {
  double pi = 3.1416;
  printf("sin(pi/2)=%f\nlnl=%f\n", sin(pi / 2), log(1.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe91(%rip),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"sin(pi/2)=%f\0Alnl=%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 3.141600e+00, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 2.000000e+00
%5 = call double @sin(double %4)
%6 = call double @log(double 1.000000e+00)
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %5, double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"sin(pi/2)=%f\0Alnl=%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double 0x3FEFFFFFFFFF12A3, double 0.000000e+00)
ret i32 0
}
int write() {}


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

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

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

LLVM IR (-O2):
define i32 @write() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int main(void) {
  for (;;)
    fork();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fork@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <fork@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 (...) @fork()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @fork()
br label %1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vpicx_set_concealmentmv(uint8_t *p_mp2vpicx) { p_mp2vpicx[7] |= 0x20; }


x86 assembly (clang, -O0):
<mp2vpicx_set_concealmentmv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
or     $0x20,%ecx
mov    %ecx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpicx_set_concealmentmv>:
orb    $0x20,0x1c(%rdi)
ret

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

LLVM IR (-O2):
define void @mp2vpicx_set_concealmentmv(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 7
%3 = load i32, i32* %2
%4 = or i32 %3, 32
store i32 %4, i32* %2
ret void
}
/* Type definitions */
typedef long uint32_t;

/* Variables and functions */
long atol(char *);
uint32_t to_u32(char *s, size_t beg, size_t len) {
  char c, *end;
  end = &s[beg + len];
  c = *end;
  *end = '\0';
  long n = atol(s + beg);
  *end = c;
  return n;
}


x86 assembly (clang, -O0):
<to_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
add    -0x10(%rbp),%rdi
call   1030 <atol@plt>
mov    %rax,-0x30(%rbp)
mov    -0x19(%rbp),%cl
mov    -0x28(%rbp),%rax
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_u32>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rdi,%r14
add    %rsi,%rbx
mov    (%rdi,%rbx,1),%bpl
movb   $0x0,(%rdi,%rbx,1)
add    %rsi,%rdi
call   1030 <atol@plt>
mov    %bpl,(%r14,%rbx,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @to_u32(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8
%8 = alloca i8*
%9 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%10 = load i8*, i8** %4
%11 = load i64, i64* %5
%12 = load i64, i64* %6
%13 = add i64 %11, %12
%14 = getelementptr inbounds i8, i8* %10, i64 %13
store i8* %14, i8** %8
%15 = load i8*, i8** %8
%16 = load i8, i8* %15
store i8 %16, i8* %7
%17 = load i8*, i8** %8
store i8 0, i8* %17
%18 = load i8*, i8** %4
%19 = load i64, i64* %5
%20 = getelementptr inbounds i8, i8* %18, i64 %19
%21 = call i64 @atol(i8* %20)
store i64 %21, i64* %9
%22 = load i8, i8* %7
%23 = load i8*, i8** %8
store i8 %22, i8* %23
%24 = load i64, i64* %9
ret i64 %24
}

LLVM IR (-O2):
define i64 @to_u32(i8* nocapture %0, i64 %1, i64 %2) {
%4 = add i64 %2, %1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
store i8 0, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %1
%8 = tail call i64 @atol(i8* %7)
store i8 %6, i8* %5
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "Usage: tscrub [OPTIONS] [FILE...]\n"
          "  -X dir     create dir+files, fill until ENOSPC, then scrub\n"
          "  -p n       select pattern sequence number\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [140 x i8] c"Usage: tscrub [OPTIONS] [FILE...]\0A -X dir create dir+files, fill until ENOSPC, then scrub\0A -p n select pattern sequence number\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [140 x i8] c"Usage: tscrub [OPTIONS] [FILE...]\0A -X dir create dir+files, fill until ENOSPC, then scrub\0A -p n select pattern sequence number\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void set_pixel_data(int depth, void *p) {}


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

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

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

LLVM IR (-O2):
define void @set_pixel_data(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ subunsub_main(int, int, char **);
void main(int argc, char **argv) { subunsub_main(1, argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <subunsub_main@plt>

LLVM IR (-O0):
define void @main(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 @subunsub_main(i32 1, i32 %5, i8** %6)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** %1) {
%3 = tail call i32 @subunsub_main(i32 1, i32 %0, i8** %1)
ret void
}
/* Variables and functions */
char *strdup(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *get_cat_section(char *section) {
  char *cat_section;
  cat_section = strdup(section);
  strncpy(cat_section, "cat", 3);
  return cat_section;
}


x86 assembly (clang, -O0):
<get_cat_section>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cat_section>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
lea    0xed0(%rip),%rsi
mov    %rax,%rdi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cat\00"
define i8* @get_cat_section(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strncpy(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"cat\00"
define i8* @get_cat_section(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *, void *);
void freealigned(void *freeptr) {
  void *ceil = freeptr - sizeof(size_t);
  size_t padding = *(size_t *)ceil;
  void *ptr = freeptr - sizeof(size_t) - padding;
  free(ptr);
  printf("%p freed\n", ptr);
  return;
}


x86 assembly (clang, -O0):
<freealigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
xor    %ecx,%ecx
sub    -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freealigned>:
push   %rbx
lea    -0x8(%rdi),%rbx
sub    -0x8(%rdi),%rbx
mov    %rbx,%rdi
call   1030 <free@plt>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%p freed\0A\00"
define void @freealigned(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = getelementptr i8, i8* %6, i64 -8
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
store i64 %10, i64* %4
%11 = load i8*, i8** %2
%12 = getelementptr i8, i8* %11, i64 -8
%13 = load i64, i64* %4
%14 = sub i64 0, %13
%15 = getelementptr i8, i8* %12, i64 %14
store i8* %15, i8** %5
%16 = load i8*, i8** %5
%17 = call i32 @free(i8* %16)
%18 = load i8*, i8** %5
%19 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%p freed\0A\00"
define void @freealigned(i8* %0) {
%2 = getelementptr i8, i8* %0, i64 -8
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
%5 = sub i64 0, %4
%6 = getelementptr i8, i8* %2, i64 %5
%7 = tail call i32 @free(i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ vide();
int main() {
  vide();
  printf("okay\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"okay\00"
define i32 @main() {
%1 = tail call i32 (...) @vide()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int *intArray, int n) {
  for (int i = 0; i < n; i++)
    printf("%d ", intArray[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int chunk_univ_multi_truncate(int /*<<< orphan*/, int, int /*<<< orphan*/ *,
                              int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
int chunk_mr_multi_truncate(uint32_t ts, uint64_t *nchunkid, uint64_t ochunkid,
                            uint8_t lsetid) {
  return chunk_univ_multi_truncate(ts, 1, nchunkid, ochunkid, 0, lsetid);
}


x86 assembly (clang, -O0):
<chunk_mr_multi_truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r9d
mov    $0x1,%esi
xor    %r8d,%r8d
call   1030 <chunk_univ_multi_truncate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chunk_mr_multi_truncate>:
mov    %ecx,%r9d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x1,%esi
xor    %r8d,%r8d
jmp    1030 <chunk_univ_multi_truncate@plt>

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

LLVM IR (-O2):
define i32 @chunk_mr_multi_truncate(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @chunk_univ_multi_truncate(i32 %0, i32 1, i32* %1, i32 %2, i32 0, i32 %3)
ret i32 %5
}
trianglearea(int h, int b) {
  float result;
  result = (h * b) * 1 / 2;
}


x86 assembly (clang, -O0):
<trianglearea>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
shl    $0x0,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @trianglearea(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %7, %8
%10 = mul nsw i32 %9, 1
%11 = sdiv i32 %10, 2
%12 = sitofp i32 %11 to float
store float %12, float* %6
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @trianglearea(i32 %0, i32 %1) {
ret i32 undef
}
void testNonDiagnosableBranchLogical(int a, int b) {
  if (a && b) {
    *(volatile int *)0 = 1;
  }
}


x86 assembly (clang, -O0):
<testNonDiagnosableBranchLogical>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1126 <testNonDiagnosableBranchLogical+0x26>
cmpl   $0x0,-0x8(%rbp)
je     1126 <testNonDiagnosableBranchLogical+0x26>
xor    %eax,%eax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<testNonDiagnosableBranchLogical>:
test   %edi,%edi
je     1113 <testNonDiagnosableBranchLogical+0x13>
test   %esi,%esi
je     1113 <testNonDiagnosableBranchLogical+0x13>
movl   $0x1,0x0
ret

LLVM IR (-O0):
define void @testNonDiagnosableBranchLogical(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store volatile i32 1, i32* null
br label %11
11: ; preds = %10, %7, %2
ret void
}

LLVM IR (-O2):
define void @testNonDiagnosableBranchLogical(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %2
store volatile i32 1, i32* null
br label %7
7: ; preds = %6, %2
ret void
}
void rsn_preauth_candidate_process(struct wpa_sm *sm) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_sm = type opaque
define void @rsn_preauth_candidate_process(%struct.wpa_sm* nocapture %0) {
ret void
}
void kthread_create(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<kthread_create>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kthread_create>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.kthread_create = [15 x i8] c"kthread_create\00"
define void @kthread_create() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.kthread_create, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.kthread_create = [15 x i8] c"kthread_create\00"
define void @kthread_create() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.kthread_create, i64 0, i64 0))
ret void
}
int _rl_qsort_string_compare(s1, s2)
char **s1, **s2;
{
  int result;
  result = **s1 - **s2;
  if (result == 0)
    result = strcmp(*s1, *s2);
  return result;
}


x86 assembly (clang, -O0):
<_rl_qsort_string_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1159 <_rl_qsort_string_compare+0x49>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rl_qsort_string_compare>:
mov    (%rdi),%rdi
movsbl (%rdi),%eax
mov    (%rsi),%rsi
movsbl (%rsi),%ecx
sub    %ecx,%eax
je     1121 <_rl_qsort_string_compare+0x11>
ret
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @_rl_qsort_string_compare(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = load i8*, i8** %1
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %5, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 @strcmp(i8* %3, i8* %6)
br label %13
13: ; preds = %11, %2
%14 = phi i32 [ %12, %11 ], [ %9, %2 ]
ret i32 %14
}
void ff_hevc_put_hevc_uni_qpel_hv12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv12_8_sse4() {
ret void
}
void DHparams_print_fp(void) {}


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

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

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

LLVM IR (-O2):
define void @DHparams_print_fp() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ die(char *, int /*<<< orphan*/);
scalar_t__ errno;
size_t fread(void *, size_t, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ strerror(scalar_t__);
size_t efread(void *ptr, size_t size, size_t nitems, FILE *stream) {
  errno = 0;
  size_t nbytes = fread(ptr, size, nitems, stream);
  if (errno)
    die("fread error: %s", strerror(errno));
  return nbytes;
}


x86 assembly (clang, -O0):
<efread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2e91(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <fread@plt>
mov    %rax,-0x28(%rbp)
mov    0x2e6a(%rip),%rax
cmpq   $0x0,(%rax)
je     119d <efread+0x6d>
mov    0x2e59(%rip),%rax
mov    (%rax),%rdi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe68(%rip),%rdi
call   1040 <die@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efread>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%r14
movq   $0x0,(%r14)
call   1030 <fread@plt>
mov    %rax,%rbx
mov    (%r14),%rdi
test   %rdi,%rdi
je     1165 <efread+0x35>
call   1050 <strerror@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i64 0
@.str = [16 x i8] c"fread error: %s\00"
define i64 @efread(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
store i64 0, i64* @errno
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i32*, i32** %8
%14 = call i64 @fread(i8* %10, i64 %11, i64 %12, i32* %13)
store i64 %14, i64* %9
%15 = load i64, i64* @errno
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %4
%18 = load i64, i64* @errno
%19 = call i32 @strerror(i64 %18)
%20 = call i32 @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %17, %4
%22 = load i64, i64* %9
ret i64 %22
}

LLVM IR (-O2):
@errno = global i64 0
@.str = [16 x i8] c"fread error: %s\00"
define i64 @efread(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
store i64 0, i64* @errno
%5 = tail call i64 @fread(i8* %0, i64 %1, i64 %2, i32* %3)
%6 = load i64, i64* @errno
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = tail call i32 @strerror(i64 %6)
%10 = tail call i32 @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %4
ret i64 %5
}
/* Variables and functions */
scalar_t__ isgraph(int);
scalar_t__ isspace(int);
int isprint(int c) { return (isgraph(c) || isspace(c)); }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isgraph@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isprint+0x37>
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
push   %rbx
mov    %edi,%ebx
call   1040 <isgraph@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isprint+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isgraph(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isspace(i32 %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):
define i32 @isprint(i32 %0) {
%2 = tail call i64 @isgraph(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isspace(i32 %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
}
void uevent_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @uevent_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_list_basic();
int /*<<< orphan*/ test_list_find();
int /*<<< orphan*/ test_list_find_struct();
int /*<<< orphan*/ test_list_free_strings();
int /*<<< orphan*/ test_list_set_element();
void test_list(void) {
  test_list_basic();
  test_list_free_strings();
  test_list_set_element();
  test_list_find();
  test_list_find_struct();
}


x86 assembly (clang, -O0):
<test_list>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_list_basic@plt>
mov    $0x0,%al
call   1070 <test_list_free_strings@plt>
mov    $0x0,%al
call   1050 <test_list_set_element@plt>
mov    $0x0,%al
call   1040 <test_list_find@plt>
mov    $0x0,%al
call   1060 <test_list_find_struct@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_list>:
push   %rax
xor    %eax,%eax
call   1030 <test_list_basic@plt>
xor    %eax,%eax
call   1070 <test_list_free_strings@plt>
xor    %eax,%eax
call   1050 <test_list_set_element@plt>
xor    %eax,%eax
call   1040 <test_list_find@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <test_list_find_struct@plt>

LLVM IR (-O0):
define void @test_list() {
%1 = call i32 (...) @test_list_basic()
%2 = call i32 (...) @test_list_free_strings()
%3 = call i32 (...) @test_list_set_element()
%4 = call i32 (...) @test_list_find()
%5 = call i32 (...) @test_list_find_struct()
ret void
}

LLVM IR (-O2):
define void @test_list() {
%1 = tail call i32 (...) @test_list_basic()
%2 = tail call i32 (...) @test_list_free_strings()
%3 = tail call i32 (...) @test_list_set_element()
%4 = tail call i32 (...) @test_list_find()
%5 = tail call i32 (...) @test_list_find_struct()
ret void
}
/* Variables and functions */
scalar_t__ config_WITH_CARDREADER();
int config_READER_SECA(void) { return config_WITH_CARDREADER() ? 1 : 0; }


x86 assembly (clang, -O0):
<config_READER_SECA>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <config_WITH_CARDREADER@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_READER_SECA>:
push   %rax
xor    %eax,%eax
call   1030 <config_WITH_CARDREADER@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @config_READER_SECA() {
%1 = call i64 (...) @config_WITH_CARDREADER()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 1, i32 0
ret i32 %4
}

LLVM IR (-O2):
define i32 @config_READER_SECA() {
%1 = tail call i64 (...) @config_WITH_CARDREADER()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
const char *clamavc_libversion(void) {
  return ("libclamavc.la ("
          ""
          ") "
          "");
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"libclamavc.la () \00"
define i8* @clamavc_libversion() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"libclamavc.la () \00"
define i8* @clamavc_libversion() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void delay(int i) {
  while (i) {
    usleep(1000);
    i--;
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113d <delay+0x2d>
mov    $0x3e8,%edi
call   1030 <usleep@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <delay+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbx
test   %edi,%edi
je     112f <delay+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1030 <usleep@plt>
add    $0xffffffff,%ebx
jne    1120 <delay+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 @usleep(i32 1000)
%8 = load i32, i32* %2
%9 = add nsw i32 %8, -1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @usleep(i32 1000)
%6 = add nsw i32 %4, -1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
long long_swap(char *cbuf) {
  union {
    char cval[4];
    long lval;
  } l_union;
  l_union.cval[3] = cbuf[0];
  l_union.cval[2] = cbuf[1];
  l_union.cval[1] = cbuf[2];
  l_union.cval[0] = cbuf[3];
  return (l_union.lval);
}


x86 assembly (clang, -O0):
<long_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,-0xf(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i64 }
define i64 @long_swap(i8* %0) {
%2 = alloca i8*
%3 = alloca %union.anon
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = bitcast %union.anon* %3 to [4 x i8]*
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 3
store i8 %6, i8* %8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = bitcast %union.anon* %3 to [4 x i8]*
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 2
store i8 %11, i8* %13
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = bitcast %union.anon* %3 to [4 x i8]*
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 1
store i8 %16, i8* %18
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = bitcast %union.anon* %3 to [4 x i8]*
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %22, i64 0, i64 0
store i8 %21, i8* %23
%24 = bitcast %union.anon* %3 to i64*
%25 = load i64, i64* %24
ret i64 %25
}

LLVM IR (-O2):
define i64 @long_swap(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
%9 = zext i8 %2 to i64
%10 = shl nuw nsw i64 %9, 24
%11 = zext i8 %4 to i64
%12 = shl nuw nsw i64 %11, 16
%13 = or i64 %12, %10
%14 = zext i8 %6 to i64
%15 = shl nuw nsw i64 %14, 8
%16 = or i64 %13, %15
%17 = zext i8 %8 to i64
%18 = or i64 %16, %17
ret i64 %18
}
void write_pot_table5(char const *filename) {}


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

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

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

LLVM IR (-O2):
define void @write_pot_table5(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DEBUG;
int /*<<< orphan*/ exit(int);
int getpid();
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
int /*<<< orphan*/ system(char *);
void flapmud(int lol) {
  char buf[100];
  syslog(LOG_DEBUG, "Noes :(");
  snprintf(buf, sizeof buf, "/usr/bin/gdb --pid=%d", getpid());
  system(buf);
  exit(1);
}


x86 assembly (clang, -O0):
<flapmud>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xe92(%rip),%rsi
call   1060 <syslog@plt>
lea    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x78(%rbp),%rdi
mov    %eax,%ecx
mov    $0x64,%esi
lea    0xe74(%rip),%rdx
call   1050 <snprintf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <system@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<flapmud>:
push   %rbx
sub    $0x70,%rsp
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
lea    0xe9b(%rip),%rsi
call   1060 <syslog@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xe90(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %eax,%ecx
call   1050 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@LOG_DEBUG = global i32 0
@.str = [8 x i8] c"Noes :(\00"
@.str.1 = [22 x i8] c"/usr/bin/gdb --pid=%d\00"
define void @flapmud(i32 %0) {
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* @LOG_DEBUG
%5 = call i32 @syslog(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32 (...) @getpid()
%8 = call i32 @snprintf(i8* %6, i32 100, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call i32 @system(i8* %9)
%11 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@LOG_DEBUG = global i32 0
@.str = [8 x i8] c"Noes :(\00"
@.str.1 = [22 x i8] c"/usr/bin/gdb --pid=%d\00"
define void @flapmud(i32 %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @LOG_DEBUG
%5 = tail call i32 @syslog(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @getpid()
%7 = call i32 @snprintf(i8* %3, i32 100, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @system(i8* %3)
%9 = call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int ausb_libusb1_init();
int rsct_usbdev_init() { return ausb_libusb1_init(); }


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

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

LLVM IR (-O0):
define i32 @rsct_usbdev_init() {
%1 = call i32 (...) @ausb_libusb1_init()
ret i32 %1
}

LLVM IR (-O2):
define i32 @rsct_usbdev_init() {
%1 = tail call i32 (...) @ausb_libusb1_init()
ret i32 %1
}
void gtk_check_button_new_with_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_check_button_new_with_label() {
ret void
}
unsigned int f9(unsigned int x, int y) {
  return (x << y) | (x >> ((-y) & (8 * sizeof(unsigned int) - 1)));
}


x86 assembly (clang, -O0):
<f9>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1f,%rcx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f9>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @f9(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 0, %9
%11 = sext i32 %10 to i64
%12 = and i64 %11, 31
%13 = trunc i64 %12 to i32
%14 = lshr i32 %8, %13
%15 = or i32 %7, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f9(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 0, %1
%5 = and i32 %4, 31
%6 = lshr i32 %0, %5
%7 = or i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ tty_putc(char);
void putc(char c) { tty_putc(c); }


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <tty_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
jmp    1030 <tty_putc@plt>

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

LLVM IR (-O2):
define void @putc(i8 signext %0) {
%2 = tail call i32 @tty_putc(i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ dgesv_(int *, int *, double *, int *, int *, double *, int *,
                          int *);
int dgesv(int n, double *a, int *piv, double *b) {
  int info, one = 1;
  dgesv_(&n, &one, a, &n, piv, b, &n, &info);
  assert(info >= 0);
  return info;
}


x86 assembly (clang, -O0):
<dgesv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    -0x4(%rbp),%r10
lea    -0x28(%rbp),%rsi
lea    -0x24(%rbp),%rax
mov    %r10,%rdi
mov    %r10,%rcx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <dgesv_@plt>
cmpl   $0x0,-0x24(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgesv>:
sub    $0x18,%rsp
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rdx
mov    %edi,0x14(%rsp)
movl   $0x1,0x10(%rsp)
lea    0xc(%rsp),%rax
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%rsi
mov    %rcx,%rdi
push   %rax
push   %rcx
call   1040 <dgesv_@plt>
add    $0x10,%rsp
mov    0xc(%rsp),%edi
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
mov    0xc(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @dgesv(i32 %0, double* %1, i32* %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store i32* %2, i32** %7
store double* %3, double** %8
store i32 1, i32* %10
%11 = load double*, double** %6
%12 = load i32*, i32** %7
%13 = load double*, double** %8
%14 = call i32 @dgesv_(i32* %5, i32* %10, double* %11, i32* %5, i32* %12, double* %13, i32* %5, i32* %9)
%15 = load i32, i32* %9
%16 = icmp sge i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %9
ret i32 %19
}

LLVM IR (-O2):
define i32 @dgesv(i32 %0, double* %1, i32* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
%8 = bitcast i32* %6 to i8*
%9 = bitcast i32* %7 to i8*
store i32 1, i32* %7
%10 = call i32 @dgesv_(i32* %5, i32* %7, double* %1, i32* %5, i32* %2, double* %3, i32* %5, i32* %6)
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = lshr i32 %12, 31
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* %6
ret i32 %15
}