xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *now_time(char *buffer) {
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  strftime(buffer, 80, "%a %d/%m/%Y %T", timeinfo);
  return buffer;
}


x86 assembly (clang, -O0):
<now_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x50,%esi
lea    0xe9a(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now_time>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xead(%rip),%rdx
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [15 x i8] c"%a %d/%m/%Y %T\00"
define i8* @now_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 80, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [15 x i8] c"%a %d/%m/%Y %T\00"
define i8* @now_time(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 80, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  extern char *__progname;
  fprintf(stderr, "usage: %s [-d] [string ...]\n", __progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"usage: %s [-d] [string ...]\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: %s [-d] [string ...]\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *memchr(const void *s, int c, size_t count) {
  const unsigned char *p = s;
  while (count--)
    if ((unsigned char)c == *p++) {
      return (void *)(p - 1);
    }
  return NULL;
}


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    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     1166 <memchr+0x66>
mov    -0x14(%rbp),%eax
movzbl %al,%eax
mov    -0x28(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
movzbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1161 <memchr+0x61>
mov    -0x28(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    116e <memchr+0x6e>
jmp    1117 <memchr+0x17>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sub    $0x1,%rdx
jb     1124 <memchr+0x24>
lea    0x1(%rdi),%rax
cmp    %sil,0x1(%rdi)
mov    %rax,%rdi
jne    1110 <memchr+0x10>
ret
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*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%9 = load i8*, i8** %5
store i8* %9, i8** %8
br label %10
10: ; preds = %26, %3
%11 = load i64, i64* %7
%12 = add i64 %11, -1
store i64 %12, i64* %7
%13 = icmp ne i64 %11, 0
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = load i32, i32* %6
%16 = trunc i32 %15 to i8
%17 = zext i8 %16 to i32
%18 = load i8*, i8** %8
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %8
%20 = load i8, i8* %18
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %17, %21
br i1 %22, label %23, label %26
23: ; preds = %14
%24 = load i8*, i8** %8
%25 = getelementptr inbounds i8, i8* %24, i64 -1
store i8* %25, i8** %4
br label %28
26: ; preds = %14
br label %10
27: ; preds = %10
store i8* null, i8** %4
br label %28
28: ; preds = %27, %23
%29 = load i8*, i8** %4
ret i8* %29
}

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


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

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

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

LLVM IR (-O2):
define void @Ctypes_hook_rd_ten_u8s() {
ret void
}
OP(dd, aa) {
  illegal_1();
  op_aa();
}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_aa()
ret i32 undef
}
void I_StartupSound(void) {}


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

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

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

LLVM IR (-O2):
define void @I_StartupSound() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GetCoefficients();
int /*<<< orphan*/ PrintResult();
int main(int argc, const char *argv[]) {
  GetCoefficients();
  PrintResult();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @GetCoefficients()
%4 = tail call i32 (...) @PrintResult()
ret i32 0
}
/* Type definitions */
struct altera_spi_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ spi_reg_write(struct altera_spi_device *, int, int);
void spi_cs_activate(struct altera_spi_device *dev, unsigned int chip_select) {
  spi_reg_write(dev, 20, 1 << chip_select);
  spi_reg_write(dev, 12, 0x400);
}


x86 assembly (clang, -O0):
<spi_cs_activate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    $0x14,%esi
call   1030 <spi_reg_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0xc,%esi
mov    $0x400,%edx
call   1030 <spi_reg_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_cs_activate>:
push   %rbx
mov    %esi,%ecx
mov    %rdi,%rbx
mov    $0x1,%edx
shl    %cl,%edx
mov    $0x14,%esi
call   1030 <spi_reg_write@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
mov    $0x400,%edx
pop    %rbx
jmp    1030 <spi_reg_write@plt>

LLVM IR (-O0):
%struct.altera_spi_device = type { i32 }
define void @spi_cs_activate(%struct.altera_spi_device* %0, i32 %1) {
%3 = alloca %struct.altera_spi_device*
%4 = alloca i32
store %struct.altera_spi_device* %0, %struct.altera_spi_device** %3
store i32 %1, i32* %4
%5 = load %struct.altera_spi_device*, %struct.altera_spi_device** %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = call i32 @spi_reg_write(%struct.altera_spi_device* %5, i32 20, i32 %7)
%9 = load %struct.altera_spi_device*, %struct.altera_spi_device** %3
%10 = call i32 @spi_reg_write(%struct.altera_spi_device* %9, i32 12, i32 1024)
ret void
}

LLVM IR (-O2):
%struct.altera_spi_device = type { i32 }
define void @spi_cs_activate(%struct.altera_spi_device* %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = tail call i32 @spi_reg_write(%struct.altera_spi_device* %0, i32 20, i32 %3)
%5 = tail call i32 @spi_reg_write(%struct.altera_spi_device* %0, i32 12, i32 1024)
ret void
}
const char *rcsid(const char *p) {
  return rcsid(p = "@(#)$File: fsmagic.c,v 1.52 2008/07/25 23:59:01 rrt Exp $");
}


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

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

LLVM IR (-O0):
@.str = [58 x i8] c"@(#)$File: fsmagic.c,v 1.52 2008/07/25 23:59:01 rrt Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int fibo(int num) {
  if (num == 0) {
    return 0;
  } else if (num == 1) {
    return 1;
  } else {
    return (fibo(num - 1) + fibo(num - 2));
  }
}


x86 assembly (clang, -O0):
<fibo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fibo+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fibo+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fibo+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fibo+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fibo+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibo@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <fibo+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibo(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @fibo(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
int ReversedNumber(long int number) {
  int rev = 0;
  while (number > 0) {
    rev = rev * 10;
    rev = rev + number % 10;
    number = number / 10;
  }
  return rev;
}


x86 assembly (clang, -O0):
<ReversedNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1158 <ReversedNumber+0x58>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    -0x18(%rbp),%rax
add    %rdx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
jmp    110f <ReversedNumber+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReversedNumber>:
test   %rdi,%rdi
jle    1144 <ReversedNumber+0x44>
mov    %rdi,%rcx
xor    %eax,%eax
movabs $0xcccccccccccccccd,%r8
cc cc cc
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rax,%rax,4),%esi
mov    %rcx,%rax
mul    %r8
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %ecx,%edi
sub    %eax,%edi
lea    (%rdi,%rsi,2),%eax
cmp    $0x9,%rcx
mov    %rdx,%rcx
ja     1120 <ReversedNumber+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ReversedNumber(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 10
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = load i64, i64* %2
%13 = srem i64 %12, 10
%14 = add nsw i64 %11, %13
%15 = trunc i64 %14 to i32
store i32 %15, i32* %3
%16 = load i64, i64* %2
%17 = sdiv i64 %16, 10
store i64 %17, i64* %2
br label %4
18: ; preds = %4
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @ReversedNumber(i64 %0) {
%2 = icmp sgt i64 %0, 0
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi i64 [ %10, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = urem i64 %5, 10
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = udiv i64 %5, 10
%11 = icmp ult i64 %5, 10
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %13
}
int cmp_mul_1(float x) { return x * 3 <= 100; }


x86 assembly (clang, -O0):
<cmp_mul_1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  0xee2(%rip),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_mul_1>:
mulss  0xef8(%rip),%xmm0
movss  0xef4(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @cmp_mul_1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 3.000000e+00
%5 = fcmp ole float %4, 1.000000e+02
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @cmp_mul_1(float %0) {
%2 = fmul float %0, 3.000000e+00
%3 = fcmp ole float %2, 1.000000e+02
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ config_cmd(unsigned char, unsigned int, unsigned int);
int /*<<< orphan*/ outl(int /*<<< orphan*/, int);
int /*<<< orphan*/ outw(unsigned short, int);
void pcibios_write_config_word(unsigned char bus, unsigned devfn,
                               unsigned where, unsigned short value) {
  outl(config_cmd(bus, devfn, where), 0xCF8);
  outw(value, 0xCFC + (where & 2));
}


x86 assembly (clang, -O0):
<pcibios_write_config_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cx,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movzbl %al,%edi
call   1040 <config_cmd@plt>
mov    %eax,%edi
mov    $0xcf8,%esi
call   1030 <outl@plt>
mov    -0xe(%rbp),%ax
mov    -0xc(%rbp),%esi
and    $0x2,%esi
add    $0xcfc,%esi
movzwl %ax,%edi
call   1050 <outw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcibios_write_config_word>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
call   1040 <config_cmd@plt>
mov    %eax,%edi
mov    $0xcf8,%esi
call   1030 <outl@plt>
and    $0x2,%ebp
or     $0xcfc,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <outw@plt>

LLVM IR (-O0):
define void @pcibios_write_config_word(i8 zeroext %0, i32 %1, i32 %2, i16 zeroext %3) {
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i16
store i8 %0, i8* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i16 %3, i16* %8
%9 = load i8, i8* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @config_cmd(i8 zeroext %9, i32 %10, i32 %11)
%13 = call i32 @outl(i32 %12, i32 3320)
%14 = load i16, i16* %8
%15 = load i32, i32* %7
%16 = and i32 %15, 2
%17 = add i32 3324, %16
%18 = call i32 @outw(i16 zeroext %14, i32 %17)
ret void
}

LLVM IR (-O2):
define void @pcibios_write_config_word(i8 zeroext %0, i32 %1, i32 %2, i16 zeroext %3) {
%5 = tail call i32 @config_cmd(i8 zeroext %0, i32 %1, i32 %2)
%6 = tail call i32 @outl(i32 %5, i32 3320)
%7 = and i32 %2, 2
%8 = or i32 %7, 3324
%9 = tail call i32 @outw(i16 zeroext %3, i32 %8)
ret void
}
int compar(const void *x, const void *y) {
  double a = *((double *)x);
  double b = *((double *)y);
  if (a > b) {
    return -1;
  } else if (a < b) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<compar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1142 <compar+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <compar+0x69>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1162 <compar+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <compar+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compar>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
ucomisd %xmm1,%xmm0
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ CatchFatal(int);
int /*<<< orphan*/ _exit(int);
void CatchFatalAndExit(int signo) {
  CatchFatal(signo);
  _exit(signo);
}


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

x86 assembly (clang, -O2):
<CatchFatalAndExit>:
push   %rbx
mov    %edi,%ebx
call   1040 <CatchFatal@plt>
mov    %ebx,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @CatchFatalAndExit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @CatchFatal(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @_exit(i32 %5)
unreachable
}

LLVM IR (-O2):
define void @CatchFatalAndExit(i32 %0) {
%2 = tail call i32 @CatchFatal(i32 %0)
%3 = tail call i32 @_exit(i32 %0)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(int);
int *init_1D(int length) {
  int i;
  int *arr = (int *)malloc(length * sizeof(int));
  for (i = 0; i < length; i++) {
    arr[i] = 0;
  }
  return arr;
}


x86 assembly (clang, -O0):
<init_1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115e <init_1D+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <init_1D+0x25>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_1D>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1149 <init_1D+0x29>
mov    %ebx,%edx
shl    $0x2,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32* @init_1D(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = inttoptr i64 %3 to i8*
%7 = zext i32 %0 to i64
%8 = shl nuw nsw i64 %7, 2
br label %9
9: ; preds = %5, %1
%10 = inttoptr i64 %3 to i32*
ret i32* %10
}
/* Variables and functions */
long long simple_strtoull(char const *, char **, unsigned int);
long long simple_strtoll(const char *cp, char **endp, unsigned int base) {
  if (*cp == '-')
    return -simple_strtoull(cp + 1, endp, base);
  return simple_strtoull(cp, endp, base);
}


x86 assembly (clang, -O0):
<simple_strtoll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1158 <simple_strtoll+0x48>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <simple_strtoull@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    116c <simple_strtoll+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <simple_strtoull@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_strtoll>:
push   %rax
cmpb   $0x2d,(%rdi)
jne    1124 <simple_strtoll+0x14>
add    $0x1,%rdi
call   1030 <simple_strtoull@plt>
neg    %rax
pop    %rcx
ret
pop    %rax
jmp    1030 <simple_strtoull@plt>

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

LLVM IR (-O2):
define i64 @simple_strtoll(i8* %0, i8** %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = tail call i64 @simple_strtoull(i8* %7, i8** %1, i32 %2)
%9 = sub nsw i64 0, %8
br label %12
10: ; preds = %3
%11 = tail call i64 @simple_strtoull(i8* %0, i8** %1, i32 %2)
br label %12
12: ; preds = %10, %6
%13 = phi i64 [ %9, %6 ], [ %11, %10 ]
ret i64 %13
}
int foo(int a, int b) {
  int res;
  if (a > b) {
    res = a - b;
  } else {
    res = b - a;
  }
  return res;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1124 <foo+0x24>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112d <foo+0x2d>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
sub    %esi,%eax
neg    %eax
sub    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = sub nsw i32 %0, %1
%5 = sub nsw i32 %1, %0
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
unsigned xrop3_126_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = D ^ S;
  stk1 = stk1 | stk2;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_126_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    %eax,%ecx
xor    $0xff,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_126_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
%8 = xor i32 %4, 255
%9 = or i32 %7, %8
ret i32 %9
}
/* Type definitions */
struct tags {
  int dummy;
};

/* Variables and functions */
scalar_t__ tags_tag(struct tags *, char const *);
int tag_exists(const struct tags *tags, const char *name) {
  if (tags_tag((struct tags *)tags, name))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<tag_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <tags_tag@plt>
cmp    $0x0,%rax
je     1143 <tag_exists+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <tag_exists+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_exists>:
push   %rax
call   1030 <tags_tag@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tags = type { i32 }
define i32 @tag_exists(%struct.tags* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.tags*
%5 = alloca i8*
store %struct.tags* %0, %struct.tags** %4
store i8* %1, i8** %5
%6 = load %struct.tags*, %struct.tags** %4
%7 = load i8*, i8** %5
%8 = call i64 @tags_tag(%struct.tags* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
%struct.tags = type { i32 }
define i32 @tag_exists(%struct.tags* %0, i8* %1) {
%3 = tail call i64 @tags_tag(%struct.tags* %0, i8* %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int write(int, char *, int);
int ft_putchar(char c) { return (write(1, &c, 1)); }


x86 assembly (clang, -O0):
<ft_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ft_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret i32 %3
}

LLVM IR (-O2):
define i32 @ft_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ wctype_t;

/* Variables and functions */
int __infer_nondet_int();
int iswctype(wint_t wc, wctype_t desc) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @iswctype(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @__infer_nondet_int()
ret i32 %5
}

LLVM IR (-O2):
define i32 @iswctype(i32 %0, i32 %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fabs(double);
double pow(int /*<<< orphan*/, double);
double f4(double x) { return pow(fabs((x - 1)), 1.0 / 3.0); }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
movsd  0xeb3(%rip),%xmm0
call   1040 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rax
addsd  0xed7(%rip),%xmm0
call   1030 <fabs@plt>
movsd  0xed2(%rip),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1040 <pow@plt>

LLVM IR (-O0):
define double @f4(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 1.000000e+00
%5 = call i32 @fabs(double %4)
%6 = call double @pow(i32 %5, double 0x3FD5555555555555)
ret double %6
}

LLVM IR (-O2):
define double @f4(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = tail call i32 @fabs(double %2)
%4 = tail call double @pow(i32 %3, double 0x3FD5555555555555)
ret double %4
}
int abs(int i) {
  if (i < 0)
    return (-i);
  else
    return (i);
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M566_f(char *s) {
  debug("M566_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


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

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

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

LLVM IR (-O2):
@.str = [47 x i8] c"M566_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M566_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
char *buf(char const *, size_t);
scalar_t__ strtol(char const *, char **, int);
int intarg(const char *p, size_t s) {
  char *ep, *b = buf(p, s);
  int r = (int)strtol(p, &ep, 8);
  return r;
}


x86 assembly (clang, -O0):
<intarg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <buf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strtol@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intarg>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <buf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @intarg(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i8* @buf(i8* %8, i64 %9)
store i8* %10, i8** %6
%11 = load i8*, i8** %3
%12 = call i64 @strtol(i8* %11, i8** %5, i32 8)
%13 = trunc i64 %12 to i32
store i32 %13, i32* %7
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @intarg(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = tail call i8* @buf(i8* %0, i64 %1)
%6 = call i64 @strtol(i8* %0, i8** %3, i32 8)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int *f(int);
int main(void) {
  int *p = f(5);
  int y = *p;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @f(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void net_disable_dhcpcd(void) {
  system("killall -2 "
         "dhcpcd");
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"killall -2 dhcpcd\00"
define void @net_disable_dhcpcd() {
%1 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"killall -2 dhcpcd\00"
define void @net_disable_dhcpcd() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct nvme_passthru_cmd {
  int dummy;
};

/* Variables and functions */
int ioctl(int, int, struct nvme_passthru_cmd *);
int nvme_submit_passthru(int fd, int ioctl_cmd, struct nvme_passthru_cmd *cmd) {
  return ioctl(fd, ioctl_cmd, cmd);
}


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

x86 assembly (clang, -O2):
<nvme_submit_passthru>:
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
%struct.nvme_passthru_cmd = type { i32 }
define i32 @nvme_submit_passthru(i32 %0, i32 %1, %struct.nvme_passthru_cmd* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.nvme_passthru_cmd*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.nvme_passthru_cmd* %2, %struct.nvme_passthru_cmd** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load %struct.nvme_passthru_cmd*, %struct.nvme_passthru_cmd** %6
%10 = call i32 @ioctl(i32 %7, i32 %8, %struct.nvme_passthru_cmd* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.nvme_passthru_cmd = type { i32 }
define i32 @nvme_submit_passthru(i32 %0, i32 %1, %struct.nvme_passthru_cmd* %2) {
%4 = tail call i32 @ioctl(i32 %0, i32 %1, %struct.nvme_passthru_cmd* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ check(int, int);
scalar_t__ strcmp(char const *, char const *);
void equal(const char *a, const char *b, int number) {
  check(a != NULL && b != NULL && (strcmp(a, b) == 0), number);
}


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x15(%rbp)
je     116a <equal+0x4a>
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x15(%rbp)
je     116a <equal+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    -0x14(%rbp),%esi
call   1040 <check@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rax
xor    %edi,%edi
test   %rax,%rax
je     1143 <equal+0x23>
test   %rsi,%rsi
je     1143 <equal+0x23>
mov    %rax,%rdi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
mov    %ebx,%esi
pop    %rbx
jmp    1040 <check@plt>

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

LLVM IR (-O2):
define void @equal(i8* %0, i8* %1, i32 %2) {
%4 = icmp ne i8* %0, null
%5 = icmp ne i8* %1, null
%6 = and i1 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i64 @strcmp(i8* %0, i8* %1)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %3
%12 = phi i32 [ 0, %3 ], [ %10, %7 ]
%13 = tail call i32 @check(i32 %12, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getientropy(unsigned int *);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(int argc, char **argv) {
  unsigned int entropy[1];
  getientropy(entropy);
  printf("%u\n", *(entropy));
  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)
lea    -0x14(%rbp),%rdi
call   1040 <getientropy@plt>
mov    -0x14(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <getientropy@plt>
mov    0x4(%rsp),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1 x i32]
%4 = bitcast [1 x i32]* %3 to i8*
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%6 = call i32 @getientropy(i32* %5)
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
double dmax(double a, double b) { return (a > b ? a : b); }


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

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

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

LLVM IR (-O2):
define double @dmax(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "rmdir", message); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [6 x i8] c"rmdir\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}