xunge/DecIR huggingface dataset:
int bfq_update_next_in_service(struct bfq_sched_data *sd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.bfq_sched_data = type opaque
define i32 @bfq_update_next_in_service(%struct.bfq_sched_data* nocapture readnone %0) {
ret i32 0
}
int hssl_enabled(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hssl_enabled() {
ret i32 0
}
float Function4Float(float a, float b, float c, float d) {
  return a + b + c + d;
}


x86 assembly (clang, -O0):
<Function4Float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Function4Float>:
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @Function4Float(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = fadd float %9, %10
%12 = load float, float* %7
%13 = fadd float %11, %12
%14 = load float, float* %8
%15 = fadd float %13, %14
ret float %15
}

LLVM IR (-O2):
define float @Function4Float(float %0, float %1, float %2, float %3) {
%5 = fadd float %0, %1
%6 = fadd float %5, %2
%7 = fadd float %6, %3
ret float %7
}
int fun264() { return 264; }


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

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

LLVM IR (-O0):
define i32 @fun264() {
ret i32 264
}

LLVM IR (-O2):
define i32 @fun264() {
ret i32 264
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int);
void StartShowStatusThread(void) {
  char strbuf[64] = {0};
  while (1) {
    printf("DSL Operational Status : %s\n", strbuf);
    sleep(2);
  }
}


x86 assembly (clang, -O0):
<StartShowStatusThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
jmp    1148 <StartShowStatusThread+0x18>

x86 assembly (clang, -O2):
<StartShowStatusThread>:
push   %r14
push   %rbx
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xebc(%rip),%r14
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
jmp    1150 <StartShowStatusThread+0x30>

LLVM IR (-O0):
@.str = [29 x i8] c"DSL Operational Status : %s\0A\00"
define void @StartShowStatusThread() {
%1 = alloca [64 x i8]
%2 = bitcast [64 x i8]* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @sleep(i32 2)
br label %3
}

LLVM IR (-O2):
@.str = [29 x i8] c"DSL Operational Status : %s\0A\00"
define void @StartShowStatusThread() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @sleep(i32 2)
br label %3
}
unsigned int poll_keyboard(void) { return 0xffffffff; }


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

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

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

LLVM IR (-O2):
define i32 @poll_keyboard() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(unsigned int a) {
  if ((a >> 5) & 1)
    bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x5,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1134 <foo+0x24>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   $0x20,%dil
jne    1117 <foo+0x7>
ret
xor    %eax,%eax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 5
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @bar()
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = and i32 %0, 32
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @bar()
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PRINT_LOG_FREE(char *, char *);
void PRINT_INFO_FREE(char *y) { PRINT_LOG_FREE("INFO", y); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"INFO\00"
define void @PRINT_INFO_FREE(i8* %0) {
%2 = tail call i32 @PRINT_LOG_FREE(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_3Fint64_lowword_reg(long long val) {
  return ((val) & (0x3F << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_3Fint64_lowword_reg>:
test   $0x3f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Fint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 63
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float *pixel(float *p, int n, int c, int i, int j) {
  return p + c * (i * n + j);
}


x86 assembly (clang, -O0):
<pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0xc(%rbp),%edx
add    -0x18(%rbp),%edx
imul   %edx,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel>:
imul   %ecx,%esi
add    %r8d,%esi
imul   %edx,%esi
movslq %esi,%rax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define float* @pixel(float* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store float* %0, float** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load float*, float** %6
%12 = load i32, i32* %8
%13 = load i32, i32* %9
%14 = load i32, i32* %7
%15 = mul nsw i32 %13, %14
%16 = load i32, i32* %10
%17 = add nsw i32 %15, %16
%18 = mul nsw i32 %12, %17
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds float, float* %11, i64 %19
ret float* %20
}

LLVM IR (-O2):
define float* @pixel(float* readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul nsw i32 %3, %1
%7 = add nsw i32 %6, %4
%8 = mul nsw i32 %7, %2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds float, float* %0, i64 %9
ret float* %10
}
/* Variables and functions */
int /*<<< orphan*/ fft_rec(int, int /*<<< orphan*/, int, double **, double **,
                           double **);
int /*<<< orphan*/ free(double **);
double **malloc(int);
void fft(int N, double (*x)[2], double (*X)[2]) {
  double(*XX)[2] = malloc(2 * N * sizeof(double));
  fft_rec(N, 0, 1, x, X, XX);
  free(XX);
}


x86 assembly (clang, -O0):
<fft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
xor    %esi,%esi
mov    $0x1,%edx
call   1050 <fft_rec@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fft>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %edi,%ebp
shl    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    %r15,%rcx
mov    %r14,%r8
mov    %rax,%r9
call   1050 <fft_rec@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @fft(i32 %0, [2 x double]* %1, [2 x double]* %2) {
%4 = alloca i32
%5 = alloca [2 x double]*
%6 = alloca [2 x double]*
%7 = alloca [2 x double]*
store i32 %0, i32* %4
store [2 x double]* %1, [2 x double]** %5
store [2 x double]* %2, [2 x double]** %6
%8 = load i32, i32* %4
%9 = mul nsw i32 2, %8
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 8
%12 = trunc i64 %11 to i32
%13 = call double** @malloc(i32 %12)
%14 = bitcast double** %13 to [2 x double]*
store [2 x double]* %14, [2 x double]** %7
%15 = load i32, i32* %4
%16 = load [2 x double]*, [2 x double]** %5
%17 = bitcast [2 x double]* %16 to double**
%18 = load [2 x double]*, [2 x double]** %6
%19 = bitcast [2 x double]* %18 to double**
%20 = load [2 x double]*, [2 x double]** %7
%21 = bitcast [2 x double]* %20 to double**
%22 = call i32 @fft_rec(i32 %15, i32 0, i32 1, double** %17, double** %19, double** %21)
%23 = load [2 x double]*, [2 x double]** %7
%24 = bitcast [2 x double]* %23 to double**
%25 = call i32 @free(double** %24)
ret void
}

LLVM IR (-O2):
define void @fft(i32 %0, [2 x double]* %1, [2 x double]* %2) {
%4 = shl i32 %0, 4
%5 = tail call double** @malloc(i32 %4)
%6 = bitcast [2 x double]* %1 to double**
%7 = bitcast [2 x double]* %2 to double**
%8 = tail call i32 @fft_rec(i32 %0, i32 0, i32 1, double** %6, double** %7, double** %5)
%9 = tail call i32 @free(double** %5)
ret void
}
/* Variables and functions */
scalar_t__ declare_arrayN(int, int, int, int);
float **declare_float(int first, int second) {
  return (float **)declare_arrayN(2, sizeof(float), first, second);
}


x86 assembly (clang, -O0):
<declare_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    $0x2,%edi
mov    $0x4,%esi
call   1030 <declare_arrayN@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<declare_float>:
mov    %esi,%ecx
mov    %edi,%edx
mov    $0x2,%edi
mov    $0x4,%esi
jmp    1030 <declare_arrayN@plt>

LLVM IR (-O0):
define float** @declare_float(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i64 @declare_arrayN(i32 2, i32 4, i32 %5, i32 %6)
%8 = inttoptr i64 %7 to float**
ret float** %8
}

LLVM IR (-O2):
define float** @declare_float(i32 %0, i32 %1) {
%3 = tail call i64 @declare_arrayN(i32 2, i32 4, i32 %0, i32 %1)
%4 = inttoptr i64 %3 to float**
ret float** %4
}
/* Variables and functions */
int /*<<< orphan*/ dlink_delete_first();
int peek();
int pop() {
  int ret = peek();
  dlink_delete_first();
  return ret;
}


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

x86 assembly (clang, -O2):
<pop>:
push   %rbx
xor    %eax,%eax
call   1030 <peek@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <dlink_delete_first@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pop() {
%1 = alloca i32
%2 = call i32 (...) @peek()
store i32 %2, i32* %1
%3 = call i32 (...) @dlink_delete_first()
%4 = load i32, i32* %1
ret i32 %4
}

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


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"testcase()\00"
define i32 @testcase() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fail(char const *, int /*<<< orphan*/, char *);
int /*<<< orphan*/ strlen(char const *);
void __chk_fail(void) {
  const char *msg = "*** buffer overflow detected ***: ";
  fail(msg, strlen(msg), "buffer overflow detected: terminated");
}


x86 assembly (clang, -O0):
<__chk_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
lea    0xed2(%rip),%rdx
call   1030 <fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__chk_fail>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xeec(%rip),%rdx
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <fail@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"*** buffer overflow detected ***: \00"
@.str.1 = [37 x i8] c"buffer overflow detected: terminated\00"
define void @__chk_fail() {
%1 = alloca i8*
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strlen(i8* %3)
%5 = call i32 @fail(i8* %2, i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"*** buffer overflow detected ***: \00"
@.str.1 = [37 x i8] c"buffer overflow detected: terminated\00"
define void @__chk_fail() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fail(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int i5(int *base) { return base[00000001]; }


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

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

LLVM IR (-O0):
define i32 @i5(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @i5(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
char *str_cp_tr(int (*)(int), char *, char *);
char *str_tr(int (*tr)(int), char *s) { return str_cp_tr(tr, s, s); }


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

x86 assembly (clang, -O2):
<str_tr>:
mov    %rsi,%rdx
jmp    1030 <str_cp_tr@plt>

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

LLVM IR (-O2):
define i8* @str_tr(i32 (i32)* %0, i8* %1) {
%3 = tail call i8* @str_cp_tr(i32 (i32)* %0, i8* %1, i8* %1)
ret i8* %3
}
/* Variables and functions */
scalar_t__ cwk_path_is_separator(char const *);
void cwk_path_get_root_unix(const char *path, size_t *length) {
  if (cwk_path_is_separator(path)) {
    *length = 1;
  } else {
    *length = 0;
  }
}


x86 assembly (clang, -O0):
<cwk_path_get_root_unix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cwk_path_is_separator@plt>
cmp    $0x0,%rax
je     1143 <cwk_path_get_root_unix+0x33>
mov    -0x10(%rbp),%rax
movq   $0x1,(%rax)
jmp    114e <cwk_path_get_root_unix+0x3e>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwk_path_get_root_unix>:
push   %rbx
mov    %rsi,%rbx
call   1030 <cwk_path_is_separator@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %rcx,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @cwk_path_get_root_unix(i8* %0, i64* nocapture writeonly %1) {
%3 = tail call i64 @cwk_path_is_separator(i8* %0)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i64
store i64 %5, i64* %1
ret void
}
cleanup(code) int code;
{ exit(code); }


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define i32 @cleanup(i32 %0) {
tail call void @exit(i32 %0)
unreachable
}
void a2i_IPADDRESS_NC(void) {}


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

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

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

LLVM IR (-O2):
define void @a2i_IPADDRESS_NC() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ erase();
int /*<<< orphan*/ refresh();
void engine_exit() {
  erase();
  refresh();
  endwin();
}


x86 assembly (clang, -O0):
<engine_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <erase@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<engine_exit>:
push   %rax
xor    %eax,%eax
call   1030 <erase@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <endwin@plt>

LLVM IR (-O0):
define void @engine_exit() {
%1 = call i32 (...) @erase()
%2 = call i32 (...) @refresh()
%3 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @engine_exit() {
%1 = tail call i32 (...) @erase()
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 (...) @endwin()
ret void
}
int tree_traverse(int *tree, int pos) {
  if (tree[pos] >= (4)) {
    ++pos;
    return pos;
  }
  ++pos;
  return tree_traverse(tree, tree_traverse(tree, pos));
}


x86 assembly (clang, -O0):
<tree_traverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpl   $0x4,(%rax,%rcx,4)
jl     1145 <tree_traverse+0x35>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <tree_traverse+0x60>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <tree_traverse@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <tree_traverse@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tree_traverse>:
push   %rbx
mov    %esi,%eax
movslq %esi,%rcx
cmpl   $0x3,(%rdi,%rcx,4)
jg     1136 <tree_traverse+0x26>
mov    %rdi,%rbx
nop
add    $0x1,%eax
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <tree_traverse@plt>
movslq %eax,%rcx
cmpl   $0x3,(%rbx,%rcx,4)
jle    1120 <tree_traverse+0x10>
add    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tree_traverse(i32* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 3
br i1 %6, label %7, label %10
7: ; preds = %10, %2
%8 = phi i32 [ %1, %2 ], [ %13, %10 ]
%9 = add nsw i32 %8, 1
ret i32 %9
10: ; preds = %2, %10
%11 = phi i32 [ %13, %10 ], [ %1, %2 ]
%12 = add nsw i32 %11, 1
%13 = tail call i32 @tree_traverse(i32* %0, i32 %12)
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %0, i64 %14
%16 = load i32, i32* %15
%17 = icmp sgt i32 %16, 3
br i1 %17, label %7, label %10
}
/* Type definitions */
struct v4l_fd {
  int dummy;
};
struct v4l2_format {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ VIDIOC_S_FMT;
int v4l_ioctl(struct v4l_fd *, int /*<<< orphan*/, struct v4l2_format *);
int v4l_s_fmt(struct v4l_fd *f, struct v4l2_format *fmt) {
  return v4l_ioctl(f, VIDIOC_S_FMT, fmt);
}


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

x86 assembly (clang, -O2):
<v4l_s_fmt>:
mov    %rsi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
jmp    1030 <v4l_ioctl@plt>

LLVM IR (-O0):
%struct.v4l_fd = type { i32 }
%struct.v4l2_format = type { i32 }
@VIDIOC_S_FMT = global i32 0
define i32 @v4l_s_fmt(%struct.v4l_fd* %0, %struct.v4l2_format* %1) {
%3 = alloca %struct.v4l_fd*
%4 = alloca %struct.v4l2_format*
store %struct.v4l_fd* %0, %struct.v4l_fd** %3
store %struct.v4l2_format* %1, %struct.v4l2_format** %4
%5 = load %struct.v4l_fd*, %struct.v4l_fd** %3
%6 = load i32, i32* @VIDIOC_S_FMT
%7 = load %struct.v4l2_format*, %struct.v4l2_format** %4
%8 = call i32 @v4l_ioctl(%struct.v4l_fd* %5, i32 %6, %struct.v4l2_format* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.v4l_fd = type { i32 }
%struct.v4l2_format = type { i32 }
@VIDIOC_S_FMT = global i32 0
define i32 @v4l_s_fmt(%struct.v4l_fd* %0, %struct.v4l2_format* %1) {
%3 = load i32, i32* @VIDIOC_S_FMT
%4 = tail call i32 @v4l_ioctl(%struct.v4l_fd* %0, i32 %3, %struct.v4l2_format* %1)
ret i32 %4
}
void gdk_selection_owner_get_for_display() {}


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

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

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

LLVM IR (-O2):
define void @gdk_selection_owner_get_for_display() {
ret void
}
/* Variables and functions */
int ackermann(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", ackermann(3, 12));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0xc,%esi
call   1030 <ackermann@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0xc,%esi
call   1030 <ackermann@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @ackermann(i32 3, i32 12)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int *getZero() {
  int *p = 0;
  return p;
}


x86 assembly (clang, -O0):
<getZero>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i32* @getZero() {
ret i32* null
}
int pgis_getopt(argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
  return _pgis_getopt_internal(argc, argv, optstring, (const struct option *)0,
                               (int *)0, 0);
}


x86 assembly (clang, -O0):
<pgis_getopt>:
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
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
mov    %r8,%rcx
mov    $0x0,%al
call   1030 <_pgis_getopt_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgis_getopt>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
jmp    1030 <_pgis_getopt_internal@plt>

LLVM IR (-O0):
%struct.option = type opaque
define i32 @pgis_getopt(i32 %0, i8** %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i8*, i8** %6
%10 = call i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...) bitcast (i32 (...)* @_pgis_getopt_internal to i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...)*)(i32 %7, i8** %8, i8* %9, %struct.option* null, i32* null, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.option = type opaque
define i32 @pgis_getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...) bitcast (i32 (...)* @_pgis_getopt_internal to i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...)*)(i32 %0, i8** %1, i8* %2, %struct.option* null, i32* null, i32 0)
ret i32 %4
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int wpa_ctrl_command(struct wpa_ctrl *, char *);
int wpa_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[]) {
  return wpa_ctrl_command(ctrl, "PING");
}


x86 assembly (clang, -O0):
<wpa_cli_cmd_ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <wpa_ctrl_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_cli_cmd_ping>:
lea    0xee9(%rip),%rsi
jmp    1030 <wpa_ctrl_command@plt>

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

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
@.str = [5 x i8] c"PING\00"
define i32 @wpa_cli_cmd_ping(%struct.wpa_ctrl* %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
int gpio_to_irq(unsigned gpio) { return 0x30 + gpio; }


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

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

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

LLVM IR (-O2):
define i32 @gpio_to_irq(i32 %0) {
%2 = add i32 %0, 48
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ping();
void *write_ping(void *iterations) {
  int *number = (void *)iterations;
  int i;
  for (i = 0; i < *number; ++i) {
    ping();
  }
  return NULL;
}


x86 assembly (clang, -O0):
<write_ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    114f <write_ping+0x3f>
mov    $0x0,%al
call   1030 <ping@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <write_ping+0x1b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_ping>:
push   %rbp
push   %rbx
push   %rax
cmpl   $0x0,(%rdi)
jle    112e <write_ping+0x1e>
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   (%rax)
xor    %eax,%eax
call   1030 <ping@plt>
add    $0x1,%ebp
cmp    (%rbx),%ebp
jl     1120 <write_ping+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @write_ping(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
store i32 0, i32* %4
br label %7
7: ; preds = %14, %1
%8 = load i32, i32* %4
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = call i32 (...) @ping()
br label %14
14: ; preds = %12
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %7
17: ; preds = %7
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @write_ping(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 (...) @ping()
%8 = add nuw nsw i32 %6, 1
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %5, label %11
11: ; preds = %5, %1
ret i8* null
}
unsigned short Concat(const unsigned char msb, const unsigned char lsb) {
  return ((unsigned short)msb << 8) | (unsigned short)lsb;
}


x86 assembly (clang, -O0):
<Concat>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzwl %ax,%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
movzwl %cx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Concat>:
shl    $0x8,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define zeroext i16 @Concat(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i16
%7 = zext i16 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8, i8* %4
%10 = zext i8 %9 to i16
%11 = zext i16 %10 to i32
%12 = or i32 %8, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @Concat(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i16
%4 = shl nuw i16 %3, 8
%5 = zext i8 %1 to i16
%6 = or i16 %4, %5
ret i16 %6
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void largeAdjustmentLE(unsigned a) {
  if (a + 2 <= 1)
    clang_analyzer_eval(a == (~0U) - 1 || a == (~0U));
  else
    clang_analyzer_eval(a < (~0U) - 1);
}


x86 assembly (clang, -O0):
<largeAdjustmentLE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    $0x1,%eax
ja     1155 <largeAdjustmentLE+0x45>
mov    $0x1,%al
cmpl   $0xfffffffe,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1143 <largeAdjustmentLE+0x33>
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    1166 <largeAdjustmentLE+0x56>
cmpl   $0xfffffffe,-0x4(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<largeAdjustmentLE>:
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @largeAdjustmentLE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 2
%5 = icmp ule i32 %4, 1
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, -2
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, -1
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ true, %6 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
br label %21
16: ; preds = %1
%17 = load i32, i32* %2
%18 = icmp ult i32 %17, -2
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
br label %21
21: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
define void @largeAdjustmentLE(i32 %0) {
%2 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_register_pair_to_HL_test();
int /*<<< orphan*/ decimal_adjust_accumulator_test();
int main(int argc, const char *argv[]) {
  add_register_pair_to_HL_test();
  decimal_adjust_accumulator_test();
  return 0;
}


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 <add_register_pair_to_HL_test@plt>
mov    $0x0,%al
call   1030 <decimal_adjust_accumulator_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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 (...) @add_register_pair_to_HL_test()
%7 = call i32 (...) @decimal_adjust_accumulator_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @add_register_pair_to_HL_test()
%4 = tail call i32 (...) @decimal_adjust_accumulator_test()
ret i32 0
}
unsigned xrop3_130_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk2 = ~stk2;
  stk1 = D & stk2;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_130_0_0>:
xor    %esi,%edi
not    %dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_130_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %9
%29 = and i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_130_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %0, %1
%4 = xor i8 %3, -1
%5 = zext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ IFF_UP;
int ifc_set_flags(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int ifc_down(const char *name) { return ifc_set_flags(name, 0, IFF_UP); }


x86 assembly (clang, -O0):
<ifc_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <ifc_set_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ifc_down>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
jmp    1030 <ifc_set_flags@plt>

LLVM IR (-O0):
@IFF_UP = global i32 0
define i32 @ifc_down(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @IFF_UP
%5 = call i32 @ifc_set_flags(i8* %3, i32 0, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@IFF_UP = global i32 0
define i32 @ifc_down(i8* %0) {
%2 = load i32, i32* @IFF_UP
%3 = tail call i32 @ifc_set_flags(i8* %0, i32 0, i32 %2)
ret i32 %3
}
void g_random_double_range() {}


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

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

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

LLVM IR (-O2):
define void @g_random_double_range() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rec(int /*<<< orphan*/);
main() { rec(0); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @rec(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @rec(i32 0)
ret i32 0
}
__float128 lbinom(int n, int k) {
  return (gammaq(1 + n)) - (gammaq(1 + k)) - (gammaq(1 + n - k));
}


x86 assembly (clang, -O0):
<lbinom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
xor    %eax,%eax
mov    %al,-0xd(%rbp)
call   1030 <gammaq@plt>
mov    %eax,%ecx
mov    -0xd(%rbp),%al
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <gammaq@plt>
mov    -0x14(%rbp),%ecx
mov    %eax,%edx
mov    -0xd(%rbp),%al
sub    %edx,%ecx
mov    %ecx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
sub    %ecx,%edi
add    $0x1,%edi
call   1030 <gammaq@plt>
mov    -0xc(%rbp),%edi
sub    %eax,%edi
call   1170 <__floatsitf>
add    $0x20,%rsp
pop    %rbp
ret
xchg   %ax,%ax

x86 assembly (clang, -O2):
<lbinom>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebp
add    $0x1,%ebp
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <gammaq@plt>
mov    %eax,%ebx
lea    0x1(%r14),%edi
xor    %eax,%eax
call   1030 <gammaq@plt>
mov    %eax,%r15d
sub    %r14d,%ebp
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <gammaq@plt>
add    %r15d,%eax
sub    %eax,%ebx
mov    %ebx,%edi
call   1160 <__floatsitf>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @lbinom(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 = add nsw i32 1, %5
%7 = call i32 (i32, ...) bitcast (i32 (...)* @gammaq to i32 (i32, ...)*)(i32 %6)
%8 = load i32, i32* %4
%9 = add nsw i32 1, %8
%10 = call i32 (i32, ...) bitcast (i32 (...)* @gammaq to i32 (i32, ...)*)(i32 %9)
%11 = sub nsw i32 %7, %10
%12 = load i32, i32* %3
%13 = add nsw i32 1, %12
%14 = load i32, i32* %4
%15 = sub nsw i32 %13, %14
%16 = call i32 (i32, ...) bitcast (i32 (...)* @gammaq to i32 (i32, ...)*)(i32 %15)
%17 = sub nsw i32 %11, %16
%18 = sitofp i32 %17 to fp128
ret fp128 %18
}

LLVM IR (-O2):
define fp128 @lbinom(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @gammaq to i32 (i32, ...)*)(i32 %3)
%5 = add nsw i32 %1, 1
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @gammaq to i32 (i32, ...)*)(i32 %5)
%7 = sub nsw i32 %3, %1
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @gammaq to i32 (i32, ...)*)(i32 %7)
%9 = add i32 %6, %8
%10 = sub i32 %4, %9
%11 = sitofp i32 %10 to fp128
ret fp128 %11
}
int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.wpabuf = type opaque
define i32 @wps_validate_m5_encr(%struct.wpabuf* nocapture readnone %0, i32 %1) {
ret i32 0
}
void vec3_isub(float a[3], const float b[3]) { vec3_sub(a, b, a); }


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

x86 assembly (clang, -O2):
<vec3_isub>:
mov    %rdi,%rdx
xor    %eax,%eax
jmp    1030 <vec3_sub@plt>

LLVM IR (-O0):
define void @vec3_isub(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = load float*, float** %3
%8 = call i32 (float*, float*, float*, ...) bitcast (i32 (...)* @vec3_sub to i32 (float*, float*, float*, ...)*)(float* %5, float* %6, float* %7)
ret void
}

LLVM IR (-O2):
define void @vec3_isub(float* %0, float* %1) {
%3 = tail call i32 (float*, float*, float*, ...) bitcast (i32 (...)* @vec3_sub to i32 (float*, float*, float*, ...)*)(float* %0, float* %1, float* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M149_f(char *s) {
  debug("M149_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M149_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M149_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M149_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M149_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M149_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M149_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}