xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int roundInt(double);
void main() {
  double a = -0.6;
  assert(roundInt(a) == -1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <roundInt@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <roundInt@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca double
store double -6.000000e-01, double* %1
%2 = load double, double* %1
%3 = call i32 @roundInt(double %2)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @roundInt(double -6.000000e-01)
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
TtyFlush() {}


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

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

LLVM IR (-O0):
define i32 @TtyFlush() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @TtyFlush() {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t lfs2_max(uint32_t a, uint32_t b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<lfs2_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <lfs2_max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <lfs2_max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lfs2_max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @lfs2_max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ iswalnum(int /*<<< orphan*/);
scalar_t__ iswprint(int /*<<< orphan*/);
int /*<<< orphan*/ iswspace(int /*<<< orphan*/);
int __iswpunct_ascii(wint_t c) {
  return iswprint(c) && !iswalnum(c) && !iswspace(c);
}


x86 assembly (clang, -O0):
<__iswpunct_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <iswprint@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1180 <__iswpunct_ascii+0x50>
mov    -0x4(%rbp),%edi
call   1030 <iswalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1180 <__iswpunct_ascii+0x50>
mov    -0x4(%rbp),%edi
call   1040 <iswspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iswpunct_ascii>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <iswprint@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     115a <__iswpunct_ascii+0x2a>
mov    %ebp,%edi
call   1030 <iswalnum@plt>
test   %eax,%eax
jne    115a <__iswpunct_ascii+0x2a>
mov    %ebp,%edi
call   1040 <iswspace@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @__iswpunct_ascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @iswprint(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @iswalnum(i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @iswspace(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %10, %6, %1
%16 = phi i1 [ false, %6 ], [ false, %1 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @__iswpunct_ascii(i32 %0) {
%2 = tail call i64 @iswprint(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @iswalnum(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i32 @iswspace(i32 %0)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
void motorOff(int motor) {}


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

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

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

LLVM IR (-O2):
define void @motorOff(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_channel_map_equal() {
  printf("NOT IMPLEMENTED:"
         "pa_channel_map_equal"
         "\n");
}


x86 assembly (clang, -O0):
<pa_channel_map_equal>:
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_channel_map_equal>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_channel_map_equal\00"
define i32 @pa_channel_map_equal() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ debug_warning(char *);
int /*<<< orphan*/ h_free(void *);
void component_camera_free(void *handle) {
  if (!handle) {
    debug_warning("[component_camera_free] handle cannot be NULL");
    return;
  }
  h_free(handle);
}


x86 assembly (clang, -O0):
<component_camera_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <component_camera_free+0x28>
lea    0xec2(%rip),%rdi
call   1040 <debug_warning@plt>
jmp    1151 <component_camera_free+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <h_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_camera_free>:
test   %rdi,%rdi
je     112a <component_camera_free+0xa>
jmp    1030 <h_free@plt>
lea    0xecf(%rip),%rdi
jmp    1040 <debug_warning@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"[component_camera_free] handle cannot be NULL\00"
define void @component_camera_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @debug_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @h_free(i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"[component_camera_free] handle cannot be NULL\00"
define void @component_camera_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @debug_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @h_free(i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
struct list_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_insert_before(struct list_node *, struct list_node *);
void list_add_tail(struct list_node *head, struct list_node *new) {
  list_insert_before(head, new);
}


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

x86 assembly (clang, -O2):
<list_add_tail>:
jmp    1030 <list_insert_before@plt>

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

LLVM IR (-O2):
%struct.list_node = type { i32 }
define void @list_add_tail(%struct.list_node* %0, %struct.list_node* %1) {
%3 = tail call i32 @list_insert_before(%struct.list_node* %0, %struct.list_node* %1)
ret void
}
int signe(int x) {
  if (x < 0)
    return -1;
  else
    return 1;
}


x86 assembly (clang, -O0):
<signe>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <signe+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1124 <signe+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signe>:
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @signe(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %8
7: ; preds = %1
store i32 1, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @signe(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 1, i32 -1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ TextStringAt(int, int, char *);
void ShowControls(void) { TextStringAt(50, 190, "(use player controls)"); }


x86 assembly (clang, -O0):
<ShowControls>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
mov    $0xbe,%esi
lea    0xedb(%rip),%rdx
call   1030 <TextStringAt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowControls>:
lea    0xee9(%rip),%rdx
mov    $0x32,%edi
mov    $0xbe,%esi
jmp    1030 <TextStringAt@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"(use player controls)\00"
define void @ShowControls() {
%1 = call i32 @TextStringAt(i32 50, i32 190, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"(use player controls)\00"
define void @ShowControls() {
%1 = tail call i32 @TextStringAt(i32 50, i32 190, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ produce_message(char *, char const *, int /*<<< orphan*/);
void qfile_gui_fatal(const char *fmt, va_list args) {
  produce_message("Fatal error", fmt, args);
  exit(1);
}


x86 assembly (clang, -O0):
<qfile_gui_fatal>:
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    0xec3(%rip),%rdi
call   1030 <produce_message@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<qfile_gui_fatal>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <produce_message@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Fatal error\00"
define void @qfile_gui_fatal(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 @produce_message(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"Fatal error\00"
define void @qfile_gui_fatal(i8* %0, i32 %1) {
%3 = tail call i32 @produce_message(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *libintl_gettext(char const *);
char *gettext(const char *msgid) { return libintl_gettext(msgid); }


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

x86 assembly (clang, -O2):
<gettext>:
jmp    1030 <libintl_gettext@plt>

LLVM IR (-O0):
define i8* @gettext(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @libintl_gettext(i8* %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @gettext(i8* %0) {
%2 = tail call i8* @libintl_gettext(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;
struct serializer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ s_wl32(struct serializer *, int /*<<< orphan*/);
void s_wl64(struct serializer *s, uint64_t u64) {
  s_wl32(s, (uint32_t)u64);
  s_wl32(s, (uint32_t)(u64 >> 32));
  return;
}


x86 assembly (clang, -O0):
<s_wl64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <s_wl32@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <s_wl32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_wl64>:
push   %rbx
mov    %rdi,%rbx
call   1030 <s_wl32@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <s_wl32@plt>

LLVM IR (-O0):
%struct.serializer = type { i32 }
define void @s_wl64(%struct.serializer* %0, i32 %1) {
%3 = alloca %struct.serializer*
%4 = alloca i32
store %struct.serializer* %0, %struct.serializer** %3
store i32 %1, i32* %4
%5 = load %struct.serializer*, %struct.serializer** %3
%6 = load i32, i32* %4
%7 = call i32 @s_wl32(%struct.serializer* %5, i32 %6)
%8 = load %struct.serializer*, %struct.serializer** %3
%9 = load i32, i32* %4
%10 = ashr i32 %9, 32
%11 = call i32 @s_wl32(%struct.serializer* %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.serializer = type { i32 }
define void @s_wl64(%struct.serializer* %0, i32 %1) {
%3 = tail call i32 @s_wl32(%struct.serializer* %0, i32 %1)
%4 = tail call i32 @s_wl32(%struct.serializer* %0, i32 poison)
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int val;
  val = getchar() != EOF;
  printf("val = getchar() != EOF\n");
  printf("val = %d\n", val);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea4(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2ea9(%rip),%rcx
xor    %ebx,%ebx
cmp    (%rcx),%rax
setne  %bl
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [24 x i8] c"val = getchar() != EOF\0A\00"
@.str.1 = [10 x i8] c"val = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 (...) @getchar()
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
%10 = zext i1 %9 to i32
store i32 %10, i32* %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i64 0
@.str.1 = [10 x i8] c"val = %d\0A\00"
@str = [23 x i8] c"val = getchar() != EOF\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
double fabsf(float);
int f(float a) { return fabsf(a) < 0.0; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabsf@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
call   1030 <fabsf@plt>
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call double @fabsf(float %3)
%5 = fcmp olt double %4, 0.000000e+00
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(float %0) {
%2 = tail call double @fabsf(float %0)
%3 = fcmp olt double %2, 0.000000e+00
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int create_file(int);
int get_free_file_index();
bool test_create_file() {
  int32_t index = get_free_file_index();
  if (index == -1) {
    return true;
  }
  return create_file(index);
}


x86 assembly (clang, -O0):
<test_create_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_free_file_index@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1148 <test_create_file+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1153 <test_create_file+0x33>
mov    -0x8(%rbp),%edi
call   1040 <create_file@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_create_file>:
push   %rax
xor    %eax,%eax
call   1030 <get_free_file_index@plt>
cmp    $0xffffffff,%eax
je     1135 <test_create_file+0x15>
mov    %eax,%edi
pop    %rax
jmp    1040 <create_file@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test_create_file() {
%1 = tail call i32 (...) @get_free_file_index()
%2 = icmp eq i32 %1, -1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @create_file(i32 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 1, %0 ]
ret i32 %6
}
void glBindBufferBase(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glBindBufferBase() {
ret void
}
/* Variables and functions */
void Default_RTC0_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Default_RTC0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int O_RDWR;
int O_TRUNC;
int /*<<< orphan*/ exit(int);
int open(char *, int);
int /*<<< orphan*/ print_err(char *);
void erase_data(char *filename) {
  int ret;
  ret = open(filename, O_RDWR | O_TRUNC);
  if (ret < 0) {
    print_err("error in flushing the content of update.log or delete.log - "
              "exiting...\n");
    exit(1);
  }
  return;
}


x86 assembly (clang, -O0):
<erase_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
or     (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    117a <erase_data+0x4a>
lea    0xe95(%rip),%rdi
call   1030 <print_err@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erase_data>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
call   1040 <open@plt>
test   %eax,%eax
js     114e <erase_data+0x1e>
pop    %rax
ret
lea    0xeab(%rip),%rdi
call   1030 <print_err@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_TRUNC = global i32 0
@.str = [72 x i8] c"error in flushing the content of update.log or delete.log - exiting...\0A\00"
define void @erase_data(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDWR
%6 = load i32, i32* @O_TRUNC
%7 = or i32 %5, %6
%8 = call i32 @open(i8* %4, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = call i32 @print_err(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
ret void
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_TRUNC = global i32 0
@.str = [72 x i8] c"error in flushing the content of update.log or delete.log - exiting...\0A\00"
define void @erase_data(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_TRUNC
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = tail call i32 @print_err(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dothestuff();
int main(int argc, char **argv, char **envp) {
  dothestuff();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @dothestuff()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show_list_memory();
int /*<<< orphan*/ show_param_memory();
int /*<<< orphan*/ show_rule_memory();
int /*<<< orphan*/ show_sys_memory();
int /*<<< orphan*/ show_zlex_memory();
show_memory() {
  printf("Memory usage\n");
  show_zlex_memory();
  show_list_memory();
  show_rule_memory();
  show_sys_memory();
  show_param_memory();
}


x86 assembly (clang, -O0):
<show_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <show_zlex_memory@plt>
mov    $0x0,%al
call   1080 <show_list_memory@plt>
mov    $0x0,%al
call   1060 <show_rule_memory@plt>
mov    $0x0,%al
call   1050 <show_sys_memory@plt>
mov    $0x0,%al
call   1030 <show_param_memory@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_memory>:
push   %rax
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1070 <show_zlex_memory@plt>
xor    %eax,%eax
call   1080 <show_list_memory@plt>
xor    %eax,%eax
call   1060 <show_rule_memory@plt>
xor    %eax,%eax
call   1050 <show_sys_memory@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <show_param_memory@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Memory usage\0A\00"
define i32 @show_memory() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @show_zlex_memory()
%4 = call i32 (...) @show_list_memory()
%5 = call i32 (...) @show_rule_memory()
%6 = call i32 (...) @show_sys_memory()
%7 = call i32 (...) @show_param_memory()
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@str = [13 x i8] c"Memory usage\00"
define i32 @show_memory() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @show_zlex_memory()
%3 = tail call i32 (...) @show_list_memory()
%4 = tail call i32 (...) @show_rule_memory()
%5 = tail call i32 (...) @show_sys_memory()
%6 = tail call i32 (...) @show_param_memory()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ err_exit(char *);
scalar_t__ setreuid(int /*<<< orphan*/, int /*<<< orphan*/);
void _setreuid(uid_t r, uid_t u) {
  if (setreuid(r, u) < 0)
    err_exit("_setreuid");
}


x86 assembly (clang, -O0):
<_setreuid>:
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   1040 <setreuid@plt>
cmp    $0x0,%rax
jge    114f <_setreuid+0x2f>
lea    0xeb6(%rip),%rdi
call   1030 <err_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_setreuid>:
push   %rax
call   1040 <setreuid@plt>
test   %rax,%rax
js     112d <_setreuid+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <err_exit@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"_setreuid\00"
define void @_setreuid(i32 %0, i32 %1) {
%3 = tail call i64 @setreuid(i32 %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err_exit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
void RTC_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @RTC_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned xrop3_66_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ D;
  stk2 = T ^ D;
  stk1 = stk1 & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_66_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_66_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
mov    %eax,%edx
or     %ecx,%eax
xor    $0xff,%ecx
xor    $0xff,%edx
and    %ecx,%edx
not    %eax
and    %edx,%eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_66_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %5
%24 = xor i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %7
%26 = load i32, i32* %5
%27 = xor i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_66_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = xor i32 %6, 255
%9 = and i32 %8, %7
%10 = or i32 %6, %4
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
%13 = or i8 %1, %0
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
ret i32 %15
}
int main() {
  while (1) {
    50;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    110b <main+0xb>

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

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
char const *dm_get_dir();
const char *crypt_get_dir(void) { return dm_get_dir(); }


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

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

LLVM IR (-O0):
define i8* @crypt_get_dir() {
%1 = call i8* (...) @dm_get_dir()
ret i8* %1
}

LLVM IR (-O2):
define i8* @crypt_get_dir() {
%1 = tail call i8* (...) @dm_get_dir()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ rtv_free_devices();
int ciFree(int argc, char **argv) {
  argc = argc;
  argv = argv;
  rtv_free_devices();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @ciFree(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @rtv_free_devices()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void conf_dispose_array(char **argv) {
  int index = 0;
  if (!argv)
    return;
  while (argv[index]) {
    free(argv[index]);
    index++;
  }
}


x86 assembly (clang, -O0):
<conf_dispose_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1133 <conf_dispose_array+0x23>
jmp    116a <conf_dispose_array+0x5a>
jmp    1138 <conf_dispose_array+0x28>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     116a <conf_dispose_array+0x5a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <conf_dispose_array+0x28>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_dispose_array>:
push   %rbx
test   %rdi,%rdi
je     1141 <conf_dispose_array+0x31>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <conf_dispose_array+0x31>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <conf_dispose_array+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @conf_dispose_array(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %12, %6 ], [ %4, %3 ]
%9 = tail call i32 @free(i8* %8)
%10 = add nuw nsw i64 %7, 1
%11 = getelementptr inbounds i8*, i8** %0, i64 %10
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3, %1
ret void
}
void print_array_err(char **a, int n) {
  printf("a: %d, a+1:%d\n", a, a + 1);
  int i = 0;
  for (i = 0; i < n; i++) {
  }
}


x86 assembly (clang, -O0):
<print_array_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
add    $0x8,%rdx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1166 <print_array_err+0x56>
jmp    1158 <print_array_err+0x48>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <print_array_err+0x37>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array_err>:
mov    %rdi,%rsi
lea    0x8(%rdi),%rdx
lea    0xee2(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"a: %d, a+1:%d\0A\00"
define void @print_array_err(i8** %0, i32 %1) {
%3 = getelementptr inbounds i8*, i8** %0, i64 1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %0, i8** %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct lu_phy_attr {
  int dummy;
};

/* Variables and functions */
uint8_t default_media_load(struct lu_phy_attr *lu, int load) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.lu_phy_attr = type { i32 }
define i32 @default_media_load(%struct.lu_phy_attr* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ isalpha(char);
int is_valid_hostname_char(char c) {
  return (isalpha(c) || c == '-' || c == '_' || c == '.');
}


x86 assembly (clang, -O0):
<is_valid_hostname_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    116a <is_valid_hostname_char+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     116a <is_valid_hostname_char+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     116a <is_valid_hostname_char+0x5a>
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_hostname_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <is_valid_hostname_char+0x17>
pop    %rbx
ret
cmp    $0x2d,%bl
je     1125 <is_valid_hostname_char+0x15>
cmp    $0x5f,%bl
je     1125 <is_valid_hostname_char+0x15>
xor    %eax,%eax
cmp    $0x2e,%bl
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_valid_hostname_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 95
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 46
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_valid_hostname_char(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i8 %0, label %6 [
i8 95, label %9
i8 45, label %9
]
6: ; preds = %5
%7 = icmp eq i8 %0, 46
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %10
}
__attribute__((no)) long trampoline_mremap(unsigned long n1, unsigned long n2,
                                           unsigned long n3, int n4,
                                           unsigned long n5) {
  long ret;
  register int r8 __asm__("r8") = n5;
  __asm__ __volatile__("leaq 1f(%%rip), %%r11\n\t"
                       "movq %%r11, %%fs:0x20\n\t"
                       "jmpq *%%gs:0x10000+"
                       "0x30"
                       "\n\t"
                       "1:\n\t"
                       : "=a"(ret)
                       : "D"(n1), "S"(n2), "d"(n3), "c"(n4), "r"(r8)
                       : "memory");
  return ret;
}


x86 assembly (clang, -O0):
<trampoline_mremap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x34(%rbp),%r8d
lea    0x11(%rip),%r11
mov    %r11,%fs:0x20
jmp    *%gs:0x10030
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trampoline_mremap>:
lea    0x11(%rip),%r11
mov    %r11,%fs:0x20
jmp    *%gs:0x10030
ret

LLVM IR (-O0):
define i64 @trampoline_mremap(i64 %0, i64 %1, i64 %2, i32 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i64
%11 = alloca i64
%12 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%13 = load i64, i64* %10
%14 = trunc i64 %13 to i32
store i32 %14, i32* %12
%15 = load i64, i64* %6
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = load i32, i32* %9
%19 = load i32, i32* %12
%20 = call i64 asm sideeffect "leaq 1f(%rip), %r11\0A\09movq %r11, %fs:0x20\0A\09jmpq *%gs:0x10000+0x30\0A\091:\0A\09", "={ax},{di},{si},{dx},{cx},{r8},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %15, i64 %16, i64 %17, i32 %18, i32 %19)
store i64 %20, i64* %11
%21 = load i64, i64* %11
ret i64 %21
}

LLVM IR (-O2):
define i64 @trampoline_mremap(i64 %0, i64 %1, i64 %2, i32 %3, i64 %4) {
%6 = trunc i64 %4 to i32
%7 = tail call i64 asm sideeffect "leaq 1f(%rip), %r11\0A\09movq %r11, %fs:0x20\0A\09jmpq *%gs:0x10000+0x30\0A\091:\0A\09", "={ax},{di},{si},{dx},{cx},{r8},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i32 %3, i32 %6)
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int __infer_nondet_int();
int sigprocmask(int how, const sigset_t *set, sigset_t *oset) {
  int ret = __infer_nondet_int();
  if (ret < -1 || 0 < ret)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<sigprocmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jl     1142 <sigprocmask+0x32>
xor    %eax,%eax
cmp    -0x1c(%rbp),%eax
jge    114c <sigprocmask+0x3c>
jmp    1147 <sigprocmask+0x37>
jmp    1147 <sigprocmask+0x37>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigprocmask>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
lea    -0x1(%rax),%ecx
cmp    $0xfffffffd,%ecx
ja     1122 <sigprocmask+0x12>
jmp    1120 <sigprocmask+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sigprocmask(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 = call i32 (...) @__infer_nondet_int()
store i32 %8, i32* %7
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, -1
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i32, i32* %7
%13 = icmp slt i32 0, %12
br i1 %13, label %14, label %16
14: ; preds = %11, %3
br label %15
15: ; preds = %14, %15
br label %15
16: ; preds = %11
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @sigprocmask(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = tail call i32 (...) @__infer_nondet_int()
%5 = add i32 %4, -1
%6 = icmp ult i32 %5, -2
br i1 %6, label %7, label %8
7: ; preds = %3, %7
br label %7
8: ; preds = %3
ret i32 %4
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dstdev(int, int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dstdev(N, 1, x, stride);
  printf("sample standard deviation: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
mov    $0x1,%esi
call   1050 <stdlib_strided_dstdev@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1040 <stdlib_strided_dstdev@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [32 x i8] c"sample standard deviation: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dstdev(i32 %6, i32 1, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [32 x i8] c"sample standard deviation: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dstdev(i32 4, i32 1, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printF(char *);
main() { printF("hello, world\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printF@plt>
xor    %eax,%eax
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 = [14 x i8] c"hello, world\0A\00"
define i32 @main() {
%1 = call i32 @printF(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"hello, world\0A\00"
define i32 @main() {
%1 = tail call i32 @printF(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}