xunge/DecIR huggingface dataset:
int main() {
  struct S {
    struct S *p;
    int x;
  } s;
  s.x = 0;
  s.p = &s;
  return s.p->p->p->p->p->x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    0x8(%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.S = type { %struct.S*, i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.S
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.S, %struct.S* %2, i32 0, i32 1
store i32 0, i32* %3
%4 = getelementptr inbounds %struct.S, %struct.S* %2, i32 0, i32 0
store %struct.S* %2, %struct.S** %4
%5 = getelementptr inbounds %struct.S, %struct.S* %2, i32 0, i32 0
%6 = load %struct.S*, %struct.S** %5
%7 = getelementptr inbounds %struct.S, %struct.S* %6, i32 0, i32 0
%8 = load %struct.S*, %struct.S** %7
%9 = getelementptr inbounds %struct.S, %struct.S* %8, i32 0, i32 0
%10 = load %struct.S*, %struct.S** %9
%11 = getelementptr inbounds %struct.S, %struct.S* %10, i32 0, i32 0
%12 = load %struct.S*, %struct.S** %11
%13 = getelementptr inbounds %struct.S, %struct.S* %12, i32 0, i32 0
%14 = load %struct.S*, %struct.S** %13
%15 = getelementptr inbounds %struct.S, %struct.S* %14, i32 0, i32 1
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int _irc_client_message(char *, char *, char *, int, char *, int);
int irc_ctcp(char *target, char *text) {
  return _irc_client_message(target, "PRIVMSG", "%c%s%c", 1, text, 1);
}


x86 assembly (clang, -O0):
<irc_ctcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%r8
lea    0xed1(%rip),%rsi
lea    0xed2(%rip),%rdx
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1030 <_irc_client_message@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_ctcp>:
mov    %rsi,%r8
lea    0xee6(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    $0x1,%ecx
mov    $0x1,%r9d
jmp    1030 <_irc_client_message@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"PRIVMSG\00"
@.str.1 = [7 x i8] c"%c%s%c\00"
define i32 @irc_ctcp(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 i32 @_irc_client_message(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 1, i8* %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"PRIVMSG\00"
@.str.1 = [7 x i8] c"%c%s%c\00"
define i32 @irc_ctcp(i8* %0, i8* %1) {
%3 = tail call i32 @_irc_client_message(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 1, i8* %1, i32 1)
ret i32 %3
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct clause_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_destroy(struct genlist *);
void clause_list_destroy(struct clause_list *tthis) {
  genlist_destroy((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<clause_list_destroy>:
jmp    1030 <genlist_destroy@plt>

LLVM IR (-O0):
%struct.clause_list = type { i32 }
%struct.genlist = type { i32 }
define void @clause_list_destroy(%struct.clause_list* %0) {
%2 = alloca %struct.clause_list*
store %struct.clause_list* %0, %struct.clause_list** %2
%3 = load %struct.clause_list*, %struct.clause_list** %2
%4 = bitcast %struct.clause_list* %3 to %struct.genlist*
%5 = call i32 @genlist_destroy(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.clause_list = type { i32 }
%struct.genlist = type { i32 }
define void @clause_list_destroy(%struct.clause_list* %0) {
%2 = bitcast %struct.clause_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_destroy(%struct.genlist* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_new(char *);
int unlink_old();
int change_link(char *path) {
  int flag = unlink_old();
  if (flag == 0) {
    link_new(path);
  }
  return flag;
}


x86 assembly (clang, -O0):
<change_link>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <unlink_old@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1149 <change_link+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <link_new@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_link>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <unlink_old@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    113b <change_link+0x1b>
mov    %rbx,%rdi
call   1030 <link_new@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @change_link(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @unlink_old()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @link_new(i8* %8)
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @change_link(i8* %0) {
%2 = tail call i32 (...) @unlink_old()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @link_new(i8* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
void *memmove_impl(void *, void const *, size_t);
void *memmove_caller(void *dst, const void *src, size_t n) {
  return memmove_impl(dst, src, n);
}


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

x86 assembly (clang, -O2):
<memmove_caller>:
jmp    1030 <memmove_impl@plt>

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

LLVM IR (-O2):
define i8* @memmove_caller(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @memmove_impl(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
void XtDisplayInitialize() {}


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

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

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

LLVM IR (-O2):
define void @XtDisplayInitialize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Expander_Init(int);
void Ports_Init(void) {
  Expander_Init(0x18);
  Expander_Init(0x19);
  Expander_Init(0x1a);
}


x86 assembly (clang, -O0):
<Ports_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
call   1030 <Expander_Init@plt>
mov    $0x19,%edi
call   1030 <Expander_Init@plt>
mov    $0x1a,%edi
call   1030 <Expander_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ports_Init>:
push   %rax
mov    $0x18,%edi
call   1030 <Expander_Init@plt>
mov    $0x19,%edi
call   1030 <Expander_Init@plt>
mov    $0x1a,%edi
pop    %rax
jmp    1030 <Expander_Init@plt>

LLVM IR (-O0):
define void @Ports_Init() {
%1 = call i32 @Expander_Init(i32 24)
%2 = call i32 @Expander_Init(i32 25)
%3 = call i32 @Expander_Init(i32 26)
ret void
}

LLVM IR (-O2):
define void @Ports_Init() {
%1 = tail call i32 @Expander_Init(i32 24)
%2 = tail call i32 @Expander_Init(i32 25)
%3 = tail call i32 @Expander_Init(i32 26)
ret void
}
unsigned long insert_li(unsigned long insn, long value, const char **errmsg) {
  return insn | (value & 0x3fffffc);
}


x86 assembly (clang, -O0):
<insert_li>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x3fffffc,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_li>:
mov    %rsi,%rax
and    $0x3fffffc,%eax
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @insert_li(i64 %0, i64 %1, i8** %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8**
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8** %2, i8*** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = and i64 %8, 67108860
%10 = or i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @insert_li(i64 %0, i64 %1, i8** nocapture readnone %2) {
%4 = and i64 %1, 67108860
%5 = or i64 %4, %0
ret i64 %5
}
/* Variables and functions */
int address_is_invalid_destination(char const *, int);
int /*<<< orphan*/ strcmpstart(char const *, char *);
int address_is_invalid_mapaddress_target(const char *addr) {
  if (!strcmpstart(addr, "*."))
    return address_is_invalid_destination(addr + 2, 1);
  else
    return address_is_invalid_destination(addr, 1);
}


x86 assembly (clang, -O0):
<address_is_invalid_mapaddress_target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strcmpstart@plt>
cmp    $0x0,%eax
jne    115f <address_is_invalid_mapaddress_target+0x3f>
mov    -0x10(%rbp),%rdi
add    $0x2,%rdi
mov    $0x1,%esi
call   1030 <address_is_invalid_destination@plt>
mov    %eax,-0x4(%rbp)
jmp    1170 <address_is_invalid_mapaddress_target+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <address_is_invalid_destination@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<address_is_invalid_mapaddress_target>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strcmpstart@plt>
test   %eax,%eax
jne    1138 <address_is_invalid_mapaddress_target+0x18>
add    $0x2,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
pop    %rbx
jmp    1030 <address_is_invalid_destination@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"*.\00"
define i32 @address_is_invalid_mapaddress_target(i8* %0) {
%2 = tail call i32 @strcmpstart(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = tail call i32 @address_is_invalid_destination(i8* %5, i32 1)
br label %9
7: ; preds = %1
%8 = tail call i32 @address_is_invalid_destination(i8* %0, i32 1)
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %8, %7 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int openme_init(char *, char *, char *, int);
extern int openme_init_f_(char *env_use, char *env_plugins, char *plugin_names,
                          int force_use) {
  return openme_init(env_use, env_plugins, plugin_names, force_use);
}


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

x86 assembly (clang, -O2):
<openme_init_f_>:
jmp    1030 <openme_init@plt>

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

LLVM IR (-O2):
define i32 @openme_init_f_(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @openme_init(i8* %0, i8* %1, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ font_draw_string(char *, int, int, int);
void gui_functions_menu_2_item_1() {
  font_draw_string("TODO: ACPI, PCI, AHCI", 700, 10, 0xffffff);
}


x86 assembly (clang, -O0):
<gui_functions_menu_2_item_1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2bc,%esi
mov    $0xa,%edx
mov    $0xffffff,%ecx
call   1030 <font_draw_string@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_functions_menu_2_item_1>:
lea    0xee9(%rip),%rdi
mov    $0x2bc,%esi
mov    $0xa,%edx
mov    $0xffffff,%ecx
jmp    1030 <font_draw_string@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"TODO: ACPI, PCI, AHCI\00"
define void @gui_functions_menu_2_item_1() {
%1 = call i32 @font_draw_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 700, i32 10, i32 16777215)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"TODO: ACPI, PCI, AHCI\00"
define void @gui_functions_menu_2_item_1() {
%1 = tail call i32 @font_draw_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 700, i32 10, i32 16777215)
ret void
}
/* Variables and functions */
int gob_decode_double(double *, char *, size_t);
int gob_decode_float(float *v, char *buf, size_t buf_size) {
  int n;
  double vv = 0.0;
  n = gob_decode_double(&vv, buf, buf_size);
  *v = (float)vv;
  return n;
}


x86 assembly (clang, -O0):
<gob_decode_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x28(%rbp),%rdi
call   1030 <gob_decode_double@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gob_decode_float>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <gob_decode_double@plt>
movsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gob_decode_float(float* %0, i8* %1, i64 %2) {
%4 = alloca float*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca double
store float* %0, float** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store double 0.000000e+00, double* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @gob_decode_double(double* %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load double, double* %8
%13 = fptrunc double %12 to float
%14 = load float*, float** %4
store float %13, float* %14
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @gob_decode_float(float* nocapture writeonly %0, i8* %1, i64 %2) {
%4 = alloca double
%5 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %4
%6 = call i32 @gob_decode_double(double* %4, i8* %1, i64 %2)
%7 = load double, double* %4
%8 = fptrunc double %7 to float
store float %8, float* %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ bf_clean(int);
int /*<<< orphan*/ p2rd(int);
int /*<<< orphan*/ rd2p(int);
int bf_movp(int obj, int sub) {
  p2rd(sub);
  bf_clean(obj);
  rd2p(obj);
  return 0;
}


x86 assembly (clang, -O0):
<bf_movp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <p2rd@plt>
mov    -0x4(%rbp),%edi
call   1030 <bf_clean@plt>
mov    -0x4(%rbp),%edi
call   1050 <rd2p@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_movp>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <p2rd@plt>
mov    %ebx,%edi
call   1030 <bf_clean@plt>
mov    %ebx,%edi
call   1050 <rd2p@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bf_movp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @p2rd(i32 %5)
%7 = load i32, i32* %3
%8 = call i32 @bf_clean(i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @rd2p(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @bf_movp(i32 %0, i32 %1) {
%3 = tail call i32 @p2rd(i32 %1)
%4 = tail call i32 @bf_clean(i32 %0)
%5 = tail call i32 @rd2p(i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init00(int, int, int);
void init0(int s) {
  switch (s) {
  case 1:
    init00(9, 9, 10);
    return;
  case 2:
    init00(16, 16, 40);
    return;
  }
}


x86 assembly (clang, -O0):
<init0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     1140 <init0+0x30>
jmp    112f <init0+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1156 <init0+0x46>
jmp    1167 <init0+0x57>
mov    $0x9,%esi
mov    $0xa,%edx
mov    %esi,%edi
call   1030 <init00@plt>
jmp    1167 <init0+0x57>
mov    $0x10,%esi
mov    $0x28,%edx
mov    %esi,%edi
call   1030 <init00@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init0>:
cmp    $0x2,%edi
je     112e <init0+0x1e>
cmp    $0x1,%edi
jne    1142 <init0+0x32>
mov    $0x9,%edi
mov    $0x9,%esi
mov    $0xa,%edx
jmp    1030 <init00@plt>
mov    $0x10,%edi
mov    $0x10,%esi
mov    $0x28,%edx
jmp    1030 <init00@plt>
ret

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

LLVM IR (-O2):
define void @init0(i32 %0) {
switch i32 %0, label %6 [
i32 1, label %2
i32 2, label %4
]
2: ; preds = %1
%3 = tail call i32 @init00(i32 9, i32 9, i32 10)
br label %6
4: ; preds = %1
%5 = tail call i32 @init00(i32 16, i32 16, i32 40)
br label %6
6: ; preds = %2, %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ManualControlSettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void ManualControlSettingsLogging() {
  UAVObjLogging(ManualControlSettingsHandle());
}


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

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

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

LLVM IR (-O2):
define void @ManualControlSettingsLogging() {
%1 = tail call i32 (...) @ManualControlSettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void app_version(void) {
  printf("%s\n(%s)\n", ("GWS Analog Baseband"),
         ("v1.0-1-140217. Buildtime: "
          "Mar 19 2022"
          ", "
          "00:28:26"));
}


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

x86 assembly (clang, -O2):
<app_version>:
lea    0xee9(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xef8(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s\0A(%s)\0A\00"
@.str.1 = [20 x i8] c"GWS Analog Baseband\00"
@.str.2 = [48 x i8] c"v1.0-1-140217. Buildtime: Mar 19 2022, 00:28:26\00"
define void @app_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s\0A(%s)\0A\00"
@.str.1 = [20 x i8] c"GWS Analog Baseband\00"
@.str.2 = [48 x i8] c"v1.0-1-140217. Buildtime: Mar 19 2022, 00:28:26\00"
define void @app_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Server {
  int dummy;
};

/* Variables and functions */
int run_every(struct Server *, long, int, void (*)(void *), void *);
int run_after(struct Server *self, long milliseconds, void task(void *),
              void *arg) {
  return run_every(self, milliseconds, 1, task, arg);
}


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

x86 assembly (clang, -O2):
<run_after>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    $0x1,%edx
jmp    1030 <run_every@plt>

LLVM IR (-O0):
%struct.Server = type { i32 }
define i32 @run_after(%struct.Server* %0, i64 %1, void (i8*)* %2, i8* %3) {
%5 = alloca %struct.Server*
%6 = alloca i64
%7 = alloca void (i8*)*
%8 = alloca i8*
store %struct.Server* %0, %struct.Server** %5
store i64 %1, i64* %6
store void (i8*)* %2, void (i8*)** %7
store i8* %3, i8** %8
%9 = load %struct.Server*, %struct.Server** %5
%10 = load i64, i64* %6
%11 = load void (i8*)*, void (i8*)** %7
%12 = load i8*, i8** %8
%13 = call i32 @run_every(%struct.Server* %9, i64 %10, i32 1, void (i8*)* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.Server = type { i32 }
define i32 @run_after(%struct.Server* %0, i64 %1, void (i8*)* %2, i8* %3) {
%5 = tail call i32 @run_every(%struct.Server* %0, i64 %1, i32 1, void (i8*)* %2, i8* %3)
ret i32 %5
}
unsigned int Int2Bar(int numero) { return (1UL << numero) - 1; }


x86 assembly (clang, -O0):
<Int2Bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int2Bar>:
mov    %edi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
not    %eax
ret

LLVM IR (-O0):
define i32 @Int2Bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = shl i64 1, %4
%6 = sub i64 %5, 1
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @Int2Bar(i32 %0) {
%2 = zext i32 %0 to i64
%3 = shl nsw i64 -1, %2
%4 = trunc i64 %3 to i32
%5 = xor i32 %4, -1
ret i32 %5
}
int test_imm_5Cint8_mem(signed char *val) {
  return ((*val) & (0x5C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_5Cint8_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, 92
%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_5Cint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 92
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void finish_decode(void) {}


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

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

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

LLVM IR (-O2):
define void @finish_decode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *_MyName = "Jeason";
  printf("Hello %s!\n", _MyName);
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"Jeason\00"
@.str.1 = [11 x i8] c"Hello %s!\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *of_calloc(size_t nmemb, size_t size) { return calloc(nmemb, size); }


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

x86 assembly (clang, -O2):
<of_calloc>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @of_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i8* @calloc(i64 %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @of_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
int fun1304() { return 1304; }


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

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

LLVM IR (-O0):
define i32 @fun1304() {
ret i32 1304
}

LLVM IR (-O2):
define i32 @fun1304() {
ret i32 1304
}
void gtk_socket_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_socket_get_type() {
ret void
}
int test_imm_2Euint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x2E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_2Euint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 46
%7 = icmp ne i64 %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_2Euint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 197568495616
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef size_t int32_t;

/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(size_t nobj, size_t size) {
  int32_t real_size;
  void *p;
  real_size = nobj * size;
  p = malloc(real_size);
  memset(p, 0, real_size);
  return p;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = mul i64 %7, %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = load i64, i64* %5
%14 = call i32 @memset(i8* %12, i32 0, i64 %13)
%15 = load i8*, i8** %6
ret i8* %15
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
ret i8* %4
}
void Cmd_Line_Init(void *shared_data_address) {}


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

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

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

LLVM IR (-O2):
define void @Cmd_Line_Init(i8* nocapture %0) {
ret void
}
int fftw_imax(int a, int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<fftw_imax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <fftw_imax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <fftw_imax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftw_imax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @fftw_imax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t read32(uint8_t *buf) {
  uint32_t v = 0;
  for (unsigned int i = 0; i < 4; i++) {
    v <<= 8;
    v |= buf[i];
  }
  return v;
}


x86 assembly (clang, -O0):
<read32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jae    1147 <read32+0x47>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <read32+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32>:
mov    (%rdi),%ecx
mov    0x4(%rdi),%eax
shl    $0x10,%ecx
shl    $0x8,%eax
or     %ecx,%eax
or     0x8(%rdi),%eax
shl    $0x8,%eax
or     0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @read32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl i32 %2, 16
%6 = shl i32 %4, 8
%7 = or i32 %5, %6
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = or i32 %9, %7
%11 = shl i32 %10, 8
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %13, %11
ret i32 %14
}
void AdPlug_LogWrite(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @AdPlug_LogWrite(i8* nocapture %0, ...) {
ret void
}
int scandir_filter_stub(const struct dirent *pdirent) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.dirent = type opaque
define i32 @scandir_filter_stub(%struct.dirent* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_task(double *, double *);
void unregistered_on_one_path(int x) {
  double p[12], q[34];
  if (x > 42) {
#pragma starpu register p
  }
#pragma starpu register q
  my_task(p, q);
}


x86 assembly (clang, -O0):
<unregistered_on_one_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2a,-0x4(%rbp)
jle    112d <unregistered_on_one_path+0x1d>
jmp    112d <unregistered_on_one_path+0x1d>
lea    -0x70(%rbp),%rdi
lea    -0x180(%rbp),%rsi
call   1030 <my_task@plt>
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unregistered_on_one_path>:
sub    $0x178,%rsp
mov    %rsp,%rdi
lea    0x60(%rsp),%rsi
call   1030 <my_task@plt>
add    $0x178,%rsp
ret

LLVM IR (-O0):
define void @unregistered_on_one_path(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x double]
%4 = alloca [34 x double]
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 42
br i1 %6, label %7, label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %1
%9 = getelementptr inbounds [12 x double], [12 x double]* %3, i64 0, i64 0
%10 = getelementptr inbounds [34 x double], [34 x double]* %4, i64 0, i64 0
%11 = call i32 @my_task(double* %9, double* %10)
ret void
}

LLVM IR (-O2):
define void @unregistered_on_one_path(i32 %0) {
%2 = alloca [12 x double]
%3 = alloca [34 x double]
%4 = bitcast [12 x double]* %2 to i8*
%5 = bitcast [34 x double]* %3 to i8*
%6 = getelementptr inbounds [12 x double], [12 x double]* %2, i64 0, i64 0
%7 = getelementptr inbounds [34 x double], [34 x double]* %3, i64 0, i64 0
%8 = call i32 @my_task(double* %6, double* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int /*<<< orphan*/ startSocket(int);
void startServer(int i) {
  if (!fork()) {
    startSocket(i);
  }
}


x86 assembly (clang, -O0):
<startServer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
cmp    $0x0,%eax
jne    1143 <startServer+0x23>
mov    -0x4(%rbp),%edi
call   1030 <startSocket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startServer>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <fork@plt>
test   %eax,%eax
je     1130 <startServer+0x10>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1030 <startSocket@plt>

LLVM IR (-O0):
define void @startServer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @fork()
%4 = icmp ne i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @startSocket(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @startServer(i32 %0) {
%2 = tail call i32 (...) @fork()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @startSocket(i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
int test_imm_55int64_lowword_mem(long long *val) {
  return ((*val) & (0x55 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_55int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 85
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ err_fatal_simple_core(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int err_fclose(FILE *stream) {
  int ret = fclose(stream);
  if (ret != 0) {
    err_fatal_simple_core("fclose", strerror(errno));
  }
  return ret;
}


x86 assembly (clang, -O0):
<err_fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     116e <err_fclose+0x3e>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe97(%rip),%rdi
call   1040 <err_fatal_simple_core@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_fclose>:
push   %rbx
call   1030 <fclose@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1158 <err_fclose+0x28>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeaf(%rip),%rdi
mov    %eax,%esi
call   1040 <err_fatal_simple_core@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"fclose\00"
@errno = global i32 0
define i32 @err_fclose(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fclose(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @errno
%10 = call i32 @strerror(i32 %9)
%11 = call i32 @err_fatal_simple_core(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [7 x i8] c"fclose\00"
@errno = global i32 0
define i32 @err_fclose(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @strerror(i32 %5)
%7 = tail call i32 @err_fatal_simple_core(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %4, %1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int /*<<< orphan*/ tm_sec;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void init() {
  time_t t;
  struct tm trec;
  t = time(NULL);
  trec = *localtime(&t);
  srand(trec.tm_sec);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%edi
call   1040 <srand@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @init() {
%1 = alloca i32
%2 = alloca %struct.tm
%3 = call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = bitcast %struct.tm* %2 to i8*
%6 = bitcast %struct.tm* %4 to i8*
%7 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @srand(i32 %8)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @init() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @srand(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  if (num > 9999)
    printf("YES");
  else
    printf("NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x270f,-0x8(%rbp)
jle    115d <main+0x3d>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    1169 <main+0x49>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2710,0x4(%rsp)
lea    0xec2(%rip),%rax
lea    0xebf(%rip),%rdi
cmovge %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 9999
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 9999
%6 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* dereferenceable(1) %6)
ret i32 0
}
void policyBISTFrameReceived(void) {}


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

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

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

LLVM IR (-O2):
define void @policyBISTFrameReceived() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ logger(int /*<<< orphan*/, char *, int);
int read_int3(char const *);
int read_mysql_int24(const char *buf) {
  int iv = 0;
  iv = read_int3(buf);
  logger(0, "INT24 %d\n", iv);
  return iv;
}


x86 assembly (clang, -O0):
<read_mysql_int24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_int3@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    %edi,%edi
lea    0xeb5(%rip),%rsi
call   1040 <logger@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_mysql_int24>:
push   %rbx
call   1030 <read_int3@plt>
mov    %eax,%ebx
lea    0xed1(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1040 <logger@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"INT24 %d\0A\00"
define i32 @read_mysql_int24(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @read_int3(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @logger(i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@.str = [10 x i8] c"INT24 %d\0A\00"
define i32 @read_mysql_int24(i8* %0) {
%2 = tail call i32 @read_int3(i8* %0)
%3 = tail call i32 @logger(i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %2
}
/* Variables and functions */
int h_errno;
int *__h_errno_location(void) { return &h_errno; }


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

x86 assembly (clang, -O2):
<__h_errno_location>:
mov    0x2ee1(%rip),%rax
ret

LLVM IR (-O0):
@h_errno = global i32 0
define i32* @__h_errno_location() {
ret i32* @h_errno
}

LLVM IR (-O2):
@h_errno = global i32 0
define i32* @__h_errno_location() {
ret i32* @h_errno
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void log_int(char *tag, int num) { printf("%s: %d\n", tag, num); }


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

x86 assembly (clang, -O2):
<log_int>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %d\0A\00"
define void @log_int(i8* %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 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %d\0A\00"
define void @log_int(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Variables and functions */
double __s_pow(double, double);
double xy__s_pow(double x) { return __s_pow(x, x); }


x86 assembly (clang, -O0):
<xy__s_pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
call   1030 <__s_pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xy__s_pow>:
movaps %xmm0,%xmm1
jmp    1030 <__s_pow@plt>

LLVM IR (-O0):
define double @xy__s_pow(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @__s_pow(double %3, double %4)
ret double %5
}

LLVM IR (-O2):
define double @xy__s_pow(double %0) {
%2 = tail call double @__s_pow(double %0, double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int nondet_signed_int();
signed int abort_gzip() {
  exit(0);
  return nondet_signed_int();
}


x86 assembly (clang, -O0):
<abort_gzip>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<abort_gzip>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @abort_gzip() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @abort_gzip() {
%1 = tail call i32 @exit(i32 0)
unreachable
}