xunge/DecIR huggingface dataset:
void copy_summary(int b[100], int a[100]) {
  for (int i = 0; i < 100; ++i) {
    b[i] = 0;
    int c = a[i];
  }
}


x86 assembly (clang, -O0):
<copy_summary>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1148 <copy_summary+0x48>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copy_summary+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_summary>:
push   %rax
mov    $0x190,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @copy_summary(i32* nocapture writeonly %0, i32* nocapture readnone %1) {
%3 = bitcast i32* %0 to i8*
ret void
}
void genbne_test() {}


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

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

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

LLVM IR (-O2):
define void @genbne_test() {
ret void
}
unsigned short unsignedshort_ignoring_unsignedlonglong(unsigned short x,
                                                       unsigned long long y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshort_ignoring_unsignedlonglong>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @unsignedshort_ignoring_unsignedlonglong(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @unsignedshort_ignoring_unsignedlonglong(i16 returned zeroext %0, i64 %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fdivp() {
  db(0xDE);
  db(0xF9);
}


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

x86 assembly (clang, -O2):
<fdivp>:
push   %rax
mov    $0xde,%edi
call   1030 <db@plt>
mov    $0xf9,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fdivp() {
%1 = call i32 @db(i32 222)
%2 = call i32 @db(i32 249)
ret void
}

LLVM IR (-O2):
define void @fdivp() {
%1 = tail call i32 @db(i32 222)
%2 = tail call i32 @db(i32 249)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _quick_sort(int *, int /*<<< orphan*/, int const,
                               unsigned long const *);
void _sort_coidx(int *sort, const int nsort, const unsigned long *ref) {
  _quick_sort(sort, 0, nsort - 1, ref);
}


x86 assembly (clang, -O0):
<_sort_coidx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x18(%rbp),%rcx
xor    %esi,%esi
call   1030 <_quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sort_coidx>:
mov    %rdx,%rcx
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <_quick_sort@plt>

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

LLVM IR (-O2):
define void @_sort_coidx(i32* %0, i32 %1, i64* %2) {
%4 = add nsw i32 %1, -1
%5 = tail call i32 @_quick_sort(i32* %0, i32 0, i32 %4, i64* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stderr;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int VErrorF(const char *fmt, va_list ap) {
  int retval;
  retval = vfprintf(stderr, fmt, ap);
  return (retval);
}


x86 assembly (clang, -O0):
<VErrorF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VErrorF>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
define i32 @VErrorF(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ RamRead32(unsigned char, unsigned char, unsigned long *);
void RamRead32A(unsigned short RamAddr, void *ReadData) {
  unsigned char RamAddrH = RamAddr >> 8;
  unsigned char RamAddrL = RamAddr & 0xFF;
  RamRead32(RamAddrH, RamAddrL, (unsigned long *)ReadData);
}


x86 assembly (clang, -O0):
<RamRead32A>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0x11(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x12(%rbp)
mov    -0x11(%rbp),%cl
mov    -0x12(%rbp),%al
mov    -0x10(%rbp),%rdx
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <RamRead32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RamRead32A>:
mov    %rsi,%rdx
movzbl %dil,%esi
shr    $0x8,%edi
jmp    1030 <RamRead32@plt>

LLVM IR (-O0):
define void @RamRead32A(i16 zeroext %0, i8* %1) {
%3 = alloca i16
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i16 %0, i16* %3
store i8* %1, i8** %4
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %5
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
store i8 %14, i8* %6
%15 = load i8, i8* %5
%16 = load i8, i8* %6
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to i64*
%19 = call i32 @RamRead32(i8 zeroext %15, i8 zeroext %16, i64* %18)
ret void
}

LLVM IR (-O2):
define void @RamRead32A(i16 zeroext %0, i8* %1) {
%3 = lshr i16 %0, 8
%4 = trunc i16 %3 to i8
%5 = trunc i16 %0 to i8
%6 = bitcast i8* %1 to i64*
%7 = tail call i32 @RamRead32(i8 zeroext %4, i8 zeroext %5, i64* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void st103_set_cntr(uint16_t cntr) {
  *((volatile uint16_t *)((0x40005C00UL) + 0x40)) = cntr;
}


x86 assembly (clang, -O0):
<st103_set_cntr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x40005c40,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<st103_set_cntr>:
mov    %edi,0x40005c40
ret

LLVM IR (-O0):
define void @st103_set_cntr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1073765440 to i32*)
ret void
}

LLVM IR (-O2):
define void @st103_set_cntr(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1073765440 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EAGAIN;
int /*<<< orphan*/ errno;
int fork() {
  errno = EAGAIN;
  return -1;
}


x86 assembly (clang, -O0):
<fork>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ecc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EAGAIN = global i32 0
@errno = global i32 0
define i32 @fork() {
%1 = load i32, i32* @EAGAIN
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EAGAIN = global i32 0
@errno = global i32 0
define i32 @fork() {
%1 = load i32, i32* @EAGAIN
store i32 %1, i32* @errno
ret i32 -1
}
/* Variables and functions */
long long _mergeSort(int *, int *, int /*<<< orphan*/, int);
scalar_t__ malloc(int);
long long int mergeSort(int arr[], int array_size) {
  int *temp = (int *)malloc(sizeof(int) * array_size);
  return _mergeSort(arr, temp, 0, array_size - 1);
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <_mergeSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
add    $0xffffffff,%ebx
mov    %r14,%rdi
mov    %rax,%rsi
xor    %edx,%edx
mov    %ebx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <_mergeSort@plt>

LLVM IR (-O0):
define i64 @mergeSort(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* %4
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %5
%12 = load i32*, i32** %3
%13 = load i32*, i32** %5
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = call i64 @_mergeSort(i32* %12, i32* %13, i32 0, i32 %15)
ret i64 %16
}

LLVM IR (-O2):
define i64 @mergeSort(i32* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i32*
%6 = add nsw i32 %1, -1
%7 = tail call i64 @_mergeSort(i32* %0, i32* %5, i32 0, i32 %6)
ret i64 %7
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
scalar_t__ scale8(scalar_t__, scalar_t__);
uint8_t map8(uint8_t in, uint8_t rangeStart, uint8_t rangeEnd) {
  uint8_t rangeWidth = rangeEnd - rangeStart;
  uint8_t out = scale8(in, rangeWidth);
  out += rangeStart;
  return out;
}


x86 assembly (clang, -O0):
<map8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <scale8@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map8>:
push   %rbx
mov    %rsi,%rbx
sub    %rsi,%rdx
mov    %rdx,%rsi
call   1030 <scale8@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @map8(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %6
%10 = load i64, i64* %5
%11 = sub nsw i64 %9, %10
store i64 %11, i64* %7
%12 = load i64, i64* %4
%13 = load i64, i64* %7
%14 = call i64 @scale8(i64 %12, i64 %13)
store i64 %14, i64* %8
%15 = load i64, i64* %5
%16 = load i64, i64* %8
%17 = add nsw i64 %16, %15
store i64 %17, i64* %8
%18 = load i64, i64* %8
ret i64 %18
}

LLVM IR (-O2):
define i64 @map8(i64 %0, i64 %1, i64 %2) {
%4 = sub nsw i64 %2, %1
%5 = tail call i64 @scale8(i64 %0, i64 %4)
%6 = add nsw i64 %5, %1
ret i64 %6
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
void ptrace_disable(struct task_struct *child) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @ptrace_disable(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void t2() {
  int a = 1;
  free(&a);
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @t2() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 @free(i32* %1)
ret void
}

LLVM IR (-O2):
define void @t2() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @free(i32* %1)
ret void
}
void zone_seqlock_init(struct zone *zone) {}


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

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

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

LLVM IR (-O2):
%struct.zone = type opaque
define void @zone_seqlock_init(%struct.zone* nocapture %0) {
ret void
}
/* Variables and functions */
char *av_malloc(int);
int /*<<< orphan*/ snprintf(char *, int, char *, double);
char *av_d2str(double d) {
  char *str = av_malloc(16);
  if (str)
    snprintf(str, 16, "%f", d);
  return str;
}


x86 assembly (clang, -O0):
<av_d2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x10,%edi
call   1030 <av_malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1160 <av_d2str+0x40>
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
mov    $0x10,%esi
lea    0xea5(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_d2str>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x10,%edi
call   1030 <av_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1157 <av_d2str+0x37>
lea    0xebc(%rip),%rdx
mov    %rbx,%rdi
mov    $0x10,%esi
movsd  0x8(%rsp),%xmm0
call   1040 <snprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i8* @av_d2str(double %0) {
%2 = alloca double
%3 = alloca i8*
store double %0, double* %2
%4 = call i8* @av_malloc(i32 16)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load double, double* %2
%10 = call i32 @snprintf(i8* %8, i32 16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %9)
br label %11
11: ; preds = %7, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i8* @av_d2str(double %0) {
%2 = tail call i8* @av_malloc(i32 16)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @snprintf(i8* %2, i32 16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
char *nsskip(char *p) {
  while (*p && !isspace(*p))
    p++;
  return p;
}


x86 assembly (clang, -O0):
<nsskip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <nsskip+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <nsskip+0x48>
jmp    1169 <nsskip+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <nsskip+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsskip>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <nsskip+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <nsskip+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <nsskip+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @nsskip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @isspace(i8 signext %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @nsskip(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int is_decreasing(int);
void is_decreasing_test(void) {
  assert(is_decreasing(66420));
  assert(!is_decreasing(66720));
}


x86 assembly (clang, -O0):
<is_decreasing_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10374,%edi
call   1040 <is_decreasing@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    $0x104a0,%edi
call   1040 <is_decreasing@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_decreasing_test>:
push   %rax
mov    $0x10374,%edi
call   1040 <is_decreasing@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    $0x104a0,%edi
call   1040 <is_decreasing@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @is_decreasing_test() {
%1 = call i32 @is_decreasing(i32 66420)
%2 = call i32 @assert(i32 %1)
%3 = call i32 @is_decreasing(i32 66720)
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret void
}

LLVM IR (-O2):
define void @is_decreasing_test() {
%1 = tail call i32 @is_decreasing(i32 66420)
%2 = tail call i32 @assert(i32 %1)
%3 = tail call i32 @is_decreasing(i32 66720)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srandom(unsigned long);
void xt_core_seed_random(unsigned long seed) { srandom(seed); }


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

x86 assembly (clang, -O2):
<xt_core_seed_random>:
jmp    1030 <srandom@plt>

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

LLVM IR (-O2):
define void @xt_core_seed_random(i64 %0) {
%2 = tail call i32 @srandom(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ beep();
void doBeep() { beep(); }


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

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

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

LLVM IR (-O2):
define void @doBeep() {
%1 = tail call i32 (...) @beep()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int counter = 1;
  do {
    printf("%d  ", counter);
  } while (++counter <= 10);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = icmp sle i32 %8, 10
br i1 %9, label %3, label %10
10: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 6)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 7)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 9)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
int do_016() { return 16; }


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

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

LLVM IR (-O0):
define i32 @do_016() {
ret i32 16
}

LLVM IR (-O2):
define i32 @do_016() {
ret i32 16
}
/* Variables and functions */
int /*<<< orphan*/ poe_islocateoption(char);
int poe_isnotlocateoption(char c) { return !poe_islocateoption(c); }


x86 assembly (clang, -O0):
<poe_isnotlocateoption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <poe_islocateoption@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @poe_isnotlocateoption(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @poe_islocateoption(i8 signext %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @poe_isnotlocateoption(i8 signext %0) {
%2 = tail call i32 @poe_islocateoption(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_syntax(void) {
  printf("  Syntax:\n\n"
         "    Compress    :  appack c <file> <packed_file>\n"
         "    Decompress  :  appack d <packed_file> <depacked_file>\n\n");
}


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

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

LLVM IR (-O0):
@.str = [120 x i8] c" Syntax:\0A\0A Compress : appack c <file> <packed_file>\0A Decompress : appack d <packed_file> <depacked_file>\0A\0A\00"
define void @show_syntax() {
%1 = call i32 @printf(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [119 x i8] c" Syntax:\0A\0A Compress : appack c <file> <packed_file>\0A Decompress : appack d <packed_file> <depacked_file>\0A\00"
define void @show_syntax() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([119 x i8], [119 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double asin(double);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double Arcseno(double a) {
  printf("Enter a number: ");
  scanf("%lf", &a);
  return (asin(a));
}


x86 assembly (clang, -O0):
<Arcseno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   1040 <asin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Arcseno>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1040 <asin@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Arcseno(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @asin(double %5)
ret double %6
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Arcseno(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @asin(double %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ DymosimErrorLev(char const *, int);
double DymosimError(const char *message) {
  DymosimErrorLev(message, 2);
  return 0;
}


x86 assembly (clang, -O0):
<DymosimError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <DymosimErrorLev@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DymosimError>:
push   %rax
mov    $0x2,%esi
call   1030 <DymosimErrorLev@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @DymosimError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @DymosimErrorLev(i8* %3, i32 2)
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @DymosimError(i8* %0) {
%2 = tail call i32 @DymosimErrorLev(i8* %0, i32 2)
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void irq_remap() {
  outb(0x20, 0x11);
  outb(0xA0, 0x11);
  outb(0x20 + 1, 0x20);
  outb(0xA0 + 1, 0x28);
  outb(0x20 + 1, 0x04);
  outb(0xA0 + 1, 0x02);
  outb(0x20 + 1, 0x01);
  outb(0xA0 + 1, 0x01);
  outb(0x20 + 1, 0x0);
  outb(0xA0 + 1, 0x0);
}


x86 assembly (clang, -O0):
<irq_remap>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_remap>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @irq_remap() {
%1 = call i32 @outb(i32 32, i32 17)
%2 = call i32 @outb(i32 160, i32 17)
%3 = call i32 @outb(i32 33, i32 32)
%4 = call i32 @outb(i32 161, i32 40)
%5 = call i32 @outb(i32 33, i32 4)
%6 = call i32 @outb(i32 161, i32 2)
%7 = call i32 @outb(i32 33, i32 1)
%8 = call i32 @outb(i32 161, i32 1)
%9 = call i32 @outb(i32 33, i32 0)
%10 = call i32 @outb(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @irq_remap() {
%1 = tail call i32 @outb(i32 32, i32 17)
%2 = tail call i32 @outb(i32 160, i32 17)
%3 = tail call i32 @outb(i32 33, i32 32)
%4 = tail call i32 @outb(i32 161, i32 40)
%5 = tail call i32 @outb(i32 33, i32 4)
%6 = tail call i32 @outb(i32 161, i32 2)
%7 = tail call i32 @outb(i32 33, i32 1)
%8 = tail call i32 @outb(i32 161, i32 1)
%9 = tail call i32 @outb(i32 33, i32 0)
%10 = tail call i32 @outb(i32 161, i32 0)
ret void
}
/* Variables and functions */
bool isNumber(char c) { return c - '0' >= 0 && c - '0' <= 9; }


x86 assembly (clang, -O0):
<isNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
sub    $0x30,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jl     112f <isNumber+0x2f>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cmp    $0x9,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumber>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isNumber(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
%11 = icmp sle i32 %10, 9
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @isNumber(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_exception_illegal();
void m68k_op_bkpt(void) {
  if (0) {
    ;
  }
  m68ki_exception_illegal();
}


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

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

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

LLVM IR (-O2):
define void @m68k_op_bkpt() {
%1 = tail call i32 (...) @m68ki_exception_illegal()
ret void
}
void foo165() {}


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

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

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

LLVM IR (-O2):
define void @foo165() {
ret void
}
int doubleImplicationValue(int x, int y) {
  if (x == 1 && y == 1) {
    return 1;
    ;
  } else if (x == 0 && y == 0) {
    return 1;
    ;
  } else
    return 0;
  ;
}


x86 assembly (clang, -O0):
<doubleImplicationValue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    112a <doubleImplicationValue+0x2a>
cmpl   $0x1,-0xc(%rbp)
jne    112a <doubleImplicationValue+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <doubleImplicationValue+0x51>
cmpl   $0x0,-0x8(%rbp)
jne    114a <doubleImplicationValue+0x4a>
cmpl   $0x0,-0xc(%rbp)
jne    114a <doubleImplicationValue+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <doubleImplicationValue+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubleImplicationValue>:
mov    %edi,%eax
xor    $0x1,%eax
mov    %esi,%ecx
xor    $0x1,%ecx
or     %eax,%ecx
sete   %al
or     %edi,%esi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @doubleImplicationValue(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
%4 = icmp eq i32 %1, 1
%5 = and i1 %3, %4
%6 = or i32 %1, %0
%7 = icmp eq i32 %6, 0
%8 = or i1 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
int ivec_all_0(int *v, long n) {
  while (n--)
    if (v[n] != 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<ivec_all_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1148 <ivec_all_0+0x48>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1143 <ivec_all_0+0x43>
movl   $0x0,-0x4(%rbp)
jmp    114f <ivec_all_0+0x4f>
jmp    110c <ivec_all_0+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivec_all_0>:
sub    $0x1,%rsi
jb     110f <ivec_all_0+0xf>
cmpl   $0x0,(%rdi,%rsi,4)
je     1100 <ivec_all_0>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ivec_all_0(i32* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %1, %2 ], [ %5, %7 ]
%5 = add nsw i64 %4, -1
%6 = icmp eq i64 %4, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds i32, i32* %0, i64 %5
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %3, label %11
11: ; preds = %3, %7
%12 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %12
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_empty(struct list_head *);
struct list_head *list_last(struct list_head *);
int /*<<< orphan*/ list_move_to_front(struct list_head *, struct list_head *);
void list_rotate_right(struct list_head *head) {
  struct list_head *last;
  if (!list_empty(head)) {
    last = list_last(head);
    list_move_to_front(last, head);
  }
}


x86 assembly (clang, -O0):
<list_rotate_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <list_empty@plt>
cmp    $0x0,%eax
jne    1168 <list_rotate_right+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <list_last@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <list_move_to_front@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_rotate_right>:
push   %rbx
mov    %rdi,%rbx
call   1050 <list_empty@plt>
test   %eax,%eax
je     113f <list_rotate_right+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <list_last@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <list_move_to_front@plt>

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

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_rotate_right(%struct.list_head* %0) {
%2 = tail call i32 @list_empty(%struct.list_head* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call %struct.list_head* @list_last(%struct.list_head* %0)
%6 = tail call i32 @list_move_to_front(%struct.list_head* %5, %struct.list_head* %0)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reader_writer();
int main(int argc, char *argv[]) {
  reader_writer();
  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 <reader_writer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <reader_writer@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 (...) @reader_writer()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @reader_writer()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear32(int, int);
int /*<<< orphan*/ set32(int, int);
int /*<<< orphan*/ udelay(int);
void PPCReset(void) {
  clear32((0xd800000 + 0x194), 0x30);
  udelay(15);
  set32((0xd800000 + 0x194), 0x20);
}


x86 assembly (clang, -O0):
<PPCReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd800194,%edi
mov    $0x30,%esi
call   1050 <clear32@plt>
mov    $0xf,%edi
call   1040 <udelay@plt>
mov    $0xd800194,%edi
mov    $0x20,%esi
call   1030 <set32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PPCReset>:
push   %rax
mov    $0xd800194,%edi
mov    $0x30,%esi
call   1050 <clear32@plt>
mov    $0xf,%edi
call   1040 <udelay@plt>
mov    $0xd800194,%edi
mov    $0x20,%esi
pop    %rax
jmp    1030 <set32@plt>

LLVM IR (-O0):
define void @PPCReset() {
%1 = call i32 @clear32(i32 226492820, i32 48)
%2 = call i32 @udelay(i32 15)
%3 = call i32 @set32(i32 226492820, i32 32)
ret void
}

LLVM IR (-O2):
define void @PPCReset() {
%1 = tail call i32 @clear32(i32 226492820, i32 48)
%2 = tail call i32 @udelay(i32 15)
%3 = tail call i32 @set32(i32 226492820, i32 32)
ret void
}
/* Variables and functions */
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(int, char *);
int main() {
  int len;
  char s[1000];
  while ((len = getline(s, 1000)) > 0) {
    reverse(len, s);
    printf("%s\n", s);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1186 <main+0x56>
mov    -0x8(%rbp),%edi
lea    -0x3f0(%rbp),%rsi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jle    1186 <main+0x56>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%edi
mov    %rbx,%rsi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @getline(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i32, i32* %2
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%11 = call i32 @reverse(i32 %9, i8* %10)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %3, %0 ]
%7 = call i32 @reverse(i32 %6, i8* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = call i32 @getline(i8* %2, i32 1000)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int uniformGenerator();
int getIntRandom(int maxValue) {
  double temp;
  int returnValue;
  temp = maxValue * uniformGenerator();
  returnValue = (int)temp;
  return (returnValue);
}


x86 assembly (clang, -O0):
<getIntRandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <uniformGenerator@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getIntRandom>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <uniformGenerator@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getIntRandom(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (...) @uniformGenerator()
%7 = mul nsw i32 %5, %6
%8 = sitofp i32 %7 to double
store double %8, double* %3
%9 = load double, double* %3
%10 = fptosi double %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @getIntRandom(i32 %0) {
%2 = tail call i32 (...) @uniformGenerator()
%3 = mul nsw i32 %2, %0
ret i32 %3
}
void script_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @script_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int gethostname(char *name, size_t len) {
  strcpy(name, "");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @gethostname(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @gethostname(i8* %0, i64 %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  while (1)
    printf("%d\n", getchar() != EOF);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
mov    %al,-0x5(%rbp)
movzbl %al,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
lea    0xece(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %esi,%esi
cmp    (%r14),%rax
setne  %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %2
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i64 0
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %1
}