xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xd1() {
  Assert_real((isascii(209) == 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_isascii.c",
              1050, ("isascii should be 0 for 0xd1"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xd1>:
push   %rax
mov    $0xd1,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x41a,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xd1\00"
define void @t_isascii_0xd1() {
%1 = call i64 @isascii(i32 209)
%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 1050, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xd1\00"
define void @t_isascii_0xd1() {
%1 = tail call i64 @isascii(i32 209)
%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 1050, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main() {
  int a[12];
  int b;
  a[b != 1] = 12;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x44(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
cltq
movl   $0xc,-0x40(%rbp,%rax,4)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 1
%6 = zext i1 %5 to i32
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 %7
store i32 12, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear();
void cpustat_top_clear(void) { (void)clear(); }


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

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

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

LLVM IR (-O2):
define void @cpustat_top_clear() {
%1 = tail call i32 (...) @clear()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t a52_get_cmixlev(const uint8_t *p_a52) { return (p_a52[6] & 0x18) >> 3; }


x86 assembly (clang, -O0):
<a52_get_cmixlev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
and    $0x18,%eax
sar    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a52_get_cmixlev>:
mov    0x18(%rdi),%eax
shr    $0x3,%eax
and    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @a52_get_cmixlev(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
%4 = lshr i32 %3, 3
%5 = and i32 %4, 3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ PathSummaryHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void PathSummaryLogging() { UAVObjLogging(PathSummaryHandle()); }


x86 assembly (clang, -O0):
<PathSummaryLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <PathSummaryHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PathSummaryLogging>:
push   %rax
xor    %eax,%eax
call   1040 <PathSummaryHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @PathSummaryLogging() {
%1 = call i32 (...) @PathSummaryHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PathSummaryLogging() {
%1 = tail call i32 (...) @PathSummaryHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Type definitions */
typedef int dev_t;

/* Variables and functions */
dev_t makedev(int maj, int min) { return ((maj & 0xff) << 8 | (min & 0xff)); }


x86 assembly (clang, -O0):
<makedev>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makedev>:
shl    $0x8,%edi
movzwl %di,%ecx
movzbl %sil,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @makedev(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 = and i32 %5, 255
%7 = shl i32 %6, 8
%8 = load i32, i32* %4
%9 = and i32 %8, 255
%10 = or i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @makedev(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = and i32 %3, 65280
%5 = and i32 %1, 255
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  puts("C Rocks!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"C Rocks!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"C Rocks!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void quit(const char message[]) {
  fprintf(stderr, "%s", message);
  exit(1);
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @quit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int open(char *, int, int /*<<< orphan*/);
int lisp_open(char *path, int flags, mode_t mode) {
  return open(path, flags, mode);
}


x86 assembly (clang, -O0):
<lisp_open>:
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
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lisp_open>:
jmp    1030 <open@plt>

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

LLVM IR (-O2):
define i32 @lisp_open(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @open(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
int Sub(int a, int b) { return a - b; }


x86 assembly (clang, -O0):
<Sub>:
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):
<Sub>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @Sub(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 @Sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char const *);
int main(int argc, const char *argv[]) {
  for (int i = 0; i < 5; i++) {
    printf(argv[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    1156 <main+0x46>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%rdi
call   1030 <printf@plt>
mov    0x10(%rbx),%rdi
call   1030 <printf@plt>
mov    0x18(%rbx),%rdi
call   1030 <printf@plt>
mov    0x20(%rbx),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* dereferenceable(1) %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* dereferenceable(1) %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 3
%12 = load i8*, i8** %11
%13 = tail call i32 @printf(i8* dereferenceable(1) %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 4
%15 = load i8*, i8** %14
%16 = tail call i32 @printf(i8* dereferenceable(1) %15)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_string(char *string) { printf("%s", string); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print_string(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void nfsd_fault_inject_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @nfsd_fault_inject_cleanup() {
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR61_get(void) { return U_WMRCORENONE_get("U_WMR61"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR61\00"
define i32 @U_WMR61_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR61\00"
define i32 @U_WMR61_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int fun1383() { return 1383; }


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

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

LLVM IR (-O0):
define i32 @fun1383() {
ret i32 1383
}

LLVM IR (-O2):
define i32 @fun1383() {
ret i32 1383
}
struct _struct_decl *nothing2(int a, char *b, long c) {
  return (struct _struct_decl *)0;
}


x86 assembly (clang, -O0):
<nothing2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._struct_decl = type opaque
define %struct._struct_decl* @nothing2(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret %struct._struct_decl* null
}

LLVM IR (-O2):
%struct._struct_decl = type opaque
define noalias %struct._struct_decl* @nothing2(i32 %0, i8* nocapture readnone %1, i64 %2) {
ret %struct._struct_decl* null
}
/* Type definitions */
struct mdoc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mdoc_alloc1(struct mdoc *);
int /*<<< orphan*/ mdoc_free1(struct mdoc *);
void mdoc_reset(struct mdoc *mdoc) {
  mdoc_free1(mdoc);
  mdoc_alloc1(mdoc);
}


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

x86 assembly (clang, -O2):
<mdoc_reset>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mdoc_free1@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <mdoc_alloc1@plt>

LLVM IR (-O0):
%struct.mdoc = type { i32 }
define void @mdoc_reset(%struct.mdoc* %0) {
%2 = alloca %struct.mdoc*
store %struct.mdoc* %0, %struct.mdoc** %2
%3 = load %struct.mdoc*, %struct.mdoc** %2
%4 = call i32 @mdoc_free1(%struct.mdoc* %3)
%5 = load %struct.mdoc*, %struct.mdoc** %2
%6 = call i32 @mdoc_alloc1(%struct.mdoc* %5)
ret void
}

LLVM IR (-O2):
%struct.mdoc = type { i32 }
define void @mdoc_reset(%struct.mdoc* %0) {
%2 = tail call i32 @mdoc_free1(%struct.mdoc* %0)
%3 = tail call i32 @mdoc_alloc1(%struct.mdoc* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *const, unsigned int);
void ft_putstr(const char *const str) {
  unsigned int len;
  len = 0;
  while (str[len] != '\0')
    len++;
  write(1, str, len);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1145 <ft_putstr+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
mov    %rdi,%rsi
mov    $0xffffffff,%edx
nopl   0x0(%rax,%rax,1)
add    $0x1,%edx
cmpb   $0x0,(%rsi,%rdx,1)
jne    1120 <ft_putstr+0x10>
mov    $0x1,%edi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
%10 = tail call i32 @write(i32 1, i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heapsort(double *, int);
void sort(double array[], int array_size) { heapsort(array, array_size); }


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

x86 assembly (clang, -O2):
<sort>:
jmp    1030 <heapsort@plt>

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

LLVM IR (-O2):
define void @sort(double* %0, i32 %1) {
%3 = tail call i32 @heapsort(double* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void signal_handle(int sig_num) {
  printf("signal sig number %d\n", sig_num);
  return;
}


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

x86 assembly (clang, -O2):
<signal_handle>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"signal sig number %d\0A\00"
define void @signal_handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"signal sig number %d\0A\00"
define void @signal_handle(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int bmk_cpu_sched_create(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<bmk_cpu_sched_create>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <bmk_cpu_sched_create+0x9>
jmp    1109 <bmk_cpu_sched_create+0x9>

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

LLVM IR (-O0):
define i32 @bmk_cpu_sched_create() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define i32 @bmk_cpu_sched_create() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ to_gps(unsigned int, int);
void ch_code(int ch, long freq) {
  int freq_hi, freq_lo;
  unsigned int add;
  freq_hi = (int)(freq >> 16);
  freq_lo = (int)(freq & 0xffff);
  add = (ch << 3) + 5;
  to_gps(add, freq_hi);
  add++;
  to_gps(add, freq_lo);
}


x86 assembly (clang, -O0):
<ch_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sar    $0x10,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
add    $0x5,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <to_gps@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <to_gps@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_code>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
movzwl %si,%ebp
shr    $0x10,%rsi
lea    0x5(,%rbx,8),%edi
call   1030 <to_gps@plt>
lea    0x6(,%rbx,8),%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <to_gps@plt>

LLVM IR (-O0):
define void @ch_code(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
%8 = load i64, i64* %4
%9 = ashr i64 %8, 16
%10 = trunc i64 %9 to i32
store i32 %10, i32* %5
%11 = load i64, i64* %4
%12 = and i64 %11, 65535
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %3
%15 = shl i32 %14, 3
%16 = add nsw i32 %15, 5
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = load i32, i32* %5
%19 = call i32 @to_gps(i32 %17, i32 %18)
%20 = load i32, i32* %7
%21 = add i32 %20, 1
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = call i32 @to_gps(i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
define void @ch_code(i32 %0, i64 %1) {
%3 = lshr i64 %1, 16
%4 = trunc i64 %3 to i32
%5 = trunc i64 %1 to i32
%6 = and i32 %5, 65535
%7 = shl i32 %0, 3
%8 = or i32 %7, 5
%9 = tail call i32 @to_gps(i32 %8, i32 %4)
%10 = or i32 %7, 6
%11 = tail call i32 @to_gps(i32 %10, i32 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int SQLITE_OK;
int /*<<< orphan*/ printfHelper(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
int wrap_FullPathname(sqlite3_vfs *pVfs, const char *zPath, int nPathOut,
                      char *zPathOut) {
  strcpy(zPathOut, zPath);
  printfHelper("wrap_FullPathname %s\n", zPathOut);
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<wrap_FullPathname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <printfHelper@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_FullPathname>:
push   %rbx
mov    %rcx,%rbx
mov    %rcx,%rdi
call   1030 <strcpy@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printfHelper@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"wrap_FullPathname %s\0A\00"
@SQLITE_OK = global i32 0
define i32 @wrap_FullPathname(i32* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = load i8*, i8** %6
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %8
%13 = call i32 @printfHelper(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @SQLITE_OK
ret i32 %14
}

LLVM IR (-O2):
@.str = [22 x i8] c"wrap_FullPathname %s\0A\00"
@SQLITE_OK = global i32 0
define i32 @wrap_FullPathname(i32* nocapture readnone %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @strcpy(i8* %3, i8* %1)
%6 = tail call i32 @printfHelper(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = load i32, i32* @SQLITE_OK
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ spi_emit_buf(char *, int);
void spi_emit_fasync(int n) {
  int i;
  for (i = 0; i < n; i++) {
    spi_emit_buf("\x5", 1);
  }
}


x86 assembly (clang, -O0):
<spi_emit_fasync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114d <spi_emit_fasync+0x3d>
lea    0xecb(%rip),%rdi
mov    $0x1,%esi
call   1030 <spi_emit_buf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <spi_emit_fasync+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_emit_fasync>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1142 <spi_emit_fasync+0x32>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <spi_emit_buf@plt>
add    $0xffffffff,%ebx
jne    1130 <spi_emit_fasync+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\05\00"
define void @spi_emit_fasync(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @spi_emit_buf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int pinconf_map_to_setting(struct pinctrl_map const *map,
                           struct pinctrl_setting *setting) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.pinctrl_map = type opaque
%struct.pinctrl_setting = type opaque
define i32 @pinconf_map_to_setting(%struct.pinctrl_map* %0, %struct.pinctrl_setting* %1) {
%3 = alloca %struct.pinctrl_map*
%4 = alloca %struct.pinctrl_setting*
store %struct.pinctrl_map* %0, %struct.pinctrl_map** %3
store %struct.pinctrl_setting* %1, %struct.pinctrl_setting** %4
ret i32 0
}

LLVM IR (-O2):
%struct.pinctrl_map = type opaque
%struct.pinctrl_setting = type opaque
define i32 @pinconf_map_to_setting(%struct.pinctrl_map* nocapture readnone %0, %struct.pinctrl_setting* nocapture readnone %1) {
ret i32 0
}
float __attribute__((no)) float_max1(float a, float b) {
  return ((a) > (b) ? (a) : (b));
}


x86 assembly (clang, -O0):
<float_max1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <float_max1+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <float_max1+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_max1>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @float_max1(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 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @float_max1(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void XResizeWindow() {}


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

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

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

LLVM IR (-O2):
define void @XResizeWindow() {
ret void
}
float __attribute__((sseregparm, no)) ssef(float f) { return f; }


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

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

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

LLVM IR (-O2):
define float @ssef(float returned %0) {
ret float %0
}
void test_squoted_escaping_doubles_single_quote(void) {
  char *const escaped = escape_for_squotes("0a'b'c'd1", 0);
  do {
    seatest_assert_string_equal("0a''b''c''d1", escaped, __FUNCTION__, 11);
  } while (0);
  free(escaped);
}


x86 assembly (clang, -O0):
<test_squoted_escaping_doubles_single_quote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <escape_for_squotes@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
lea    0xeb7(%rip),%rdx
mov    $0xb,%ecx
mov    $0x0,%al
call   1040 <seatest_assert_string_equal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_squoted_escaping_doubles_single_quote>:
push   %rbx
lea    0xec8(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <escape_for_squotes@plt>
movslq %eax,%rbx
lea    0xebf(%rip),%rdi
lea    0xec5(%rip),%rdx
mov    %rbx,%rsi
mov    $0xb,%ecx
xor    %eax,%eax
call   1040 <seatest_assert_string_equal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"0a'b'c'd1\00"
@.str.1 = [13 x i8] c"0a''b''c''d1\00"
@__FUNCTION__.test_squoted_escaping_doubles_single_quote = [43 x i8] c"test_squoted_escaping_doubles_single_quote\00"
define void @test_squoted_escaping_doubles_single_quote() {
%1 = alloca i8*
%2 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @escape_for_squotes to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %1
br label %5
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @__FUNCTION__.test_squoted_escaping_doubles_single_quote, i64 0, i64 0), i32 11)
br label %8
8: ; preds = %5
%9 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"0a'b'c'd1\00"
@.str.1 = [13 x i8] c"0a''b''c''d1\00"
@__FUNCTION__.test_squoted_escaping_doubles_single_quote = [43 x i8] c"test_squoted_escaping_doubles_single_quote\00"
define void @test_squoted_escaping_doubles_single_quote() {
%1 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @escape_for_squotes to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @__FUNCTION__.test_squoted_escaping_doubles_single_quote, i64 0, i64 0), i32 11)
tail call void @free(i8* %3)
ret void
}
int test_imm_3Fuint16_reg(unsigned short val) {
  return ((val) & (0x3F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Fuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x3f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_3Fuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 63
%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_3Fuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 63
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void aes_encrypt_deinit(void *ctx) {
  memset(ctx, 0, (4 * 44));
  free(ctx);
}


x86 assembly (clang, -O0):
<aes_encrypt_deinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0xb0,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_encrypt_deinit>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0xb0,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @aes_encrypt_deinit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memset(i8* %3, i32 0, i32 176)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @aes_encrypt_deinit(i8* %0) {
%2 = tail call i32 @memset(i8* %0, i32 0, i32 176)
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *A;
label_10:
  A = "Hello World!";
label_20:
  printf("%s\n", A);
label_30:
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
br label %3
3: ; preds = %0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
br label %4
4: ; preds = %3
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int cairo_code_draw_envSaturationLabel_get_height() { return 97; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_envSaturationLabel_get_height() {
ret i32 97
}

LLVM IR (-O2):
define i32 @cairo_code_draw_envSaturationLabel_get_height() {
ret i32 97
}
/* Variables and functions */
int /*<<< orphan*/ pelgam_(double *, double *);
void cpelgam(double *xmom, double *para) { pelgam_(xmom, para); }


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

x86 assembly (clang, -O2):
<cpelgam>:
jmp    1030 <pelgam_@plt>

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

LLVM IR (-O2):
define void @cpelgam(double* %0, double* %1) {
%3 = tail call i32 @pelgam_(double* %0, double* %1)
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t I2CSlaveIntStatusEx(uint32_t ui32Base, bool bMasked) {
  ;
  if (bMasked) {
    return ((*((volatile unsigned long *)(ui32Base + 0x00000814))));
  } else {
    return ((*((volatile unsigned long *)(ui32Base + 0x00000810))));
  }
}


x86 assembly (clang, -O0):
<I2CSlaveIntStatusEx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1129 <I2CSlaveIntStatusEx+0x29>
mov    -0x10(%rbp),%rax
mov    0x814(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1138 <I2CSlaveIntStatusEx+0x38>
mov    -0x10(%rbp),%rax
mov    0x810(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntStatusEx>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    -0x8(%rsp),%rcx
mov    0x810(%rcx,%rax,4),%rax
ret

LLVM IR (-O0):
define i64 @I2CSlaveIntStatusEx(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store volatile i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load volatile i64, i64* %4
%10 = add i64 %9, 2068
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %3
br label %18
13: ; preds = %2
%14 = load volatile i64, i64* %4
%15 = add i64 %14, 2064
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
store i64 %17, i64* %3
br label %18
18: ; preds = %13, %8
%19 = load i64, i64* %3
ret i64 %19
}

LLVM IR (-O2):
define i64 @I2CSlaveIntStatusEx(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = icmp eq i32 %1, 0
%5 = load volatile i64, i64* %3
%6 = select i1 %4, i64 2064, i64 2068
%7 = add i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
int stat(char const *, struct stat *);
int file_exists(const char *path) {
  struct stat sb;
  if (stat(path, &sb) == -1 && errno == ENOENT) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    1158 <file_exists+0x48>
mov    0x2ea7(%rip),%rax
mov    (%rax),%rax
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
jne    1158 <file_exists+0x48>
movl   $0x0,-0x4(%rbp)
jmp    115f <file_exists+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    1136 <file_exists+0x26>
mov    0x2ebb(%rip),%rax
mov    (%rax),%rcx
mov    0x2ea1(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
je     113b <file_exists+0x2b>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i64 0
@ENOENT = global i64 0
define i32 @file_exists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* @errno
%8 = load i64, i64* @ENOENT
%9 = icmp eq i64 %7, %8
br i1 %9, label %11, label %10
10: ; preds = %6, %1
br label %11
11: ; preds = %6, %10
%12 = phi i32 [ 1, %10 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  int i = 0;
  char ch;
  for (i = 0; i < 256; i++) {
    printf("%c ", ch);
    ch = (char)((int)ch + 1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jge    1162 <main+0x52>
lea    0xebf(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <printf@plt>
movsbl -0x9(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
/* Type definitions */
struct bencode {
  int dummy;
};

/* Variables and functions */
struct bencode *ben_list_pop(struct bencode *, size_t);
struct bencode *ben_list_pop_current(struct bencode *list, size_t *pos) {
  struct bencode *value = ben_list_pop(list, *pos);
  (*pos)--;
  return value;
}


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

x86 assembly (clang, -O2):
<ben_list_pop_current>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rsi
call   1030 <ben_list_pop@plt>
addq   $0xffffffffffffffff,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.bencode = type { i32 }
define %struct.bencode* @ben_list_pop_current(%struct.bencode* %0, i64* %1) {
%3 = alloca %struct.bencode*
%4 = alloca i64*
%5 = alloca %struct.bencode*
store %struct.bencode* %0, %struct.bencode** %3
store i64* %1, i64** %4
%6 = load %struct.bencode*, %struct.bencode** %3
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = call %struct.bencode* @ben_list_pop(%struct.bencode* %6, i64 %8)
store %struct.bencode* %9, %struct.bencode** %5
%10 = load i64*, i64** %4
%11 = load i64, i64* %10
%12 = add i64 %11, -1
store i64 %12, i64* %10
%13 = load %struct.bencode*, %struct.bencode** %5
ret %struct.bencode* %13
}

LLVM IR (-O2):
%struct.bencode = type { i32 }
define %struct.bencode* @ben_list_pop_current(%struct.bencode* %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = tail call %struct.bencode* @ben_list_pop(%struct.bencode* %0, i64 %3)
%5 = load i64, i64* %1
%6 = add i64 %5, -1
store i64 %6, i64* %1
ret %struct.bencode* %4
}
double f3(void) {
  typedef double b32;
#pragma STDC FLOAT_CONST_DECIMAL64 ON
  b32 b = 0.5;
  return b;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f3() {
%1 = alloca double
store double 5.000000e-01, double* %1
%2 = load double, double* %1
ret double %2
}

LLVM IR (-O2):
define double @f3() {
ret double 5.000000e-01
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fuckme();
void bar(int foo) {
  switch (foo) {
  case 0:
    abort();
    break;
  case 1:
    fuckme();
    break;
  default:
    abort();
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     114f <bar+0x2f>
jmp    113e <bar+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1156 <bar+0x36>
jmp    1162 <bar+0x42>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1040 <fuckme@plt>
jmp    1169 <bar+0x49>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
cmp    $0x1,%edi
jne    112e <bar+0xe>
xor    %eax,%eax
pop    %rcx
jmp    1040 <fuckme@plt>
test   %edi,%edi
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @bar(i32 %0) {
switch i32 %0, label %6 [
i32 0, label %2
i32 1, label %4
]
2: ; preds = %1
%3 = tail call i32 (...) @abort()
unreachable
4: ; preds = %1
%5 = tail call i32 (...) @fuckme()
ret void
6: ; preds = %1
%7 = tail call i32 (...) @abort()
unreachable
}