xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ BEE_DriverIRQHandler();
__attribute__((weak)) void BEE_IRQHandler(void) { BEE_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @BEE_IRQHandler() {
%1 = call i32 (...) @BEE_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @BEE_IRQHandler() {
%1 = tail call i32 (...) @BEE_DriverIRQHandler()
ret void
}
/* Type definitions */
typedef int __u64;
typedef int __u32;

/* Variables and functions */
int dev_read(void *, int, int);
int dev_read_blocks(void *buf, __u64 addr, __u32 nr_blks) {
  return dev_read(buf, addr * 4096, nr_blks * 4096);
}


x86 assembly (clang, -O0):
<dev_read_blocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0xc,%esi
mov    -0x10(%rbp),%edx
shl    $0xc,%edx
call   1030 <dev_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dev_read_blocks>:
shl    $0xc,%esi
shl    $0xc,%edx
jmp    1030 <dev_read@plt>

LLVM IR (-O0):
define i32 @dev_read_blocks(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %8, 4096
%10 = load i32, i32* %6
%11 = mul nsw i32 %10, 4096
%12 = call i32 @dev_read(i8* %7, i32 %9, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @dev_read_blocks(i8* %0, i32 %1, i32 %2) {
%4 = shl nsw i32 %1, 12
%5 = shl nsw i32 %2, 12
%6 = tail call i32 @dev_read(i8* %0, i32 %4, i32 %5)
ret i32 %6
}
void window_title_logo_emptysub() {}


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

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

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

LLVM IR (-O2):
define void @window_title_logo_emptysub() {
ret void
}
int jsk_connect(int s, const char *addr) { return 0; }


x86 assembly (clang, -O0):
<jsk_connect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @jsk_connect(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @jsk_connect(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int expm1(double const);
double selu_activate(const double x) {
  return (x >= 0) * 1.0507 * x + (x < 0) * 1.0507 * 1.6732 * expm1(x);
}


x86 assembly (clang, -O0):
<selu_activate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
movsd  0xecb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe9c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe88(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <expm1@plt>
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
cvtsi2sd %eax,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<selu_activate>:
sub    $0x38,%rsp
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
cmpltsd %xmm2,%xmm1
cmplesd %xmm0,%xmm2
movsd  0xecc(%rip),%xmm3
andpd  %xmm2,%xmm3
movapd %xmm3,0x20(%rsp)
movsd  0xec2(%rip),%xmm2
andpd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
call   1030 <expm1@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x10(%rsp),%xmm1
movapd 0x20(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @selu_activate(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
%5 = zext i1 %4 to i32
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 1.050700e+00
%8 = load double, double* %2
%9 = load double, double* %2
%10 = fcmp olt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
%12 = sitofp i32 %11 to double
%13 = fmul double %12, 1.050700e+00
%14 = fmul double %13, 1.673200e+00
%15 = load double, double* %2
%16 = call i32 @expm1(double %15)
%17 = sitofp i32 %16 to double
%18 = fmul double %14, %17
%19 = call double @llvm.fmuladd.f64(double %7, double %8, double %18)
ret double %19
}

LLVM IR (-O2):
define double @selu_activate(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = uitofp i1 %2 to double
%4 = fmul double %3, 1.050700e+00
%5 = fcmp olt double %0, 0.000000e+00
%6 = uitofp i1 %5 to double
%7 = fmul double %6, 1.050700e+00
%8 = fmul double %7, 1.673200e+00
%9 = tail call i32 @expm1(double %0)
%10 = sitofp i32 %9 to double
%11 = fmul double %8, %10
%12 = tail call double @llvm.fmuladd.f64(double %4, double %0, double %11)
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  float ans;
  scanf("%d %d", &a, &b);
  ans = (a * b) / 12.0;
  printf("%.3lf\n", ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeaa(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
imul   0x4(%rsp),%eax
cvtsi2sd %eax,%xmm0
divsd  0xeb7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = mul nsw i32 %6, %7
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 1.200000e+01
%11 = fptrunc double %10 to float
store float %11, float* %4
%12 = load float, float* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [7 x i8] c"%.3lf\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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, %6
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 1.200000e+01
%11 = fptrunc double %10 to float
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %11)
ret i32 0
}
/* Type definitions */
struct session {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ socket_printf(struct session *, int, char *, int, int, int);
int /*<<< orphan*/ telopt_debug(struct session *, char *);
int send_wont_xdisploc(struct session *ses, int cplen, unsigned char *cpsrc) {
  socket_printf(ses, 3, "%c%c%c", 255, 252, 35);
  telopt_debug(ses, "SENT IAC WONT XDISPLOC");
  return 3;
}


x86 assembly (clang, -O0):
<send_wont_xdisploc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
lea    0xebd(%rip),%rdx
mov    $0xff,%ecx
mov    $0xfc,%r8d
mov    $0x23,%r9d
call   1040 <socket_printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <telopt_debug@plt>
mov    $0x3,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_wont_xdisploc>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdx
mov    $0x3,%esi
mov    $0xff,%ecx
mov    $0xfc,%r8d
mov    $0x23,%r9d
call   1040 <socket_printf@plt>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1030 <telopt_debug@plt>
mov    $0x3,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.session = type { i32 }
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [23 x i8] c"SENT IAC WONT XDISPLOC\00"
define i32 @send_wont_xdisploc(%struct.session* %0, i32 %1, i8* %2) {
%4 = alloca %struct.session*
%5 = alloca i32
%6 = alloca i8*
store %struct.session* %0, %struct.session** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.session*, %struct.session** %4
%8 = call i32 @socket_printf(%struct.session* %7, i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 255, i32 252, i32 35)
%9 = load %struct.session*, %struct.session** %4
%10 = call i32 @telopt_debug(%struct.session* %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}

LLVM IR (-O2):
%struct.session = type { i32 }
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [23 x i8] c"SENT IAC WONT XDISPLOC\00"
define i32 @send_wont_xdisploc(%struct.session* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @socket_printf(%struct.session* %0, i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 255, i32 252, i32 35)
%5 = tail call i32 @telopt_debug(%struct.session* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int __strverscmp(int /*<<< orphan*/, int /*<<< orphan*/);
int versionsort(const void *a, const void *b) {
  return __strverscmp((*(const struct dirent **)a)->d_name,
                      (*(const struct dirent **)b)->d_name);
}


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

x86 assembly (clang, -O2):
<versionsort>:
mov    (%rdi),%rax
mov    (%rax),%edi
mov    (%rsi),%rax
mov    (%rax),%esi
jmp    1030 <__strverscmp@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @versionsort(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.dirent**
%7 = load %struct.dirent*, %struct.dirent** %6
%8 = getelementptr inbounds %struct.dirent, %struct.dirent* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to %struct.dirent**
%12 = load %struct.dirent*, %struct.dirent** %11
%13 = getelementptr inbounds %struct.dirent, %struct.dirent* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @__strverscmp(i32 %9, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @versionsort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to %struct.dirent**
%4 = load %struct.dirent*, %struct.dirent** %3
%5 = getelementptr inbounds %struct.dirent, %struct.dirent* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = bitcast i8* %1 to %struct.dirent**
%8 = load %struct.dirent*, %struct.dirent** %7
%9 = getelementptr inbounds %struct.dirent, %struct.dirent* %8, i64 0, i32 0
%10 = load i32, i32* %9
%11 = tail call i32 @__strverscmp(i32 %6, i32 %10)
ret i32 %11
}
void _exit(int status) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

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

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

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put2_8(int, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ const *, int, int,
                             int /*<<< orphan*/);
void MC_put_y_8_mmxext(uint8_t *dest, const uint8_t *ref, int stride,
                       int height) {
  MC_put2_8(height, dest, ref, stride, stride, 0);
}


x86 assembly (clang, -O0):
<MC_put_y_8_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
xor    %r9d,%r9d
call   1030 <MC_put2_8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_put_y_8_mmxext>:
mov    %edx,%r8d
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %ecx,%edi
mov    %r8d,%ecx
xor    %r9d,%r9d
jmp    1030 <MC_put2_8@plt>

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

LLVM IR (-O2):
define void @MC_put_y_8_mmxext(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put2_8(i32 %3, i32* %0, i32* %1, i32 %2, i32 %2, i32 0)
ret void
}
void *server_handler(void *param) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @server_handler(i8* nocapture readnone %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ st103_set_cntr(int /*<<< orphan*/);
int /*<<< orphan*/ st103_set_istr(int /*<<< orphan*/);
void usb_lld_prepare_shutdown(void) {
  st103_set_istr(0);
  st103_set_cntr(0);
}


x86 assembly (clang, -O0):
<usb_lld_prepare_shutdown>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <st103_set_istr@plt>
xor    %edi,%edi
call   1040 <st103_set_cntr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_lld_prepare_shutdown>:
push   %rax
xor    %edi,%edi
call   1030 <st103_set_istr@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <st103_set_cntr@plt>

LLVM IR (-O0):
define void @usb_lld_prepare_shutdown() {
%1 = call i32 @st103_set_istr(i32 0)
%2 = call i32 @st103_set_cntr(i32 0)
ret void
}

LLVM IR (-O2):
define void @usb_lld_prepare_shutdown() {
%1 = tail call i32 @st103_set_istr(i32 0)
%2 = tail call i32 @st103_set_cntr(i32 0)
ret void
}
const char *_glxapi_get_version(void) { return "1.3"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"1.3\00"
define i8* @_glxapi_get_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
unsigned int gc_align(unsigned int n) {
  unsigned int cell = 1 << 3;
  return ((n + cell - 1) / cell) * cell;
}


x86 assembly (clang, -O0):
<gc_align>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_align>:
lea    0x7(%rdi),%eax
and    $0xfffffff8,%eax
ret

LLVM IR (-O0):
define i32 @gc_align(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 8, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = add i32 %4, %5
%7 = sub i32 %6, 1
%8 = load i32, i32* %3
%9 = udiv i32 %7, %8
%10 = load i32, i32* %3
%11 = mul i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @gc_align(i32 %0) {
%2 = add i32 %0, 7
%3 = and i32 %2, -8
ret i32 %3
}
unsigned int do_integral_promotion(unsigned int type) {
  if (((((type) >= 0x0200) && ((type) <= 0x0b00)) || ((type) == 0x1600) ||
       ((type) == 0x1b00)) &&
      (((type) & ~0xF1FF) < ((0x0600) & ~0xF1FF))) {
    type = 0x0600;
  }
  return type;
}


x86 assembly (clang, -O0):
<do_integral_promotion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x200,-0x4(%rbp)
jb     1121 <do_integral_promotion+0x21>
cmpl   $0xb00,-0x4(%rbp)
jbe    113b <do_integral_promotion+0x3b>
cmpl   $0x1600,-0x4(%rbp)
je     113b <do_integral_promotion+0x3b>
cmpl   $0x1b00,-0x4(%rbp)
jne    1155 <do_integral_promotion+0x55>
mov    -0x4(%rbp),%eax
and    $0xffff0e00,%eax
cmp    $0x600,%eax
jae    1155 <do_integral_promotion+0x55>
movl   $0x600,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_integral_promotion>:
mov    %edi,%eax
lea    -0x200(%rax),%ecx
cmp    $0x901,%ecx
jb     111e <do_integral_promotion+0x1e>
cmp    $0x1b00,%eax
je     111e <do_integral_promotion+0x1e>
cmp    $0x1600,%eax
jne    1134 <do_integral_promotion+0x34>
mov    %eax,%ecx
and    $0xffff0e00,%ecx
cmp    $0x600,%ecx
mov    $0x600,%ecx
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @do_integral_promotion(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 512
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 2816
br i1 %7, label %14, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 5632
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 6912
br i1 %13, label %14, label %19
14: ; preds = %11, %8, %5
%15 = load i32, i32* %2
%16 = and i32 %15, -61952
%17 = icmp ult i32 %16, 1536
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 1536, i32* %2
br label %19
19: ; preds = %18, %14, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @do_integral_promotion(i32 %0) {
%2 = add i32 %0, -512
%3 = icmp ult i32 %2, 2305
br i1 %3, label %5, label %4
4: ; preds = %1
switch i32 %0, label %9 [
i32 6912, label %5
i32 5632, label %5
]
5: ; preds = %4, %4, %1
%6 = and i32 %0, -61952
%7 = icmp ult i32 %6, 1536
%8 = select i1 %7, i32 1536, i32 %0
br label %9
9: ; preds = %4, %5
%10 = phi i32 [ %8, %5 ], [ %0, %4 ]
ret i32 %10
}
int add2(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<add2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add2>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int BLAS_char_check_diag(char diag) {
  return diag == 'N' || diag == 'n' || diag == 'U' || diag == 'u';
}


x86 assembly (clang, -O0):
<BLAS_char_check_diag>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x4e,%ecx
mov    %al,-0x2(%rbp)
je     114d <BLAS_char_check_diag+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6e,%ecx
mov    %al,-0x2(%rbp)
je     114d <BLAS_char_check_diag+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x55,%ecx
mov    %al,-0x2(%rbp)
je     114d <BLAS_char_check_diag+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x75,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLAS_char_check_diag>:
lea    -0x4e(%rdi),%ecx
cmp    $0x20,%cl
ja     1121 <BLAS_char_check_diag+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x100000081,%rdx
bt     %rcx,%rdx
jae    1121 <BLAS_char_check_diag+0x21>
ret
xor    %eax,%eax
cmp    $0x75,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @BLAS_char_check_diag(i8 signext %0) {
switch i8 %0, label %2 [
i8 110, label %5
i8 85, label %5
i8 78, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 117
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void swap(char *x, char *y) {
  char tmp;
  tmp = *x;
  *x = *y;
  *y = tmp;
  return;
}


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

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

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
void destroy_params(const struct kernel_param *params, unsigned num) {}


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

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

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

LLVM IR (-O2):
%struct.kernel_param = type opaque
define void @destroy_params(%struct.kernel_param* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bgGreen(char *);
int /*<<< orphan*/ printColor(int /*<<< orphan*/);
void cmBgGreen(char *str) { printColor(bgGreen(str)); }


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

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

LLVM IR (-O0):
define void @cmBgGreen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bgGreen(i8* %3)
%5 = call i32 @printColor(i32 %4)
ret void
}

LLVM IR (-O2):
define void @cmBgGreen(i8* %0) {
%2 = tail call i32 @bgGreen(i8* %0)
%3 = tail call i32 @printColor(i32 %2)
ret void
}
char cast_long_char_fast(long int x) { return (char)x; }


x86 assembly (clang, -O0):
<cast_long_char_fast>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cast_long_char_fast>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define signext i8 @cast_long_char_fast(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @cast_long_char_fast(i64 %0) {
%2 = trunc i64 %0 to i8
ret i8 %2
}
void g_vprintf() {}


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

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

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

LLVM IR (-O2):
define void @g_vprintf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void showVersion() {
  printf("bigsync version "
         "0.0.0"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"bigsync version 0.0.0\0A\00"
define void @showVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"bigsync version 0.0.0\00"
define void @showVersion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int about(void) {
  printf("1.2.0 \n");
  printf("\n cx - simple line based editor \n");
  return 0;
}


x86 assembly (clang, -O0):
<about>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"1.2.0 \0A\00"
@.str.1 = [34 x i8] c"\0A cx - simple line based editor \0A\00"
define i32 @about() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"1.2.0 \00"
@str.2 = [33 x i8] c"\0A cx - simple line based editor \00"
define i32 @about() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_network_monitor_get_events(void *m) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_network_monitor_get_events>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_network_monitor_get_events>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_network_monitor_get_events(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_network_monitor_get_events(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ menu();
int /*<<< orphan*/ printStart();
int main() {
  printStart();
  menu();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @printStart()
%2 = tail call i32 (...) @menu()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int func_a(char arg) {
  printf("func_a\n");
  return 0;
}


x86 assembly (clang, -O0):
<func_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"func_a\0A\00"
define i32 @func_a(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"func_a\00"
define i32 @func_a(i8 signext %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ COND_MI();
int /*<<< orphan*/ EA_AY_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_smi_8_pd(void) {
  m68ki_write_8(EA_AY_PD_8(), COND_MI() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_smi_8_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_MI@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_smi_8_pd>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_MI@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_smi_8_pd() {
%1 = call i32 (...) @EA_AY_PD_8()
%2 = call i64 (...) @COND_MI()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_smi_8_pd() {
%1 = tail call i32 (...) @EA_AY_PD_8()
%2 = tail call i64 (...) @COND_MI()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ c();
int e(int, int);
int main(int argc, char **argv) {
  c();
  return e(5, 7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <c@plt>
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <e@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <c@plt>
mov    $0x5,%edi
mov    $0x7,%esi
pop    %rax
jmp    1030 <e@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @c()
%4 = tail call i32 @e(i32 5, i32 7)
ret i32 %4
}
/* Variables and functions */
int maxsum(int *, int);
int ms(int *, int);
int /*<<< orphan*/ printf(char *, int);
int xmain() {
  int a[8] = {1, -2, 3, 10, -4, 7, 2, -5};
  printf("max sum = %d\n", maxsum(a, 8));
  printf("max sum = %d\n", ms(a, 8));
  return 0;
}


x86 assembly (clang, -O0):
<xmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x8,%esi
call   1040 <maxsum@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x8,%esi
call   1050 <ms@plt>
mov    %eax,%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmain>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movaps 0xed2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x8,%esi
call   1040 <maxsum@plt>
lea    0xebb(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
call   1050 <ms@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.xmain.a = [8 x i32] [i32 1, i32 -2, i32 3, i32 10, i32 -4, i32 7, i32 2, i32 -5]
@.str = [14 x i8] c"max sum = %d\0A\00"
define i32 @xmain() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @maxsum(i32* %3, i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%7 = call i32 @ms(i32* %6, i32 8)
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.xmain.a = [8 x i32] [i32 1, i32 -2, i32 3, i32 10, i32 -4, i32 7, i32 2, i32 -5]
@.str = [14 x i8] c"max sum = %d\0A\00"
define i32 @xmain() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @maxsum(i32* %3, i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @ms(i32* %3, i32 8)
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strerror_r(int, char *, size_t);
char *rs_strerror_r(int errnum, char *buf, size_t buflen) {
  strerror_r(errnum, buf, buflen);
  return buf;
}


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

x86 assembly (clang, -O2):
<rs_strerror_r>:
push   %rbx
mov    %rsi,%rbx
call   1030 <strerror_r@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @rs_strerror_r(i32 %0, i8* returned %1, i64 %2) {
%4 = tail call i32 @strerror_r(i32 %0, i8* %1, i64 %2)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ INC_();
int /*<<< orphan*/ c64_memZeroX();
void INC_zpx(void) {
  c64_memZeroX();
  INC_();
}


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

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

LLVM IR (-O0):
define void @INC_zpx() {
%1 = call i32 (...) @c64_memZeroX()
%2 = call i32 (...) @INC_()
ret void
}

LLVM IR (-O2):
define void @INC_zpx() {
%1 = tail call i32 (...) @c64_memZeroX()
%2 = tail call i32 (...) @INC_()
ret void
}
const char *get_lame_version(void) {
  static const char *const str = "3"
                                 "."
                                 "93"
                                 " "
                                 ""
                                 ""
                                 "";
  return str;
}


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

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

LLVM IR (-O0):
@get_lame_version.str = internal constant i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0)
@.str = [6 x i8] c"3.93 \00"
define i8* @get_lame_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"3.93 \00"
define i8* @get_lame_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mcalign_flush() {
  printf("NOT IMPLEMENTED:"
         "pa_mcalign_flush"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_mcalign_flush\00"
define i32 @pa_mcalign_flush() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(int, size_t);
void *xcalloc(size_t size) {
  void *p = calloc(1, size);
  if (p == NULL)
    abort();
  return p;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xcalloc+0x30>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
mov    %rdi,%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
test   %rax,%rax
je     1135 <xcalloc+0x15>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i8* @xcalloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret i8* %2
}
void sleep() {}


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

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

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

LLVM IR (-O2):
define void @sleep() {
ret void
}
int nooutput_ign_hook() { return -1; }


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

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

LLVM IR (-O0):
define i32 @nooutput_ign_hook() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @nooutput_ign_hook() {
ret i32 -1
}
int namesort(pp1, pp2) const void *pp1;
const void *pp2;
{
  char **p1 = (char **)pp1;
  char **p2 = (char **)pp2;
  return strcmp(*p1, *p2);
}


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

x86 assembly (clang, -O2):
<namesort>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @namesort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Type definitions */
struct client {
  int dummy;
};

/* Variables and functions */
short BEV_EVENT_EOF;
short BEV_EVENT_ERROR;
int /*<<< orphan*/ client_delete(struct client *);
void server_event(struct client *clnt, short events) {
  if (events & (BEV_EVENT_EOF | BEV_EVENT_ERROR)) {
    ;
    client_delete(clnt);
  }
}


x86 assembly (clang, -O0):
<server_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
mov    0x2eb2(%rip),%rcx
movswl (%rcx),%ecx
mov    0x2eb8(%rip),%rdx
movswl (%rdx),%edx
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1151 <server_event+0x41>
mov    -0x8(%rbp),%rdi
call   1030 <client_delete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<server_event>:
mov    0x2ec9(%rip),%rax
mov    0x2ed2(%rip),%rcx
movzwl (%rcx),%ecx
or     (%rax),%cx
test   %si,%cx
je     112e <server_event+0x1e>
jmp    1030 <client_delete@plt>
ret

LLVM IR (-O0):
%struct.client = type { i32 }
@BEV_EVENT_EOF = global i16 0
@BEV_EVENT_ERROR = global i16 0
define void @server_event(%struct.client* %0, i16 signext %1) {
%3 = alloca %struct.client*
%4 = alloca i16
store %struct.client* %0, %struct.client** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = load i16, i16* @BEV_EVENT_EOF
%8 = sext i16 %7 to i32
%9 = load i16, i16* @BEV_EVENT_ERROR
%10 = sext i16 %9 to i32
%11 = or i32 %8, %10
%12 = and i32 %6, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load %struct.client*, %struct.client** %3
%16 = call i32 @client_delete(%struct.client* %15)
br label %17
17: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
%struct.client = type { i32 }
@BEV_EVENT_EOF = global i16 0
@BEV_EVENT_ERROR = global i16 0
define void @server_event(%struct.client* %0, i16 signext %1) {
%3 = load i16, i16* @BEV_EVENT_EOF
%4 = load i16, i16* @BEV_EVENT_ERROR
%5 = or i16 %4, %3
%6 = and i16 %5, %1
%7 = icmp eq i16 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @client_delete(%struct.client* %0)
br label %10
10: ; preds = %8, %2
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void mmio_and(uint32_t reg, uint32_t data) {
  *(volatile uint32_t *)reg &= data;
}


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

x86 assembly (clang, -O2):
<mmio_and>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
mov    -0x8(%rsp),%rcx
and    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @mmio_and(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, %5
store volatile i64 %9, i64* %7
ret void
}

LLVM IR (-O2):
define void @mmio_and(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, %5
store volatile i64 %9, i64* %7
ret void
}
void ShmGetCoredump(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ShmGetCoredump() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PAC9685SetPeriod();
void pwm20ms() { PAC9685SetPeriod(); }


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

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

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

LLVM IR (-O2):
define void @pwm20ms() {
%1 = tail call i32 (...) @PAC9685SetPeriod()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ CopyToVRAM(int /*<<< orphan*/ volatile *,
                              int /*<<< orphan*/ const *, int);
void LoadPaletteObj(const uint16_t palette_data[256]) {
  CopyToVRAM(((volatile uint16_t *)(0x5000200)), palette_data, 256);
}


x86 assembly (clang, -O0):
<LoadPaletteObj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x5000200,%edi
mov    $0x100,%edx
call   1030 <CopyToVRAM@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadPaletteObj>:
mov    %rdi,%rsi
mov    $0x5000200,%edi
mov    $0x100,%edx
jmp    1030 <CopyToVRAM@plt>

LLVM IR (-O0):
define void @LoadPaletteObj(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @CopyToVRAM(i32* inttoptr (i64 83886592 to i32*), i32* %3, i32 256)
ret void
}

LLVM IR (-O2):
define void @LoadPaletteObj(i32* %0) {
%2 = tail call i32 @CopyToVRAM(i32* inttoptr (i64 83886592 to i32*), i32* %0, i32 256)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ __inline_clock();
clock_t clock(void) { return __inline_clock(); }


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

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

LLVM IR (-O0):
define i32 @clock() {
%1 = call i32 (...) @__inline_clock()
ret i32 %1
}

LLVM IR (-O2):
define i32 @clock() {
%1 = tail call i32 (...) @__inline_clock()
ret i32 %1
}