xunge/DecIR huggingface dataset:
/* Type definitions */
struct scsi_cmnd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ata_scsi_badcmd(struct scsi_cmnd *,
                                   void (*)(struct scsi_cmnd *), int, int);
void ata_bad_scsiop(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
  ata_scsi_badcmd(cmd, done, 0x20, 0x00);
}


x86 assembly (clang, -O0):
<ata_bad_scsiop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x20,%edx
xor    %ecx,%ecx
call   1030 <ata_scsi_badcmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ata_bad_scsiop>:
mov    $0x20,%edx
xor    %ecx,%ecx
jmp    1030 <ata_scsi_badcmd@plt>

LLVM IR (-O0):
%struct.scsi_cmnd = type { i32 }
define void @ata_bad_scsiop(%struct.scsi_cmnd* %0, void (%struct.scsi_cmnd*)* %1) {
%3 = alloca %struct.scsi_cmnd*
%4 = alloca void (%struct.scsi_cmnd*)*
store %struct.scsi_cmnd* %0, %struct.scsi_cmnd** %3
store void (%struct.scsi_cmnd*)* %1, void (%struct.scsi_cmnd*)** %4
%5 = load %struct.scsi_cmnd*, %struct.scsi_cmnd** %3
%6 = load void (%struct.scsi_cmnd*)*, void (%struct.scsi_cmnd*)** %4
%7 = call i32 @ata_scsi_badcmd(%struct.scsi_cmnd* %5, void (%struct.scsi_cmnd*)* %6, i32 32, i32 0)
ret void
}

