xunge/DecIR huggingface dataset:
void rop3_100_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T | S;
  stk2 = *D & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %edx,%eax
or     %sil,%al
mov    (%rdi),%r8b
and    %r8b,%al
xor    %sil,%al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
and    %al,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_100_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = xor i8 %6, %1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_smalltalk_comment_entities();
int /*<<< orphan*/ test_smalltalk_comments();
void all_smalltalk_tests() {
  test_smalltalk_comments();
  test_smalltalk_comment_entities();
}


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

x86 assembly (clang, -O2):
<all_smalltalk_tests>:
push   %rax
xor    %eax,%eax
call   1030 <test_smalltalk_comments@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_smalltalk_comment_entities@plt>

LLVM IR (-O0):
define void @all_smalltalk_tests() {
%1 = call i32 (...) @test_smalltalk_comments()
%2 = call i32 (...) @test_smalltalk_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_smalltalk_tests() {
%1 = tail call i32 (...) @test_smalltalk_comments()
%2 = tail call i32 (...) @test_smalltalk_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void quit_programm(const char *error_message) {
  printf("%s\n", error_message);
  exit(1);
}


x86 assembly (clang, -O0):
<quit_programm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<quit_programm>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @quit_programm(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @quit_programm(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
float logf(float);
float HMM_LogF(float Float) {
  ;
  float Result = logf(Float);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_LogF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <logf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_LogF>:
jmp    1030 <logf@plt>

LLVM IR (-O0):
define float @HMM_LogF(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @logf(float %4)
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @HMM_LogF(float %0) {
%2 = tail call float @logf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ _mkdir(char *);
int /*<<< orphan*/ _rmdir(char *);
int /*<<< orphan*/ _unlink(char *);
void cleanup() {
  _unlink("TESTDIR/a");
  _unlink("a");
  _rmdir("TESTDIR");
  _mkdir("TESTDIR");
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <_unlink@plt>
lea    0xec1(%rip),%rdi
call   1050 <_unlink@plt>
lea    0xeb7(%rip),%rdi
call   1040 <_rmdir@plt>
lea    0xeab(%rip),%rdi
call   1030 <_mkdir@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <_unlink@plt>
lea    0xec4(%rip),%rdi
call   1050 <_unlink@plt>
lea    0xeba(%rip),%rbx
mov    %rbx,%rdi
call   1040 <_rmdir@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_mkdir@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"TESTDIR/a\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"TESTDIR\00"
define void @cleanup() {
%1 = call i32 @_unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @_unlink(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @_rmdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @_mkdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"TESTDIR/a\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"TESTDIR\00"
define void @cleanup() {
%1 = tail call i32 @_unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @_unlink(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @_rmdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @_mkdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) int h1(int A, int B) {
  volatile int C = A | B;
  volatile int D = A ^ B;
  return C & ~D;
}


x86 assembly (clang, -O0):
<h1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h1>:
mov    %esi,%eax
or     %edi,%eax
mov    %eax,-0x4(%rsp)
xor    %edi,%esi
mov    %esi,-0x8(%rsp)
mov    -0x4(%rsp),%ecx
mov    -0x8(%rsp),%eax
not    %eax
and    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @h1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = or i32 %7, %8
store volatile i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = xor i32 %10, %11
store volatile i32 %12, i32* %6
%13 = load volatile i32, i32* %5
%14 = load volatile i32, i32* %6
%15 = xor i32 %14, -1
%16 = and i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @h1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = or i32 %1, %0
store volatile i32 %6, i32* %3
%7 = bitcast i32* %4 to i8*
%8 = xor i32 %1, %0
store volatile i32 %8, i32* %4
%9 = load volatile i32, i32* %3
%10 = load volatile i32, i32* %4
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
ret i32 %12
}
/* Type definitions */
struct tms {
  int dummy;
};
struct _reent {
  int dummy;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
clock_t _times_r(struct _reent *r, struct tms *buf) { return 0; }


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

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

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

LLVM IR (-O2):
%struct._reent = type { i32 }
%struct.tms = type { i32 }
define i32 @_times_r(%struct._reent* nocapture readnone %0, %struct.tms* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ irc_notify_hook_timer_whois();
void irc_config_change_network_notify_check_whois(
    void *data, struct t_config_option *option) {
  (void)data;
  (void)option;
  irc_notify_hook_timer_whois();
}


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

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

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

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @irc_config_change_network_notify_check_whois(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1) {
%3 = tail call i32 (...) @irc_notify_hook_timer_whois()
ret void
}
void ___sl_plot(const char *name, ...) { (void)name; }


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

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

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

LLVM IR (-O2):
define void @___sl_plot(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "Usage: bintoc [--compress] <in> <out> <symbol>\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: bintoc [--compress] <in> <out> <symbol>\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: bintoc [--compress] <in> <out> <symbol>\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long CalcHash(char *str) {
  unsigned long hashval;
  unsigned char *puc = ((void *)0);
  hashval = 19791007;
  for (puc = (unsigned char *)str; *puc; puc++) {
    hashval = hashval * 19830923 + (*puc);
  }
  return hashval;
}


x86 assembly (clang, -O0):
<CalcHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x12dfc9f,-0x10(%rbp)
01
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1154 <CalcHash+0x54>
imul   $0x12e988b,-0x10(%rbp),%rax
01
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1120 <CalcHash+0x20>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalcHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <CalcHash+0x29>
add    $0x1,%rdi
mov    $0x12dfc9f,%eax
nop
imul   $0x12e988b,%rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <CalcHash+0x10>
ret
mov    $0x12dfc9f,%eax
ret

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

LLVM IR (-O2):
define i64 @CalcHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %11, %4 ], [ %0, %1 ]
%7 = phi i64 [ %10, %4 ], [ 19791007, %1 ]
%8 = mul i64 %7, 19830923
%9 = zext i8 %5 to i64
%10 = add i64 %8, %9
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 19791007, %1 ], [ %10, %4 ]
ret i64 %15
}
int ValidateAddress(int Address) {
  if ((Address < 3) || (Address > 0x77))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<ValidateAddress>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     111b <ValidateAddress+0x1b>
cmpl   $0x77,-0x8(%rbp)
jle    1127 <ValidateAddress+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <ValidateAddress+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ValidateAddress>:
add    $0xfffffffd,%edi
xor    %eax,%eax
cmp    $0x75,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ValidateAddress(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, 117
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ euler1();
int /*<<< orphan*/ euler2();
int /*<<< orphan*/ search_graph1();
int /*<<< orphan*/ search_graph2();
int /*<<< orphan*/ search_graph3();
int /*<<< orphan*/ search_graph4();
int /*<<< orphan*/ search_graph5();
int /*<<< orphan*/ topological_sort1();
int /*<<< orphan*/ topological_sort2();
int main(void) {
  search_graph1();
  search_graph2();
  search_graph3();
  search_graph4();
  search_graph5();
  topological_sort1();
  topological_sort2();
  euler1();
  euler2();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <search_graph1@plt>
mov    $0x0,%al
call   10a0 <search_graph2@plt>
mov    $0x0,%al
call   1040 <search_graph3@plt>
mov    $0x0,%al
call   1090 <search_graph4@plt>
mov    $0x0,%al
call   1050 <search_graph5@plt>
mov    $0x0,%al
call   10b0 <topological_sort1@plt>
mov    $0x0,%al
call   1080 <topological_sort2@plt>
mov    $0x0,%al
call   1060 <euler1@plt>
mov    $0x0,%al
call   1070 <euler2@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <search_graph1@plt>
xor    %eax,%eax
call   10a0 <search_graph2@plt>
xor    %eax,%eax
call   1040 <search_graph3@plt>
xor    %eax,%eax
call   1090 <search_graph4@plt>
xor    %eax,%eax
call   1050 <search_graph5@plt>
xor    %eax,%eax
call   10b0 <topological_sort1@plt>
xor    %eax,%eax
call   1080 <topological_sort2@plt>
xor    %eax,%eax
call   1060 <euler1@plt>
xor    %eax,%eax
call   1070 <euler2@plt>
mov    0x2e09(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @search_graph1()
%3 = call i32 (...) @search_graph2()
%4 = call i32 (...) @search_graph3()
%5 = call i32 (...) @search_graph4()
%6 = call i32 (...) @search_graph5()
%7 = call i32 (...) @topological_sort1()
%8 = call i32 (...) @topological_sort2()
%9 = call i32 (...) @euler1()
%10 = call i32 (...) @euler2()
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @search_graph1()
%2 = tail call i32 (...) @search_graph2()
%3 = tail call i32 (...) @search_graph3()
%4 = tail call i32 (...) @search_graph4()
%5 = tail call i32 (...) @search_graph5()
%6 = tail call i32 (...) @topological_sort1()
%7 = tail call i32 (...) @topological_sort2()
%8 = tail call i32 (...) @euler1()
%9 = tail call i32 (...) @euler2()
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t get_big_endian_32(const uint8_t *buf) {
  return (uint32_t)(buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]);
}


x86 assembly (clang, -O0):
<get_big_endian_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_big_endian_32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_header(const char *title) {
  printf("\n\n---------- Start testing");
  if (title)
    printf(" of %s", title);
  printf(" ----------");
}


x86 assembly (clang, -O0):
<print_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     1147 <print_header+0x37>
mov    -0x8(%rbp),%rsi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_header>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %rbx,%rbx
je     1138 <print_header+0x28>
lea    0xeed(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"\0A\0A---------- Start testing\00"
@.str.1 = [7 x i8] c" of %s\00"
@.str.2 = [12 x i8] c" ----------\00"
define void @print_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0A\0A---------- Start testing\00"
@.str.1 = [7 x i8] c" of %s\00"
@.str.2 = [12 x i8] c" ----------\00"
define void @print_header(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
float exp(int /*<<< orphan*/);
int /*<<< orphan*/ lgammaf_r(float, int *);
float tgammaf(float x) {
  int sign;
  float y;
  y = exp(lgammaf_r(x, &sign));
  if (sign < 0)
    y = -y;
  return y;
}


x86 assembly (clang, -O0):
<tgammaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x8(%rbp),%rdi
call   1030 <lgammaf_r@plt>
mov    %eax,%edi
call   1040 <exp@plt>
movss  %xmm0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1168 <tgammaf+0x48>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgammaf>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <lgammaf_r@plt>
mov    %eax,%edi
call   1040 <exp@plt>
cmpl   $0x0,0x4(%rsp)
jns    1140 <tgammaf+0x20>
xorps  0xec0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @tgammaf(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call i32 @lgammaf_r(float %5, i32* %3)
%7 = call float @exp(i32 %6)
store float %7, float* %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load float, float* %4
%12 = fneg float %11
store float %12, float* %4
br label %13
13: ; preds = %10, %1
%14 = load float, float* %4
ret float %14
}

LLVM IR (-O2):
define float @tgammaf(float %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @lgammaf_r(float %0, i32* %2)
%5 = call float @exp(i32 %4)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
%8 = fneg float %5
%9 = select i1 %7, float %8, float %5
ret float %9
}
void foo_1_2_2_1_2_1_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_2_1_1_1_1() {
ret void
}
/* Type definitions */
struct dict {
  int dummy;
};

/* Variables and functions */
int dictGenericDelete(struct dict *, void const *, int);
int dictDeleteNoFree(struct dict *ht, const void *key) {
  return dictGenericDelete(ht, key, 1);
}


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

x86 assembly (clang, -O2):
<dictDeleteNoFree>:
mov    $0x1,%edx
jmp    1030 <dictGenericDelete@plt>

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

LLVM IR (-O2):
%struct.dict = type { i32 }
define i32 @dictDeleteNoFree(%struct.dict* %0, i8* %1) {
%3 = tail call i32 @dictGenericDelete(%struct.dict* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ my_str(char *);
void sig_bye() { my_str("Error: Could not close myirc_client.\n"); }


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"Error: Could not close myirc_client.\0A\00"
define void @sig_bye() {
%1 = call i32 @my_str(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Error: Could not close myirc_client.\0A\00"
define void @sig_bye() {
%1 = tail call i32 @my_str(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *mcon_strndup(char *, int);
char *strchr(char *, char);
char *mongo_server_hash_to_server(char *hash) {
  char *ptr, *tmp;
  ptr = strchr(hash, ';');
  tmp = mcon_strndup(hash, ptr - hash);
  return tmp;
}


x86 assembly (clang, -O0):
<mongo_server_hash_to_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
call   1040 <mcon_strndup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mongo_server_hash_to_server>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3b,%esi
call   1030 <strchr@plt>
sub    %ebx,%eax
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <mcon_strndup@plt>

LLVM IR (-O0):
define i8* @mongo_server_hash_to_server(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strchr(i8* %5, i8 signext 59)
store i8* %6, i8** %3
%7 = load i8*, i8** %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = ptrtoint i8* %8 to i64
%11 = ptrtoint i8* %9 to i64
%12 = sub i64 %10, %11
%13 = trunc i64 %12 to i32
%14 = call i8* @mcon_strndup(i8* %7, i32 %13)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @mongo_server_hash_to_server(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 59)
%3 = ptrtoint i8* %2 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = tail call i8* @mcon_strndup(i8* %0, i32 %6)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void quit(void) {
  puts("Compilation aborted");
  exit(EXIT_FAILURE);
  return;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Compilation aborted\00"
@EXIT_FAILURE = global i32 0
define void @quit() {
%1 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"Compilation aborted\00"
@EXIT_FAILURE = global i32 0
define void @quit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ UADC_RawToASCII();
int /*<<< orphan*/ ULCD_RefreshLine2();
int /*<<< orphan*/ USIO_TxLCDMsgToSIO();
void UAPP_TaskADC(void) {
  UADC_RawToASCII();
  ULCD_RefreshLine2();
  USIO_TxLCDMsgToSIO();
}


x86 assembly (clang, -O0):
<UAPP_TaskADC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <UADC_RawToASCII@plt>
mov    $0x0,%al
call   1050 <ULCD_RefreshLine2@plt>
mov    $0x0,%al
call   1040 <USIO_TxLCDMsgToSIO@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<UAPP_TaskADC>:
push   %rax
xor    %eax,%eax
call   1030 <UADC_RawToASCII@plt>
xor    %eax,%eax
call   1050 <ULCD_RefreshLine2@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <USIO_TxLCDMsgToSIO@plt>

LLVM IR (-O0):
define void @UAPP_TaskADC() {
%1 = call i32 (...) @UADC_RawToASCII()
%2 = call i32 (...) @ULCD_RefreshLine2()
%3 = call i32 (...) @USIO_TxLCDMsgToSIO()
ret void
}

LLVM IR (-O2):
define void @UAPP_TaskADC() {
%1 = tail call i32 (...) @UADC_RawToASCII()
%2 = tail call i32 (...) @ULCD_RefreshLine2()
%3 = tail call i32 (...) @USIO_TxLCDMsgToSIO()
ret void
}
void nseel_asm_max_fp(void) {
  __asm__("fcom\n"
          "fstsw %ax\n"
          "testl $256, %eax\n"
          "jnz 0f\n"
          "fxch\n"
          "0:\n"
          "fstp %st(0)\n");
}


x86 assembly (clang, -O0):
<nseel_asm_max_fp>:
push   %rbp
mov    %rsp,%rbp
fcom   %st(1)
fstsw  %ax
test   $0x100,%eax
jne    1116 <nseel_asm_max_fp+0x16>
fxch   %st(1)
fstp   %st(0)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nseel_asm_max_fp>:
fcom   %st(1)
fstsw  %ax
test   $0x100,%eax
jne    110e <nseel_asm_max_fp+0xe>
fxch   %st(1)
fstp   %st(0)
ret

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

LLVM IR (-O2):
define void @nseel_asm_max_fp() {
tail call void asm sideeffect "fcom\0Afstsw %ax\0Atestl $$256, %eax\0Ajnz 0f\0Afxch\0A0:\0Afstp %st(0)\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
float __ocml_rsqrt_f32(float);
float rsqrtf(float x) { return __ocml_rsqrt_f32(x); }


x86 assembly (clang, -O0):
<rsqrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__ocml_rsqrt_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsqrtf>:
jmp    1030 <__ocml_rsqrt_f32@plt>

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

LLVM IR (-O2):
define float @rsqrtf(float %0) {
%2 = tail call float @__ocml_rsqrt_f32(float %0)
ret float %2
}
void kmemcheck_show(struct pt_regs *regs) {}


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @kmemcheck_show(%struct.pt_regs* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __truncate(const char *path, off_t length) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__truncate>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__truncate(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__truncate(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
void *test_anti_range_65(int n) {
  extern void *alloc_anti_range_65(int) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 0)
    n = 0 - 1;
  return alloc_anti_range_65(n);
}


x86 assembly (clang, -O0):
<test_anti_range_65>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jg     1137 <test_anti_range_65+0x27>
cmpl   $0x0,-0x4(%rbp)
jg     1137 <test_anti_range_65+0x27>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <alloc_anti_range_65@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_65>:
cmp    $0x1,%edi
sbb    %eax,%eax
or     %eax,%edi
jmp    1030 <alloc_anti_range_65@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_65(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 -1, i32 %0
%4 = tail call i8* @alloc_anti_range_65(i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ CG_Printf(char *);
int /*<<< orphan*/ CG_UseItem(int /*<<< orphan*/);
int /*<<< orphan*/ trap_Cmd_Argc();
int /*<<< orphan*/ trap_Cmd_Args();
void CG_Cmd_UseItem_f(void) {
  if (!trap_Cmd_Argc()) {
    CG_Printf("Usage: 'use <item name>' or 'use <item index>'\n");
    return;
  }
  CG_UseItem(trap_Cmd_Args());
}


x86 assembly (clang, -O0):
<CG_Cmd_UseItem_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <trap_Cmd_Argc@plt>
cmp    $0x0,%eax
jne    1165 <CG_Cmd_UseItem_f+0x25>
lea    0xea5(%rip),%rdi
call   1050 <CG_Printf@plt>
jmp    1173 <CG_Cmd_UseItem_f+0x33>
mov    $0x0,%al
call   1030 <trap_Cmd_Args@plt>
mov    %eax,%edi
call   1060 <CG_UseItem@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_Cmd_UseItem_f>:
push   %rax
xor    %eax,%eax
call   1040 <trap_Cmd_Argc@plt>
test   %eax,%eax
je     115b <CG_Cmd_UseItem_f+0x1b>
xor    %eax,%eax
call   1030 <trap_Cmd_Args@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <CG_UseItem@plt>
lea    0xe9e(%rip),%rdi
pop    %rax
jmp    1050 <CG_Printf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Usage: 'use <item name>' or 'use <item index>'\0A\00"
define void @CG_Cmd_UseItem_f() {
%1 = call i32 (...) @trap_Cmd_Argc()
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 @CG_Printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %8
5: ; preds = %0
%6 = call i32 (...) @trap_Cmd_Args()
%7 = call i32 @CG_UseItem(i32 %6)
br label %8
8: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Usage: 'use <item name>' or 'use <item index>'\0A\00"
define void @CG_Cmd_UseItem_f() {
%1 = tail call i32 (...) @trap_Cmd_Argc()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @CG_Printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %8
5: ; preds = %0
%6 = tail call i32 (...) @trap_Cmd_Args()
%7 = tail call i32 @CG_UseItem(i32 %6)
br label %8
8: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ se_fill(int);
void se_fill_test(void **state) {
  assert_int_equal(se_fill(0x0100000000000000ul), 0x0102040810204080ul);
}


x86 assembly (clang, -O0):
<se_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <se_fill@plt>
mov    %eax,%edi
mov    $0x10204080,%esi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<se_fill_test>:
push   %rax
xor    %edi,%edi
call   1040 <se_fill@plt>
mov    %eax,%edi
mov    $0x10204080,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @se_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @se_fill(i32 0)
%4 = call i32 @assert_int_equal(i32 %3, i32 270549120)
ret void
}

LLVM IR (-O2):
define void @se_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @se_fill(i32 0)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 270549120)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ r;

/* Variables and functions */
int /*<<< orphan*/ rc4(unsigned char *, int);
uint64_t rc4rand64(void) {
  uint64_t r;
  rc4((unsigned char *)&r, sizeof(r));
  return r;
}


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

x86 assembly (clang, -O2):
<rc4rand64>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <rc4@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rc4rand64() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @rc4(i8* %2, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @rc4rand64() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @rc4(i8* %2, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int CLAMP(int, int, int);
char *_uitoa_internal(unsigned int, char *, int /*<<< orphan*/);
char *uitoa(unsigned int value, char *str, int base) {
  base = CLAMP(base, 2, 32);
  return _uitoa_internal(value, str, (uint)base);
}


x86 assembly (clang, -O0):
<uitoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x2,%esi
mov    $0x20,%edx
call   1030 <CLAMP@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <_uitoa_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uitoa>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %edx,%edi
mov    $0x2,%esi
mov    $0x20,%edx
call   1030 <CLAMP@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_uitoa_internal@plt>

LLVM IR (-O0):
define i8* @uitoa(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @CLAMP(i32 %7, i32 2, i32 32)
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i8* @_uitoa_internal(i32 %9, i8* %10, i32 %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @uitoa(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @CLAMP(i32 %2, i32 2, i32 32)
%5 = tail call i8* @_uitoa_internal(i32 %0, i8* %1, i32 %4)
ret i8* %5
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int imul_hi_op_16(short a, short b) {
  int64_t res = 0;
  res = a * b;
  return (int)(res >> 16);
}


x86 assembly (clang, -O0):
<imul_hi_op_16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imul_hi_op_16>:
mov    %edi,%eax
imul   %esi,%eax
sar    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @imul_hi_op_16(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i32
store i16 %0, i16* %3
store i16 %1, i16* %4
store i32 0, i32* %5
%6 = load i16, i16* %3
%7 = sext i16 %6 to i32
%8 = load i16, i16* %4
%9 = sext i16 %8 to i32
%10 = mul nsw i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = ashr i32 %11, 16
ret i32 %12
}

LLVM IR (-O2):
define i32 @imul_hi_op_16(i16 signext %0, i16 signext %1) {
%3 = sext i16 %0 to i32
%4 = sext i16 %1 to i32
%5 = mul nsw i32 %4, %3
%6 = ashr i32 %5, 16
ret i32 %6
}
/* Type definitions */
struct ip_usbph {
  int dummy;
};

/* Variables and functions */
int EINVAL;
int ip_usbph_clear(struct ip_usbph *);
int cmd_clear(struct ip_usbph *ph, int argc, char **argv) {
  if (argc > 1) {
    return -EINVAL;
  }
  return ip_usbph_clear(ph);
}


x86 assembly (clang, -O0):
<cmd_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x1,-0x14(%rbp)
jle    1140 <cmd_clear+0x30>
xor    %eax,%eax
mov    0x2eaa(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <cmd_clear+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <ip_usbph_clear@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_clear>:
cmp    $0x2,%esi
jl     1121 <cmd_clear+0x11>
mov    0x2ec4(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret
jmp    1030 <ip_usbph_clear@plt>

LLVM IR (-O0):
%struct.ip_usbph = type { i32 }
@EINVAL = global i32 0
define i32 @cmd_clear(%struct.ip_usbph* %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca %struct.ip_usbph*
%6 = alloca i32
%7 = alloca i8**
store %struct.ip_usbph* %0, %struct.ip_usbph** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
%8 = load i32, i32* %6
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* @EINVAL
%12 = sub nsw i32 0, %11
store i32 %12, i32* %4
br label %16
13: ; preds = %3
%14 = load %struct.ip_usbph*, %struct.ip_usbph** %5
%15 = call i32 @ip_usbph_clear(%struct.ip_usbph* %14)
store i32 %15, i32* %4
br label %16
16: ; preds = %13, %10
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
%struct.ip_usbph = type { i32 }
@EINVAL = global i32 0
define i32 @cmd_clear(%struct.ip_usbph* %0, i32 %1, i8** nocapture readnone %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = load i32, i32* @EINVAL
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %3
%9 = tail call i32 @ip_usbph_clear(%struct.ip_usbph* %0)
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void divide_by_zero_fault(void) { panic("exception(fault): divide by zero"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"exception(fault): divide by zero\00"
define void @divide_by_zero_fault() {
%1 = call i32 @panic(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"exception(fault): divide by zero\00"
define void @divide_by_zero_fault() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  printf("%d\n", (a + b) % 10);
  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
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xeab(%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
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
add    0x4(%rsp),%eax
movslq %eax,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
%8 = srem i32 %7, 10
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = srem i32 %8, 10
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
char getchar();
void FFLUSH(void) {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<FFLUSH>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <FFLUSH+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <FFLUSH+0x21>
jmp    1119 <FFLUSH+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FFLUSH>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <FFLUSH+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @FFLUSH() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @FFLUSH() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}