xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
char *strcpy(char *dest, const char *str) {
  *dest = '\0';
  strcat(dest, str);
  return dest;
}


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

x86 assembly (clang, -O2):
<strcpy>:
push   %rbx
mov    %rdi,%rbx
movb   $0x0,(%rdi)
call   1030 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned %0, i8* %1) {
store i8 0, i8* %0
%3 = tail call i32 @strcat(i8* %0, i8* %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
scalar_t__ pipe(int *);
void xpipe(int fds[2]) {
  if (pipe(fds) < 0)
    err(1, "pipe");
}


x86 assembly (clang, -O0):
<xpipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pipe@plt>
cmp    $0x0,%rax
jge    1150 <xpipe+0x30>
mov    $0x1,%edi
lea    0xeb5(%rip),%rsi
call   1040 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpipe>:
push   %rax
call   1030 <pipe@plt>
test   %rax,%rax
js     112d <xpipe+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1040 <err@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"pipe\00"
define void @xpipe(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @pipe(i32* %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"pipe\00"
define void @xpipe(i32* %0) {
%2 = tail call i64 @pipe(i32* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ mc91(int);
int main() {
  int x = __VERIFIER_nondet_int();
  mc91(x);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @mc91(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_indent(int i) {
  while (i--)
    putchar('\t');
}


x86 assembly (clang, -O0):
<print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     113e <print_indent+0x2e>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    111b <print_indent+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_indent>:
push   %rbx
test   %edi,%edi
je     112f <print_indent+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <print_indent+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_indent(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @putchar(i8 signext 9)
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_uname;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  syscall(SYS_uname, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SYS_uname = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SYS_uname
%3 = call i32 @syscall(i32 %2, i32 0)
ret i32 0
}

LLVM IR (-O2):
@SYS_uname = global i32 0
define i32 @main() {
%1 = load i32, i32* @SYS_uname
%2 = tail call i32 @syscall(i32 %1, i32 0)
ret i32 0
}
long long bit02() { return 0x0000000000000004LL; }


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

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

LLVM IR (-O0):
define i64 @bit02() {
ret i64 4
}

LLVM IR (-O2):
define i64 @bit02() {
ret i64 4
}
/* Variables and functions */
int /*<<< orphan*/ audio_getdevs(char *, int *, char *, int *, int *, int *,
                                 int, int);
void sys_get_audio_devs(char *indevlist, int *nindevs, char *outdevlist,
                        int *noutdevs, int *canmulti, int *cancallback,
                        int maxndev, int devdescsize) {
  audio_getdevs(indevlist, nindevs, outdevlist, noutdevs, canmulti, cancallback,
                maxndev, devdescsize);
}


x86 assembly (clang, -O0):
<sys_get_audio_devs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <audio_getdevs@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_get_audio_devs>:
jmp    1030 <audio_getdevs@plt>

LLVM IR (-O0):
define void @sys_get_audio_devs(i8* %0, i32* %1, i8* %2, i32* %3, i32* %4, i32* %5, i32 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
store i8* %0, i8** %9
store i32* %1, i32** %10
store i8* %2, i8** %11
store i32* %3, i32** %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i8*, i8** %9
%18 = load i32*, i32** %10
%19 = load i8*, i8** %11
%20 = load i32*, i32** %12
%21 = load i32*, i32** %13
%22 = load i32*, i32** %14
%23 = load i32, i32* %15
%24 = load i32, i32* %16
%25 = call i32 @audio_getdevs(i8* %17, i32* %18, i8* %19, i32* %20, i32* %21, i32* %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @sys_get_audio_devs(i8* %0, i32* %1, i8* %2, i32* %3, i32* %4, i32* %5, i32 %6, i32 %7) {
%9 = tail call i32 @audio_getdevs(i8* %0, i32* %1, i8* %2, i32* %3, i32* %4, i32* %5, i32 %6, i32 %7)
ret void
}
/* Variables and functions */
int inv_host_serif_close(int /*<<< orphan*/);
int /*<<< orphan*/ inv_host_serif_get_instance();
int inv_host_serif_close_i(void) {
  return inv_host_serif_close(inv_host_serif_get_instance());
}


x86 assembly (clang, -O0):
<inv_host_serif_close_i>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <inv_host_serif_get_instance@plt>
mov    %eax,%edi
call   1040 <inv_host_serif_close@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @inv_host_serif_close_i() {
%1 = call i32 (...) @inv_host_serif_get_instance()
%2 = call i32 @inv_host_serif_close(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @inv_host_serif_close_i() {
%1 = tail call i32 (...) @inv_host_serif_get_instance()
%2 = tail call i32 @inv_host_serif_close(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int iam = 0, np = 1;
#pragma omp parallel private(iam, np)
  { printf("Hello from thread %d out of %d \n", iam, np); }
}


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

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

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

LLVM IR (-O2):
@.str = [33 x i8] c"Hello from thread %d out of %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
scalar_t__ is_alu();
int st0sel();
uint8_t io_rd(void) { return (is_alu() && (0xc == st0sel())); }


x86 assembly (clang, -O0):
<io_rd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <is_alu@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1157 <io_rd+0x37>
mov    $0x0,%al
call   1040 <st0sel@plt>
mov    %eax,%ecx
mov    $0xc,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_rd>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <is_alu@plt>
test   %rax,%rax
je     113e <io_rd+0x1e>
xor    %eax,%eax
call   1040 <st0sel@plt>
xor    %ebx,%ebx
cmp    $0xc,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @io_rd() {
%1 = call i64 (...) @is_alu()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @st0sel()
%5 = icmp eq i32 12, %4
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @io_rd() {
%1 = tail call i64 (...) @is_alu()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (...) @st0sel()
%5 = icmp eq i32 %4, 12
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef double *__m128d;

/* Variables and functions */
void __attribute__((__always___, __nodebug__))
_mm_storeh_pd(double *dp, __m128d a) {
  dp[0] = a[1];
}


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

x86 assembly (clang, -O2):
<_mm_storeh_pd>:
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @_mm_storeh_pd(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 1
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
store double %7, double* %9
ret void
}

LLVM IR (-O2):
define void @_mm_storeh_pd(double* nocapture writeonly %0, double* nocapture %1) {
%3 = getelementptr inbounds double, double* %1, i64 1
%4 = load double, double* %3
store double %4, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ conversion(int *);
int /*<<< orphan*/ layoutSelect(int *);
int main() {
  int layoutOrder[2];
  layoutSelect(layoutOrder);
  conversion(layoutOrder);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <layoutSelect@plt>
lea    -0xc(%rbp),%rdi
call   1040 <conversion@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <layoutSelect@plt>
mov    %rbx,%rdi
call   1040 <conversion@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%4 = call i32 @layoutSelect(i32* %3)
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%6 = call i32 @conversion(i32* %5)
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @layoutSelect(i32* %3)
%5 = call i32 @conversion(i32* %3)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SEC_PKCS7DecodeItem();
int /*<<< orphan*/ SEC_PKCS7DestroyContentInfo();
smime_CMDExports() {
  SEC_PKCS7DecodeItem();
  SEC_PKCS7DestroyContentInfo();
}


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

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

LLVM IR (-O0):
define i32 @smime_CMDExports() {
%1 = alloca i32
%2 = call i32 (...) @SEC_PKCS7DecodeItem()
%3 = call i32 (...) @SEC_PKCS7DestroyContentInfo()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @smime_CMDExports() {
%1 = tail call i32 (...) @SEC_PKCS7DecodeItem()
%2 = tail call i32 (...) @SEC_PKCS7DestroyContentInfo()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ handle_args(int, char **);
int main(int argc, char **argv) {
  handle_args(argc, argv);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <handle_args@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <handle_args@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @handle_args(i32 %0, i8** %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
int ValArrayDefaultCompareFn(const void *pleft, const void *pright) {
  const unsigned long long *left = pleft, *right = pright;
  return *left < *right ? -1 : (*left > *right ? 1 : 0);
}


x86 assembly (clang, -O0):
<ValArrayDefaultCompareFn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
jae    113d <ValArrayDefaultCompareFn+0x3d>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    115b <ValArrayDefaultCompareFn+0x5b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ValArrayDefaultCompareFn>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ValArrayDefaultCompareFn(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
store i64* %10, i64** %6
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = icmp ult i64 %12, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %25
17: ; preds = %2
%18 = load i64*, i64** %5
%19 = load i64, i64* %18
%20 = load i64*, i64** %6
%21 = load i64, i64* %20
%22 = icmp ugt i64 %19, %21
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 1, i32 0
br label %25
25: ; preds = %17, %16
%26 = phi i32 [ -1, %16 ], [ %24, %17 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @ValArrayDefaultCompareFn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
%8 = icmp ugt i64 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char const *);
int /*<<< orphan*/ scanf(char *, int *);
int acceptAlternative(const char *menu) {
  int choice;
  printf(menu);
  scanf("%d", &choice);
  return choice == 1;
}


x86 assembly (clang, -O0):
<acceptAlternative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acceptAlternative>:
push   %rax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmpl   $0x1,0x4(%rsp)
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @acceptAlternative(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @acceptAlternative(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @printf(i8* dereferenceable(1) %0)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *read_paragraph(int (*)(void *), void *);
void stub1(void *, char *);
void by_paragraph(int (*read)(void *), void *in, void (*write)(void *, char *),
                  void *out) {
  while (1) {
    char *line = read_paragraph(read, in);
    if (line == NULL) {
      return;
    }
    (*write)(out, line);
    free(line);
  }
}


x86 assembly (clang, -O0):
<by_paragraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <read_paragraph@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    115a <by_paragraph+0x3a>
add    $0x30,%rsp
pop    %rbp
ret
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   *%rax
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
jmp    1138 <by_paragraph+0x18>

x86 assembly (clang, -O2):
<by_paragraph>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%r13
call   1040 <read_paragraph@plt>
test   %rax,%rax
je     1174 <by_paragraph+0x54>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   *%r15
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <read_paragraph@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <by_paragraph+0x30>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @by_paragraph(i32 (i8*)* %0, i8* %1, void (i8*, i8*)* %2, i8* %3) {
%5 = alloca i32 (i8*)*
%6 = alloca i8*
%7 = alloca void (i8*, i8*)*
%8 = alloca i8*
%9 = alloca i8*
store i32 (i8*)* %0, i32 (i8*)** %5
store i8* %1, i8** %6
store void (i8*, i8*)* %2, void (i8*, i8*)** %7
store i8* %3, i8** %8
br label %10
10: ; preds = %4, %17
%11 = load i32 (i8*)*, i32 (i8*)** %5
%12 = load i8*, i8** %6
%13 = call i8* @read_paragraph(i32 (i8*)* %11, i8* %12)
store i8* %13, i8** %9
%14 = load i8*, i8** %9
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %10
ret void
17: ; preds = %10
%18 = load void (i8*, i8*)*, void (i8*, i8*)** %7
%19 = load i8*, i8** %8
%20 = load i8*, i8** %9
%21 = load i8*, i8** %9
%22 = call i32 @free(i8* %21)
br label %10
}

LLVM IR (-O2):
define void @by_paragraph(i32 (i8*)* %0, i8* %1, void (i8*, i8*)* nocapture %2, i8* %3) {
%5 = tail call i8* @read_paragraph(i32 (i8*)* %0, i8* %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %12, label %7
7: ; preds = %4, %7
%8 = phi i8* [ %10, %7 ], [ %5, %4 ]
tail call void %2(i8* %3, i8* %8)
%9 = tail call i32 @free(i8* %8)
%10 = tail call i8* @read_paragraph(i32 (i8*)* %0, i8* %1)
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %7
12: ; preds = %7, %4
ret void
}
/* Variables and functions */
int foo(int, int);
int main() { return foo(1, 2) - 3; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <foo@plt>
sub    $0x3,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <foo@plt>
add    $0xfffffffd,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 2)
%2 = add nsw i32 %1, -3
ret i32 %2
}
int do_050() { return 50; }


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

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

LLVM IR (-O0):
define i32 @do_050() {
ret i32 50
}

LLVM IR (-O2):
define i32 @do_050() {
ret i32 50
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_H8_5(void) {
  DeinitFields();
  ClearONOFF();
}


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

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

LLVM IR (-O0):
define void @SwitchFrom_H8_5() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_H8_5() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_write_004x(int);
void io_write_0041() { io_write_004x(1); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <io_write_004x@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @io_write_0041() {
%1 = call i32 @io_write_004x(i32 1)
ret void
}

LLVM IR (-O2):
define void @io_write_0041() {
%1 = tail call i32 @io_write_004x(i32 1)
ret void
}
/* Variables and functions */
scalar_t__ do_recv_completion(int, int);
void do_recv_completions(int fd, int domain) {
  while (do_recv_completion(fd, domain)) {
  }
}


x86 assembly (clang, -O0):
<do_recv_completions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <do_recv_completion@plt>
cmp    $0x0,%rax
je     1138 <do_recv_completions+0x28>
jmp    111e <do_recv_completions+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_recv_completions>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <do_recv_completion@plt>
test   %rax,%rax
jne    1120 <do_recv_completions+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @do_recv_completions(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i64 @do_recv_completion(i32 %0, i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TestVarArg(char *, double);
void TestPassVarDouble(double x) { TestVarArg("A", x); }


x86 assembly (clang, -O0):
<TestPassVarDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <TestVarArg@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
define void @TestPassVarDouble(double %0) {
%2 = tail call i32 @TestVarArg(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  int i = 0x12345678;
  char *pi = &i;
  printf("*pi = 0x%x\n", *pi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x12345678,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xec7(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"*pi = 0x%x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
store i32 305419896, i32* %2
%4 = bitcast i32* %2 to i8*
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"*pi = 0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 120)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void report(unsigned long value) { printf("report(0x%x);\n", (unsigned)value); }


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"report(0x%x);\0A\00"
define void @report(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ floor(double const);
void floor_l_d(const double *source, int64_t *dest) {
  *dest = (int64_t)floor(*source);
}


x86 assembly (clang, -O0):
<floor_l_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <floor@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor_l_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <floor@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @floor_l_d(double* %0, i64* %1) {
%3 = alloca double*
%4 = alloca i64*
store double* %0, double** %3
store i64* %1, i64** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = call i64 @floor(double %6)
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @floor_l_d(double* nocapture %0, i64* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i64 @floor(double %3)
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
char *__strtok_r(char *, char const *, char **, int);
__attribute__((__section__(".libc.rom.text"))) __attribute__((long_call)) char *
_strtok_r(register char *s, register const char *delim, char **lasts) {
  return __strtok_r(s, delim, lasts, 1);
}


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

x86 assembly (clang, -O2):
<_strtok_r>:
mov    $0x1,%ecx
jmp    1030 <__strtok_r@plt>

LLVM IR (-O0):
define i8* @_strtok_r(i8* %0, i8* %1, i8** %2) section ".libc.rom.text" {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8**, i8*** %6
%10 = call i8* @__strtok_r(i8* %7, i8* %8, i8** %9, i32 1)
ret i8* %10
}

LLVM IR (-O2):
define i8* @_strtok_r(i8* %0, i8* %1, i8** %2) section ".libc.rom.text" {
%4 = tail call i8* @__strtok_r(i8* %0, i8* %1, i8** %2, i32 1)
ret i8* %4
}
void rt_barrier_sync(void) {}


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

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

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

LLVM IR (-O2):
define void @rt_barrier_sync() {
ret void
}
void i2d_ASN1_UTCTIME(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ASN1_UTCTIME() {
ret void
}
/* Variables and functions */
unsigned char *hmac(void *, unsigned char *, int);
unsigned char *crypto_mac(void *ctx, int mac, unsigned char *data, int dlen) {
  return hmac(ctx, data, dlen);
}


x86 assembly (clang, -O0):
<crypto_mac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <hmac@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_mac>:
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <hmac@plt>

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

LLVM IR (-O2):
define i8* @crypto_mac(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i8* @hmac(i8* %0, i8* %2, i32 %3)
ret i8* %5
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int _wpa_ctrl_command(struct wpa_ctrl *, char const *);
int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd) {
  return _wpa_ctrl_command(ctrl, cmd);
}


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

x86 assembly (clang, -O2):
<wpa_ctrl_command>:
jmp    1030 <_wpa_ctrl_command@plt>

LLVM IR (-O0):
%struct.wpa_ctrl = type { i32 }
define i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* %1) {
%3 = alloca %struct.wpa_ctrl*
%4 = alloca i8*
store %struct.wpa_ctrl* %0, %struct.wpa_ctrl** %3
store i8* %1, i8** %4
%5 = load %struct.wpa_ctrl*, %struct.wpa_ctrl** %3
%6 = load i8*, i8** %4
%7 = call i32 @_wpa_ctrl_command(%struct.wpa_ctrl* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
define i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* %1) {
%3 = tail call i32 @_wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* %1)
ret i32 %3
}
int quantization_component(int block_no) {
  switch (block_no % 4) {
  case 0:
  case 3:
    return 0;
  case 1:
    return 1;
  case 2:
    return 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<quantization_component>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%edx
add    $0x3,%edx
test   %eax,%eax
mov    %eax,%ecx
cmovs  %edx,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1162 <quantization_component+0x62>
mov    -0x10(%rbp),%rax
lea    0xecb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1169 <quantization_component+0x69>
movl   $0x1,-0x4(%rbp)
jmp    1169 <quantization_component+0x69>
movl   $0x2,-0x4(%rbp)
jmp    1169 <quantization_component+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quantization_component>:
lea    0x3(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
and    $0xfffffffc,%eax
sub    %eax,%edi
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
cmp    $0x2,%edi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @quantization_component(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
switch i32 %5, label %9 [
i32 0, label %6
i32 3, label %6
i32 1, label %7
i32 2, label %8
]
6: ; preds = %1, %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
store i32 1, i32* %2
br label %10
8: ; preds = %1
store i32 2, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @quantization_component(i32 %0) {
%2 = srem i32 %0, 4
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
%5 = icmp eq i32 %2, 2
%6 = select i1 %5, i32 2, i32 %4
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
void seekdir(DIR *dirp, long int pos) {
  if (dirp == NULL) {
    __set_errno(EINVAL);
    return;
  }
  __set_errno(ENOSYS);
}


x86 assembly (clang, -O0):
<seekdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <seekdir+0x2e>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
jmp    114c <seekdir+0x3c>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seekdir>:
test   %rdi,%rdi
jne    1123 <seekdir+0x13>
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__set_errno@plt>
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__set_errno@plt>

LLVM IR (-O0):
@EINVAL = global i32 0
@ENOSYS = global i32 0
define void @seekdir(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* @EINVAL
%9 = call i32 @__set_errno(i32 %8)
br label %13
10: ; preds = %2
%11 = load i32, i32* @ENOSYS
%12 = call i32 @__set_errno(i32 %11)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@EINVAL = global i32 0
@ENOSYS = global i32 0
define void @seekdir(i32* readnone %0, i64 %1) {
%3 = icmp eq i32* %0, null
%4 = load i32, i32* @EINVAL
%5 = load i32, i32* @ENOSYS
%6 = select i1 %3, i32 %4, i32 %5
%7 = tail call i32 @__set_errno(i32 %6)
ret void
}
int ft_abs(int n) {
  if (n < 0)
    n = -n;
  return (n);
}


x86 assembly (clang, -O0):
<ft_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1119 <ft_abs+0x19>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @ft_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handleData0(char *data, int len) {
  printf("# vulnserver_cov: Auth success\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"# vulnserver_cov: Auth success\0A\00"
define void @handleData0(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"# vulnserver_cov: Auth success\00"
define void @handleData0(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
long double frexpl(long double x, int *exp) { return __builtin_frexpl(x, exp); }


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

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

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

LLVM IR (-O2):
define x86_fp80 @frexpl(x86_fp80 %0, i32* nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
double double_max(double x, double y) {
  if (x > y) {
    return x;
  } else {
    return y;
  }
}


x86 assembly (clang, -O0):
<double_max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    112d <double_max+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <double_max+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_max>:
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @double_max(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @double_max(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void gtk_text_iter_get_slice() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_slice() {
ret void
}
int test_imm_32int16_mem(short *val) {
  return ((*val) & (-0x32 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_32int16_mem>:
movzwl (%rdi),%eax
test   $0xffce,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_32int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -50
%7 = icmp ne i32 %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_32int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -50
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ vprintf(char const *, int /*<<< orphan*/);
_log_tag(const char *tag, const char *src, const char *format, va_list argptr) {
  printf("%s %s: ", tag, src);
  vprintf(format, argptr);
  printf("\n");
}


x86 assembly (clang, -O0):
<_log_tag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <vprintf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_log_tag>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <vprintf@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s %s: \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @_log_tag(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = call i32 @vprintf(i8* %13, i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s %s: \00"
define i32 @_log_tag(i8* %0, i8* %1, i8* nocapture %2, i32 %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = tail call i32 @vprintf(i8* %2, i32 %3)
%7 = tail call i32 @putchar(i32 10)
ret i32 undef
}
/* Variables and functions */
void *memchr(const void *s, int c, size_t n) {
  unsigned char *p = (unsigned char *)s;
  unsigned char *end = p + n;
  for (; p != end; p++)
    if (*p == c)
      return ((void *)p);
  return (0);
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x30(%rbp),%rax
je     1164 <memchr+0x64>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    114e <memchr+0x4e>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <memchr+0x6c>
jmp    1153 <memchr+0x53>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1123 <memchr+0x23>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
test   %rdx,%rdx
je     1121 <memchr+0x21>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
cmp    %esi,%ecx
je     1123 <memchr+0x23>
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1110 <memchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %2
%5 = icmp eq i64 %2, 0
br i1 %5, label %14, label %6
6: ; preds = %3, %11
%7 = phi i8* [ %12, %11 ], [ %0, %3 ]
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, %1
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = icmp eq i8* %12, %4
br i1 %13, label %14, label %6
14: ; preds = %6, %11, %3
%15 = phi i8* [ null, %3 ], [ null, %11 ], [ %7, %6 ]
ret i8* %15
}