xunge/DecIR huggingface dataset:
/* Variables and functions */
long syscall(int, int, int, char const *, int);
long dcac_add_ops(int type, int gid, const char *attr, int flags) {
  return syscall(320, type, gid, attr, flags);
}


x86 assembly (clang, -O0):
<dcac_add_ops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x140,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_add_ops>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x140,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i64 @dcac_add_ops(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i64 @syscall(i32 320, i32 %0, i32 %1, i8* %2, i32 %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ CL_ShutdownCGame();
int /*<<< orphan*/ CL_ShutdownUI();
void CL_ShutdownVMs(void) {
  CL_ShutdownCGame();
  CL_ShutdownUI();
}


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

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

LLVM IR (-O0):
define void @CL_ShutdownVMs() {
%1 = call i32 (...) @CL_ShutdownCGame()
%2 = call i32 (...) @CL_ShutdownUI()
ret void
}

LLVM IR (-O2):
define void @CL_ShutdownVMs() {
%1 = tail call i32 (...) @CL_ShutdownCGame()
%2 = tail call i32 (...) @CL_ShutdownUI()
ret void
}
int asymptote_panel_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @asymptote_panel_init() {
ret i32 0
}
int do_029() { return 29; }


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

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

LLVM IR (-O0):
define i32 @do_029() {
ret i32 29
}

LLVM IR (-O2):
define i32 @do_029() {
ret i32 29
}
double r20(void *x) { return *(double *)(x + 32748); }


x86 assembly (clang, -O0):
<r20>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x7fec(%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<r20>:
movsd  0x7fec(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @r20(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32748
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @r20(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32748
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
ret double %4
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
struct slInt {
  int dummy;
};

/* Variables and functions */
struct slInt *matchingExtId(struct sqlConnection *, char *, char *);
struct slInt *genePixSelectLocusLink(struct sqlConnection *conn, char *id) {
  return matchingExtId(conn, id, "locusLink");
}


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

x86 assembly (clang, -O2):
<genePixSelectLocusLink>:
lea    0xee9(%rip),%rdx
jmp    1030 <matchingExtId@plt>

LLVM IR (-O0):
%struct.slInt = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [10 x i8] c"locusLink\00"
define %struct.slInt* @genePixSelectLocusLink(%struct.sqlConnection* %0, i8* %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i8*
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i8* %1, i8** %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i8*, i8** %4
%7 = call %struct.slInt* @matchingExtId(%struct.sqlConnection* %5, i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret %struct.slInt* %7
}

LLVM IR (-O2):
%struct.slInt = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [10 x i8] c"locusLink\00"
define %struct.slInt* @genePixSelectLocusLink(%struct.sqlConnection* %0, i8* %1) {
%3 = tail call %struct.slInt* @matchingExtId(%struct.sqlConnection* %0, i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret %struct.slInt* %3
}
void UARTWriteByte(char c) { *((char *)0xFFFFFFE0) = c; }


x86 assembly (clang, -O0):
<UARTWriteByte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%cl
mov    $0xffffffe0,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTWriteByte>:
mov    $0xffffffe0,%eax
mov    %dil,(%rax)
ret

LLVM IR (-O0):
define void @UARTWriteByte(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
store i8 %3, i8* inttoptr (i64 4294967264 to i8*)
ret void
}

LLVM IR (-O2):
define void @UARTWriteByte(i8 signext %0) {
store i8 %0, i8* inttoptr (i64 4294967264 to i8*)
ret void
}
/* Variables and functions */
size_t cwk_path_output_sized(char *, size_t, size_t, char *, int);
size_t cwk_path_output_dot(char *buffer, size_t buffer_size, size_t position) {
  return cwk_path_output_sized(buffer, buffer_size, position, ".", 1);
}


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

x86 assembly (clang, -O2):
<cwk_path_output_dot>:
lea    0xee9(%rip),%rcx
mov    $0x1,%r8d
jmp    1030 <cwk_path_output_sized@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i64 @cwk_path_output_dot(i8* %0, i64 %1, i64 %2) {
%4 = tail call i64 @cwk_path_output_sized(i8* %0, i64 %1, i64 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i64 %4
}
int gpio_unexport(int pin) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gpio_unexport(i32 %0) {
ret i32 0
}
unsigned short sprdwl_rx_event_process(struct sprdwl_priv *priv,
                                       unsigned char *msg) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sprdwl_priv = type opaque
define zeroext i16 @sprdwl_rx_event_process(%struct.sprdwl_priv* %0, i8* %1) {
%3 = alloca %struct.sprdwl_priv*
%4 = alloca i8*
store %struct.sprdwl_priv* %0, %struct.sprdwl_priv** %3
store i8* %1, i8** %4
ret i16 0
}

LLVM IR (-O2):
%struct.sprdwl_priv = type opaque
define zeroext i16 @sprdwl_rx_event_process(%struct.sprdwl_priv* nocapture readnone %0, i8* nocapture readnone %1) {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char const *);
int delete_file(const char *filename) {
  unlink(filename);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @delete_file(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 0
}
/* Type definitions */
struct ibv_qp {
  int dummy;
};

/* Variables and functions */
int ibv_destroy_qp(struct ibv_qp *);
int mlx4_glue_destroy_qp(struct ibv_qp *qp) { return ibv_destroy_qp(qp); }


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

x86 assembly (clang, -O2):
<mlx4_glue_destroy_qp>:
jmp    1030 <ibv_destroy_qp@plt>

LLVM IR (-O0):
%struct.ibv_qp = type { i32 }
define i32 @mlx4_glue_destroy_qp(%struct.ibv_qp* %0) {
%2 = alloca %struct.ibv_qp*
store %struct.ibv_qp* %0, %struct.ibv_qp** %2
%3 = load %struct.ibv_qp*, %struct.ibv_qp** %2
%4 = call i32 @ibv_destroy_qp(%struct.ibv_qp* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.ibv_qp = type { i32 }
define i32 @mlx4_glue_destroy_qp(%struct.ibv_qp* %0) {
%2 = tail call i32 @ibv_destroy_qp(%struct.ibv_qp* %0)
ret i32 %2
}
/* Variables and functions */
double average(int, double, double, double, ...);
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("%f\n", average(3, 13.2, 22.3, 4.5));
  printf("%f\n", average(5, 3.3, 2.2, 1.1, 5.5, 3.3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
movsd  0xeef(%rip),%xmm0
movsd  0xeef(%rip),%xmm1
movsd  0xeef(%rip),%xmm2
mov    $0x3,%al
call   1040 <average@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
movsd  0xe9f(%rip),%xmm4
movsd  0xe9f(%rip),%xmm1
movsd  0xe9f(%rip),%xmm2
movsd  0xe9f(%rip),%xmm3
movaps %xmm4,%xmm0
mov    $0x5,%al
call   1040 <average@plt>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
movsd  0xed7(%rip),%xmm2
mov    $0x3,%edi
mov    $0x3,%al
call   1040 <average@plt>
lea    0xeec(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xebc(%rip),%xmm1
movsd  0xebc(%rip),%xmm2
movsd  0xebc(%rip),%xmm3
movsd  0xebc(%rip),%xmm0
mov    $0x5,%edi
movaps %xmm0,%xmm4
mov    $0x5,%al
call   1040 <average@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = call double (i32, double, double, double, ...) @average(i32 3, double 1.320000e+01, double 2.230000e+01, double 4.500000e+00)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = call double (i32, double, double, double, ...) @average(i32 5, double 3.300000e+00, double 2.200000e+00, double 1.100000e+00, double 5.500000e+00, double 3.300000e+00)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double (i32, double, double, double, ...) @average(i32 3, double 1.320000e+01, double 2.230000e+01, double 4.500000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double (i32, double, double, double, ...) @average(i32 5, double 3.300000e+00, double 2.200000e+00, double 1.100000e+00, double 5.500000e+00, double 3.300000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
R0A1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ r0 = (*((int *)11111111)); }


x86 assembly (clang, -O0):
<R0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0xa98ac7,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @R0A1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 11111111 to i32*)
store i32 %14, i32* %8
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @R0A1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
ret i32 undef
}
void rudder_left() {}


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

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

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

LLVM IR (-O2):
define void @rudder_left() {
ret void
}
int test_imm_BDint32_mem(int *val) {
  return ((*val) & (0xBD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_BDint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 189
%6 = icmp ne i32 %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_BDint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 189
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int main() {
  void *arr[] = {&&label1, &&label2, &&label3, &&label4, &&label5};
  int i;
label1:
  i = 2;
label2:
  i = 4;
label3:
  goto *arr[i];
label4:
  i = 3;
label5:
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movaps %xmm0,-0x20(%rbp)
movaps %xmm0,-0x30(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0x30(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0x2c(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0x28(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0x2f(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0x2b(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x2,-0x34(%rbp)
movl   $0x4,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rax
mov    %rax,-0x40(%rbp)
jmp    1181 <main+0x81>
movl   $0x3,-0x34(%rbp)
mov    -0x34(%rbp),%eax
pop    %rbp
ret
mov    -0x40(%rbp),%rax
jmp    *%rax

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8*]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x i8*]* %2 to i8*
%5 = bitcast i8* %4 to [5 x i8*]*
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 0
store i8* blockaddress(@main, %11), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 1
store i8* blockaddress(@main, %12), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 2
store i8* blockaddress(@main, %13), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 3
store i8* blockaddress(@main, %18), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 4
store i8* blockaddress(@main, %19), i8** %10
br label %11
11: ; preds = %0, %21
store i32 2, i32* %3
br label %12
12: ; preds = %11, %21
store i32 4, i32* %3
br label %13
13: ; preds = %12, %21
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %15
%17 = load i8*, i8** %16
br label %21
18: ; preds = %21
store i32 3, i32* %3
br label %19
19: ; preds = %18, %21
%20 = load i32, i32* %3
ret i32 %20
21: ; preds = %13
%22 = phi i8* [ %17, %13 ]
indirectbr i8* %22, [label %11, label %12, label %13, label %18, label %19]
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
int *baz(int *vector __attribute__((unused))) { return vector; }


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

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

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

LLVM IR (-O2):
define i32* @baz(i32* readnone returned %0) {
ret i32* %0
}
/* Variables and functions */
int /*<<< orphan*/ SO_RCVBUF;
int set_sockbuf_size(int, int /*<<< orphan*/, size_t const, char *);
int set_rcvbuf(int sockfd, const size_t len) {
  return set_sockbuf_size(sockfd, SO_RCVBUF, len, "receive");
}


x86 assembly (clang, -O0):
<set_rcvbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rcx
call   1030 <set_sockbuf_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_rcvbuf>:
mov    %rsi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
lea    0xedd(%rip),%rcx
jmp    1030 <set_sockbuf_size@plt>

LLVM IR (-O0):
@SO_RCVBUF = global i32 0
@.str = [8 x i8] c"receive\00"
define i32 @set_rcvbuf(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @SO_RCVBUF
%7 = load i64, i64* %4
%8 = call i32 @set_sockbuf_size(i32 %5, i32 %6, i64 %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
@SO_RCVBUF = global i32 0
@.str = [8 x i8] c"receive\00"
define i32 @set_rcvbuf(i32 %0, i64 %1) {
%3 = load i32, i32* @SO_RCVBUF
%4 = tail call i32 @set_sockbuf_size(i32 %0, i32 %3, i64 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
long double test_floorl(long double x) { return __builtin_floorl(x); }


x86 assembly (clang, -O0):
<test_floorl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <floorl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_floorl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <floorl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @test_floorl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.floor.f80(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @test_floorl(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.floor.f80(x86_fp80 %0)
ret x86_fp80 %2
}
void gendiv_d() {}


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

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

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

LLVM IR (-O2):
define void @gendiv_d() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(unsigned long);
int /*<<< orphan*/ stderr;
void *RuntimeMalloc(unsigned long SIZE) {
  void *ptr = malloc(SIZE);
  if (ptr == NULL) {
    fprintf(stderr, "error: not enought memory\n");
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<RuntimeMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <RuntimeMalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RuntimeMalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <RuntimeMalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"error: not enought memory\0A\00"
define i8* @RuntimeMalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"error: not enought memory\0A\00"
define noalias i8* @RuntimeMalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int arch_audio_codec_write(int, int);
int arch_audio_power_write(int reg, int val) {
  int ret = 0;
  ret = arch_audio_codec_write(reg, val);
  return ret;
}


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

x86 assembly (clang, -O2):
<arch_audio_power_write>:
jmp    1030 <arch_audio_codec_write@plt>

LLVM IR (-O0):
define i32 @arch_audio_power_write(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 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @arch_audio_codec_write(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @arch_audio_power_write(i32 %0, i32 %1) {
%3 = tail call i32 @arch_audio_codec_write(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int ph_ftp_destroy(void *handler) {
  free(handler);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ph_ftp_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ar;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int g(unsigned long long *, int, unsigned int *, int);
main() {
  int res;
  unsigned int ar[] = {10, 11, 12, 13, 14};
  unsigned long long int v;
  res = g(&v, sizeof(ar) / sizeof(ar[0]), ar, 16);
  if (v != 0xabcdeUL)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rdi
mov    $0x5,%esi
mov    $0x10,%ecx
call   1040 <g@plt>
mov    %eax,-0x8(%rbp)
cmpq   $0xabcde,-0x28(%rbp)
je     118d <main+0x5d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xed6(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rdx
mov    $0x5,%esi
mov    $0x10,%ecx
call   1040 <g@plt>
cmpq   $0xabcde,0x8(%rsp)
jne    1175 <main+0x45>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.ar = [5 x i32] [i32 10, i32 11, i32 12, i32 13, i32 14]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [5 x i32]
%4 = alloca i64
store i32 0, i32* %1
%5 = bitcast [5 x i32]* %3 to i8*
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%7 = call i32 @g(i64* %4, i32 5, i32* %6, i32 16)
store i32 %7, i32* %2
%8 = load i64, i64* %4
%9 = icmp ne i64 %8, 703710
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@__const.main.ar = [5 x i32] [i32 10, i32 11, i32 12, i32 13, i32 14]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = alloca i64
%3 = bitcast [5 x i32]* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = call i32 @g(i64* %2, i32 5, i32* %5, i32 16)
%7 = load i64, i64* %2
%8 = icmp eq i64 %7, 703710
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
%12 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void ltrim(char *str) {
  char *start_pos;
  start_pos = str;
  while (*start_pos == ' ' || *start_pos == '\t')
    start_pos++;
  strcpy(str, start_pos);
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1149 <ltrim+0x39>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1159 <ltrim+0x49>
jmp    116a <ltrim+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <ltrim+0x14>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
mov    %rdi,%rsi
jmp    1124 <ltrim+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rsi
movzbl (%rsi),%eax
cmp    $0x20,%al
je     1120 <ltrim+0x10>
cmp    $0x9,%al
je     1120 <ltrim+0x10>
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @ltrim(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %17, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 32
br i1 %9, label %15, label %10
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ true, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
br label %5
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = load i8*, i8** %3
%23 = call i32 @strcpy(i8* %21, i8* %22)
ret void
}

LLVM IR (-O2):
define void @ltrim(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
%8 = tail call i32 @strcpy(i8* %0, i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ codepage;

/* Variables and functions */
int msdosGetCodePage();
int /*<<< orphan*/ snprintf(char *, int, char *, int);
const char *getLocaleCharset(void) {
  static char codepage[8];
  snprintf(codepage, sizeof(codepage), "CP%03u", msdosGetCodePage());
  return codepage;
}


x86 assembly (clang, -O0):
<getLocaleCharset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <msdosGetCodePage@plt>
mov    %eax,%ecx
lea    0x2efd(%rip),%rdi
mov    $0x8,%esi
lea    0xec0(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2ee5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLocaleCharset>:
push   %rbx
xor    %eax,%eax
call   1040 <msdosGetCodePage@plt>
lea    0x2f02(%rip),%rbx
lea    0xeca(%rip),%rdx
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %eax,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@getLocaleCharset.codepage = internal global [8 x i8] zeroinitializer
@.str = [7 x i8] c"CP%03u\00"
define i8* @getLocaleCharset() {
%1 = call i32 (...) @msdosGetCodePage()
%2 = call i32 @snprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @getLocaleCharset.codepage, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @getLocaleCharset.codepage, i64 0, i64 0)
}

LLVM IR (-O2):
@getLocaleCharset.codepage = internal global [8 x i8] zeroinitializer
@.str = [7 x i8] c"CP%03u\00"
define i8* @getLocaleCharset() {
%1 = tail call i32 (...) @msdosGetCodePage()
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @getLocaleCharset.codepage, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @getLocaleCharset.codepage, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void mov_preg64preg64_reg32(int reg1, int reg2, int reg32) {
  put8(0x89);
  put8(0x04 | (reg32 << 3));
  put8((reg1 << 3) | reg2);
}


x86 assembly (clang, -O0):
<mov_preg64preg64_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
shl    $0x3,%edi
or     $0x4,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     -0x8(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_preg64preg64_reg32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x89,%edi
call   1030 <put8@plt>
lea    0x4(,%rbx,8),%edi
call   1030 <put8@plt>
shl    $0x3,%ebp
or     %r14d,%ebp
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @mov_preg64preg64_reg32(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @put8(i32 137)
%8 = load i32, i32* %6
%9 = shl i32 %8, 3
%10 = or i32 4, %9
%11 = call i32 @put8(i32 %10)
%12 = load i32, i32* %4
%13 = shl i32 %12, 3
%14 = load i32, i32* %5
%15 = or i32 %13, %14
%16 = call i32 @put8(i32 %15)
ret void
}

LLVM IR (-O2):
define void @mov_preg64preg64_reg32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 137)
%5 = shl i32 %2, 3
%6 = or i32 %5, 4
%7 = tail call i32 @put8(i32 %6)
%8 = shl i32 %0, 3
%9 = or i32 %8, %1
%10 = tail call i32 @put8(i32 %9)
ret void
}
/* Type definitions */
struct ss7 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ss7_message(struct ss7 *, char *, unsigned char);
int((facility_ind_dump))(struct ss7 *ss7, int messagetype, unsigned char *parm,
                         int len) {
  ss7_message(ss7, "\t\t\tFacility Indicator: %x\n", parm[0]);
  return 1;
}


x86 assembly (clang, -O0):
<facility_ind_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
lea    0xecb(%rip),%rsi
movzbl (%rax),%edx
call   1030 <ss7_message@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<facility_ind_dump>:
push   %rax
movzbl (%rdx),%edx
lea    0xee5(%rip),%rsi
call   1030 <ss7_message@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ss7 = type { i32 }
@.str = [27 x i8] c"\09\09\09Facility Indicator: %x\0A\00"
define i32 @facility_ind_dump(%struct.ss7* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.ss7*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.ss7*, %struct.ss7** %5
%10 = load i8*, i8** %7
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = call i32 @ss7_message(%struct.ss7* %9, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 zeroext %12)
ret i32 1
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [27 x i8] c"\09\09\09Facility Indicator: %x\0A\00"
define i32 @facility_ind_dump(%struct.ss7* %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = load i8, i8* %2
%6 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 zeroext %5)
ret i32 1
}
char *RCSid() {
  return RCSid("$Id: graph3d.c,v 1.253.2.14 2013/07/03 16:18:21 sfeam Exp $");
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"$Id: graph3d.c,v 1.253.2.14 2013/07/03 16:18:21 sfeam Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
void ff_hevc_put_hevc_uni_w_qpel_h8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h8_10_sse4() {
ret void
}
/* Variables and functions */
int Factorial(int);
int Combinations(int n, int k) {
  return (Factorial(n) / (Factorial(k) * Factorial(n - k)));
}


x86 assembly (clang, -O0):
<Combinations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Factorial@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <Factorial@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <Factorial@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Combinations>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <Factorial@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <Factorial@plt>
mov    %eax,%r15d
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <Factorial@plt>
mov    %eax,%ecx
imul   %r15d,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Combinations(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 = call i32 @Factorial(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @Factorial(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @Factorial(i32 %11)
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %6, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @Combinations(i32 %0, i32 %1) {
%3 = tail call i32 @Factorial(i32 %0)
%4 = tail call i32 @Factorial(i32 %1)
%5 = sub nsw i32 %0, %1
%6 = tail call i32 @Factorial(i32 %5)
%7 = mul nsw i32 %6, %4
%8 = sdiv i32 %3, %7
ret i32 %8
}
int main() { return ((5 - 1) - (3 - 2)); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ TransformAlarmC__0__Alarm__stop();
void CC2420TransmitP__BackoffTimer__stop(void) {
  TransformAlarmC__0__Alarm__stop();
}


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

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

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

LLVM IR (-O2):
define void @CC2420TransmitP__BackoffTimer__stop() {
%1 = tail call i32 (...) @TransformAlarmC__0__Alarm__stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void dbg(char *prn) { printf("%s", prn); }


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

x86 assembly (clang, -O2):
<dbg>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @dbg(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEaconst_null(int /*<<< orphan*/ *);
void code_aconst_null() { appendCODE(makeCODEaconst_null(NULL)); }


x86 assembly (clang, -O0):
<code_aconst_null>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <makeCODEaconst_null@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @code_aconst_null() {
%1 = call i32 @makeCODEaconst_null(i32* null)
%2 = call i32 @appendCODE(i32 %1)
ret void
}

LLVM IR (-O2):
define void @code_aconst_null() {
%1 = tail call i32 @makeCODEaconst_null(i32* null)
%2 = tail call i32 @appendCODE(i32 %1)
ret void
}
int geral_existeCharXNaStringY(char ch, char array[]) {
  int i;
  for (i = 0; array[i] != '\0'; i++) {
    if (array[i] == ch)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<geral_existeCharXNaStringY>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1161 <geral_existeCharXNaStringY+0x61>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    114e <geral_existeCharXNaStringY+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1168 <geral_existeCharXNaStringY+0x68>
jmp    1153 <geral_existeCharXNaStringY+0x53>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <geral_existeCharXNaStringY+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<geral_existeCharXNaStringY>:
mov    (%rsi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <geral_existeCharXNaStringY+0x20>
add    $0x1,%rsi
nopl   0x0(%rax)
cmp    %dil,%cl
je     1121 <geral_existeCharXNaStringY+0x21>
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <geral_existeCharXNaStringY+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @geral_existeCharXNaStringY(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %1, i64 %13
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %13, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = icmp eq i8 %11, %0
%13 = add nuw i64 %10, 1
br i1 %12, label %14, label %5
14: ; preds = %9, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %15
}
void SPIReset(unsigned long ulBase) {
  (*((volatile unsigned long *)(ulBase + 0x00000110))) |= 0x00000002;
  while (!((*((volatile unsigned long *)(ulBase + 0x00000114))) & 0x00000001)) {
  }
}


x86 assembly (clang, -O0):
<SPIReset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x110(%rax),%rcx
or     $0x2,%rcx
mov    %rcx,0x110(%rax)
mov    -0x8(%rbp),%rax
mov    0x114(%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1143 <SPIReset+0x43>
jmp    1148 <SPIReset+0x48>
jmp    111e <SPIReset+0x1e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPIReset>:
orq    $0x2,0x110(%rdi)
02
nopl   0x0(%rax,%rax,1)
testq  $0x1,0x114(%rdi)
je     1110 <SPIReset+0x10>
ret

LLVM IR (-O0):
define void @SPIReset(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 272
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 2
store volatile i64 %7, i64* %5
br label %8
8: ; preds = %16, %1
%9 = load i64, i64* %2
%10 = add i64 %9, 276
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, 1
%14 = icmp ne i64 %13, 0
%15 = xor i1 %14, true
br i1 %15, label %16, label %17
16: ; preds = %8
br label %8
17: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @SPIReset(i64 %0) {
%2 = add i64 %0, 272
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 2
store volatile i64 %5, i64* %3
%6 = add i64 %0, 276
%7 = inttoptr i64 %6 to i64*
br label %8
8: ; preds = %8, %1
%9 = load volatile i64, i64* %7
%10 = and i64 %9, 1
%11 = icmp eq i64 %10, 0
br i1 %11, label %8, label %12
12: ; preds = %8
ret void
}
/* Variables and functions */
void Default_PWM0_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Default_PWM0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ vm_fail(char *);
void fail_format() {
  vm_fail("File expected to be: ELF 32-bit LSB executable,\n"
          "ARM, version 1 (SYSV)\n");
}


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

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

LLVM IR (-O0):
@.str = [71 x i8] c"File expected to be: ELF 32-bit LSB executable,\0AARM, version 1 (SYSV)\0A\00"
define void @fail_format() {
%1 = call i32 @vm_fail(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [71 x i8] c"File expected to be: ELF 32-bit LSB executable,\0AARM, version 1 (SYSV)\0A\00"
define void @fail_format() {
%1 = tail call i32 @vm_fail(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int lengthOfLongestSubstring(char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", lengthOfLongestSubstring("pwwkew"));
  printf("%d\n", lengthOfLongestSubstring("abcabcbb"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <lengthOfLongestSubstring@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
call   1040 <lengthOfLongestSubstring@plt>
mov    %eax,%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedc(%rip),%rdi
call   1040 <lengthOfLongestSubstring@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
call   1040 <lengthOfLongestSubstring@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"pwwkew\00"
@.str.2 = [9 x i8] c"abcabcbb\00"
define i32 @main() {
%1 = tail call i32 @lengthOfLongestSubstring(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @lengthOfLongestSubstring(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}