LLVM IR (-O2):
%struct.scsi_cmnd = type { i32 }
define void @ata_bad_scsiop(%struct.scsi_cmnd* %0, void (%struct.scsi_cmnd*)* %1) {
%3 = tail call i32 @ata_scsi_badcmd(%struct.scsi_cmnd* %0, void (%struct.scsi_cmnd*)* %1, i32 32, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
double *dcalloc(int x) {
  double *ptr;
  if ((ptr = (double *)calloc(x, sizeof(*ptr))) == NULL) {
    fprintf(stderr, "Cannot Allocate Memory\n");
    exit(1);
  }
  return (ptr);
}


x86 assembly (clang, -O0):
<dcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1175 <dcalloc+0x45>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xe9a(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcalloc>:
push   %rax
mov    $0x8,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1142 <dcalloc+0x12>
pop    %rcx
ret
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Cannot Allocate Memory\0A\00"
define double* @dcalloc(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = icmp eq double* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load double*, double** %3
ret double* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Cannot Allocate Memory\0A\00"
define double* @dcalloc(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to double*
ret double* %9
}
/* Variables and functions */
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ doupdate();
int /*<<< orphan*/ endwin();
void tx_refresh_screen(void) {
  endwin();
  doupdate();
  curs_set(0);
}


x86 assembly (clang, -O0):
<tx_refresh_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <endwin@plt>
mov    $0x0,%al
call   1040 <doupdate@plt>
xor    %edi,%edi
call   1050 <curs_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_refresh_screen>:
push   %rax
xor    %eax,%eax
call   1030 <endwin@plt>
xor    %eax,%eax
call   1040 <doupdate@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <curs_set@plt>

LLVM IR (-O0):
define void @tx_refresh_screen() {
%1 = call i32 (...) @endwin()
%2 = call i32 (...) @doupdate()
%3 = call i32 @curs_set(i32 0)
ret void
}

LLVM IR (-O2):
define void @tx_refresh_screen() {
%1 = tail call i32 (...) @endwin()
%2 = tail call i32 (...) @doupdate()
%3 = tail call i32 @curs_set(i32 0)
ret void
}
/* Variables and functions */
int make_daemon();
int main(void) { return make_daemon(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @make_daemon()
ret i32 %1
}
int jit_compile(struct jit_code *u1, struct decision_tree *u2) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.jit_code = type opaque
%struct.decision_tree = type opaque
define i32 @jit_compile(%struct.jit_code* nocapture readnone %0, %struct.decision_tree* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ dibujar(char *, int, int);
int getRandomNum(int);
void getFlip() {
  int randomNum = getRandomNum(3);
  dibujar("flip.png", 80 * randomNum, 324);
}


x86 assembly (clang, -O0):
<getFlip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
call   1030 <getRandomNum@plt>
mov    %eax,-0x4(%rbp)
imul   $0x50,-0x4(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x144,%edx
call   1040 <dibujar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFlip>:
push   %rax
mov    $0x3,%edi
call   1030 <getRandomNum@plt>
shl    $0x4,%eax
lea    (%rax,%rax,4),%esi
lea    0xec8(%rip),%rdi
mov    $0x144,%edx
pop    %rax
jmp    1040 <dibujar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"flip.png\00"
define void @getFlip() {
%1 = alloca i32
%2 = call i32 @getRandomNum(i32 3)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = mul nsw i32 80, %3
%5 = call i32 @dibujar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4, i32 324)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"flip.png\00"
define void @getFlip() {
%1 = tail call i32 @getRandomNum(i32 3)
%2 = mul nsw i32 %1, 80
%3 = tail call i32 @dibujar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i32 324)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clearScreen();
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ updateScreen();
void resizeCallback(int width, int height) {
  glViewport(0, 0, width, height);
  clearScreen();
  updateScreen();
  clearScreen();
}


x86 assembly (clang, -O0):
<resizeCallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1050 <glViewport@plt>
mov    $0x0,%al
call   1040 <clearScreen@plt>
mov    $0x0,%al
call   1030 <updateScreen@plt>
mov    $0x0,%al
call   1040 <clearScreen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resizeCallback>:
push   %rax
mov    %esi,%ecx
mov    %edi,%edx
xor    %edi,%edi
xor    %esi,%esi
call   1050 <glViewport@plt>
xor    %eax,%eax
call   1040 <clearScreen@plt>
xor    %eax,%eax
call   1030 <updateScreen@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <clearScreen@plt>

LLVM IR (-O0):
define void @resizeCallback(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 = call i32 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = call i32 (...) @clearScreen()
%9 = call i32 (...) @updateScreen()
%10 = call i32 (...) @clearScreen()
ret void
}

LLVM IR (-O2):
define void @resizeCallback(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = tail call i32 (...) @clearScreen()
%5 = tail call i32 (...) @updateScreen()
%6 = tail call i32 (...) @clearScreen()
ret void
}
void TC0_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @TC0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int hasPathName(char pathname[64]) {
  if (strcmp(pathname, "") == 0)
    return 0;
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @hasPathName(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @hasPathName(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void Common_Exit() {}


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

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

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

LLVM IR (-O2):
define void @Common_Exit() {
ret void
}
void band_positive_constant_Bad() {
  char a[2];
  int x = 6 & 2;
  a[x] = 0;
}


x86 assembly (clang, -O0):
<band_positive_constant_Bad>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2,-0x8(%rbp)
movslq -0x8(%rbp),%rax
movb   $0x0,-0x2(%rbp,%rax,1)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @band_positive_constant_Bad() {
%1 = alloca [2 x i8]
%2 = alloca i32
store i32 2, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 %4
store i8 0, i8* %5
ret void
}

LLVM IR (-O2):
define void @band_positive_constant_Bad() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int a = 5;
  printf("Hello world!\n");
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int do_271() { return 271; }


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

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

LLVM IR (-O0):
define i32 @do_271() {
ret i32 271
}

LLVM IR (-O2):
define i32 @do_271() {
ret i32 271
}
int test39(int x) {
  int y;
  int z = x + y;
  return z;
}


x86 assembly (clang, -O0):
<test39>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test39(i32 %0) {
ret i32 undef
}
long C_pair(long **ptr, long car, long cdr) {
  long *p = *ptr, *p0 = p;
  *(p++) = (0x0300000000000000L) | (3 - 1);
  *(p++) = car;
  *(p++) = cdr;
  *ptr = p;
  return (long)p0;
}


x86 assembly (clang, -O0):
<C_pair>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movabs $0x300000000000002,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_pair>:
mov    (%rdi),%rax
movabs $0x300000000000002,%rcx
mov    %rcx,(%rax)
mov    %rsi,0x8(%rax)
lea    0x18(%rax),%rcx
mov    %rdx,0x10(%rax)
mov    %rcx,(%rdi)
ret

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

LLVM IR (-O2):
define i64 @C_pair(i64** nocapture %0, i64 %1, i64 %2) {
%4 = load i64*, i64** %0
%5 = getelementptr inbounds i64, i64* %4, i64 1
store i64 216172782113783810, i64* %4
%6 = getelementptr inbounds i64, i64* %4, i64 2
store i64 %1, i64* %5
%7 = getelementptr inbounds i64, i64* %4, i64 3
store i64 %2, i64* %6
store i64* %7, i64** %0
%8 = ptrtoint i64* %4 to i64
ret i64 %8
}
double ceil(double num) {
  if (num > 0.0) {
    if (num - (double)(int)num != 0.0)
      return (double)((int)num + 1);
  } else
    return (double)(int)num;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <ceil+0x60>
movsd  -0x10(%rbp),%xmm0
cvttsd2si -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1145 <ceil+0x45>
jp     1145 <ceil+0x45>
jmp    115b <ceil+0x5b>
cvttsd2si -0x10(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116e <ceil+0x6e>
jmp    116e <ceil+0x6e>
cvttsd2si -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
jbe    1130 <ceil+0x30>
movapd %xmm0,%xmm3
subsd  %xmm1,%xmm3
ucomisd %xmm2,%xmm3
jne    1122 <ceil+0x22>
jnp    1135 <ceil+0x35>
cvttsd2si %xmm0,%eax
add    $0x1,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm1,%xmm0
ret
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = load double, double* %3
%8 = load double, double* %3
%9 = fptosi double %8 to i32
%10 = sitofp i32 %9 to double
%11 = fsub double %7, %10
%12 = fcmp une double %11, 0.000000e+00
br i1 %12, label %13, label %18
13: ; preds = %6
%14 = load double, double* %3
%15 = fptosi double %14 to i32
%16 = add nsw i32 %15, 1
%17 = sitofp i32 %16 to double
store double %17, double* %2
br label %23
18: ; preds = %6
br label %23
19: ; preds = %1
%20 = load double, double* %3
%21 = fptosi double %20 to i32
%22 = sitofp i32 %21 to double
store double %22, double* %2
br label %23
23: ; preds = %13, %19, %18
%24 = load double, double* %2
ret double %24
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fptosi double %0 to i32
%4 = sitofp i32 %3 to double
br i1 %2, label %5, label %11
5: ; preds = %1
%6 = fsub double %0, %4
%7 = fcmp une double %6, 0.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = add nsw i32 %3, 1
%10 = sitofp i32 %9 to double
br label %11
11: ; preds = %1, %5, %8
%12 = phi double [ %10, %8 ], [ undef, %5 ], [ %4, %1 ]
ret double %12
}
double aic(double logl, long k, long n) {
  if (k > 1)
    k++;
  return -2 * logl + 2 * k + (double)(2 * k * (k + 1)) / (double)(n - k - 1);
}


x86 assembly (clang, -O0):
<aic>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x1,-0x10(%rbp)
jle    1128 <aic+0x28>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
cvtsi2sd %rax,%xmm0
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
cvtsi2sd %rax,%xmm1
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
sub    $0x1,%rax
cvtsi2sd %rax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<aic>:
xor    %eax,%eax
cmp    $0x2,%rdi
setge  %al
lea    (%rax,%rdi,1),%rcx
lea    (%rcx,%rcx,1),%rdx
cvtsi2sd %rdx,%xmm1
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm1
add    %rdi,%rax
add    $0x1,%rax
imul   %rdx,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
not    %rcx
add    %rsi,%rcx
cvtsi2sd %rcx,%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @aic(double %0, i64 %1, i64 %2) {
%4 = alloca double
%5 = alloca i64
%6 = alloca i64
store double %0, double* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = icmp sgt i64 %7, 1
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i64, i64* %5
%11 = add nsw i64 %10, 1
store i64 %11, i64* %5
br label %12
12: ; preds = %9, %3
%13 = load double, double* %4
%14 = load i64, i64* %5
%15 = mul nsw i64 2, %14
%16 = sitofp i64 %15 to double
%17 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %13, double %16)
%18 = load i64, i64* %5
%19 = mul nsw i64 2, %18
%20 = load i64, i64* %5
%21 = add nsw i64 %20, 1
%22 = mul nsw i64 %19, %21
%23 = sitofp i64 %22 to double
%24 = load i64, i64* %6
%25 = load i64, i64* %5
%26 = sub nsw i64 %24, %25
%27 = sub nsw i64 %26, 1
%28 = sitofp i64 %27 to double
%29 = fdiv double %23, %28
%30 = fadd double %17, %29
ret double %30
}

LLVM IR (-O2):
define double @aic(double %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, 1
%5 = zext i1 %4 to i64
%6 = add nsw i64 %5, %1
%7 = shl nsw i64 %6, 1
%8 = sitofp i64 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %0, double -2.000000e+00, double %8)
%10 = add nsw i64 %6, 1
%11 = mul nsw i64 %7, %10
%12 = sitofp i64 %11 to double
%13 = xor i64 %6, -1
%14 = add i64 %13, %2
%15 = sitofp i64 %14 to double
%16 = fdiv double %12, %15
%17 = fadd double %9, %16
ret double %17
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ j64_eobj_encode(char *, int);
int /*<<< orphan*/ memset(char *, char, int);
scalar_t__ strcmp(char *, char *);
int test_eobj_encode_1(void) {
  char buf[1 + 1];
  memset(buf, '\0', sizeof(buf));
  j64_eobj_encode(buf, 1);
  return strcmp(buf, "{") == 0;
}


x86 assembly (clang, -O0):
<test_eobj_encode_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x2(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1040 <memset@plt>
lea    -0x2(%rbp),%rdi
mov    $0x1,%esi
call   1030 <j64_eobj_encode@plt>
lea    -0x2(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_eobj_encode_1>:
push   %rbx
sub    $0x10,%rsp
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <j64_eobj_encode@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"{\00"
define i32 @test_eobj_encode_1() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 2)
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%5 = call i32 @j64_eobj_encode(i8* %4, i32 1)
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [2 x i8] c"{\00"
define i32 @test_eobj_encode_1() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 2)
%4 = call i32 @j64_eobj_encode(i8* %2, i32 1)
%5 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void void_funct(void) { return; }


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

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

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

LLVM IR (-O2):
define void @void_funct() {
ret void
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONUniStatValueL(const struct feature_pair *pair,
                            const struct CovariateAnalysis *covan, FILE *fp) {}


x86 assembly (clang, -O0):
<_emitJSONUniStatValueL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniStatValueL(%struct.feature_pair* %0, %struct.CovariateAnalysis* %1, i32* %2) {
%4 = alloca %struct.feature_pair*
%5 = alloca %struct.CovariateAnalysis*
%6 = alloca i32*
store %struct.feature_pair* %0, %struct.feature_pair** %4
store %struct.CovariateAnalysis* %1, %struct.CovariateAnalysis** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniStatValueL(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}
void sigtstp_handler(int sig) { return; }


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

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

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

LLVM IR (-O2):
define void @sigtstp_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_add(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_imm8sp_op();
void t16_add_sp8() { arm_arith_add(t16_data_imm8sp_op(), 0); }


x86 assembly (clang, -O0):
<t16_add_sp8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <t16_data_imm8sp_op@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <arm_arith_add@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_add_sp8>:
push   %rax
xor    %eax,%eax
call   1040 <t16_data_imm8sp_op@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <arm_arith_add@plt>

LLVM IR (-O0):
define void @t16_add_sp8() {
%1 = call i32 (...) @t16_data_imm8sp_op()
%2 = call i32 @arm_arith_add(i32 %1, i32 0)
ret void
}

LLVM IR (-O2):
define void @t16_add_sp8() {
%1 = tail call i32 (...) @t16_data_imm8sp_op()
%2 = tail call i32 @arm_arith_add(i32 %1, i32 0)
ret void
}
void omap_vram_reserve_sdram_memblock(void) {}


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

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

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

LLVM IR (-O2):
define void @omap_vram_reserve_sdram_memblock() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  char **we_wordv;
};
typedef TYPE_1__ wordexp_t;

/* Variables and functions */
int /*<<< orphan*/ wordexp(char *, TYPE_1__ *, int /*<<< orphan*/);
char **expand_newargv(char *string) {
  wordexp_t p;
  wordexp(string, &p, 0);
  return p.we_wordv;
}


x86 assembly (clang, -O0):
<expand_newargv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <wordexp@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand_newargv>:
push   %rax
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <wordexp@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8** }
define i8** @expand_newargv(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.TYPE_3__
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @wordexp(i8* %4, %struct.TYPE_3__* %3, i32 0)
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%7 = load i8**, i8*** %6
ret i8** %7
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8** }
define i8** @expand_newargv(i8* %0) {
%2 = alloca %struct.TYPE_3__
%3 = bitcast %struct.TYPE_3__* %2 to i8*
%4 = call i32 @wordexp(i8* %0, %struct.TYPE_3__* %2, i32 0)
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i64 0, i32 0
%6 = load i8**, i8*** %5
ret i8** %6
}
/* Variables and functions */
int /*<<< orphan*/ rdp_close();
__attribute__((visibility("default"))) void RomClosed(void) { rdp_close(); }


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

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

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

LLVM IR (-O2):
define void @RomClosed() {
%1 = tail call i32 (...) @rdp_close()
ret void
}
/* Type definitions */
struct listnode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct listnode *);
void listnode_free(struct listnode *node) { free(node); }


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

x86 assembly (clang, -O2):
<listnode_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.listnode = type { i32 }
define void @listnode_free(%struct.listnode* nocapture %0) {
%2 = tail call i32 @free(%struct.listnode* %0)
ret void
}
int test_imm_9Bint64_lowword_mem(long long *val) {
  return ((*val) & (0x9B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Bint64_lowword_mem>:
testb  $0x9b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Bint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 155
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LeftTrim(char *);
int /*<<< orphan*/ RightTrim(char *);
void FullTrim(char *psValue) {
  RightTrim(psValue);
  LeftTrim(psValue);
}


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

x86 assembly (clang, -O2):
<FullTrim>:
push   %rbx
mov    %rdi,%rbx
call   1030 <RightTrim@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <LeftTrim@plt>

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

LLVM IR (-O2):
define void @FullTrim(i8* %0) {
%2 = tail call i32 @RightTrim(i8* %0)
%3 = tail call i32 @LeftTrim(i8* %0)
ret void
}
void pcp_print_net_nfs_stats(struct activity *a, int curr) {}


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

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

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

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_print_net_nfs_stats(%struct.activity* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, size_t, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
void get_comm_name(char *buf, size_t buf_sz) {
  FILE *f = fopen("/proc/self/comm", "r");
  memset(buf, 0, buf_sz);
  fread(buf, buf_sz, 1, f);
  fclose(f);
}


x86 assembly (clang, -O0):
<get_comm_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea9(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_comm_name>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xeae(%rip),%rdi
lea    0xeb7(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1050 <memset@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"/proc/self/comm\00"
@.str.1 = [2 x i8] c"r\00"
define void @get_comm_name(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %6, i32** %5
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = call i32 @memset(i8* %7, i32 0, i64 %8)
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = load i32*, i32** %5
%13 = call i32 @fread(i8* %10, i64 %11, i32 1, i32* %12)
%14 = load i32*, i32** %5
%15 = call i32 @fclose(i32* %14)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"/proc/self/comm\00"
@.str.1 = [2 x i8] c"r\00"
define void @get_comm_name(i8* %0, i64 %1) {
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
%5 = tail call i32 @fread(i8* %0, i64 %1, i32 1, i32* %3)
%6 = tail call i32 @fclose(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
int assert_string_equals(char *expected, char *actual) {
  if (strcmp(expected, actual)) {
    printf("Expected \"%s\" but received \"%s\"\n", expected, actual);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<assert_string_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1167 <assert_string_equals+0x47>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    116e <assert_string_equals+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_string_equals>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strcmp@plt>
test   %rax,%rax
je     114d <assert_string_equals+0x2d>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
mov    $0x1,%eax
jmp    114f <assert_string_equals+0x2f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Expected \22%s\22 but received \22%s\22\0A\00"
define i32 @assert_string_equals(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = call i64 @strcmp(i8* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
store i32 1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [33 x i8] c"Expected \22%s\22 but received \22%s\22\0A\00"
define i32 @assert_string_equals(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int getlittleline(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int len;
  char line[1000000];
  while ((len = getlittleline(line)) > 0) {
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4260,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xf4260(%rbp),%rdi
call   1040 <getlittleline@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    1169 <main+0x49>
lea    -0xf4260(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0xf4260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf4248,%rsp
mov    %rsp,%rdi
call   1040 <getlittleline@plt>
test   %eax,%eax
jle    1157 <main+0x37>
lea    0xec3(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <getlittleline@plt>
test   %eax,%eax
jg     1140 <main+0x20>
xor    %eax,%eax
add    $0xf4248,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000000 x i8]
%4 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%5 = call i32 @getlittleline(i8* %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2, %7
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%9 = call i32 @getlittleline(i8* %4)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ program_loop();
int main(int argc, char *argv[]) {
  program_loop();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @program_loop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @program_loop()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void fmt_convert_s32_to_s32(void *dest_v, void *src_v, int n) {
  memcpy(dest_v, src_v, n * sizeof(int32_t));
}


x86 assembly (clang, -O0):
<fmt_convert_s32_to_s32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmt_convert_s32_to_s32>:
shl    $0x2,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @fmt_convert_s32_to_s32(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(i8* %7, i8* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @fmt_convert_s32_to_s32(i8* %0, i8* %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %4)
ret void
}
void regerror(s) char *s;
{
  std_err("gres: ");
  std_err(s);
  std_err("\n");
  done(2);
}


x86 assembly (clang, -O0):
<regerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <done@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regerror>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
mov    $0x2,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <done@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"gres: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @regerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %4)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i32, ...) bitcast (i32 (...)* @done to i32 (i32, ...)*)(i32 2)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"gres: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @regerror(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @done to i32 (i32, ...)*)(i32 2)
ret void
}
void bsp_coresight_suspend(void) { return; }


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

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

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

LLVM IR (-O2):
define void @bsp_coresight_suspend() {
ret void
}
/* Variables and functions */
scalar_t__ fEqual(float, double);
float sinf(float);
float sinc(float x) {
  float xpi = x * 3.14159265358979323846;
  return fEqual(x, 0.0) ? 1.0 : sinf(xpi) / (xpi);
}


x86 assembly (clang, -O0):
<sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1040 <fEqual@plt>
cmp    $0x0,%rax
je     1174 <sinc+0x54>
movsd  0xe9e(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    118c <sinc+0x6c>
movss  -0x8(%rbp),%xmm0
call   1030 <sinf@plt>
divss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinc>:
push   %rax
xorps  %xmm1,%xmm1
movss  %xmm0,0x4(%rsp)
call   1040 <fEqual@plt>
test   %rax,%rax
je     113e <sinc+0x1e>
movss  0xecc(%rip),%xmm0
pop    %rax
ret
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeb0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <sinf@plt>
divss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sinc(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fmul double %5, 0x400921FB54442D18
%7 = fptrunc double %6 to float
store float %7, float* %3
%8 = load float, float* %2
%9 = call i64 @fEqual(float %8, double 0.000000e+00)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
br label %18
12: ; preds = %1
%13 = load float, float* %3
%14 = call float @sinf(float %13)
%15 = load float, float* %3
%16 = fdiv float %14, %15
%17 = fpext float %16 to double
br label %18
18: ; preds = %12, %11
%19 = phi double [ 1.000000e+00, %11 ], [ %17, %12 ]
%20 = fptrunc double %19 to float
ret float %20
}

LLVM IR (-O2):
define float @sinc(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x400921FB54442D18
%4 = fptrunc double %3 to float
%5 = tail call i64 @fEqual(float %0, double 0.000000e+00)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = tail call float @sinf(float %4)
%9 = fdiv float %8, %4
br label %10
10: ; preds = %1, %7
%11 = phi float [ %9, %7 ], [ 1.000000e+00, %1 ]
ret float %11
}
/* Variables and functions */
char const *P_tmpdir;
const char *get_tempdir(void) {
  if (P_tmpdir)
    return P_tmpdir;
  return "/tmp";
}


x86 assembly (clang, -O0):
<get_tempdir>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
cmpq   $0x0,(%rax)
je     1128 <get_tempdir+0x28>
mov    0x2ecc(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <get_tempdir+0x33>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tempdir>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%rcx
test   %rcx,%rcx
lea    0xeec(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@P_tmpdir = global i8* null
@.str = [5 x i8] c"/tmp\00"
define i8* @get_tempdir() {
%1 = alloca i8*
%2 = load i8*, i8** @P_tmpdir
%3 = icmp ne i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i8*, i8** @P_tmpdir
store i8* %5, i8** %1
br label %7
6: ; preds = %0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
br label %7
7: ; preds = %6, %4
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@P_tmpdir = global i8* null
@.str = [5 x i8] c"/tmp\00"
define i8* @get_tempdir() {
%1 = load i8*, i8** @P_tmpdir
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1
ret i8* %3
}