xunge/DecIR huggingface dataset:
const char *gei_nb_current(void) { return "CURRENT"; }


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

x86 assembly (clang, -O2):
<gei_nb_current>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"CURRENT\00"
define i8* @gei_nb_current() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"CURRENT\00"
define i8* @gei_nb_current() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ bm_reloader_stop(int);
void sig_handler(int signum) { bm_reloader_stop(signum + 128); }


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x80,%edi
call   1030 <bm_reloader_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
sub    $0xffffff80,%edi
jmp    1030 <bm_reloader_stop@plt>

LLVM IR (-O0):
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 128
%5 = call i32 @bm_reloader_stop(i32 %4)
ret void
}

LLVM IR (-O2):
define void @sig_handler(i32 %0) {
%2 = add nsw i32 %0, 128
%3 = tail call i32 @bm_reloader_stop(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x7a() {
  Assert_real((isbdigit(122) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              615, ("isbdigit should be 0 for z"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x7a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7a,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x267,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x7a>:
push   %rax
mov    $0x7a,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x267,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for z\00"
define void @t_isbdigit_0x7a() {
%1 = call i64 @isbdigit(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for z\00"
define void @t_isbdigit_0x7a() {
%1 = tail call i64 @isbdigit(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int SIM_power_draincap(double, int, int);
double SIM_rr_arbiter_grant_cap() {
  double Ctotal = 0;
  Ctotal += 2 * SIM_power_draincap((5.4 * 0.0875), 1, 1) +
            SIM_power_draincap((30.5 * 0.0875), 0, 2);
  return Ctotal;
}


x86 assembly (clang, -O0):
<SIM_rr_arbiter_grant_cap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xee0(%rip),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <SIM_power_draincap@plt>
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsd  0xebe(%rip),%xmm0
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <SIM_power_draincap@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIM_rr_arbiter_grant_cap>:
push   %rbx
movsd  0xee7(%rip),%xmm0
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <SIM_power_draincap@plt>
mov    %eax,%ebx
movsd  0xed6(%rip),%xmm0
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <SIM_power_draincap@plt>
lea    (%rax,%rbx,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @SIM_rr_arbiter_grant_cap() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @SIM_power_draincap(double 4.725000e-01, i32 1, i32 1)
%3 = mul nsw i32 2, %2
%4 = call i32 @SIM_power_draincap(double 0x4005599999999999, i32 0, i32 2)
%5 = add nsw i32 %3, %4
%6 = sitofp i32 %5 to double
%7 = load double, double* %1
%8 = fadd double %7, %6
store double %8, double* %1
%9 = load double, double* %1
ret double %9
}

LLVM IR (-O2):
define double @SIM_rr_arbiter_grant_cap() {
%1 = tail call i32 @SIM_power_draincap(double 4.725000e-01, i32 1, i32 1)
%2 = shl nsw i32 %1, 1
%3 = tail call i32 @SIM_power_draincap(double 0x4005599999999999, i32 0, i32 2)
%4 = add nsw i32 %2, %3
%5 = sitofp i32 %4 to double
ret double %5
}
int is_gcm_mode(int keytype) { return ((keytype == 5) || (keytype == 6)); }


x86 assembly (clang, -O0):
<is_gcm_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x5,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <is_gcm_mode+0x20>
cmpl   $0x6,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_gcm_mode>:
add    $0xfffffffb,%edi
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_gcm_mode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 5
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 6
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_gcm_mode(i32 %0) {
%2 = add i32 %0, -5
%3 = icmp ult i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
OP(ed, eb) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int lua_callfunction(int /*<<< orphan*/);
int /*<<< orphan*/ lua_getglobal(char *);
int(lua_call)(char *name) { return lua_callfunction(lua_getglobal(name)); }


x86 assembly (clang, -O0):
<lua_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <lua_getglobal@plt>
mov    %eax,%edi
call   1040 <lua_callfunction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lua_call>:
push   %rax
call   1030 <lua_getglobal@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lua_callfunction@plt>

LLVM IR (-O0):
define i32 @lua_call(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @lua_getglobal(i8* %3)
%5 = call i32 @lua_callfunction(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @lua_call(i8* %0) {
%2 = tail call i32 @lua_getglobal(i8* %0)
%3 = tail call i32 @lua_callfunction(i32 %2)
ret i32 %3
}
/* Type definitions */
struct cc_usb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cc_usb_printf(struct cc_usb *, char *);
int /*<<< orphan*/ cc_usb_sync(struct cc_usb *);
int cc_usb_debug_mode(struct cc_usb *cc) {
  cc_usb_sync(cc);
  cc_usb_printf(cc, "D\n");
  return 1;
}


x86 assembly (clang, -O0):
<cc_usb_debug_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cc_usb_sync@plt>
mov    -0x8(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1040 <cc_usb_printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_usb_debug_mode>:
push   %rbx
mov    %rdi,%rbx
call   1030 <cc_usb_sync@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <cc_usb_printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.cc_usb = type { i32 }
@.str = [3 x i8] c"D\0A\00"
define i32 @cc_usb_debug_mode(%struct.cc_usb* %0) {
%2 = alloca %struct.cc_usb*
store %struct.cc_usb* %0, %struct.cc_usb** %2
%3 = load %struct.cc_usb*, %struct.cc_usb** %2
%4 = call i32 @cc_usb_sync(%struct.cc_usb* %3)
%5 = load %struct.cc_usb*, %struct.cc_usb** %2
%6 = call i32 @cc_usb_printf(%struct.cc_usb* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.cc_usb = type { i32 }
@.str = [3 x i8] c"D\0A\00"
define i32 @cc_usb_debug_mode(%struct.cc_usb* %0) {
%2 = tail call i32 @cc_usb_sync(%struct.cc_usb* %0)
%3 = tail call i32 @cc_usb_printf(%struct.cc_usb* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
struct passwd {
  char *pw_dir;
};

/* Variables and functions */
struct passwd *getpwnam(char *);
char *get_user_home_dir(char *user) {
  struct passwd *pwd;
  pwd = getpwnam(user);
  if (!pwd)
    return NULL;
  return pwd->pw_dir;
}


x86 assembly (clang, -O0):
<get_user_home_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getpwnam@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1141 <get_user_home_dir+0x31>
movq   $0x0,-0x8(%rbp)
jmp    114c <get_user_home_dir+0x3c>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_user_home_dir>:
push   %rax
call   1030 <getpwnam@plt>
test   %rax,%rax
je     1120 <get_user_home_dir+0x10>
mov    (%rax),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
define i8* @get_user_home_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca %struct.passwd*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call %struct.passwd* @getpwnam(i8* %5)
store %struct.passwd* %6, %struct.passwd** %4
%7 = load %struct.passwd*, %struct.passwd** %4
%8 = icmp ne %struct.passwd* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i8* null, i8** %2
br label %14
10: ; preds = %1
%11 = load %struct.passwd*, %struct.passwd** %4
%12 = getelementptr inbounds %struct.passwd, %struct.passwd* %11, i32 0, i32 0
%13 = load i8*, i8** %12
store i8* %13, i8** %2
br label %14
14: ; preds = %10, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
define i8* @get_user_home_dir(i8* nocapture %0) {
%2 = tail call %struct.passwd* @getpwnam(i8* %0)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i8*, i8** %5
br label %7
7: ; preds = %1, %4
%8 = phi i8* [ %6, %4 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ _unsupported();
void _Unwind_GetIP() { _unsupported(); }


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

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

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

LLVM IR (-O2):
define void @_Unwind_GetIP() {
%1 = tail call i32 (...) @_unsupported()
ret void
}
void foo284(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo284(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ dst;

/* Variables and functions */
int /*<<< orphan*/ memmove(int *, int *, int);
void memmove_bad4() {
  int src[1];
  int buff[1];
  int *dst = &buff[0];
  memmove(dst, src, sizeof(dst));
}


x86 assembly (clang, -O0):
<memmove_bad4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memmove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memmove_bad4>:
push   %rax
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x8,%edx
call   1030 <memmove@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @memmove_bad4() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = alloca i32*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%7 = call i32 @memmove(i32* %5, i32* %6, i32 8)
ret void
}

LLVM IR (-O2):
define void @memmove_bad4() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %1 to i8*
%4 = bitcast [1 x i32]* %2 to i8*
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%7 = call i32 @memmove(i32* %5, i32* %6, i32 8)
ret void
}
void init_test(void) { return; }


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

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

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

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

/* Variables and functions */
int utimensat(int, char const *, struct timespec const *, int);
__attribute__((__weak__, __always___)) int
softboundmpx_utimensat(int dirfd, const char *pathname,
                       const struct timespec times[2], int flags) {
  return utimensat(dirfd, pathname, times, flags);
}


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

x86 assembly (clang, -O2):
<softboundmpx_utimensat>:
jmp    1030 <utimensat@plt>

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

LLVM IR (-O2):
%struct.timespec = type { i32 }
define weak i32 @softboundmpx_utimensat(i32 %0, i8* %1, %struct.timespec* %2, i32 %3) {
%5 = tail call i32 @utimensat(i32 %0, i8* %1, %struct.timespec* %2, i32 %3)
ret i32 %5
}
void irq_disable(void) { asm volatile("cli" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @irq_disable() {
tail call void asm sideeffect "cli", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ adainit();
int /*<<< orphan*/ challenge_any_one();
int /*<<< orphan*/ challenge_run();
int main() {
  adainit();
  challenge_run();
  challenge_run();
  challenge_any_one();
  challenge_run();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <adainit@plt>
mov    $0x0,%al
call   1030 <challenge_run@plt>
mov    $0x0,%al
call   1030 <challenge_run@plt>
mov    $0x0,%al
call   1040 <challenge_any_one@plt>
mov    $0x0,%al
call   1030 <challenge_run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @adainit()
%3 = call i32 (...) @challenge_run()
%4 = call i32 (...) @challenge_run()
%5 = call i32 (...) @challenge_any_one()
%6 = call i32 (...) @challenge_run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @adainit()
%2 = tail call i32 (...) @challenge_run()
%3 = tail call i32 (...) @challenge_run()
%4 = tail call i32 (...) @challenge_any_one()
%5 = tail call i32 (...) @challenge_run()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DO_STH_PRODUCTIVE();
int /*<<< orphan*/ mem_init();
int main() {
  mem_init();
  DO_STH_PRODUCTIVE();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mem_init()
%2 = tail call i32 (...) @DO_STH_PRODUCTIVE()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ out_line_count(char const *);
int /*<<< orphan*/ printf(char const *, unsigned int);
void out_hex(const char *fmt, unsigned int x) {
  printf(fmt, x);
  out_line_count(fmt);
}


x86 assembly (clang, -O0):
<out_hex>:
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 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <out_line_count@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_hex>:
push   %rbx
mov    %rdi,%rbx
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <out_line_count@plt>

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

LLVM IR (-O2):
define void @out_hex(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* %0, i32 %1)
%4 = tail call i32 @out_line_count(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ basic();
int /*<<< orphan*/ errors();
int main(void) {
  basic();
  errors();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @basic()
%2 = tail call i32 (...) @errors()
ret i32 0
}
int foo(int a, int b) {
  int t;
  if (b) {
    if (a)
      t = 3;
    else
      t = 5;
    a = 0;
  } else
    t = 7;
  return t;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113d <foo+0x3d>
cmpl   $0x0,-0x4(%rbp)
je     112a <foo+0x2a>
movl   $0x3,-0xc(%rbp)
jmp    1131 <foo+0x31>
movl   $0x5,-0xc(%rbp)
movl   $0x0,-0x4(%rbp)
jmp    1144 <foo+0x44>
movl   $0x7,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
test   %esi,%esi
lea    0x3(%rax,%rax,1),%ecx
mov    $0x7,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 5, i32 3
%6 = select i1 %3, i32 7, i32 %5
ret i32 %6
}
/* Variables and functions */
float sinf(float);
float sine_ease_out(float p) { return sinf(p * 1.5707963268f); }


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

x86 assembly (clang, -O2):
<sine_ease_out>:
mulss  0xee8(%rip),%xmm0
jmp    1030 <sinf@plt>

LLVM IR (-O0):
define float @sine_ease_out(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3FF921FB60000000
%5 = call float @sinf(float %4)
ret float %5
}

LLVM IR (-O2):
define float @sine_ease_out(float %0) {
%2 = fmul float %0, 0x3FF921FB60000000
%3 = tail call float @sinf(float %2)
ret float %3
}
int ff_thread_once(char *control, void (*routine)(void)) {
  if (!*control) {
    routine();
    *control = 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ff_thread_once>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1127 <ff_thread_once+0x27>
call   *-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x1,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_thread_once>:
push   %rbx
cmpb   $0x0,(%rdi)
jne    110e <ff_thread_once+0xe>
mov    %rdi,%rbx
call   *%rsi
movb   $0x1,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ff_thread_once(i8* nocapture %0, void ()* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
tail call void %1()
store i8 1, i8* %0
br label %6
6: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
struct printf_info {
  int dummy;
};
struct __printf_io {
  int dummy;
};

/* Variables and functions */
int __printf_puts(struct __printf_io *, char *, int);
int __printf_render_pct(struct __printf_io *io, const struct printf_info *pi,
                        const void *const *arg) {
  return (__printf_puts(io, "%", 1));
}


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

x86 assembly (clang, -O2):
<__printf_render_pct>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <__printf_puts@plt>

LLVM IR (-O0):
%struct.__printf_io = type { i32 }
%struct.printf_info = type { i32 }
@.str = [2 x i8] c"%\00"
define i32 @__printf_render_pct(%struct.__printf_io* %0, %struct.printf_info* %1, i8** %2) {
%4 = alloca %struct.__printf_io*
%5 = alloca %struct.printf_info*
%6 = alloca i8**
store %struct.__printf_io* %0, %struct.__printf_io** %4
store %struct.printf_info* %1, %struct.printf_info** %5
store i8** %2, i8*** %6
%7 = load %struct.__printf_io*, %struct.__printf_io** %4
%8 = call i32 @__printf_puts(%struct.__printf_io* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 %8
}

LLVM IR (-O2):
%struct.__printf_io = type { i32 }
%struct.printf_info = type { i32 }
@.str = [2 x i8] c"%\00"
define i32 @__printf_render_pct(%struct.__printf_io* %0, %struct.printf_info* nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @__printf_puts(%struct.__printf_io* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 %4
}
int simple5(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @simple5() {
ret i32 0
}

LLVM IR (-O2):
define i32 @simple5() {
ret i32 0
}
int test_imm_30uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x30 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_30uint64_highword_reg>:
movabs $0x3000000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_30uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 206158430208
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
double pow(double, double);
double convert_it(double x) { return pow(x, 1.0 / 3.0); }


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

x86 assembly (clang, -O2):
<convert_it>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @convert_it(double %0) {
%2 = tail call double @pow(double %0, double 0x3FD5555555555555)
ret double %2
}
int FinF1(int a) { return a + 1; }


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

x86 assembly (clang, -O2):
<FinF1>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @FinF1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @FinF1(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
scalar_t__ write_string(char *);
void tube_WriteS(unsigned int *reg) {
  reg[13] = (unsigned int)write_string((char *)reg[13]);
  reg[13] += 3;
  reg[13] &= ~3;
}


x86 assembly (clang, -O0):
<tube_WriteS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%eax
mov    %eax,%edi
call   1030 <write_string@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x34(%rax)
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%ecx
add    $0x3,%ecx
mov    %ecx,0x34(%rax)
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%ecx
and    $0xfffffffc,%ecx
mov    %ecx,0x34(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tube_WriteS>:
push   %rbx
mov    %rdi,%rbx
mov    0x34(%rdi),%edi
call   1030 <write_string@plt>
add    $0x3,%eax
and    $0xfffffffc,%eax
mov    %eax,0x34(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @tube_WriteS(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 13
%5 = load i32, i32* %4
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = call i64 @write_string(i8* %7)
%9 = trunc i64 %8 to i32
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 13
store i32 %9, i32* %11
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 13
%14 = load i32, i32* %13
%15 = add i32 %14, 3
store i32 %15, i32* %13
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 13
%18 = load i32, i32* %17
%19 = and i32 %18, -4
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @tube_WriteS(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 13
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i64 @write_string(i8* %5)
%7 = trunc i64 %6 to i32
%8 = add i32 %7, 3
%9 = and i32 %8, -4
store i32 %9, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ udd_send_remotewakeup();
void udc_remotewakeup(void) { udd_send_remotewakeup(); }


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

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

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

LLVM IR (-O2):
define void @udc_remotewakeup() {
%1 = tail call i32 (...) @udd_send_remotewakeup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hires_timer(double *);
void hires_timer__(double *d) { hires_timer(d); }


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

x86 assembly (clang, -O2):
<hires_timer__>:
jmp    1030 <hires_timer@plt>

LLVM IR (-O0):
define void @hires_timer__(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @hires_timer(double* %3)
ret void
}

LLVM IR (-O2):
define void @hires_timer__(double* %0) {
%2 = tail call i32 @hires_timer(double* %0)
ret void
}
double computeRectangleArea(double length, double width) {
  return length * width;
}


x86 assembly (clang, -O0):
<computeRectangleArea>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeRectangleArea>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @computeRectangleArea(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
extern void print_hello(void) {
  puts("hello");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define void @print_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int Bar7(int, int, int);
int /*<<< orphan*/ printf(char *);
extern int Blue7(int one, int two) {
  int sum = 0;
  printf(" Blue7: once\n");
  sum = Bar7(one, two, 1);
  printf(" Blue7: twice\n");
  return sum;
}


x86 assembly (clang, -O0):
<Blue7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
call   1040 <Bar7@plt>
mov    %eax,-0xc(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Blue7>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1040 <Bar7@plt>
mov    %eax,%ebx
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c" Blue7: once\0A\00"
@.str.1 = [15 x i8] c" Blue7: twice\0A\00"
define i32 @Blue7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @Bar7(i32 %7, i32 %8, i32 1)
store i32 %9, i32* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
@str = [13 x i8] c" Blue7: once\00"
@str.2 = [14 x i8] c" Blue7: twice\00"
define i32 @Blue7(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @Bar7(i32 %0, i32 %1, i32 1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(void *, char const *);
scalar_t__ strlen(char const *);
void *xcmalloc(scalar_t__);
void *xcstrdup(const char *string) {
  void *mem;
  mem = xcmalloc(strlen(string) + sizeof(char));
  strcpy(mem, string);
  return (mem);
}


x86 assembly (clang, -O0):
<xcstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xcmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xcmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xcstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 1
%7 = call i8* @xcmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @xcstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @xcmalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_uint32_encode();
void bench_uint32_encode() {
  unsigned i;
  for (i = 0; i < 1000000; i++) {
    if (!test_uint32_encode()) {
      printf("what ???\n");
    }
  }
}


x86 assembly (clang, -O0):
<bench_uint32_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xf4240,-0x4(%rbp)
jae    116b <bench_uint32_encode+0x4b>
mov    $0x0,%al
call   1040 <test_uint32_encode@plt>
cmp    $0x0,%eax
jne    1158 <bench_uint32_encode+0x38>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <bench_uint32_encode+0x3d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <bench_uint32_encode+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bench_uint32_encode>:
push   %rbp
push   %rbx
push   %rax
mov    $0xf4240,%ebp
lea    0xed1(%rip),%rbx
jmp    1145 <bench_uint32_encode+0x25>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%ebp
je     115a <bench_uint32_encode+0x3a>
xor    %eax,%eax
call   1040 <test_uint32_encode@plt>
test   %eax,%eax
jne    1140 <bench_uint32_encode+0x20>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1140 <bench_uint32_encode+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@str = [9 x i8] c"what ???\00"
define void @bench_uint32_encode() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 0, %0 ], [ %8, %7 ]
%3 = tail call i32 (...) @test_uint32_encode()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 1000000
br i1 %9, label %10, label %1
10: ; preds = %7
ret void
}
void ice_sync_arfs_fltrs(struct ice_pf *pf) {}


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

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

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

LLVM IR (-O2):
%struct.ice_pf = type opaque
define void @ice_sync_arfs_fltrs(%struct.ice_pf* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ send_msg(int, char *, int);
void config_send(int sockfd, char *buffer, int len) {
  send_msg(sockfd, buffer, len);
  printf("Sending Data to socket\n");
}


x86 assembly (clang, -O0):
<config_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <send_msg@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_send>:
push   %rax
call   1040 <send_msg@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Sending Data to socket\0A\00"
define void @config_send(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* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @send_msg(i32 %7, i8* %8, i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"Sending Data to socket\00"
define void @config_send(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @send_msg(i32 %0, i8* %1, i32 %2)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
char *ft_strncpy(char *dest, const char *src, int n) {
  int i;
  i = -1;
  while (*(src + (++i)) && i < n) {
    *(dest + i) = *(src + (i));
  }
  return (dest);
}


x86 assembly (clang, -O0):
<ft_strncpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1144 <ft_strncpy+0x44>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
setl   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1154 <ft_strncpy+0x54>
jmp    116f <ft_strncpy+0x6f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1116 <ft_strncpy+0x16>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strncpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1138 <ft_strncpy+0x38>
test   %edx,%edx
jle    1138 <ft_strncpy+0x38>
mov    %edx,%r8d
mov    $0x1,%edi
cs nopw 0x0(%rax,%rax,1)
nop
mov    %cl,-0x1(%rax,%rdi,1)
movzbl (%rsi,%rdi,1),%ecx
test   %cl,%cl
je     1138 <ft_strncpy+0x38>
lea    0x1(%rdi),%rdx
cmp    %r8,%rdi
mov    %rdx,%rdi
jb     1120 <ft_strncpy+0x20>
ret

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

LLVM IR (-O2):
define i8* @ft_strncpy(i8* returned writeonly %0, i8* nocapture %1, i32 %2) {
%4 = load i8, i8* %1
%5 = icmp ne i8 %4, 0
%6 = icmp sgt i32 %2, 0
%7 = and i1 %5, %6
br i1 %7, label %8, label %20
8: ; preds = %3
%9 = zext i32 %2 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %14, %10 ]
%12 = phi i8 [ %4, %8 ], [ %16, %10 ]
%13 = getelementptr inbounds i8, i8* %0, i64 %11
store i8 %12, i8* %13
%14 = add nuw nsw i64 %11, 1
%15 = getelementptr inbounds i8, i8* %1, i64 %14
%16 = load i8, i8* %15
%17 = icmp ne i8 %16, 0
%18 = icmp ult i64 %14, %9
%19 = select i1 %17, i1 %18, i1 false
br i1 %19, label %10, label %20
20: ; preds = %10, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strip(char *);
int main(void) {
  char buf[64];
  fgets(buf, 64, stdin);
  strip(buf);
  printf("%s", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    $0x40,%esi
call   1050 <fgets@plt>
lea    -0x50(%rbp),%rdi
call   1040 <strip@plt>
lea    -0x50(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1040 <strip@plt>
lea    0xea3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 64, i32 %4)
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%7 = call i32 @strip(i8* %6)
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 64, i32 %3)
%5 = call i32 @strip(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
size_t sat_sub(size_t x, size_t y) {
  size_t z = x - y;
  if (z > x) {
    return 0;
  }
  return z;
}


x86 assembly (clang, -O0):
<sat_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1133 <sat_sub+0x33>
movq   $0x0,-0x8(%rbp)
jmp    113b <sat_sub+0x3b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sat_sub>:
xor    %eax,%eax
sub    %rsi,%rdi
cmovae %rdi,%rax
ret

LLVM IR (-O0):
define i64 @sat_sub(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = sub i64 %7, %8
store i64 %9, i64* %6
%10 = load i64, i64* %6
%11 = load i64, i64* %4
%12 = icmp ugt i64 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i64 0, i64* %3
br label %16
14: ; preds = %2
%15 = load i64, i64* %6
store i64 %15, i64* %3
br label %16
16: ; preds = %14, %13
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @sat_sub(i64 %0, i64 %1) {
%3 = tail call i64 @llvm.usub.sat.i64(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
scalar_t__ isalnum(int);
bool first_char_valid(int chr) { return (isalnum(chr) || chr == '_'); }


x86 assembly (clang, -O0):
<first_char_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    113f <first_char_valid+0x2f>
cmpl   $0x5f,-0x4(%rbp)
sete   %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):
<first_char_valid>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%ebx
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @first_char_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalnum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 95
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ true, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @first_char_valid(i32 %0) {
%2 = tail call i64 @isalnum(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i32 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}