xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("\nCDP MCTOOLS: NMIX V2.0.1 (c) RWD,CDP 1999,2009\n"
         "mix two multi-channel files\n"
         "usage:\n"
         "nmix [-d][-f][-oOFFSET] infile1 infile2 outfile\n"
         "     -d      : apply TPDF dither (16bit format output only).\n"
         "     -f      : set output sample type to floats.\n"
         "                Default: outfile type is that of infile 1\n"
         "     -oOFFSET:  start infile2 at OFFSET seconds.\n"
         "Files must have the same channel count.\n"
         "WAVE-EX files must have the same speaker layout\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [437 x i8] c"\0ACDP MCTOOLS: NMIX V2.0.1 (c) RWD,CDP 1999,2009\0Amix two multi-channel files\0Ausage:\0Anmix [-d][-f][-oOFFSET] infile1 infile2 outfile\0A -d : apply TPDF dither (16bit format output only).\0A -f : set output sample type to floats.\0A Default: outfile type is that of infile 1\0A -oOFFSET: start infile2 at OFFSET seconds.\0AFiles must have the same channel count.\0AWAVE-EX files must have the same speaker layout\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([437 x i8], [437 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [436 x i8] c"\0ACDP MCTOOLS: NMIX V2.0.1 (c) RWD,CDP 1999,2009\0Amix two multi-channel files\0Ausage:\0Anmix [-d][-f][-oOFFSET] infile1 infile2 outfile\0A -d : apply TPDF dither (16bit format output only).\0A -f : set output sample type to floats.\0A Default: outfile type is that of infile 1\0A -oOFFSET: start infile2 at OFFSET seconds.\0AFiles must have the same channel count.\0AWAVE-EX files must have the same speaker layout\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([436 x i8], [436 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int refresh_BaseScreen(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @refresh_BaseScreen() {
ret i32 1
}

LLVM IR (-O2):
define i32 @refresh_BaseScreen() {
ret i32 1
}
void VID_CheckRenderer(void) {}


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

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

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

LLVM IR (-O2):
define void @VID_CheckRenderer() {
ret void
}
void mem_text_writeable_spinunlock(unsigned long *flags) {}


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

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

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

LLVM IR (-O2):
define void @mem_text_writeable_spinunlock(i64* nocapture %0) {
ret void
}
/* Type definitions */
struct rnode {
  int dummy;
};

/* Variables and functions */
char *append_to(char *, char *);
char *subtree(struct rnode *);
char *to_newick(struct rnode *node) {
  char *result;
  result = subtree(node);
  if (NULL == result)
    return NULL;
  result = append_to(result, ";");
  return result;
}


x86 assembly (clang, -O0):
<to_newick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <subtree@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1152 <to_newick+0x32>
movq   $0x0,-0x8(%rbp)
jmp    116e <to_newick+0x4e>
mov    -0x18(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1040 <append_to@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_newick>:
push   %rax
call   1030 <subtree@plt>
test   %rax,%rax
je     113b <to_newick+0x1b>
lea    0xece(%rip),%rsi
mov    %rax,%rdi
pop    %rax
jmp    1040 <append_to@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rnode = type { i32 }
@.str = [2 x i8] c";\00"
define i8* @to_newick(%struct.rnode* %0) {
%2 = alloca i8*
%3 = alloca %struct.rnode*
%4 = alloca i8*
store %struct.rnode* %0, %struct.rnode** %3
%5 = load %struct.rnode*, %struct.rnode** %3
%6 = call i8* @subtree(%struct.rnode* %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* null, %7
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* null, i8** %2
br label %14
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = call i8* @append_to(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %12, i8** %4
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %10, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
%struct.rnode = type { i32 }
@.str = [2 x i8] c";\00"
define i8* @to_newick(%struct.rnode* %0) {
%2 = tail call i8* @subtree(%struct.rnode* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @append_to(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hwbm_pool = type opaque
define i32 @mvneta_bm_construct(%struct.hwbm_pool* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int retrieve_hyperplane_sections(int m, int k, int n, int i, double *c) {
  int a[3], fail;
  a[0] = m;
  a[1] = k;
  a[2] = n;
  fail = _ada_use_c2phc(61, a, &i, c);
  return fail;
}


x86 assembly (clang, -O0):
<retrieve_hyperplane_sections>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x3d,%edi
lea    -0x10(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<retrieve_hyperplane_sections>:
sub    $0x18,%rsp
mov    %ecx,0x8(%rsp)
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x3d,%edi
mov    %r8,%rcx
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @retrieve_hyperplane_sections(i32 %0, i32 %1, i32 %2, i32 %3, double* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca [3 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double* %4, double** %10
%13 = load i32, i32* %6
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
store i32 %13, i32* %14
%15 = load i32, i32* %7
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 1
store i32 %15, i32* %16
%17 = load i32, i32* %8
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 2
store i32 %17, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%20 = load double*, double** %10
%21 = call i32 @_ada_use_c2phc(i32 61, i32* %19, i32* %9, double* %20)
store i32 %21, i32* %12
%22 = load i32, i32* %12
ret i32 %22
}

LLVM IR (-O2):
define i32 @retrieve_hyperplane_sections(i32 %0, i32 %1, i32 %2, i32 %3, double* %4) {
%6 = alloca i32
%7 = alloca [3 x i32]
store i32 %3, i32* %6
%8 = bitcast [3 x i32]* %7 to i8*
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
store i32 %0, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 1
store i32 %1, i32* %10
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 2
store i32 %2, i32* %11
%12 = call i32 @_ada_use_c2phc(i32 61, i32* %9, i32* %6, double* %4)
ret i32 %12
}
void gtk_text_iter_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_type() {
ret void
}
void ff_hevc_put_hevc_bi_qpel_h12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h12_10_sse4() {
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int cio_file_st_get_meta_len(char *);
char *cio_file_st_get_content(char *map) {
  uint16_t len;
  len = cio_file_st_get_meta_len(map);
  return map + 24 + len;
}


x86 assembly (clang, -O0):
<cio_file_st_get_content>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cio_file_st_get_meta_len@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x18,%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cio_file_st_get_content>:
push   %rbx
mov    %rdi,%rbx
call   1030 <cio_file_st_get_meta_len@plt>
cltq
add    %rbx,%rax
add    $0x18,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cio_file_st_get_content(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @cio_file_st_get_meta_len(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 24
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
ret i8* %10
}

LLVM IR (-O2):
define i8* @cio_file_st_get_content(i8* %0) {
%2 = tail call i32 @cio_file_st_get_meta_len(i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 24
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %3, i64 %4
ret i8* %5
}
void _exit(int __status) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XmbDrawString() {
  printf("XmbDrawString called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"XmbDrawString called\0A\00"
define i32 @XmbDrawString() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"XmbDrawString called\00"
define i32 @XmbDrawString() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void ntfs_inode_printk(struct inode *inode, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
define void @ntfs_inode_printk(%struct.inode* nocapture %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PutLitStr(char *);
int /*<<< orphan*/ SkipFieldResult();
void ReadPageField(void) {
  PutLitStr("\\thepage{}");
  SkipFieldResult();
}


x86 assembly (clang, -O0):
<ReadPageField>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <PutLitStr@plt>
mov    $0x0,%al
call   1030 <SkipFieldResult@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadPageField>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <PutLitStr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SkipFieldResult@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\\thepage{}\00"
define void @ReadPageField() {
%1 = call i32 @PutLitStr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @SkipFieldResult()
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\\thepage{}\00"
define void @ReadPageField() {
%1 = tail call i32 @PutLitStr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @SkipFieldResult()
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int a, b;
  a = atoi(argv[1]);
  b = atoi(argv[2]);
  if (a > b) {
    printf("%d\n", 0);
  } else {
    printf("%d\n", 1);
  }
  return 0;
}


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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1175 <main+0x55>
lea    0xe97(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
jmp    1186 <main+0x66>
lea    0xe84(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
xor    %esi,%esi
cmp    %eax,%ebp
setle  %sil
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = icmp sle i32 %5, %8
%10 = zext i1 %9 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
int test_imm_D0int32_mem(int *val) {
  return ((*val) & (0xD0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D0int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 208
%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_D0int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 208
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void print_ddr3_memory_setup(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p448_add(uintptr_t, uintptr_t, uintptr_t);
void fiat_p448_add(uint64_t out1[8], const uint64_t arg1[8],
                   const uint64_t arg2[8]) {
  internal_fiat_p448_add((uintptr_t)out1, (uintptr_t)arg1, (uintptr_t)arg2);
}


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

x86 assembly (clang, -O2):
<fiat_p448_add>:
jmp    1030 <internal_fiat_p448_add@plt>

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

LLVM IR (-O2):
define void @fiat_p448_add(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_p448_add(i64 %4, i64 %5, i64 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void so_fini1(void) {
  printf("so_fini1"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"so_fini1\0A\00"
define void @so_fini1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"so_fini1\00"
define void @so_fini1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned char f79(unsigned char x, unsigned int y) {
  return (x << y) + (x >> (8 * sizeof(unsigned char) - y));
}


x86 assembly (clang, -O0):
<f79>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %ecx,%esi
mov    $0x8,%ecx
sub    %rsi,%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f79>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f79(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 %6, %7
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = sub i64 8, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %10, %14
%16 = add nsw i32 %8, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f79(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = shl i32 %3, %1
%5 = sub i32 8, %1
%6 = lshr i32 %3, %5
%7 = add nsw i32 %6, %4
%8 = trunc i32 %7 to i8
ret i8 %8
}
void foo666(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo666(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ transform_file_content();
int main(void) {
  fputs("\n\x1b[34m# [file-stream] "
        "transform_file_content"
        "\x1b[0m\n",
        stderr);
  transform_file_content();
  ;
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
xor    %eax,%eax
call   1040 <transform_file_content@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"\0A\1B[34m# [file-stream] transform_file_content\1B[0m\0A\00"
@stderr = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fputs(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @transform_file_content()
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"\0A\1B[34m# [file-stream] transform_file_content\1B[0m\0A\00"
@stderr = global i32 0
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @transform_file_content()
ret i32 0
}
/* Type definitions */
struct RNAalifold_args_info {
  int dummy;
};

/* Variables and functions */
int RNAalifold_cmdline_parser2(int, char **, struct RNAalifold_args_info *,
                               int /*<<< orphan*/, int, int);
int RNAalifold_cmdline_parser(int argc, char **argv,
                              struct RNAalifold_args_info *args_info) {
  return RNAalifold_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


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

x86 assembly (clang, -O2):
<RNAalifold_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <RNAalifold_cmdline_parser2@plt>

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

LLVM IR (-O2):
%struct.RNAalifold_args_info = type { i32 }
define i32 @RNAalifold_cmdline_parser(i32 %0, i8** %1, %struct.RNAalifold_args_info* %2) {
%4 = tail call i32 @RNAalifold_cmdline_parser2(i32 %0, i8** %1, %struct.RNAalifold_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
/* Variables and functions */
char *strndup(char *, int);
void strndup_1_Bad() {
  char s1[] = "Hello Infer!";
  int len = 100;
  char *s2 = strndup(s1, len);
  for (int i = 0; i < len; i++) {
    s2[i] = 'a';
  }
}


x86 assembly (clang, -O0):
<strndup_1_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xeda(%rip),%al
mov    %al,-0x1(%rbp)
movl   $0x64,-0x14(%rbp)
lea    -0xd(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <strndup@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1179 <strndup_1_Bad+0x69>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movb   $0x61,(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1153 <strndup_1_Bad+0x43>
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @strndup_1_Bad() {
ret void
}
int main(void) {
  int counter = 0;
LOOPSTART:
  if (counter < 5) {
    counter++;
    goto LOOPSTART;
  }
  if (counter == 4) {
    goto ERROR;
  } else {
    goto END;
  }
ERROR:
  goto ERROR;
END:
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    112a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
cmpl   $0x4,-0x8(%rbp)
jne    1139 <main+0x39>
jmp    113e <main+0x3e>
jmp    1143 <main+0x43>
jmp    113e <main+0x3e>
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 i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 4
br i1 %11, label %12, label %13
12: ; preds = %9
br label %14
13: ; preds = %9
br label %15
14: ; preds = %14, %12
br label %14
15: ; preds = %13
ret i32 0
}

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


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

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

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

LLVM IR (-O2):
define void @abort_output() {
%1 = tail call i32 (...) @abort_demanded_output()
ret void
}
char *get_result_str(char result) {
  switch (result) {
  case 'o':
    return "FRIEND";
    break;
  case 'x':
    return "ENEMY";
    break;
  case '=':
    return "DRAW";
    break;
  default:
    break;
  }
  return "";
}


x86 assembly (clang, -O0):
<get_result_str>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x3d,%eax
je     1161 <get_result_str+0x61>
jmp    111f <get_result_str+0x1f>
mov    -0x10(%rbp),%eax
sub    $0x6f,%eax
je     1141 <get_result_str+0x41>
jmp    1130 <get_result_str+0x30>
mov    -0x10(%rbp),%eax
sub    $0x78,%eax
je     1151 <get_result_str+0x51>
jmp    1171 <get_result_str+0x71>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1181 <get_result_str+0x81>
lea    0xeaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1181 <get_result_str+0x81>
lea    0xea5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1181 <get_result_str+0x81>
jmp    1176 <get_result_str+0x76>
lea    0xe89(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_result_str>:
cmp    $0x3d,%edi
je     1117 <get_result_str+0x17>
cmp    $0x6f,%edi
je     111f <get_result_str+0x1f>
cmp    $0x78,%edi
jne    1127 <get_result_str+0x27>
lea    0xef1(%rip),%rax
ret
lea    0xeef(%rip),%rax
ret
lea    0xeda(%rip),%rax
ret
lea    0xed8(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"FRIEND\00"
@.str.1 = [6 x i8] c"ENEMY\00"
@.str.2 = [5 x i8] c"DRAW\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @get_result_str(i8 signext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 111, label %6
i32 120, label %7
i32 61, label %8
]
6: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %11
8: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %11
9: ; preds = %1
br label %10
10: ; preds = %9
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %10, %8, %7, %6
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"FRIEND\00"
@.str.1 = [6 x i8] c"ENEMY\00"
@.str.2 = [5 x i8] c"DRAW\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @get_result_str(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 111, label %6
i32 120, label %3
i32 61, label %4
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %7
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int vec3_is_equal(float *, float *);
__attribute__((always_)) bool psvec3_is_equal(struct vec3 *a, struct vec3 *b) {
  return vec3_is_equal((float *)a, (float *)b);
}


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

x86 assembly (clang, -O2):
<psvec3_is_equal>:
jmp    1030 <vec3_is_equal@plt>

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define i32 @psvec3_is_equal(%struct.vec3* %0, %struct.vec3* %1) {
%3 = alloca %struct.vec3*
%4 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %3
store %struct.vec3* %1, %struct.vec3** %4
%5 = load %struct.vec3*, %struct.vec3** %3
%6 = bitcast %struct.vec3* %5 to float*
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = call i32 @vec3_is_equal(float* %6, float* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define i32 @psvec3_is_equal(%struct.vec3* %0, %struct.vec3* %1) {
%3 = bitcast %struct.vec3* %0 to float*
%4 = bitcast %struct.vec3* %1 to float*
%5 = tail call i32 @vec3_is_equal(float* %3, float* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_sevl();
void sevl() { __builtin_arm_sevl(); }


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

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

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

LLVM IR (-O2):
define void @sevl() {
%1 = tail call i32 (...) @__builtin_arm_sevl()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ preload_seq(int);
void main(void) { preload_seq(177); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb1,%edi
call   1030 <preload_seq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xb1,%edi
jmp    1030 <preload_seq@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @preload_seq(i32 177)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @preload_seq(i32 177)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printnum(int);
int /*<<< orphan*/ putchar(char);
void main() {
  printnum(1234);
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4d2,%edi
call   1040 <printnum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4d2,%edi
call   1040 <printnum@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @printnum(i32 1234)
%2 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @printnum(i32 1234)
%2 = tail call i32 @putchar(i8 signext 10)
ret void
}
int f(int i) { return i >= (i - 2); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 2
%6 = icmp sge i32 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 1
}
/* Variables and functions */
void *pubrealloc(void *, size_t, char *);
void *phkrealloc(void *ptr, size_t size) {
  return (pubrealloc(ptr, size, " in realloc():"));
}


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

x86 assembly (clang, -O2):
<phkrealloc>:
lea    0xee9(%rip),%rdx
jmp    1030 <pubrealloc@plt>

LLVM IR (-O0):
@.str = [15 x i8] c" in realloc():\00"
define i8* @phkrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @pubrealloc(i8* %5, i64 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
@.str = [15 x i8] c" in realloc():\00"
define i8* @phkrealloc(i8* %0, i64 %1) {
%3 = tail call i8* @pubrealloc(i8* %0, i64 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ putchar(int);
void catbychar(FILE *input, char *filename) {
  printf("FILE %s:\n", filename);
  for (;;) {
    int byte = fgetc(input);
    if (byte == EOF)
      break;
    putchar(byte);
  }
}


x86 assembly (clang, -O0):
<catbychar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%eax
jne    1173 <catbychar+0x43>
jmp    1180 <catbychar+0x50>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    1150 <catbychar+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catbychar>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    0x2e96(%rip),%r14
cmp    (%r14),%eax
je     1174 <catbychar+0x44>
nopw   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
cmp    (%r14),%eax
jne    1160 <catbychar+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"FILE %s:\0A\00"
@EOF = global i32 0
define void @catbychar(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %15, %2
%9 = load i32*, i32** %3
%10 = call i32 @fgetc(i32* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %8
br label %18
15: ; preds = %8
%16 = load i32, i32* %5
%17 = call i32 @putchar(i32 %16)
br label %8
18: ; preds = %14
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"FILE %s:\0A\00"
@EOF = global i32 0
define void @catbychar(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @fgetc(i32* %0)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %13, label %7
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ %4, %2 ]
%9 = tail call i32 @putchar(i32 %8)
%10 = tail call i32 @fgetc(i32* %0)
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %7
13: ; preds = %7, %2
ret void
}
/* Type definitions */
struct evp_test {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EVP_PKEY_sign;
int /*<<< orphan*/ EVP_PKEY_sign_init;
int pkey_test_init(struct evp_test *, char const *, int /*<<< orphan*/,
                   int /*<<< orphan*/, int /*<<< orphan*/);
int sign_test_init(struct evp_test *t, const char *name) {
  return pkey_test_init(t, name, 0, EVP_PKEY_sign_init, EVP_PKEY_sign);
}


x86 assembly (clang, -O0):
<sign_test_init>:
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    0x2eb1(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb0(%rip),%rax
mov    (%rax),%r8d
xor    %edx,%edx
call   1030 <pkey_test_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign_test_init>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    (%rax),%r8d
xor    %edx,%edx
jmp    1030 <pkey_test_init@plt>

LLVM IR (-O0):
%struct.evp_test = type { i32 }
@EVP_PKEY_sign_init = global i32 0
@EVP_PKEY_sign = global i32 0
define i32 @sign_test_init(%struct.evp_test* %0, i8* %1) {
%3 = alloca %struct.evp_test*
%4 = alloca i8*
store %struct.evp_test* %0, %struct.evp_test** %3
store i8* %1, i8** %4
%5 = load %struct.evp_test*, %struct.evp_test** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EVP_PKEY_sign_init
%8 = load i32, i32* @EVP_PKEY_sign
%9 = call i32 @pkey_test_init(%struct.evp_test* %5, i8* %6, i32 0, i32 %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.evp_test = type { i32 }
@EVP_PKEY_sign_init = global i32 0
@EVP_PKEY_sign = global i32 0
define i32 @sign_test_init(%struct.evp_test* %0, i8* %1) {
%3 = load i32, i32* @EVP_PKEY_sign_init
%4 = load i32, i32* @EVP_PKEY_sign
%5 = tail call i32 @pkey_test_init(%struct.evp_test* %0, i8* %1, i32 0, i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
scalar_t__ floor(scalar_t__);
scalar_t__ log10(float);
unsigned NumLen(int n) {
  return n == 0 ? 1 : (unsigned)floor(log10((float)n) + 1);
}


x86 assembly (clang, -O0):
<NumLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1142 <NumLen+0x22>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115b <NumLen+0x3b>
cvtsi2ssl -0x4(%rbp),%xmm0
call   1030 <log10@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <floor@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumLen>:
test   %edi,%edi
je     113c <NumLen+0x1c>
push   %rax
cvtsi2ss %edi,%xmm0
call   1030 <log10@plt>
lea    0x1(%rax),%rdi
call   1040 <floor@plt>
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @NumLen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %13
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to float
%9 = call i64 @log10(float %8)
%10 = add nsw i64 %9, 1
%11 = call i64 @floor(i64 %10)
%12 = trunc i64 %11 to i32
br label %13
13: ; preds = %6, %5
%14 = phi i32 [ 1, %5 ], [ %12, %6 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @NumLen(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = sitofp i32 %0 to float
%5 = tail call i64 @log10(float %4)
%6 = add nsw i64 %5, 1
%7 = tail call i64 @floor(i64 %6)
%8 = trunc i64 %7 to i32
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 1, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ gal_fun_test_f2(int *);
void gal_fun_test_f3(void) {
  int a[20];
  gal_fun_test_f2(a);
}


x86 assembly (clang, -O0):
<gal_fun_test_f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
call   1030 <gal_fun_test_f2@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gal_fun_test_f3>:
sub    $0x58,%rsp
mov    %rsp,%rdi
call   1030 <gal_fun_test_f2@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
define void @gal_fun_test_f3() {
%1 = alloca [20 x i32]
%2 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%3 = call i32 @gal_fun_test_f2(i32* %2)
ret void
}

LLVM IR (-O2):
define void @gal_fun_test_f3() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = call i32 @gal_fun_test_f2(i32* %3)
ret void
}
short bar_short(void) { return __real__(foo_short(2 - 3i)); }


x86 assembly (clang, -O0):
<bar_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x8(%rbp)
movl   $0xfffffffd,-0x4(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <foo_short@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar_short>:
push   %rax
movabs $0xfffffffd00000002,%rdi
ff ff ff
xor    %eax,%eax
call   1030 <foo_short@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @bar_short() {
%1 = alloca { i32, i32 }
%2 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 0
%3 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 1
store i32 2, i32* %2
store i32 -3, i32* %3
%4 = bitcast { i32, i32 }* %1 to i64*
%5 = load i64, i64* %4
%6 = call i32 (i64, ...) bitcast (i32 (...)* @foo_short to i32 (i64, ...)*)(i64 %5)
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @bar_short() {
%1 = tail call i32 (i64, ...) bitcast (i32 (...)* @foo_short to i32 (i64, ...)*)(i64 -12884901886)
%2 = trunc i32 %1 to i16
ret i16 %2
}
/* Variables and functions */
scalar_t__ memcmp(unsigned char const *, unsigned char const *, int);
int id_eq(const unsigned char *id1, const unsigned char *id2) {
  return memcmp(id1, id2, 4) == 0;
}


x86 assembly (clang, -O0):
<id_eq>:
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    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id_eq>:
push   %rax
mov    $0x4,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @id_eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @memcmp(i8* %5, i8* %6, i32 4)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @id_eq(i8* %0, i8* %1) {
%3 = tail call i64 @memcmp(i8* %0, i8* %1, i32 4)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ ENOENT;
int /*<<< orphan*/ assert(int);
scalar_t__ errno;
int main() {
  int x = 5;
  if (errno == ENOENT) {
    x = 9;
  }
  assert(x == 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%rax
mov    0x2e99(%rip),%rcx
cmp    (%rcx),%rax
jne    1147 <main+0x37>
movl   $0x9,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%rax
mov    0x2eae(%rip),%rcx
xor    %edi,%edi
cmp    (%rcx),%rax
setne  %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@ENOENT = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = load i64, i64* @errno
%4 = load i64, i64* @ENOENT
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 9, i32* %2
br label %7
7: ; preds = %6, %0
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 5
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
@errno = global i64 0
@ENOENT = global i64 0
define i32 @main() {
%1 = load i64, i64* @errno
%2 = load i64, i64* @ENOENT
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i32 0
}
int suite_all(struct ctest *t) {
  (void)t;
  return 1;
}


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

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

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

LLVM IR (-O2):
%struct.ctest = type opaque
define i32 @suite_all(%struct.ctest* nocapture readnone %0) {
ret i32 1
}
unsigned char cast_long_uchar(long int x) { return (unsigned char)x; }


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

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

LLVM IR (-O0):
define zeroext i8 @cast_long_uchar(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @cast_long_uchar(i64 %0) {
%2 = trunc i64 %0 to i8
ret i8 %2
}
int do_empty(void *args) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @do_empty(i8* nocapture readnone %0) {
ret i32 0
}