xunge/DecIR huggingface dataset:
int btic2f_log2u(int val) {
  int v, e;
  v = val;
  e = 0;
  while (v > 1) {
    v = (v + 1) >> 1;
    e++;
  }
  return (e);
}


x86 assembly (clang, -O0):
<btic2f_log2u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1138 <btic2f_log2u+0x38>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <btic2f_log2u+0x14>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btic2f_log2u>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111f <btic2f_log2u+0x1f>
xor    %eax,%eax
nopl   0x0(%rax)
lea    0x1(%rdi),%ecx
shr    %ecx
add    $0x1,%eax
cmp    $0x2,%edi
mov    %ecx,%edi
ja     1110 <btic2f_log2u+0x10>
ret

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

LLVM IR (-O2):
define i32 @btic2f_log2u(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %5, 1
%7 = lshr i32 %6, 1
%8 = add nuw nsw i32 %4, 1
%9 = icmp ugt i32 %5, 2
br i1 %9, label %3, label %10
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ uilow_end();
int /*<<< orphan*/ uilow_init();
int /*<<< orphan*/ uilow_mvaddstr(int /*<<< orphan*/, int /*<<< orphan*/,
                                  char *);
int main(void) {
  uilow_init();
  uilow_mvaddstr(0, 0, "asdfasdfasdfasdfasdfasdf");
  getch();
  uilow_end();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <uilow_init@plt>
xor    %esi,%esi
lea    0xeac(%rip),%rdx
mov    %esi,%edi
call   1050 <uilow_mvaddstr@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    $0x0,%al
call   1030 <uilow_end@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <uilow_init@plt>
lea    0xeb1(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1050 <uilow_mvaddstr@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
call   1030 <uilow_end@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"asdfasdfasdfasdfasdfasdf\00"
define i32 @main() {
%1 = call i32 (...) @uilow_init()
%2 = call i32 @uilow_mvaddstr(i32 0, i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getch()
%4 = call i32 (...) @uilow_end()
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"asdfasdfasdfasdfasdfasdf\00"
define i32 @main() {
%1 = tail call i32 (...) @uilow_init()
%2 = tail call i32 @uilow_mvaddstr(i32 0, i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getch()
%4 = tail call i32 (...) @uilow_end()
ret i32 0
}
void end_test(void) {}


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

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

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

LLVM IR (-O2):
define void @end_test() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void test(char *buf) {
  char local[8];
  int i;
  strcpy(local, buf);
}


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

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @test(i8* %0) {
%2 = alloca [8 x i8]
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
ret void
}
__attribute__((always_)) void SCB_EnableICache(void) {}


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

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

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

LLVM IR (-O2):
define void @SCB_EnableICache() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ THAtomicAdd(int volatile *, int);
void THAtomicIncrementRef(int volatile *a) { THAtomicAdd(a, 1); }


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

x86 assembly (clang, -O2):
<THAtomicIncrementRef>:
mov    $0x1,%esi
jmp    1030 <THAtomicAdd@plt>

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

LLVM IR (-O2):
define void @THAtomicIncrementRef(i32* %0) {
%2 = tail call i32 @THAtomicAdd(i32* %0, i32 1)
ret void
}
void performance_exit() {}


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

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

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

LLVM IR (-O2):
define void @performance_exit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_nest_lock_t;

/* Variables and functions */
int omp_test_nest_lock(omp_nest_lock_t *_Lock) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omp_test_nest_lock(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char const *ll_idx_n2a(int, char *);
const char *ll_index_to_name(int idx) {
  static char nbuf[16];
  return ll_idx_n2a(idx, nbuf);
}


x86 assembly (clang, -O0):
<ll_index_to_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f1b(%rip),%rsi
call   1030 <ll_idx_n2a@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ll_index_to_name>:
lea    0x2f29(%rip),%rsi
jmp    1030 <ll_idx_n2a@plt>

LLVM IR (-O0):
@ll_index_to_name.nbuf = internal global [16 x i8] zeroinitializer
define i8* @ll_index_to_name(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @ll_idx_n2a(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @ll_index_to_name.nbuf, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@ll_index_to_name.nbuf = internal global [16 x i8] zeroinitializer
define i8* @ll_index_to_name(i32 %0) {
%2 = tail call i8* @ll_idx_n2a(i32 %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @ll_index_to_name.nbuf, i64 0, i64 0))
ret i8* %2
}
void xrewind(void *fd) {}


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

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

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

LLVM IR (-O2):
define void @xrewind(i8* nocapture %0) {
ret void
}
int CheckY(float Y, float y, float Y_tile, float y_tile) {
  if (Y < y_tile)
    return 0;
  if (y > Y_tile)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<CheckY>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1137 <CheckY+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1159 <CheckY+0x59>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1152 <CheckY+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1159 <CheckY+0x59>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckY>:
ucomiss %xmm0,%xmm3
setbe  %al
ucomiss %xmm2,%xmm1
setbe  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @CheckY(float %0, float %1, float %2, float %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
%10 = load float, float* %6
%11 = load float, float* %9
%12 = fcmp olt float %10, %11
br i1 %12, label %13, label %14
13: ; preds = %4
store i32 0, i32* %5
br label %20
14: ; preds = %4
%15 = load float, float* %7
%16 = load float, float* %8
%17 = fcmp ogt float %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 0, i32* %5
br label %20
19: ; preds = %14
store i32 1, i32* %5
br label %20
20: ; preds = %19, %18, %13
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @CheckY(float %0, float %1, float %2, float %3) {
%5 = fcmp uge float %0, %3
%6 = fcmp ule float %1, %2
%7 = and i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
void strassign(char *sconst, char *sarray) {
  while (*sconst != '\0') {
    *sarray++ = *sconst++;
  }
  *sarray = '\0';
}


x86 assembly (clang, -O0):
<strassign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1143 <strassign+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    110c <strassign+0xc>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<strassign>:
mov    (%rdi),%al
test   %al,%al
je     1121 <strassign+0x21>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
mov    %al,(%rsi)
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <strassign+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @strassign(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %1, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %1, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret void
}
/* Variables and functions */
float arrayf_max(float *, int);
float arrayf_min(float *, int);
float arrayf_maxdev(float *x, int n) {
  return (arrayf_max(x, n) - arrayf_min(x, n));
}


x86 assembly (clang, -O0):
<arrayf_maxdev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <arrayf_max@plt>
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <arrayf_min@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrayf_maxdev>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <arrayf_max@plt>
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <arrayf_min@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @arrayf_maxdev(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load float*, float** %3
%6 = load i32, i32* %4
%7 = call float @arrayf_max(float* %5, i32 %6)
%8 = load float*, float** %3
%9 = load i32, i32* %4
%10 = call float @arrayf_min(float* %8, i32 %9)
%11 = fsub float %7, %10
ret float %11
}

LLVM IR (-O2):
define float @arrayf_maxdev(float* %0, i32 %1) {
%3 = tail call float @arrayf_max(float* %0, i32 %1)
%4 = tail call float @arrayf_min(float* %0, i32 %1)
%5 = fsub float %3, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ board_fen(char *);
int /*<<< orphan*/ printf(char *, ...);
void show_fen(void) {
  char fen[256];
  board_fen(fen);
  printf("%s", fen);
  printf("\n");
}


x86 assembly (clang, -O0):
<show_fen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
call   1040 <board_fen@plt>
lea    -0x100(%rbp),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_fen>:
push   %rbx
sub    $0x100,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <board_fen@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x100,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @show_fen() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @board_fen(i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @putchar(i32 10)
ret void
}
long long bit18() { return 0x0000000000040000LL; }


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

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

LLVM IR (-O0):
define i64 @bit18() {
ret i64 262144
}

LLVM IR (-O2):
define i64 @bit18() {
ret i64 262144
}
int Cyc_Interface_check_public_enumdecl(struct Cyc_Tcenv_Genv *ae,
                                        struct Cyc_Interface_Seen *seen,
                                        struct Cyc_Absyn_Enumdecl *d) {
  return 1;
}


x86 assembly (clang, -O0):
<Cyc_Interface_check_public_enumdecl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Cyc_Tcenv_Genv = type opaque
%struct.Cyc_Interface_Seen = type opaque
%struct.Cyc_Absyn_Enumdecl = type opaque
define i32 @Cyc_Interface_check_public_enumdecl(%struct.Cyc_Tcenv_Genv* %0, %struct.Cyc_Interface_Seen* %1, %struct.Cyc_Absyn_Enumdecl* %2) {
%4 = alloca %struct.Cyc_Tcenv_Genv*
%5 = alloca %struct.Cyc_Interface_Seen*
%6 = alloca %struct.Cyc_Absyn_Enumdecl*
store %struct.Cyc_Tcenv_Genv* %0, %struct.Cyc_Tcenv_Genv** %4
store %struct.Cyc_Interface_Seen* %1, %struct.Cyc_Interface_Seen** %5
store %struct.Cyc_Absyn_Enumdecl* %2, %struct.Cyc_Absyn_Enumdecl** %6
ret i32 1
}

LLVM IR (-O2):
%struct.Cyc_Tcenv_Genv = type opaque
%struct.Cyc_Interface_Seen = type opaque
%struct.Cyc_Absyn_Enumdecl = type opaque
define i32 @Cyc_Interface_check_public_enumdecl(%struct.Cyc_Tcenv_Genv* nocapture readnone %0, %struct.Cyc_Interface_Seen* nocapture readnone %1, %struct.Cyc_Absyn_Enumdecl* nocapture readnone %2) {
ret i32 1
}
void GPIOPortK_Handler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @GPIOPortK_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void kchange_bit(int nr, volatile void *addr) {
  asm volatile("btcl %1, %0" : "=m"(*(volatile long *)addr) : "Ir"(nr));
}


x86 assembly (clang, -O0):
<kchange_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
btc    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kchange_bit>:
btc    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @kchange_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i64*
%7 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
define void @kchange_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i64*
tail call void asm sideeffect "btcl $1, $0", "=*m,Ir,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, void *, size_t);
void clib_copy(void *destination, void *source, size_t size) {
  memcpy((char *)destination, source, size);
}


x86 assembly (clang, -O0):
<clib_copy>:
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
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clib_copy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @clib_copy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", 12); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int dia, mes, ano;
  dia = 14;
  mes = 10;
  ano = 91;
  printf("Data: %d/%d/%d\n", dia, mes, ano);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xe,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x5b,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0xe,%esi
mov    $0xa,%edx
mov    $0x5b,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"Data: %d/%d/%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 14, i32 10, i32 91)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
int test_imm_DAint64_midword_reg(long long val) {
  return ((val >> 16) & (0xDA << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_DAint64_midword_reg>:
test   $0xda0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DAint64_midword_reg(i64 %0) {
%2 = and i64 %0, 14286848
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gdb_byte2hexbyte(char *s, int byte) {
  static char hexchars[] = "0123456789abcdef";
  s[0] = hexchars[(byte >> 4) & 0xf];
  s[1] = hexchars[byte & 0xf];
}


x86 assembly (clang, -O0):
<gdb_byte2hexbyte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0x2f12(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0x2ef9(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdb_byte2hexbyte>:
mov    %esi,%eax
shr    $0x4,%eax
and    $0xf,%eax
lea    0xef1(%rip),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,(%rdi)
and    $0xf,%esi
mov    (%rsi,%rcx,1),%al
mov    %al,0x1(%rdi)
ret

LLVM IR (-O0):
@gdb_byte2hexbyte.hexchars = internal global [17 x i8] c"0123456789abcdef\00"
define void @gdb_byte2hexbyte(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
%7 = and i32 %6, 15
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [17 x i8], [17 x i8]* @gdb_byte2hexbyte.hexchars, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i32, i32* %4
%14 = and i32 %13, 15
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [17 x i8], [17 x i8]* @gdb_byte2hexbyte.hexchars, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8 %17, i8* %19
ret void
}

LLVM IR (-O2):
@gdb_byte2hexbyte.hexchars = internal unnamed_addr constant [17 x i8] c"0123456789abcdef\00"
define void @gdb_byte2hexbyte(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 4
%4 = and i32 %3, 15
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [17 x i8], [17 x i8]* @gdb_byte2hexbyte.hexchars, i64 0, i64 %5
%7 = load i8, i8* %6
store i8 %7, i8* %0
%8 = and i32 %1, 15
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [17 x i8], [17 x i8]* @gdb_byte2hexbyte.hexchars, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
unsigned long long clock();
int /*<<< orphan*/ printf(char *, unsigned long long);
int /*<<< orphan*/ ramanujan(int);
int main() {
  unsigned long long clo = clock();
  unsigned long long numterms = 128000;
  ramanujan(5);
  printf("%d\n", (clock() - clo) / 1000);
  printf("Terms:%d\n", numterms);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x10(%rbp)
movq   $0x1f400,-0x18(%rbp)
mov    $0x5,%edi
call   1050 <ramanujan@plt>
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rsi
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <clock@plt>
mov    %rax,%rbx
mov    $0x5,%edi
call   1050 <ramanujan@plt>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
shr    $0x4,%rdx
lea    0xe9b(%rip),%rdi
mov    %rdx,%rsi
call   1040 <printf@plt>
lea    0xe86(%rip),%rdi
mov    $0x1f400,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [10 x i8] c"Terms:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i64 (...) @clock()
store i64 %4, i64* %2
store i64 128000, i64* %3
%5 = call i32 @ramanujan(i32 5)
%6 = call i64 (...) @clock()
%7 = load i64, i64* %2
%8 = sub i64 %6, %7
%9 = udiv i64 %8, 1000
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i64, i64* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [10 x i8] c"Terms:%d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @clock()
%2 = tail call i32 @ramanujan(i32 5)
%3 = tail call i64 (...) @clock()
%4 = sub i64 %3, %1
%5 = udiv i64 %4, 1000
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 128000)
ret i32 0
}
void resettodr(void) {}


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

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

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

LLVM IR (-O2):
define void @resettodr() {
ret void
}
void XtAddCallback() {}


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

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

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

LLVM IR (-O2):
define void @XtAddCallback() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mmap_chunks_higher(int, int /*<<< orphan*/);
int /*<<< orphan*/ mmap_chunks_lower(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void alloc_page_full_reverse() {
  printf("Allocating default pagesize pages > 128TB \n");
  mmap_chunks_higher(24575, 0);
  printf("Allocating default pagesize pages < 128TB \n");
  mmap_chunks_lower(8190, 0);
}


x86 assembly (clang, -O0):
<alloc_page_full_reverse>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5fff,%edi
xor    %esi,%esi
call   1040 <mmap_chunks_higher@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1ffe,%edi
xor    %esi,%esi
call   1050 <mmap_chunks_lower@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_page_full_reverse>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5fff,%edi
xor    %esi,%esi
call   1040 <mmap_chunks_higher@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1ffe,%edi
xor    %esi,%esi
pop    %rax
jmp    1050 <mmap_chunks_lower@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Allocating default pagesize pages > 128TB \0A\00"
@.str.1 = [44 x i8] c"Allocating default pagesize pages < 128TB \0A\00"
define void @alloc_page_full_reverse() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @mmap_chunks_higher(i32 24575, i32 0)
%3 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @mmap_chunks_lower(i32 8190, i32 0)
ret void
}

LLVM IR (-O2):
@str = [43 x i8] c"Allocating default pagesize pages > 128TB \00"
@str.2 = [43 x i8] c"Allocating default pagesize pages < 128TB \00"
define void @alloc_page_full_reverse() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @mmap_chunks_higher(i32 24575, i32 0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @mmap_chunks_lower(i32 8190, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void nocrash_fgetpos() {
  FILE *f;
  fpos_t position;
  f = fopen("this_file_doesnt_exist", "r");
  if (f) {
    fgetpos(f, &position);
    fclose(f);
  }
}


x86 assembly (clang, -O0):
<nocrash_fgetpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1170 <nocrash_fgetpos+0x40>
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <fgetpos@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nocrash_fgetpos>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     116a <nocrash_fgetpos+0x3a>
mov    %rax,%rbx
lea    0xc(%rsp),%rsi
mov    %rax,%rdi
call   1040 <fgetpos@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
define void @nocrash_fgetpos() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32*, i32** %1
%8 = call i32 @fgetpos(i32* %7, i32* %2)
%9 = load i32*, i32** %1
%10 = call i32 @fclose(i32* %9)
br label %11
11: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
define void @nocrash_fgetpos() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i32 @fgetpos(i32* %3, i32* %1)
%7 = tail call i32 @fclose(i32* %3)
br label %8
8: ; preds = %5, %0
ret void
}
/* Variables and functions */
long errno;
long __syscall_error(long a0) {
  errno = -a0;
  return -1;
}


x86 assembly (clang, -O0):
<__syscall_error>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%ecx
sub    -0x8(%rbp),%rcx
mov    0x2ec9(%rip),%rax
mov    %rcx,(%rax)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__syscall_error>:
neg    %rdi
mov    0x2ed6(%rip),%rax
mov    %rdi,(%rax)
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
@errno = global i64 0
define i64 @__syscall_error(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
store i64 %4, i64* @errno
ret i64 -1
}

LLVM IR (-O2):
@errno = global i64 0
define i64 @__syscall_error(i64 %0) {
%2 = sub nsw i64 0, %0
store i64 %2, i64* @errno
ret i64 -1
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void t4(char *p, char *q) {
  strcpy(p, q);
  strcat(p, q + 32);
}


x86 assembly (clang, -O0):
<t4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x20,%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t4>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strcpy@plt>
add    $0x20,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strcat@plt>

LLVM IR (-O0):
define void @t4(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcpy(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 32
%11 = call i32 @strcat(i8* %8, i8* %10)
ret void
}

LLVM IR (-O2):
define void @t4(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
%4 = getelementptr inbounds i8, i8* %1, i64 32
%5 = tail call i32 @strcat(i8* %0, i8* %4)
ret void
}
/* Type definitions */
struct client {
  int dummy;
};

/* Variables and functions */
struct client *get_client(int);
struct client *protocol_http_newclient(int fd) {
  return get_client(fd);
}


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

x86 assembly (clang, -O2):
<protocol_http_newclient>:
jmp    1030 <get_client@plt>

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

LLVM IR (-O2):
%struct.client = type { i32 }
define %struct.client* @protocol_http_newclient(i32 %0) {
%2 = tail call %struct.client* @get_client(i32 %0)
ret %struct.client* %2
}
/* Type definitions */
struct bb {
  int dummy;
};

/* Variables and functions */
scalar_t__ EQ(struct bb *, int /*<<< orphan*/);
int /*<<< orphan*/ NEXT(struct bb *);
scalar_t__ NumIN(struct bb *, int);
int isIf(struct bb *t, struct bb *e, int nt) {
  return EQ(e, NEXT(t)) && NumIN(t, nt);
}


x86 assembly (clang, -O0):
<isIf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <NEXT@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1050 <EQ@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x15(%rbp)
je     1187 <isIf+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <NumIN@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isIf>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1040 <NEXT@plt>
mov    %rbp,%rdi
mov    %eax,%esi
call   1050 <EQ@plt>
test   %rax,%rax
je     1169 <isIf+0x39>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <NumIN@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    116b <isIf+0x3b>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.bb = type { i32 }
define i32 @isIf(%struct.bb* %0, %struct.bb* %1, i32 %2) {
%4 = alloca %struct.bb*
%5 = alloca %struct.bb*
%6 = alloca i32
store %struct.bb* %0, %struct.bb** %4
store %struct.bb* %1, %struct.bb** %5
store i32 %2, i32* %6
%7 = load %struct.bb*, %struct.bb** %5
%8 = load %struct.bb*, %struct.bb** %4
%9 = call i32 @NEXT(%struct.bb* %8)
%10 = call i64 @EQ(%struct.bb* %7, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = load %struct.bb*, %struct.bb** %4
%14 = load i32, i32* %6
%15 = call i64 @NumIN(%struct.bb* %13, i32 %14)
%16 = icmp ne i64 %15, 0
br label %17
17: ; preds = %12, %3
%18 = phi i1 [ false, %3 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
%struct.bb = type { i32 }
define i32 @isIf(%struct.bb* %0, %struct.bb* %1, i32 %2) {
%4 = tail call i32 @NEXT(%struct.bb* %0)
%5 = tail call i64 @EQ(%struct.bb* %1, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = tail call i64 @NumIN(%struct.bb* %0, i32 %2)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %3
%12 = phi i32 [ 0, %3 ], [ %10, %7 ]
ret i32 %12
}
int test_imm_29int16_reg(short val) {
  return ((val) & (-0x29 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_29int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffd7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_29int16_reg>:
test   $0xffd7,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_29int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -41
%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_29int16_reg(i16 signext %0) {
%2 = and i16 %0, -41
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void _M2_SysExceptions_init(void) {}


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

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

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

LLVM IR (-O2):
define void @_M2_SysExceptions_init() {
ret void
}
int g3_max(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<g3_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <g3_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <g3_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g3_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @g3_max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @g3_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void spd_set_dram_timing(void) {}


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

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

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

LLVM IR (-O2):
define void @spd_set_dram_timing() {
ret void
}
OP(fd, b1) { op_b1(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_b1()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ out_asm(char *, int /*<<< orphan*/);
int /*<<< orphan*/ reg_str_i(int);
void impl_jmp_reg(int r) { out_asm("jr $%s", reg_str_i(r)); }


x86 assembly (clang, -O0):
<impl_jmp_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <reg_str_i@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1040 <out_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<impl_jmp_reg>:
push   %rax
call   1030 <reg_str_i@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <out_asm@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"jr $%s\00"
define void @impl_jmp_reg(i32 %0) {
%2 = tail call i32 @reg_str_i(i32 %0)
%3 = tail call i32 @out_asm(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
float copysignf(float, float const);
scalar_t__ isinf(float const);
float log2f(float);
float log2f_non_ieee(float f) {
  float const result = log2f(f);
  return isinf(result) ? copysignf(127.0f, result) : result;
}


x86 assembly (clang, -O0):
<log2f_non_ieee>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log2f@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <isinf@plt>
cmp    $0x0,%rax
je     1175 <log2f_non_ieee+0x55>
movss  -0x8(%rbp),%xmm0
movaps 0xea4(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xea9(%rip),%xmm1
por    %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    117f <log2f_non_ieee+0x5f>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2f_non_ieee>:
sub    $0x18,%rsp
call   1030 <log2f@plt>
movaps %xmm0,(%rsp)
call   1040 <isinf@plt>
test   %rax,%rax
je     114e <log2f_non_ieee+0x2e>
movaps (%rsp),%xmm0
andps  0xebe(%rip),%xmm0
orps   0xec7(%rip),%xmm0
add    $0x18,%rsp
ret
movaps (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @log2f_non_ieee(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @log2f(float %4)
store float %5, float* %3
%6 = load float, float* %3
%7 = call i64 @isinf(float %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load float, float* %3
%11 = call float @llvm.copysign.f32(float 1.270000e+02, float %10)
br label %14
12: ; preds = %1
%13 = load float, float* %3
br label %14
14: ; preds = %12, %9
%15 = phi float [ %11, %9 ], [ %13, %12 ]
ret float %15
}

LLVM IR (-O2):
define float @log2f_non_ieee(float %0) {
%2 = tail call float @log2f(float %0)
%3 = tail call i64 @isinf(float %2)
%4 = icmp eq i64 %3, 0
%5 = tail call float @llvm.copysign.f32(float 1.270000e+02, float %2)
%6 = select i1 %4, float %2, float %5
ret float %6
}
/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ member_0;
};
typedef int /*<<< orphan*/ in_port_t;
typedef int /*<<< orphan*/ in_addr_t;

/* Variables and functions */
struct sockaddr_in *
tow_internet_socket_address_alloc_copy(struct sockaddr_in *);
int /*<<< orphan*/ tow_internet_socket_address_init(struct sockaddr_in *,
                                                    int /*<<< orphan*/,
                                                    int /*<<< orphan*/);
struct sockaddr_in *
tow_internet_socket_address_alloc(in_addr_t address_in_host_order,
                                  in_port_t port_in_host_order) {
  struct sockaddr_in socket_address = {0};
  tow_internet_socket_address_init(&socket_address, address_in_host_order,
                                   port_in_host_order);
  return tow_internet_socket_address_alloc_copy(&socket_address);
}


x86 assembly (clang, -O0):
<tow_internet_socket_address_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    -0x10(%rbp),%rdi
call   1050 <tow_internet_socket_address_init@plt>
lea    -0x10(%rbp),%rdi
call   1040 <tow_internet_socket_address_alloc_copy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tow_internet_socket_address_alloc>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%edx
mov    %edi,%esi
movl   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <tow_internet_socket_address_init@plt>
mov    %rbx,%rdi
call   1030 <tow_internet_socket_address_alloc_copy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
define %struct.sockaddr_in* @tow_internet_socket_address_alloc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_in
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = bitcast %struct.sockaddr_in* %5 to i8*
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @tow_internet_socket_address_init(%struct.sockaddr_in* %5, i32 %7, i32 %8)
%10 = call %struct.sockaddr_in* @tow_internet_socket_address_alloc_copy(%struct.sockaddr_in* %5)
ret %struct.sockaddr_in* %10
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
define %struct.sockaddr_in* @tow_internet_socket_address_alloc(i32 %0, i32 %1) {
%3 = alloca %struct.sockaddr_in
%4 = bitcast %struct.sockaddr_in* %3 to i8*
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 0, i32* %5
%6 = call i32 @tow_internet_socket_address_init(%struct.sockaddr_in* %3, i32 %0, i32 %1)
%7 = call %struct.sockaddr_in* @tow_internet_socket_address_alloc_copy(%struct.sockaddr_in* %3)
ret %struct.sockaddr_in* %7
}
/* Variables and functions */
int tini_parse_core(char const *, int /*<<< orphan*/ *,
                    int (*)(int, int, char const *, char const *,
                            char const *));
int tini_parse_cb(const char *tini_file,
                  int (*handler)(int, int, const char *, const char *,
                                 const char *)) {
  return tini_parse_core(tini_file, NULL, handler);
}


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

x86 assembly (clang, -O2):
<tini_parse_cb>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <tini_parse_core@plt>

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

LLVM IR (-O2):
define i32 @tini_parse_cb(i8* %0, i32 (i32, i32, i8*, i8*, i8*)* %1) {
%3 = tail call i32 @tini_parse_core(i8* %0, i32* null, i32 (i32, i32, i8*, i8*, i8*)* %1)
ret i32 %3
}