xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ handle_USR1(int /*<<< orphan*/);
int gen_USR1() { handle_USR1(0); }


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

x86 assembly (clang, -O2):
<gen_USR1>:
xor    %edi,%edi
jmp    1030 <handle_USR1@plt>

LLVM IR (-O0):
define i32 @gen_USR1() {
%1 = alloca i32
%2 = call i32 @handle_USR1(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_USR1() {
%1 = tail call i32 @handle_USR1(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void display(char new_char, int new_num) {
  int i;
  for (i = 0; i < new_num; i++) {
    printf("%c\n", new_char);
  }
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1152 <display+0x42>
lea    0xec5(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <display+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    113f <display+0x2f>
mov    %esi,%ebx
movsbl %dil,%ebp
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <display+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define void @display(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
int test_imm_47uint8_mem(unsigned char *val) {
  return ((*val) & (-0x47 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_47uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -71
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Use left mouse button to place vertices.\n");
  printf("Press middle mouse button when done.\n");
  printf("Select tesselate from the pop-up menu.\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1e(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Use left mouse button to place vertices.\0A\00"
@.str.1 = [38 x i8] c"Press middle mouse button when done.\0A\00"
@.str.2 = [40 x i8] c"Select tesselate from the pop-up menu.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"Use left mouse button to place vertices.\00"
@str.3 = [37 x i8] c"Press middle mouse button when done.\00"
@str.4 = [39 x i8] c"Select tesselate from the pop-up menu.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.4, i64 0, i64 0))
ret void
}
void TIME_Enable(void) { (*((volatile unsigned long *)0xE0004004)) = 1; }


x86 assembly (clang, -O0):
<TIME_Enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0004004,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TIME_Enable>:
mov    $0xe0004004,%eax
movq   $0x1,(%rax)
ret

LLVM IR (-O0):
define void @TIME_Enable() {
store volatile i64 1, i64* inttoptr (i64 3758112772 to i64*)
ret void
}

LLVM IR (-O2):
define void @TIME_Enable() {
store volatile i64 1, i64* inttoptr (i64 3758112772 to i64*)
ret void
}
void print_memblock_summary(void) {}


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

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

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

LLVM IR (-O2):
define void @print_memblock_summary() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void ref() { foo(); }


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

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

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

LLVM IR (-O2):
define void @ref() {
%1 = tail call i32 (...) @foo()
ret void
}
int test_imm_B4int8_mem(signed char *val) {
  return ((*val) & (0xB4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B4int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -76
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void RTProcSetPriority(void) {}


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

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

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

LLVM IR (-O2):
define void @RTProcSetPriority() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ l_abort();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("in main:\n");
  l_abort();
  printf("after abort:\n");
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <l_abort@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <l_abort@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"in main:\0A\00"
@.str.1 = [14 x i8] c"after abort:\0A\00"
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 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @l_abort()
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"in main:\00"
@str.2 = [13 x i8] c"after abort:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @l_abort()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
double harmonic(double x, double y) { return x * x + y * y; }


x86 assembly (clang, -O0):
<harmonic>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<harmonic>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @harmonic(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* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
ret double %10
}

LLVM IR (-O2):
define double @harmonic(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
ret double %4
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tst_timeval_diff(struct timeval, struct timeval);
long long tst_timeval_to_us(int /*<<< orphan*/);
long long tst_timeval_diff_us(struct timeval t1, struct timeval t2) {
  return tst_timeval_to_us(tst_timeval_diff(t1, t2));
}


x86 assembly (clang, -O0):
<tst_timeval_diff_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <tst_timeval_diff@plt>
mov    %eax,%edi
call   1040 <tst_timeval_to_us@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_timeval_diff_us>:
push   %rax
call   1030 <tst_timeval_diff@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <tst_timeval_to_us@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i64 @tst_timeval_diff_us(i32 %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
store i32 %1, i32* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @tst_timeval_diff(i32 %8, i32 %10)
%12 = call i64 @tst_timeval_to_us(i32 %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @tst_timeval_diff_us(i32 %0, i32 %1) {
%3 = tail call i32 @tst_timeval_diff(i32 %0, i32 %1)
%4 = tail call i64 @tst_timeval_to_us(i32 %3)
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ advance_prop_addr(int /*<<< orphan*/);
scalar_t__ property_length(int /*<<< orphan*/);
uint16_t next_property(uint16_t propaddr) {
  propaddr += property_length(propaddr);
  return advance_prop_addr(propaddr);
}


x86 assembly (clang, -O0):
<next_property>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <property_length@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <advance_prop_addr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_property>:
push   %rbx
mov    %edi,%ebx
call   1040 <property_length@plt>
add    %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <advance_prop_addr@plt>

LLVM IR (-O0):
define i32 @next_property(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @property_length(i32 %3)
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = add nsw i64 %6, %4
%8 = trunc i64 %7 to i32
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @advance_prop_addr(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @next_property(i32 %0) {
%2 = tail call i64 @property_length(i32 %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, %0
%5 = tail call i32 @advance_prop_addr(i32 %4)
ret i32 %5
}
int log_printf(const char *format, ...) {
  ((format) = (format));
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @log_printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
store i8* %3, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @log_printf(i8* nocapture readnone %0, ...) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnge_ss(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmpnge_ss(__m128 __a, __m128 __b) {
  return _mm_cmpnge_ss(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpnge_ss>:
jmp    1030 <_mm_cmpnge_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpnge_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnge_ss(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int stat(char *, struct stat *);
int getFileSize(char *filename) {
  struct stat fileStat;
  int result = stat(filename, &fileStat);
  if (result != 0) {
    perror(filename);
    exit(1);
  }
  return fileStat.st_size;
}


x86 assembly (clang, -O0):
<getFileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1169 <getFileSize+0x39>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileSize>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <stat@plt>
test   %eax,%eax
jne    1150 <getFileSize+0x20>
mov    0x8(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @perror(i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%15 = load i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = tail call i32 @perror(i8* %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%11 = load i32, i32* %10
ret i32 %11
}
void *mymalloc(x)
long x;
{
  void *mem;
  mem = (void *)calloc(1, x);
  if (!mem)
    memerror();
  else
    return (void *)mem;
}


x86 assembly (clang, -O0):
<mymalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1155 <mymalloc+0x35>
mov    $0x0,%al
call   1040 <memerror@plt>
jmp    115d <mymalloc+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymalloc>:
push   %rbx
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113d <mymalloc+0x1d>
xor    %eax,%eax
call   1040 <memerror@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @mymalloc(i64 %0) {
%2 = tail call i8* @calloc(i64 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @memerror()
br label %6
6: ; preds = %1, %4
ret i8* %2
}
float getMin(float a, float b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<getMin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <getMin+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <getMin+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMin>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @getMin(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c;
  while (c = (getchar()) != EOF) {
    printf("%d", c);
  }
  printf("%d", c);
}


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
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x8(%rbp)
test   $0x1,%al
jne    115b <main+0x3b>
jmp    116f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
mov    -0x8(%rbp),%esi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%rax
je     1159 <main+0x39>
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea0(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i64 (...) @getchar()
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __USAX(uint32_t x, uint32_t y) {
  int32_t r, s;
  r = (((x << 16) >> 16) + ((y) >> 16)) & 0x0000FFFF;
  s = (((x) >> 16) - ((y << 16) >> 16)) & 0x0000FFFF;
  return ((s << 16) | (r));
}


x86 assembly (clang, -O0):
<__USAX>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%ecx
sar    $0x10,%ecx
add    %ecx,%eax
and    $0xffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
sar    $0x10,%ecx
sub    %ecx,%eax
and    $0xffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__USAX>:
mov    %esi,%eax
shr    $0x10,%eax
add    %edi,%eax
movzwl %ax,%eax
shl    $0x10,%esi
sub    %esi,%edi
and    $0xffff0000,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @__USAX(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
%7 = load i32, i32* %3
%8 = shl i32 %7, 16
%9 = ashr i32 %8, 16
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = add nsw i32 %9, %11
%13 = and i32 %12, 65535
store i32 %13, i32* %5
%14 = load i32, i32* %3
%15 = ashr i32 %14, 16
%16 = load i32, i32* %4
%17 = shl i32 %16, 16
%18 = ashr i32 %17, 16
%19 = sub nsw i32 %15, %18
%20 = and i32 %19, 65535
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = shl i32 %21, 16
%23 = load i32, i32* %5
%24 = or i32 %22, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @__USAX(i32 %0, i32 %1) {
%3 = lshr i32 %1, 16
%4 = add i32 %3, %0
%5 = and i32 %4, 65535
%6 = mul i32 %1, -65536
%7 = add i32 %6, %0
%8 = and i32 %7, -65536
%9 = or i32 %8, %5
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ISR_RS485_RX_Disable();
void ISR_RS485_RX_Stop(void) { ISR_RS485_RX_Disable(); }


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

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

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

LLVM IR (-O2):
define void @ISR_RS485_RX_Stop() {
%1 = tail call i32 (...) @ISR_RS485_RX_Disable()
ret void
}
double c5(float x, int y, int z) { return z ? x + x : y; }


x86 assembly (clang, -O0):
<c5>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     112d <c5+0x2d>
movss  -0x4(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1137 <c5+0x37>
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<c5>:
test   %esi,%esi
je     110d <c5+0xd>
addss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
ret
xorps  %xmm0,%xmm0
cvtsi2ss %edi,%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @c5(float %0, i32 %1, i32 %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
store float %0, float* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load float, float* %4
%11 = load float, float* %4
%12 = fadd float %10, %11
br label %16
13: ; preds = %3
%14 = load i32, i32* %5
%15 = sitofp i32 %14 to float
br label %16
16: ; preds = %13, %9
%17 = phi float [ %12, %9 ], [ %15, %13 ]
%18 = fpext float %17 to double
ret double %18
}

LLVM IR (-O2):
define double @c5(float %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = fadd float %0, %0
%6 = sitofp i32 %1 to float
%7 = select i1 %4, float %6, float %5
%8 = fpext float %7 to double
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ bdclose_raw();
void bdclose(void) { bdclose_raw(); }


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

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

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

LLVM IR (-O2):
define void @bdclose() {
%1 = tail call i32 (...) @bdclose_raw()
ret void
}
/* Type definitions */
struct forth_instance {
  int dummy;
};

/* Variables and functions */
intptr_t st_pop(struct forth_instance *);
int /*<<< orphan*/ st_push(struct forth_instance *, intptr_t);
void rshift(struct forth_instance *fi) {
  intptr_t tp;
  tp = st_pop(fi);
  st_push(fi, st_pop(fi) >> tp);
}


x86 assembly (clang, -O0):
<rshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <st_pop@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <st_pop@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
mov    -0x10(%rbp),%rcx
sar    %cl,%rsi
call   1040 <st_push@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rshift>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <st_pop@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <st_pop@plt>
mov    %r14d,%ecx
sar    %cl,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <st_push@plt>

LLVM IR (-O0):
%struct.forth_instance = type { i32 }
define void @rshift(%struct.forth_instance* %0) {
%2 = alloca %struct.forth_instance*
%3 = alloca i64
store %struct.forth_instance* %0, %struct.forth_instance** %2
%4 = load %struct.forth_instance*, %struct.forth_instance** %2
%5 = call i64 @st_pop(%struct.forth_instance* %4)
store i64 %5, i64* %3
%6 = load %struct.forth_instance*, %struct.forth_instance** %2
%7 = load %struct.forth_instance*, %struct.forth_instance** %2
%8 = call i64 @st_pop(%struct.forth_instance* %7)
%9 = load i64, i64* %3
%10 = ashr i64 %8, %9
%11 = call i32 @st_push(%struct.forth_instance* %6, i64 %10)
ret void
}

LLVM IR (-O2):
%struct.forth_instance = type { i32 }
define void @rshift(%struct.forth_instance* %0) {
%2 = tail call i64 @st_pop(%struct.forth_instance* %0)
%3 = tail call i64 @st_pop(%struct.forth_instance* %0)
%4 = ashr i64 %3, %2
%5 = tail call i32 @st_push(%struct.forth_instance* %0, i64 %4)
ret void
}
int test(long double x) { return __builtin_signbitl(x); }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
movzwl -0x8(%rbp),%eax
shr    $0xf,%rax
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movzwl 0x10(%rsp),%eax
shr    $0xf,%rax
ret

LLVM IR (-O0):
define i32 @test(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = bitcast x86_fp80 %3 to i80
%5 = icmp slt i80 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test(x86_fp80 %0) {
%2 = bitcast x86_fp80 %0 to i80
%3 = lshr i80 %2, 79
%4 = trunc i80 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  unsigned int x = 0;
  unsigned int y = 1;
  while (x < 6) {
    x++;
    y *= 2;
  }
  __VERIFIER_assert(y != 64);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
jae    114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x40,-0xc(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <__VERIFIER_assert@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
store i32 0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = mul i32 %10, 2
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 64
%15 = zext i1 %14 to i32
%16 = call i32 @__VERIFIER_assert(i32 %15)
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
void initDigitalInputPins(void) {}


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

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

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

LLVM IR (-O2):
define void @initDigitalInputPins() {
ret void
}
int clear() {
  int retval;
  __asm__("int $0x80      \n\t"
          "mov %%eax, %0"
          : "=m"(retval)
          : "a"(15)
          : "memory");
  return retval;
}


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

x86 assembly (clang, -O2):
<clear>:
mov    $0xf,%eax
int    $0x80
mov    %eax,-0x4(%rsp)
mov    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @clear() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* %1
ret i32 %3
}
void RAWToARGBRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @RAWToARGBRow_Any_NEON() {
ret void
}
void mock_tearDown(void) {}


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

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

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

LLVM IR (-O2):
define void @mock_tearDown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_abort();
int /*<<< orphan*/ pickmsg(int);
void op_pabort() {
  pickmsg(1);
  op_abort();
}


x86 assembly (clang, -O0):
<op_pabort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <pickmsg@plt>
mov    $0x0,%al
call   1040 <op_abort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_pabort>:
push   %rax
mov    $0x1,%edi
call   1030 <pickmsg@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_abort@plt>

LLVM IR (-O0):
define void @op_pabort() {
%1 = call i32 @pickmsg(i32 1)
%2 = call i32 (...) @op_abort()
ret void
}

LLVM IR (-O2):
define void @op_pabort() {
%1 = tail call i32 @pickmsg(i32 1)
%2 = tail call i32 (...) @op_abort()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_array_zip_iter_add();
int /*<<< orphan*/ test_array_zip_iter_next();
int /*<<< orphan*/ test_array_zip_iter_remove();
int /*<<< orphan*/ test_array_zip_iter_replace();
void test_array_zip_iter() {
  test_array_zip_iter_remove();
  test_array_zip_iter_add();
  test_array_zip_iter_next();
  test_array_zip_iter_replace();
}


x86 assembly (clang, -O0):
<test_array_zip_iter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_array_zip_iter_remove@plt>
mov    $0x0,%al
call   1050 <test_array_zip_iter_add@plt>
mov    $0x0,%al
call   1060 <test_array_zip_iter_next@plt>
mov    $0x0,%al
call   1040 <test_array_zip_iter_replace@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_array_zip_iter>:
push   %rax
xor    %eax,%eax
call   1030 <test_array_zip_iter_remove@plt>
xor    %eax,%eax
call   1050 <test_array_zip_iter_add@plt>
xor    %eax,%eax
call   1060 <test_array_zip_iter_next@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_array_zip_iter_replace@plt>

LLVM IR (-O0):
define void @test_array_zip_iter() {
%1 = call i32 (...) @test_array_zip_iter_remove()
%2 = call i32 (...) @test_array_zip_iter_add()
%3 = call i32 (...) @test_array_zip_iter_next()
%4 = call i32 (...) @test_array_zip_iter_replace()
ret void
}

LLVM IR (-O2):
define void @test_array_zip_iter() {
%1 = tail call i32 (...) @test_array_zip_iter_remove()
%2 = tail call i32 (...) @test_array_zip_iter_add()
%3 = tail call i32 (...) @test_array_zip_iter_next()
%4 = tail call i32 (...) @test_array_zip_iter_replace()
ret void
}
unsigned xrop3_44_1_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;
  unsigned stk3;
  stk3 = D | S;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_44_1_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    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_44_1_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
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = or i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %7
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %6
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = xor i32 %33, -1
%35 = and i32 %32, %34
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = and i32 %36, %37
%39 = or i32 %35, %38
ret i32 %39
}

LLVM IR (-O2):
define i32 @xrop3_44_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %3, 255
%7 = and i32 %6, %5
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
double exp(double);
double futhark_exp64(double x) { return exp(x); }


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

x86 assembly (clang, -O2):
<futhark_exp64>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define double @futhark_exp64(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
/* Variables and functions */
void *malloc(int);
void *int_3add(void *a0, void *a1, void *a2) {
  void *ret = malloc(sizeof(int));
  *((int *)ret) = *((int *)a0) + *((int *)a1) + *((int *)a2);
  return ret;
}


x86 assembly (clang, -O0):
<int_3add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    -0x18(%rbp),%rax
add    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_3add>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    (%rbx),%ecx
add    (%r15),%ecx
add    (%r14),%ecx
mov    %ecx,(%rax)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @int_3add(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = call i8* @malloc(i32 4)
store i8* %8, i8** %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = add nsw i32 %11, %14
%16 = load i8*, i8** %6
%17 = bitcast i8* %16 to i32*
%18 = load i32, i32* %17
%19 = add nsw i32 %15, %18
%20 = load i8*, i8** %7
%21 = bitcast i8* %20 to i32*
store i32 %19, i32* %21
%22 = load i8*, i8** %7
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @int_3add(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = bitcast i8* %1 to i32*
%8 = load i32, i32* %7
%9 = add nsw i32 %8, %6
%10 = bitcast i8* %2 to i32*
%11 = load i32, i32* %10
%12 = add nsw i32 %9, %11
%13 = bitcast i8* %4 to i32*
store i32 %12, i32* %13
ret i8* %4
}
/* Variables and functions */
scalar_t__ isrealf(float const);
scalar_t__ iszerof(float const);
int flt_iszero(const float x) { return (isrealf(x) && iszerof(x)); }


x86 assembly (clang, -O0):
<flt_iszero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <isrealf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     115d <flt_iszero+0x3d>
movss  -0x4(%rbp),%xmm0
call   1030 <iszerof@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flt_iszero>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1040 <isrealf@plt>
test   %rax,%rax
je     1149 <flt_iszero+0x29>
movss  0x4(%rsp),%xmm0
call   1030 <iszerof@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @flt_iszero(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @isrealf(float %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load float, float* %2
%8 = call i64 @iszerof(float %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @flt_iszero(float %0) {
%2 = tail call i64 @isrealf(float %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @iszerof(float %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int access(int);
int /*<<< orphan*/ assertTrue(char *, int);
void test_long_index() {
  assertTrue("access(2) == 102", access(2) == 102);
  ;
}


x86 assembly (clang, -O0):
<test_long_index>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <access@plt>
cmp    $0x66,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xec0(%rip),%rdi
call   1030 <assertTrue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_long_index>:
push   %rax
mov    $0x2,%edi
call   1040 <access@plt>
xor    %esi,%esi
cmp    $0x66,%eax
sete   %sil
lea    0xec5(%rip),%rdi
pop    %rax
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"access(2) == 102\00"
define void @test_long_index() {
%1 = call i32 @access(i32 2)
%2 = icmp eq i32 %1, 102
%3 = zext i1 %2 to i32
%4 = call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"access(2) == 102\00"
define void @test_long_index() {
%1 = tail call i32 @access(i32 2)
%2 = icmp eq i32 %1, 102
%3 = zext i1 %2 to i32
%4 = tail call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ motion_params(char *, char *, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 3) {
    printf("Not enough arguments \n");
    return 1;
  }
  motion_params(argv[1], argv[2], 180);
  return EXIT_SUCCESS;
}


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)
cmpl   $0x3,-0x8(%rbp)
jge    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    117e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    $0xb4,%edx
call   1040 <motion_params@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jg     1139 <main+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
mov    $0xb4,%edx
call   1040 <motion_params@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Not enough arguments \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %19
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @motion_params(i8* %13, i8* %16, i32 180)
%18 = load i32, i32* @EXIT_SUCCESS
store i32 %18, i32* %3
br label %19
19: ; preds = %10, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [22 x i8] c"Not enough arguments \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %13
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @motion_params(i8* %8, i8* %10, i32 180)
%12 = load i32, i32* @EXIT_SUCCESS
br label %13
13: ; preds = %6, %4
%14 = phi i32 [ 1, %4 ], [ %12, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void output(int result) {
  printf("Factorial  = %d\n", result);
  return;
}


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

x86 assembly (clang, -O2):
<output>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"Factorial = %d\0A\00"
define void @output(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}