xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ board;

/* Variables and functions */
int /*<<< orphan*/ memset(unsigned int **, int /*<<< orphan*/, int);
unsigned long long queens_arrangements_aux(size_t, unsigned int **,
                                           int /*<<< orphan*/);
unsigned long long queens_arrangements(size_t x) {
  unsigned board[x][x];
  memset(board, 0, sizeof(board));
  return queens_arrangements_aux(x, board, 0);
}


x86 assembly (clang, -O0):
<queens_arrangements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
mov    %rsp,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,%rdx
imul   %rdx,%rdx
lea    0xf(,%rdx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rdi
sub    %rdx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
imul   %rcx,%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x28(%rbp),%rsi
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
call   1040 <queens_arrangements_aux@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<queens_arrangements>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    %rdi,%rdx
imul   %rdi,%rdx
mov    %rsp,%rbx
lea    0xf(,%rdx,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
shl    $0x2,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <queens_arrangements_aux@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @queens_arrangements(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = load i64, i64* %2
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = mul nuw i64 %6, %7
%10 = alloca i32, i64 %9
store i64 %6, i64* %4
store i64 %7, i64* %5
%11 = bitcast i32* %10 to i32**
%12 = mul nuw i64 %6, %7
%13 = mul nuw i64 4, %12
%14 = trunc i64 %13 to i32
%15 = call i32 @memset(i32** %11, i32 0, i32 %14)
%16 = load i64, i64* %2
%17 = bitcast i32* %10 to i32**
%18 = call i64 @queens_arrangements_aux(i64 %16, i32** %17, i32 0)
%19 = load i8*, i8** %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @queens_arrangements(i64 %0) {
%2 = mul nuw i64 %0, %0
%3 = alloca i32, i64 %2
%4 = bitcast i32* %3 to i32**
%5 = trunc i64 %2 to i32
%6 = shl i32 %5, 2
%7 = call i32 @memset(i32** %4, i32 0, i32 %6)
%8 = call i64 @queens_arrangements_aux(i64 %0, i32** %4, i32 0)
ret i64 %8
}
const char *strendc(const char *str, char c) {
  while (*str && *str != c)
    str++;
  return str;
}


x86 assembly (clang, -O0):
<strendc>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa(%rbp)
je     1136 <strendc+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    1146 <strendc+0x46>
jmp    1157 <strendc+0x57>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110e <strendc+0xe>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strendc>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <strendc+0x21>
cmp    %sil,%cl
jne    1110 <strendc+0x10>
ret

LLVM IR (-O0):
define i8* @strendc(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
br label %5
5: ; preds = %19, %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 %17
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %13, %15
br label %17
17: ; preds = %10, %5
%18 = phi i1 [ false, %5 ], [ %16, %10 ]
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
br label %5
22: ; preds = %17
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @strendc(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = icmp eq i8 %5, %1
%8 = or i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret i8* %4
}
float _Complex add_float_rc(float a, float _Complex b) { return a + b; }


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

x86 assembly (clang, -O2):
<add_float_rc>:
addss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define <2 x float> @add_float_rc(float %0, <2 x float> %1) {
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca float
%6 = bitcast { float, float }* %4 to <2 x float>*
store <2 x float> %1, <2 x float>* %6
store float %0, float* %5
%7 = load float, float* %5
%8 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%9 = load float, float* %8
%10 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%11 = load float, float* %10
%12 = fadd float %7, %9
%13 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%14 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
store float %12, float* %13
store float %11, float* %14
%15 = bitcast { float, float }* %3 to <2 x float>*
%16 = load <2 x float>, <2 x float>* %15
ret <2 x float> %16
}

LLVM IR (-O2):
define <2 x float> @add_float_rc(float %0, <2 x float> %1) {
%3 = extractelement <2 x float> %1, i64 0
%4 = fadd float %3, %0
%5 = insertelement <2 x float> %1, float %4, i64 0
ret <2 x float> %5
}
/* Variables and functions */
bool my_isspace(char c) { return (c == ' ') || (c == '\t') || (c == '\n'); }


x86 assembly (clang, -O0):
<my_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     113b <my_isspace+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     113b <my_isspace+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_isspace>:
mov    $0x1,%eax
cmp    $0x9,%dil
je     1111 <my_isspace+0x11>
cmp    $0x20,%dil
jne    1112 <my_isspace+0x12>
ret
xor    %eax,%eax
cmp    $0xa,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @my_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *, char *,
                           char *);
void statistics_print_header(FILE *fd) {
  fprintf(fd, "%-10s %10s %18s %18s\n", "label", "N", "sum", "mean");
}


x86 assembly (clang, -O0):
<statistics_print_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xee7(%rip),%rcx
lea    0xee2(%rip),%r8
lea    0xedf(%rip),%r9
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<statistics_print_header>:
lea    0xee9(%rip),%rsi
lea    0xef8(%rip),%rdx
lea    0xef7(%rip),%rcx
lea    0xef2(%rip),%r8
lea    0xeef(%rip),%r9
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"%-10s %10s %18s %18s\0A\00"
@.str.1 = [6 x i8] c"label\00"
@.str.2 = [2 x i8] c"N\00"
@.str.3 = [4 x i8] c"sum\00"
@.str.4 = [5 x i8] c"mean\00"
define void @statistics_print_header(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%-10s %10s %18s %18s\0A\00"
@.str.1 = [6 x i8] c"label\00"
@.str.2 = [2 x i8] c"N\00"
@.str.3 = [4 x i8] c"sum\00"
@.str.4 = [5 x i8] c"mean\00"
define void @statistics_print_header(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *Cyc_Absyn_thin_bounds_int(unsigned int);
void *Cyc_Absyn_bounds_one(void) {
  void *_T0;
  static void *bone = 0;
  if (bone != 0)
    goto _TL46;
  bone = Cyc_Absyn_thin_bounds_int(1U);
  goto _TL47;
_TL46:
_TL47:
  _T0 = bone;
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_bounds_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpq   $0x0,0x2f10(%rip)
je     112b <Cyc_Absyn_bounds_one+0x1b>
jmp    1141 <Cyc_Absyn_bounds_one+0x31>
mov    $0x1,%edi
call   1030 <Cyc_Absyn_thin_bounds_int@plt>
mov    %rax,0x2ef4(%rip)
jmp    1146 <Cyc_Absyn_bounds_one+0x36>
jmp    1146 <Cyc_Absyn_bounds_one+0x36>
mov    0x2ee3(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_bounds_one>:
push   %rax
mov    0x2f18(%rip),%rax
test   %rax,%rax
je     111f <Cyc_Absyn_bounds_one+0xf>
pop    %rcx
ret
mov    $0x1,%edi
call   1030 <Cyc_Absyn_thin_bounds_int@plt>
mov    %rax,0x2f00(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@Cyc_Absyn_bounds_one.bone = internal global i8* null
define i8* @Cyc_Absyn_bounds_one() {
%1 = alloca i8*
%2 = load i8*, i8** @Cyc_Absyn_bounds_one.bone
%3 = icmp ne i8* %2, null
br i1 %3, label %4, label %5
4: ; preds = %0
br label %7
5: ; preds = %0
%6 = call i8* @Cyc_Absyn_thin_bounds_int(i32 1)
store i8* %6, i8** @Cyc_Absyn_bounds_one.bone
br label %8
7: ; preds = %4
br label %8
8: ; preds = %7, %5
%9 = load i8*, i8** @Cyc_Absyn_bounds_one.bone
store i8* %9, i8** %1
%10 = load i8*, i8** %1
ret i8* %10
}

LLVM IR (-O2):
@Cyc_Absyn_bounds_one.bone = internal unnamed_addr global i8* null
define i8* @Cyc_Absyn_bounds_one() {
%1 = load i8*, i8** @Cyc_Absyn_bounds_one.bone
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i8* @Cyc_Absyn_thin_bounds_int(i32 1)
store i8* %4, i8** @Cyc_Absyn_bounds_one.bone
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %1, %0 ], [ %4, %3 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int p26(int ac, char *av[]) {
  int ret = 0;
  printf("POSIX is not supported.\n");
  ret = -1;
  return ret;
}


x86 assembly (clang, -O0):
<p26>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"POSIX is not supported.\0A\00"
define i32 @p26(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %5
%7 = load i32, i32* %5
ret i32 %7
}

LLVM IR (-O2):
@str = [24 x i8] c"POSIX is not supported.\00"
define i32 @p26(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 -1
}
void InitLoadPoint(void) { return; }


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

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

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

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

/* Variables and functions */
int pthread_sigmask(int __how, __const __sigset_t *__restrict __newmask,
                    __sigset_t *__restrict __oldmask) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pthread_sigmask(i32 %0, i32* noalias %1, i32* noalias %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @pthread_sigmask(i32 %0, i32* noalias nocapture readnone %1, i32* noalias nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *, char const *);
void say_hello(int id, const char *action, const char *message) {
  printf("%d %s %s\n", id, action, message);
}


x86 assembly (clang, -O0):
<say_hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<say_hello>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%d %s %s\0A\00"
define void @say_hello(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 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %s %s\0A\00"
define void @say_hello(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *malloc(size_t);
void *checked_malloc(size_t bytes) {
  void *mem = malloc(bytes);
  assert(mem != NULL);
  return mem;
}


x86 assembly (clang, -O0):
<checked_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @checked_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @checked_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t OPENSSL_rdtsc(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @OPENSSL_rdtsc() {
ret i32 0
}
int isdigit(int ch) {
  switch (ch) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffd0,%eax
sub    $0x9,%eax
ja     1127 <isdigit+0x27>
jmp    111b <isdigit+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <isdigit+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 48, label %5
i32 49, label %5
i32 50, label %5
i32 51, label %5
i32 52, label %5
i32 53, label %5
i32 54, label %5
i32 55, label %5
i32 56, label %5
i32 57, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void menu() {
  printf("\nPress 1 for Insert\nPress 2 for Delete\nPress 3 for exit");
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"\0APress 1 for Insert\0APress 2 for Delete\0APress 3 for exit\00"
define void @menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"\0APress 1 for Insert\0APress 2 for Delete\0APress 3 for exit\00"
define void @menu() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}
int rislower(int c) { return (c >= 'a' && c <= 'z'); }


x86 assembly (clang, -O0):
<rislower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <rislower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rislower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @rislower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void _ULongTo4Bytes(const unsigned long longValue, unsigned char *_4bytes) {
  unsigned long temp = longValue;
  unsigned long loop = 0;
  for (loop = 0; loop < 4; loop++) {
    _4bytes[loop] = (char)((temp % 0x100) & 0xFF);
    temp /= 0x100;
  }
}


x86 assembly (clang, -O0):
<_ULongTo4Bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x4,-0x20(%rbp)
jae    1169 <_ULongTo4Bytes+0x69>
mov    -0x18(%rbp),%rax
and    $0xff,%rax
and    $0xff,%rax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1124 <_ULongTo4Bytes+0x24>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ULongTo4Bytes>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @_ULongTo4Bytes(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
%7 = load i64, i64* %3
store i64 %7, i64* %5
store i64 0, i64* %6
store i64 0, i64* %6
br label %8
8: ; preds = %21, %2
%9 = load i64, i64* %6
%10 = icmp ult i64 %9, 4
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i64, i64* %5
%13 = urem i64 %12, 256
%14 = and i64 %13, 255
%15 = trunc i64 %14 to i8
%16 = load i8*, i8** %4
%17 = load i64, i64* %6
%18 = getelementptr inbounds i8, i8* %16, i64 %17
store i8 %15, i8* %18
%19 = load i64, i64* %5
%20 = udiv i64 %19, 256
store i64 %20, i64* %5
br label %21
21: ; preds = %11
%22 = load i64, i64* %6
%23 = add i64 %22, 1
store i64 %23, i64* %6
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @_ULongTo4Bytes(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
store i8 %3, i8* %1
%4 = lshr i64 %0, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %0, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %0, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_keyboard_reports();
int /*<<< orphan*/ reset_media_report();
int /*<<< orphan*/ reset_mouse_report();
int /*<<< orphan*/ reset_vendor_report();
void reset_hid_reports(void) {
  reset_keyboard_reports();
  reset_mouse_report();
  reset_media_report();
  reset_vendor_report();
}


x86 assembly (clang, -O0):
<reset_hid_reports>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <reset_keyboard_reports@plt>
mov    $0x0,%al
call   1060 <reset_mouse_report@plt>
mov    $0x0,%al
call   1050 <reset_media_report@plt>
mov    $0x0,%al
call   1030 <reset_vendor_report@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_hid_reports>:
push   %rax
xor    %eax,%eax
call   1040 <reset_keyboard_reports@plt>
xor    %eax,%eax
call   1060 <reset_mouse_report@plt>
xor    %eax,%eax
call   1050 <reset_media_report@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <reset_vendor_report@plt>

LLVM IR (-O0):
define void @reset_hid_reports() {
%1 = call i32 (...) @reset_keyboard_reports()
%2 = call i32 (...) @reset_mouse_report()
%3 = call i32 (...) @reset_media_report()
%4 = call i32 (...) @reset_vendor_report()
ret void
}

LLVM IR (-O2):
define void @reset_hid_reports() {
%1 = tail call i32 (...) @reset_keyboard_reports()
%2 = tail call i32 (...) @reset_mouse_report()
%3 = tail call i32 (...) @reset_media_report()
%4 = tail call i32 (...) @reset_vendor_report()
ret void
}
int test_imm_5Eint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x5E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_5Eint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 403726925824
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
struct string {
  int dummy;
};

/* Variables and functions */
int string_concatb(struct string *, char *, int);
int vsnprintf(char *, int, char const *, int /*<<< orphan*/);
bool defprintf(struct string *s, const char const *fmt, va_list exactlyonearg) {
  char buf[4096];
  int len;
  len = vsnprintf(buf, 4096, fmt, exactlyonearg);
  return string_concatb(s, buf, len);
}


x86 assembly (clang, -O0):
<defprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1030,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x1020(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1000,%esi
call   1030 <vsnprintf@plt>
mov    %eax,-0x1024(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
mov    -0x1024(%rbp),%edx
call   1040 <string_concatb@plt>
add    $0x1030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defprintf>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1000,%esi
call   1030 <vsnprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <string_concatb@plt>
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.string = type { i32 }
define i32 @defprintf(%struct.string* %0, i8* %1, i32 %2) {
%4 = alloca %struct.string*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [4096 x i8]
%8 = alloca i32
store %struct.string* %0, %struct.string** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @vsnprintf(i8* %9, i32 4096, i8* %10, i32 %11)
store i32 %12, i32* %8
%13 = load %struct.string*, %struct.string** %4
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%15 = load i32, i32* %8
%16 = call i32 @string_concatb(%struct.string* %13, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.string = type { i32 }
define i32 @defprintf(%struct.string* %0, i8* nocapture %1, i32 %2) {
%4 = alloca [4096 x i8]
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%6 = call i32 @vsnprintf(i8* %5, i32 4096, i8* %1, i32 %2)
%7 = call i32 @string_concatb(%struct.string* %0, i8* %5, i32 %6)
ret i32 %7
}
long long int o_pow(long long int n) {
  long long int result = 1, i;
  for (i = 1; i <= n; i++)
    result *= 10;
  return result;
}


x86 assembly (clang, -O0):
<o_pow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jg     1140 <o_pow+0x40>
imul   $0xa,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <o_pow+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<o_pow>:
test   %rdi,%rdi
jle    111b <o_pow+0x1b>
lea    -0x1(%rdi),%rax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1121 <o_pow+0x21>
mov    $0x1,%eax
jmp    113d <o_pow+0x3d>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rdi
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
imul   $0x5f5e100,%rax,%rax
add    $0xfffffffffffffff8,%rdi
jne    1130 <o_pow+0x30>
test   %rcx,%rcx
je     115d <o_pow+0x5d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %rax,%rax
lea    (%rax,%rax,4),%rax
add    $0xffffffffffffffff,%rcx
jne    1150 <o_pow+0x50>
ret

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

LLVM IR (-O2):
define i64 @o_pow(i64 %0) {
%2 = icmp slt i64 %0, 1
br i1 %2, label %25, label %3
3: ; preds = %1
%4 = add i64 %0, -1
%5 = and i64 %0, 7
%6 = icmp ult i64 %4, 7
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = and i64 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i64 [ 1, %7 ], [ %12, %9 ]
%11 = phi i64 [ 0, %7 ], [ %13, %9 ]
%12 = mul i64 %10, 100000000
%13 = add i64 %11, 8
%14 = icmp eq i64 %13, %8
br i1 %14, label %15, label %9
15: ; preds = %9, %3
%16 = phi i64 [ undef, %3 ], [ %12, %9 ]
%17 = phi i64 [ 1, %3 ], [ %12, %9 ]
%18 = icmp eq i64 %5, 0
br i1 %18, label %25, label %19
19: ; preds = %15, %19
%20 = phi i64 [ %22, %19 ], [ %17, %15 ]
%21 = phi i64 [ %23, %19 ], [ 0, %15 ]
%22 = mul nsw i64 %20, 10
%23 = add i64 %21, 1
%24 = icmp eq i64 %23, %5
br i1 %24, label %25, label %19
25: ; preds = %15, %19, %1
%26 = phi i64 [ 1, %1 ], [ %16, %15 ], [ %22, %19 ]
ret i64 %26
}
float ANTweenTimingFunctionBackOut(float time, float begin, float change,
                                   float duration) {
  float s = 1.70158;
  time = time / duration - 1;
  return change * (time * time * ((s + 1) * time + s) + 1) + begin;
}


x86 assembly (clang, -O0):
<ANTweenTimingFunctionBackOut>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  0xee4(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  0xec9(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
mulss  -0x4(%rbp),%xmm2
movss  0xea9(%rip),%xmm1
addss  -0x14(%rbp),%xmm1
movss  -0x4(%rbp),%xmm4
movss  -0x14(%rbp),%xmm3
mulss  %xmm4,%xmm1
addss  %xmm3,%xmm1
mulss  %xmm1,%xmm2
movss  0xe86(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenTimingFunctionBackOut>:
divss  %xmm3,%xmm0
addss  0xef4(%rip),%xmm0
movaps %xmm0,%xmm3
mulss  0xeed(%rip),%xmm0
mulss  %xmm3,%xmm3
addss  0xee5(%rip),%xmm0
mulss  %xmm3,%xmm0
addss  0xedd(%rip),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ANTweenTimingFunctionBackOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
store float 0x3FFB39AC00000000, float* %9
%10 = load float, float* %5
%11 = load float, float* %8
%12 = fdiv float %10, %11
%13 = fsub float %12, 1.000000e+00
store float %13, float* %5
%14 = load float, float* %7
%15 = load float, float* %5
%16 = load float, float* %5
%17 = fmul float %15, %16
%18 = load float, float* %9
%19 = fadd float %18, 1.000000e+00
%20 = load float, float* %5
%21 = load float, float* %9
%22 = call float @llvm.fmuladd.f32(float %19, float %20, float %21)
%23 = call float @llvm.fmuladd.f32(float %17, float %22, float 1.000000e+00)
%24 = load float, float* %6
%25 = call float @llvm.fmuladd.f32(float %14, float %23, float %24)
ret float %25
}

LLVM IR (-O2):
define float @ANTweenTimingFunctionBackOut(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fadd float %5, -1.000000e+00
%7 = fmul float %6, %6
%8 = tail call float @llvm.fmuladd.f32(float %6, float 0x40059CD600000000, float 0x3FFB39AC00000000)
%9 = tail call float @llvm.fmuladd.f32(float %7, float %8, float 1.000000e+00)
%10 = tail call float @llvm.fmuladd.f32(float %2, float %9, float %1)
ret float %10
}
void edit_size(int rows, int cols) {}


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

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

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

LLVM IR (-O2):
define void @edit_size(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func(int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int main(int argc, char *argv[], char *envp[]) {
  srand(func(42));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x2a,%edi
call   1040 <func@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1040 <func@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = call i32 @func(i32 42)
%9 = call i32 @srand(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @func(i32 42)
%5 = tail call i32 @srand(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, double);
int main() {
  printf("Zahlenformatierungen: 100 == %d Dezimal == %o Oktal == %x "
         "Hexadezimal == %f Float",
         100, 100, 100, 100.1234567890);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x64,%ecx
movsd  0xecd(%rip),%xmm0
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x64,%esi
mov    $0x64,%edx
mov    $0x64,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [82 x i8] c"Zahlenformatierungen: 100 == %d Dezimal == %o Oktal == %x Hexadezimal == %f Float\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 100, i32 100, i32 100, double 0x405907E6B74DCE59)
ret i32 0
}

LLVM IR (-O2):
@.str = [82 x i8] c"Zahlenformatierungen: 100 == %d Dezimal == %o Oktal == %x Hexadezimal == %f Float\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 100, i32 100, i32 100, double 0x405907E6B74DCE59)
ret i32 0
}
void BIO_ctrl(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_ctrl() {
ret void
}
double radius_effective(int mode, double radius) { return radius; }


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

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

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

LLVM IR (-O2):
define double @radius_effective(i32 %0, double returned %1) {
ret double %1
}
unsigned int test_25(unsigned int a, unsigned int b) {
  return (a >> 31) | (b << 3);
}


x86 assembly (clang, -O0):
<test_25>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1f,%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_25>:
shr    $0x1f,%edi
lea    (%rdi,%rsi,8),%eax
ret

LLVM IR (-O0):
define i32 @test_25(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 = lshr i32 %5, 31
%7 = load i32, i32* %4
%8 = shl i32 %7, 3
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_25(i32 %0, i32 %1) {
%3 = lshr i32 %0, 31
%4 = shl i32 %1, 3
%5 = or i32 %4, %3
ret i32 %5
}
int termios_tcflushio(int fd) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @termios_tcflushio(i32 %0) {
ret i32 1
}
void handle(int s) {}


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

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

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

LLVM IR (-O2):
define void @handle(i32 %0) {
ret void
}
void assertions2WORDBOUNDARY() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void SetDisplayClockDivider(char a) {
  unsigned char d[] = {0xD5, a};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetDisplayClockDivider>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0xd5,-0x3(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
lea    -0x3(%rbp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetDisplayClockDivider>:
push   %rax
movb   $0xd5,0x6(%rsp)
mov    %dil,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @SetDisplayClockDivider(i8 signext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 -43, i8* %3
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 %0, i8* %4
%5 = call i32 @oled_SendCommand(i8* %3, i32 2)
ret void
}
/* Variables and functions */
void *xnmalloc_inline(size_t, size_t);
void *xnmalloc(size_t n, size_t s) { return xnmalloc_inline(n, s); }


x86 assembly (clang, -O0):
<xnmalloc>:
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 <xnmalloc_inline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xnmalloc>:
jmp    1030 <xnmalloc_inline@plt>

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

LLVM IR (-O2):
define i8* @xnmalloc(i64 %0, i64 %1) {
%3 = tail call i8* @xnmalloc_inline(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
char const *fsll_basename(char const *);
const char *bucketname(const char *path) { return fsll_basename(path); }


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

x86 assembly (clang, -O2):
<bucketname>:
jmp    1030 <fsll_basename@plt>

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

LLVM IR (-O2):
define i8* @bucketname(i8* %0) {
%2 = tail call i8* @fsll_basename(i8* %0)
ret i8* %2
}
void ag7240_phy_setup(int unit) {
  {}
}


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

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

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

LLVM IR (-O2):
define void @ag7240_phy_setup(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 24680;
  int b = 01234567;
  int c = 0x2468ac;
  int d = 0x2468AC;
  printf("%d\n", a);
  printf("%d\n", b);
  printf("%d\n", c);
  printf("%d\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6068,-0x8(%rbp)
movl   $0x53977,-0xc(%rbp)
movl   $0x2468ac,-0x10(%rbp)
movl   $0x2468ac,-0x14(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 24680, i32* %2
store i32 342391, i32* %3
store i32 2386092, i32* %4
store i32 2386092, i32* %5
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %5
%13 = 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 24680)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 342391)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2386092)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2386092)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void fileReleaseBuffer(char *buffer) {
  if (buffer)
    free((void *)buffer);
}


x86 assembly (clang, -O0):
<fileReleaseBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <fileReleaseBuffer+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileReleaseBuffer>:
test   %rdi,%rdi
je     111a <fileReleaseBuffer+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @fileReleaseBuffer(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_error(char *, int, int);
int log_message(char *message, int log_level) {
  log_error(message, log_level, -1);
}


x86 assembly (clang, -O0):
<log_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0xffffffff,%edx
call   1030 <log_error@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_message>:
mov    $0xffffffff,%edx
jmp    1030 <log_error@plt>

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

LLVM IR (-O2):
define i32 @log_message(i8* %0, i32 %1) {
%3 = tail call i32 @log_error(i8* %0, i32 %1, i32 -1)
ret i32 undef
}
void UAPP_PutByteRxBuffer(void) {}


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

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

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

LLVM IR (-O2):
define void @UAPP_PutByteRxBuffer() {
ret void
}
int test_imm_41int64_lowword_reg(long long val) {
  return ((val) & (0x41 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_41int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 65
%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_41int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 65
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Debug_InitialiseComparisonLists();
void Debug_Init(void) { Debug_InitialiseComparisonLists(); }


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

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

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

LLVM IR (-O2):
define void @Debug_Init() {
%1 = tail call i32 (...) @Debug_InitialiseComparisonLists()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
void test16_head() {
  do {
    printf("test16");
    puts("");
  } while (0);
}


x86 assembly (clang, -O0):
<test16_head>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test16_head+0x9>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test16_head>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"test16\00"
@.str.1 = [1 x i8] zeroinitializer
define void @test16_head() {
br label %1
1: ; preds = %0
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"test16\00"
define void @test16_head() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
ret void
}