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

/* Variables and functions */
struct _tuple7 *Cyc_Sexp_mk_slonglong(long long);
unsigned long long Cyc_Sexp_parse_longlong(struct Cyc_Sexp_Parser *);
struct _tuple7 *Cyc_Sexp_parse_slonglong(struct Cyc_Sexp_Parser *p) {
  unsigned long long _T0;
  long long _T1;
  struct _tuple7 *_T2;
  _T0 = Cyc_Sexp_parse_longlong(p);
  _T1 = (long long)_T0;
  _T2 = Cyc_Sexp_mk_slonglong(_T1);
  return _T2;
}


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

x86 assembly (clang, -O2):
<Cyc_Sexp_parse_slonglong>:
push   %rax
call   1030 <Cyc_Sexp_parse_longlong@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <Cyc_Sexp_mk_slonglong@plt>

LLVM IR (-O0):
%struct._tuple7 = type { i32 }
%struct.Cyc_Sexp_Parser = type { i32 }
define %struct._tuple7* @Cyc_Sexp_parse_slonglong(%struct.Cyc_Sexp_Parser* %0) {
%2 = alloca %struct.Cyc_Sexp_Parser*
%3 = alloca i64
%4 = alloca i64
%5 = alloca %struct._tuple7*
store %struct.Cyc_Sexp_Parser* %0, %struct.Cyc_Sexp_Parser** %2
%6 = load %struct.Cyc_Sexp_Parser*, %struct.Cyc_Sexp_Parser** %2
%7 = call i64 @Cyc_Sexp_parse_longlong(%struct.Cyc_Sexp_Parser* %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = call %struct._tuple7* @Cyc_Sexp_mk_slonglong(i64 %9)
store %struct._tuple7* %10, %struct._tuple7** %5
%11 = load %struct._tuple7*, %struct._tuple7** %5
ret %struct._tuple7* %11
}

LLVM IR (-O2):
%struct._tuple7 = type { i32 }
%struct.Cyc_Sexp_Parser = type { i32 }
define %struct._tuple7* @Cyc_Sexp_parse_slonglong(%struct.Cyc_Sexp_Parser* %0) {
%2 = tail call i64 @Cyc_Sexp_parse_longlong(%struct.Cyc_Sexp_Parser* %0)
%3 = tail call %struct._tuple7* @Cyc_Sexp_mk_slonglong(i64 %2)
ret %struct._tuple7* %3
}
/* Variables and functions */
int /*<<< orphan*/ set_ioprio_rt();
int pcap_sg_prepare_writing_pcap(int fd) {
  set_ioprio_rt();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pcap_sg_prepare_writing_pcap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @set_ioprio_rt()
ret i32 0
}

LLVM IR (-O2):
define i32 @pcap_sg_prepare_writing_pcap(i32 %0) {
%2 = tail call i32 (...) @set_ioprio_rt()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int /*<<< orphan*/ writeint(int);
void nullpointertest(int lineno, void *ptr) {
  if (ptr == NULL) {
    char msg[] = "Runtime error: null pointer exception on line ";
    write(1, msg, sizeof(msg) - 1);
    writeint(lineno);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<nullpointertest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1191 <nullpointertest+0x51>
lea    -0x40(%rbp),%rdi
lea    0xe9b(%rip),%rsi
mov    $0x2f,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rsi
mov    $0x1,%edi
mov    $0x2e,%edx
call   1040 <write@plt>
mov    -0x4(%rbp),%edi
call   1030 <writeint@plt>
xor    %edi,%edi
call   1060 <exit@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullpointertest>:
test   %rsi,%rsi
je     1136 <nullpointertest+0x6>
ret
push   %rbx
sub    $0x30,%rsp
mov    %edi,%ebx
movups 0xedb(%rip),%xmm0
movups %xmm0,0x1f(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
mov    $0x2e,%edx
call   1040 <write@plt>
mov    %ebx,%edi
call   1030 <writeint@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@__const.nullpointertest.msg = [47 x i8] c"Runtime error: null pointer exception on line \00"
define void @nullpointertest(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [47 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = bitcast [47 x i8]* %5 to i8*
%10 = getelementptr inbounds [47 x i8], [47 x i8]* %5, i64 0, i64 0
%11 = call i32 @write(i32 1, i8* %10, i32 46)
%12 = load i32, i32* %3
%13 = call i32 @writeint(i32 %12)
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@__const.nullpointertest.msg = [47 x i8] c"Runtime error: null pointer exception on line \00"
define void @nullpointertest(i32 %0, i8* readnone %1) {
%3 = alloca [47 x i8]
%4 = icmp eq i8* %1, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = getelementptr inbounds [47 x i8], [47 x i8]* %3, i64 0, i64 0
%7 = call i32 @write(i32 1, i8* %6, i32 46)
%8 = tail call i32 @writeint(i32 %0)
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %2
ret void
}
void test9_HelloWorld_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test9_HelloWorld_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pr_inf_skip(char *, char const *);
int /*<<< orphan*/ stress_check_capability(int);
int stress_uprobe_supported(const char *name) {
  if (!stress_check_capability((-1))) {
    pr_inf_skip("%s stressor will be skipped, "
                "need to be running with CAP_SYS_ADMIN "
                "rights for this stressor\n",
                name);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stress_uprobe_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0xffffffff,%edi
call   1030 <stress_check_capability@plt>
cmp    $0x0,%eax
jne    115b <stress_uprobe_supported+0x3b>
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <pr_inf_skip@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <stress_uprobe_supported+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_uprobe_supported>:
push   %rbx
mov    %rdi,%rbx
mov    $0xffffffff,%edi
call   1030 <stress_check_capability@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1138 <stress_uprobe_supported+0x18>
pop    %rbx
ret
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1040 <pr_inf_skip@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [93 x i8] c"%s stressor will be skipped, need to be running with CAP_SYS_ADMIN rights for this stressor\0A\00"
define i32 @stress_uprobe_supported(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @stress_check_capability(i32 -1)
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @pr_inf_skip(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [93 x i8] c"%s stressor will be skipped, need to be running with CAP_SYS_ADMIN rights for this stressor\0A\00"
define i32 @stress_uprobe_supported(i8* %0) {
%2 = tail call i32 @stress_check_capability(i32 -1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pr_inf_skip(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
void outb_p(unsigned char value, unsigned short int port) {
  __asm__ __volatile__("outb %b0,%w1\noutb %%al,$0x80"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
out    %al,$0x80
ret

LLVM IR (-O0):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},${1:w}\0Aoutb %al,$$0x80", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
ret void
}
/* Variables and functions */
void *_glp_lib_xcalloc(int, int);
void *glp_calloc(int n, int size) {
  void *ptr;
  ptr = _glp_lib_xcalloc(n, size);
  return ptr;
}


x86 assembly (clang, -O0):
<glp_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_glp_lib_xcalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glp_calloc>:
jmp    1030 <_glp_lib_xcalloc@plt>

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

LLVM IR (-O2):
define i8* @glp_calloc(i32 %0, i32 %1) {
%3 = tail call i8* @_glp_lib_xcalloc(i32 %0, i32 %1)
ret i8* %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long window;
};
struct TYPE_4__ {
  TYPE_1__ xproperty;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xproperty_window(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xproperty.window = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xproperty_window>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xproperty_window(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xproperty_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void crm_save_mesh_files_adios_(int *nspec, int *npointot, int *iregion_code,
                                int *num_ibool_AVS_DX, int *mask_ibool) {}


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

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

LLVM IR (-O0):
define void @crm_save_mesh_files_adios_(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
ret void
}

LLVM IR (-O2):
define void @crm_save_mesh_files_adios_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void troca(int v[5000], int i, int j) {
  if ((i > 5000) || (j > 5000))
    return;
  int x = v[i];
  if (0 > 2)
    printf("Trocar: %d,%d\n", i, j);
  v[i] = v[j];
  v[j] = x;
}


x86 assembly (clang, -O0):
<troca>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1388,-0xc(%rbp)
jg     1128 <troca+0x28>
cmpl   $0x1388,-0x10(%rbp)
jle    112d <troca+0x2d>
jmp    115f <troca+0x5f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<troca>:
cmp    $0x1388,%esi
jg     1122 <troca+0x22>
cmp    $0x1388,%edx
jg     1122 <troca+0x22>
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @troca(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 5000
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 5000
br i1 %12, label %13, label %14
13: ; preds = %10, %3
br label %34
14: ; preds = %10
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
store i32 %19, i32* %7
%20 = load i32*, i32** %4
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = load i32, i32* %23
%25 = load i32*, i32** %4
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
store i32 %24, i32* %28
%29 = load i32, i32* %7
%30 = load i32*, i32** %4
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
store i32 %29, i32* %33
br label %34
34: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
define void @troca(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 5000
%5 = icmp sgt i32 %2, 5000
%6 = or i1 %4, %5
br i1 %6, label %14, label %7
7: ; preds = %3
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = sext i32 %2 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
store i32 %13, i32* %9
store i32 %10, i32* %12
br label %14
14: ; preds = %3, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_load_cookie_from_file() {
  printf("NOT IMPLEMENTED:"
         "pa_context_load_cookie_from_file"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"NOT IMPLEMENTED:pa_context_load_cookie_from_file\0A\00"
define i32 @pa_context_load_cookie_from_file() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [49 x i8] c"NOT IMPLEMENTED:pa_context_load_cookie_from_file\00"
define i32 @pa_context_load_cookie_from_file() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int test_imm_B7uint32_mem(unsigned int *val) {
  return ((*val) & (0xB7 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B7uint32_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, 183
%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_B7uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 183
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ delayMicroseconds(int);
int /*<<< orphan*/ pulse(int);
void header() {
  pulse(77);
  delayMicroseconds(1998);
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4d,%edi
call   1030 <pulse@plt>
mov    $0x7ce,%edi
call   1040 <delayMicroseconds@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %rax
mov    $0x4d,%edi
call   1030 <pulse@plt>
mov    $0x7ce,%edi
pop    %rax
jmp    1040 <delayMicroseconds@plt>

LLVM IR (-O0):
define void @header() {
%1 = call i32 @pulse(i32 77)
%2 = call i32 @delayMicroseconds(i32 1998)
ret void
}

LLVM IR (-O2):
define void @header() {
%1 = tail call i32 @pulse(i32 77)
%2 = tail call i32 @delayMicroseconds(i32 1998)
ret void
}
void glmCopyVector3f(const float source[3], float target[3]) {
  target[0] = source[0];
  target[1] = source[1];
  target[2] = source[2];
}


x86 assembly (clang, -O0):
<glmCopyVector3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmCopyVector3f>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rsi)
movss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rsi)
ret

LLVM IR (-O0):
define void @glmCopyVector3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %3
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %4
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = load float*, float** %4
%19 = getelementptr inbounds float, float* %18, i64 2
store float %17, float* %19
ret void
}

LLVM IR (-O2):
define void @glmCopyVector3f(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
store float %3, float* %1
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %1, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 2
store float %8, float* %9
ret void
}
int fun1148() { return 1148; }


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

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

LLVM IR (-O0):
define i32 @fun1148() {
ret i32 1148
}

LLVM IR (-O2):
define i32 @fun1148() {
ret i32 1148
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigpipe_handler(int sig) { printf("Client Has Been Closed Connection\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Client Has Been Closed Connection\0A\00"
define void @sigpipe_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Client Has Been Closed Connection\00"
define void @sigpipe_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cmps10_update_all();
void update_all_inputs(void) {
  cmps10_update_all();
  return;
}


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

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

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

LLVM IR (-O2):
define void @update_all_inputs() {
%1 = tail call i32 (...) @cmps10_update_all()
ret void
}
int palindrom(int l, char s[]) {
  int i;
  for (i = 0; i < l; i++) {
    if (s[i] != s[l]) {
      return 0;
    }
    l--;
  }
  return 1;
}


x86 assembly (clang, -O0):
<palindrom>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1161 <palindrom+0x61>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x8(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114a <palindrom+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1168 <palindrom+0x68>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <palindrom+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindrom>:
mov    $0x1,%eax
test   %edi,%edi
jle    112a <palindrom+0x2a>
mov    %edi,%ecx
mov    $0x1,%edi
movzbl -0x1(%rsi,%rdi,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    112b <palindrom+0x2b>
add    $0xffffffffffffffff,%rcx
lea    0x1(%rdi),%rdx
cmp    %rcx,%rdi
mov    %rdx,%rdi
jl     1110 <palindrom+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @palindrom(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 0, i32* %6
br label %7
7: ; preds = %29, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %32
11: ; preds = %7
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i8*, i8** %5
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %17, %23
br i1 %24, label %25, label %26
25: ; preds = %11
store i32 0, i32* %3
br label %33
26: ; preds = %11
%27 = load i32, i32* %4
%28 = add nsw i32 %27, -1
store i32 %28, i32* %4
br label %29
29: ; preds = %26
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %7
32: ; preds = %7
store i32 1, i32* %3
br label %33
33: ; preds = %32, %25
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @palindrom(i32 %0, i8* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %18
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %14
%7 = phi i64 [ %5, %4 ], [ %15, %14 ]
%8 = phi i64 [ 0, %4 ], [ %16, %14 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %1, i64 %7
%12 = load i8, i8* %11
%13 = icmp eq i8 %10, %12
br i1 %13, label %14, label %18
14: ; preds = %6
%15 = add nsw i64 %7, -1
%16 = add nuw nsw i64 %8, 1
%17 = icmp slt i64 %16, %15
br i1 %17, label %6, label %18
18: ; preds = %6, %14, %2
%19 = phi i32 [ 1, %2 ], [ 1, %14 ], [ 0, %6 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ __gpio_set(int, int);
void gpio_set(int gpio, int value) { __gpio_set(gpio, value << ((gpio) % 32)); }


x86 assembly (clang, -O0):
<gpio_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
shl    %cl,%esi
call   1030 <__gpio_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_set>:
mov    %edi,%ecx
shl    %cl,%esi
jmp    1030 <__gpio_set@plt>

LLVM IR (-O0):
define void @gpio_set(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 = load i32, i32* %3
%8 = srem i32 %7, 32
%9 = shl i32 %6, %8
%10 = call i32 @__gpio_set(i32 %5, i32 %9)
ret void
}

LLVM IR (-O2):
define void @gpio_set(i32 %0, i32 %1) {
%3 = and i32 %0, 31
%4 = shl i32 %1, %3
%5 = tail call i32 @__gpio_set(i32 %0, i32 %4)
ret void
}
void tim_init(void) {}


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

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

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

LLVM IR (-O2):
define void @tim_init() {
ret void
}
void XtInstallAllAccelerators() {}


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

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

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

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

/* Variables and functions */
int constant_memeq16(uint8_t *p1, uint8_t *p2) {}


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

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

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

LLVM IR (-O2):
define i32 @constant_memeq16(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 undef
}
int tiffNumLevels(int w, int h) {
  int i;
  for (i = 0; (w > 2) && (h > 2); i++, w = w >> 1, h = h >> 1)
    ;
  return i + 1;
}


x86 assembly (clang, -O0):
<tiffNumLevels>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jle    112a <tiffNumLevels+0x2a>
cmpl   $0x2,-0x8(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    113a <tiffNumLevels+0x3a>
jmp    115f <tiffNumLevels+0x5f>
jmp    113f <tiffNumLevels+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1111 <tiffNumLevels+0x11>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tiffNumLevels>:
mov    $0x1,%eax
cmp    $0x3,%edi
jl     1135 <tiffNumLevels+0x35>
cmp    $0x3,%esi
jl     1135 <tiffNumLevels+0x35>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
cmp    $0x6,%edi
jb     1135 <tiffNumLevels+0x35>
shr    %edi
mov    %esi,%ecx
shr    %ecx
cmp    $0x5,%esi
mov    %ecx,%esi
ja     1120 <tiffNumLevels+0x20>
ret

LLVM IR (-O0):
define i32 @tiffNumLevels(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 2
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 2
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %22
14: ; preds = %12
br label %15
15: ; preds = %14
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
%18 = load i32, i32* %3
%19 = ashr i32 %18, 1
store i32 %19, i32* %3
%20 = load i32, i32* %4
%21 = ashr i32 %20, 1
store i32 %21, i32* %4
br label %6
22: ; preds = %12
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
ret i32 %24
}

LLVM IR (-O2):
define i32 @tiffNumLevels(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 2
%4 = icmp sgt i32 %1, 2
%5 = and i1 %3, %4
br i1 %5, label %6, label %16
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ 1, %2 ]
%8 = phi i32 [ %11, %6 ], [ %1, %2 ]
%9 = phi i32 [ %10, %6 ], [ %0, %2 ]
%10 = lshr i32 %9, 1
%11 = lshr i32 %8, 1
%12 = add nuw nsw i32 %7, 1
%13 = icmp ugt i32 %9, 5
%14 = icmp ugt i32 %8, 5
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %6, label %16
16: ; preds = %6, %2
%17 = phi i32 [ 1, %2 ], [ %12, %6 ]
ret i32 %17
}
int litbitint(unsigned int a) {
  register unsigned int b = a + 1;
  if (b & 0x0001)
    return (0);
  else if (b & 0x0004)
    return (1);
  else if (b & 0x2010)
    return (2);
  else
    return (3);
}


x86 assembly (clang, -O0):
<litbitint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112b <litbitint+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    116a <litbitint+0x6a>
mov    -0xc(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1146 <litbitint+0x46>
movl   $0x1,-0x4(%rbp)
jmp    116a <litbitint+0x6a>
mov    -0xc(%rbp),%eax
and    $0x2010,%eax
cmp    $0x0,%eax
je     1163 <litbitint+0x63>
movl   $0x2,-0x4(%rbp)
jmp    116a <litbitint+0x6a>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<litbitint>:
add    $0x1,%edi
xor    %eax,%eax
test   $0x1,%dil
jne    1124 <litbitint+0x24>
mov    $0x1,%eax
test   $0x4,%dil
jne    1124 <litbitint+0x24>
xor    %eax,%eax
test   $0x2010,%edi
sete   %al
or     $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @litbitint(i32 %0) {
%2 = add i32 %0, 1
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = and i32 %2, 4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = and i32 %2, 8208
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 3, i32 2
br label %12
12: ; preds = %8, %5, %1
%13 = phi i32 [ 0, %1 ], [ 1, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ put_char(int /*<<< orphan*/, int /*<<< orphan*/ *);
void put_string(char *str, FILE *fp) {
  while (*str != '\0')
    put_char(*str++, fp);
}


x86 assembly (clang, -O0):
<put_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <put_string+0x40>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1030 <put_char@plt>
jmp    1120 <put_string+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_string>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <put_string+0x36>
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
mov    %r14,%rsi
call   1030 <put_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <put_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @put_string(i8* nocapture %0, i32* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @put_char(i32 %8, i32* %1)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
int uselib(const char *name) {
  int r;
  asm("movl $134,%%eax\n"
      "int $128\n"
      : "=a"(r)
      : "b"(name));
  return r;
}


x86 assembly (clang, -O0):
<uselib>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rbx
mov    $0x86,%eax
int    $0x80
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<uselib>:
push   %rbx
mov    %rdi,%rbx
mov    $0x86,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @uselib(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 asm "movl $$134,%eax\0Aint $$128\0A", "={ax},{bx},~{dirflag},~{fpsr},~{flags}"(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @uselib(i8* readnone %0) {
%2 = tail call i32 asm "movl $$134,%eax\0Aint $$128\0A", "={ax},{bx},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ Ptngc_i32x2_to_d(unsigned long const, unsigned long const);
int /*<<< orphan*/ unquantize_float(float *, int const, int const, float,
                                    int *);
void tng_compress_int_to_float(int *posvel_int, const unsigned long prec_hi,
                               const unsigned long prec_lo, const int natoms,
                               const int nframes, float *posvel_float) {
  unquantize_float(posvel_float, natoms, nframes,
                   (float)(Ptngc_i32x2_to_d(prec_hi, prec_lo)), posvel_int);
}


x86 assembly (clang, -O0):
<tng_compress_int_to_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <Ptngc_i32x2_to_d@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
cvtsi2ss %rax,%xmm0
mov    -0x8(%rbp),%rcx
call   1030 <unquantize_float@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tng_compress_int_to_float>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9,%r15
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <Ptngc_i32x2_to_d@plt>
cvtsi2ss %rax,%xmm0
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <unquantize_float@plt>

LLVM IR (-O0):
define void @tng_compress_int_to_float(i32* %0, i64 %1, i64 %2, i32 %3, i32 %4, float* %5) {
%7 = alloca i32*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
store i32* %0, i32** %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store float* %5, float** %12
%13 = load float*, float** %12
%14 = load i32, i32* %10
%15 = load i32, i32* %11
%16 = load i64, i64* %8
%17 = load i64, i64* %9
%18 = call i64 @Ptngc_i32x2_to_d(i64 %16, i64 %17)
%19 = sitofp i64 %18 to float
%20 = load i32*, i32** %7
%21 = call i32 @unquantize_float(float* %13, i32 %14, i32 %15, float %19, i32* %20)
ret void
}

LLVM IR (-O2):
define void @tng_compress_int_to_float(i32* %0, i64 %1, i64 %2, i32 %3, i32 %4, float* %5) {
%7 = tail call i64 @Ptngc_i32x2_to_d(i64 %1, i64 %2)
%8 = sitofp i64 %7 to float
%9 = tail call i32 @unquantize_float(float* %5, i32 %3, i32 %4, float %8, i32* %0)
ret void
}
void set_port_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @set_port_handler() {
ret void
}
int test_imm_8Eint8_mem(signed char *val) {
  return ((*val) & (0x8E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Eint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -114
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int *always_null() { return 0; }


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

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

LLVM IR (-O0):
define i32* @always_null() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @always_null() {
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf(" Imprimiedo  la linea 10 version 1.0");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c" Imprimiedo la linea 10 version 1.0\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c" Imprimiedo la linea 10 version 1.0\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ glVertex3i(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
void Vertex3i(GLint x, GLint y, GLint z) { glVertex3i(x, y, z); }


x86 assembly (clang, -O0):
<Vertex3i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <glVertex3i@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vertex3i>:
jmp    1030 <glVertex3i@plt>

LLVM IR (-O0):
define void @Vertex3i(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 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @glVertex3i(i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @Vertex3i(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glVertex3i(i32 %0, i32 %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int lis(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int arr[] = {10, 22, 9, 33, 21, 50, 41, 60};
  int n = sizeof(arr) / sizeof(arr[0]);
  printf("LIS is : %d\n", lis(arr, n));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x8,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <lis@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <lis@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [8 x i32] [i32 10, i32 22, i32 9, i32 33, i32 21, i32 50, i32 41, i32 60]
@.str = [13 x i8] c"LIS is : %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [8 x i32]* %2 to i8*
store i32 8, i32* %3
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @lis(i32* %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [8 x i32] [i32 10, i32 22, i32 9, i32 33, i32 21, i32 50, i32 41, i32 60]
@.str = [13 x i8] c"LIS is : %d\0A\00"
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @lis(i32* %3, i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
long F0(long n) {
  return (((1L << ((n + 2) / 2)) + (1L << n) * (2 * n + 1)) >> 2) - !!n;
}


x86 assembly (clang, -O0):
<F0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
mov    -0x8(%rbp),%rdx
shl    $0x1,%rdx
add    $0x1,%rdx
imul   %rdx,%rcx
add    %rcx,%rax
sar    $0x2,%rax
cmpq   $0x0,-0x8(%rbp)
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<F0>:
lea    0x2(%rdi),%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
add    %eax,%ecx
shr    %ecx
mov    $0x1,%edx
shl    %cl,%rdx
lea    (%rdi,%rdi,1),%rax
add    $0x1,%rax
mov    %edi,%ecx
shl    %cl,%rax
add    %rdx,%rax
sar    $0x2,%rax
cmp    $0x1,%rdi
adc    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @F0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 2
%5 = sdiv i64 %4, 2
%6 = shl i64 1, %5
%7 = load i64, i64* %2
%8 = shl i64 1, %7
%9 = load i64, i64* %2
%10 = mul nsw i64 2, %9
%11 = add nsw i64 %10, 1
%12 = mul nsw i64 %8, %11
%13 = add nsw i64 %6, %12
%14 = ashr i64 %13, 2
%15 = load i64, i64* %2
%16 = icmp ne i64 %15, 0
%17 = xor i1 %16, true
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = sext i32 %19 to i64
%21 = sub nsw i64 %14, %20
ret i64 %21
}

LLVM IR (-O2):
define i64 @F0(i64 %0) {
%2 = add nsw i64 %0, 2
%3 = sdiv i64 %2, 2
%4 = shl nuw i64 1, %3
%5 = shl nsw i64 %0, 1
%6 = or i64 %5, 1
%7 = shl i64 %6, %0
%8 = add nsw i64 %4, %7
%9 = ashr i64 %8, 2
%10 = icmp ne i64 %0, 0
%11 = sext i1 %10 to i64
%12 = add nsw i64 %9, %11
ret i64 %12
}
int call_typecast(int (*fn)(void)) {
  int (*fn_cast)(int) = (int (*)(int))fn;
  return fn_cast(42);
}


x86 assembly (clang, -O0):
<call_typecast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x2a,%edi
call   *-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_typecast>:
mov    %rdi,%rax
mov    $0x2a,%edi
jmp    *%rax

LLVM IR (-O0):
define i32 @call_typecast(i32 ()* %0) {
%2 = alloca i32 ()*
%3 = alloca i32 (i32)*
store i32 ()* %0, i32 ()** %2
%4 = load i32 ()*, i32 ()** %2
%5 = bitcast i32 ()* %4 to i32 (i32)*
store i32 (i32)* %5, i32 (i32)** %3
%6 = load i32 (i32)*, i32 (i32)** %3
%7 = call i32 %6(i32 42)
ret i32 %7
}

LLVM IR (-O2):
define i32 @call_typecast(i32 ()* nocapture %0) {
%2 = bitcast i32 ()* %0 to i32 (i32)*
%3 = tail call i32 %2(i32 42)
ret i32 %3
}
/* Variables and functions */
scalar_t__ const_bar();
scalar_t__ pure_bar();
int foo(void) {
  int i = 0, x = 0;
  for (; i < 100; i++) {
    x += const_bar();
    x += pure_bar();
  }
  return x;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1176 <foo+0x56>
mov    $0x0,%al
call   1040 <const_bar@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pure_bar@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <foo+0x16>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %r14
push   %rbx
mov    $0x64,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <const_bar@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1030 <pure_bar@plt>
mov    %rax,%rbx
add    %r14d,%ebx
add    $0xffffffff,%ebp
jne    1130 <foo+0x10>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @foo() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = phi i32 [ 0, %0 ], [ %10, %1 ]
%4 = tail call i64 (...) @const_bar()
%5 = trunc i64 %4 to i32
%6 = add i32 %2, %5
%7 = tail call i64 (...) @pure_bar()
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = add nuw nsw i32 %3, 1
%11 = icmp eq i32 %10, 100
br i1 %11, label %12, label %1
12: ; preds = %1
ret i32 %9
}