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

/* Variables and functions */
int /*<<< orphan*/ attr_get(int /*<<< orphan*/ *, short *,
                            int /*<<< orphan*/ *);
short CSLP_GetCurrentPair() {
  short pair;
  attr_t attr;
  attr_get(&attr, &pair, NULL);
  return pair;
}


x86 assembly (clang, -O0):
<CSLP_GetCurrentPair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
lea    -0x2(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <attr_get@plt>
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSLP_GetCurrentPair>:
push   %rax
lea    0x4(%rsp),%rdi
lea    0x2(%rsp),%rsi
xor    %edx,%edx
call   1030 <attr_get@plt>
movzwl 0x2(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @CSLP_GetCurrentPair() {
%1 = alloca i16
%2 = alloca i32
%3 = call i32 @attr_get(i32* %2, i16* %1, i32* null)
%4 = load i16, i16* %1
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @CSLP_GetCurrentPair() {
%1 = alloca i16
%2 = alloca i32
%3 = bitcast i16* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @attr_get(i32* %2, i16* %1, i32* null)
%6 = load i16, i16* %1
ret i16 %6
}
extern int link(char *old, char *new) {
  (void)old;
  (void)new;
  return -1;
}


x86 assembly (clang, -O0):
<link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fs_univ_emptytrash(int /*<<< orphan*/, int,
                                      int /*<<< orphan*/, int /*<<< orphan*/);
uint8_t fs_mr_emptytrash(uint32_t ts, uint32_t freeinodes,
                         uint32_t sustainedinodes) {
  return fs_univ_emptytrash(ts, 0x80, freeinodes, sustainedinodes);
}


x86 assembly (clang, -O0):
<fs_mr_emptytrash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x80,%esi
call   1030 <fs_univ_emptytrash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_mr_emptytrash>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x80,%esi
jmp    1030 <fs_univ_emptytrash@plt>

LLVM IR (-O0):
define i32 @fs_mr_emptytrash(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @fs_univ_emptytrash(i32 %7, i32 128, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @fs_mr_emptytrash(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @fs_univ_emptytrash(i32 %0, i32 128, i32 %1, i32 %2)
ret i32 %4
}
void freeparamsinitgrid() {}


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

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

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

LLVM IR (-O2):
define void @freeparamsinitgrid() {
ret void
}
/* Variables and functions */
double standardNormalVar();
double normal8var(void) { return standardNormalVar() + 8; }


x86 assembly (clang, -O0):
<normal8var>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <standardNormalVar@plt>
movsd  0xedd(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<normal8var>:
push   %rax
xor    %eax,%eax
call   1030 <standardNormalVar@plt>
addsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @normal8var() {
%1 = call double (...) @standardNormalVar()
%2 = fadd double %1, 8.000000e+00
ret double %2
}

LLVM IR (-O2):
define double @normal8var() {
%1 = tail call double (...) @standardNormalVar()
%2 = fadd double %1, 8.000000e+00
ret double %2
}
unsigned rcb_fast_circular_shift_right(unsigned val, unsigned count) {
  count %= sizeof(unsigned) * 8;
  return (val << (sizeof(unsigned) * 8) - count) | (val >> count);
}


x86 assembly (clang, -O0):
<rcb_fast_circular_shift_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x20,%ecx
sub    %rdx,%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcb_fast_circular_shift_right>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rcb_fast_circular_shift_right(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = zext i32 %5 to i64
%7 = urem i64 %6, 32
%8 = trunc i64 %7 to i32
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = sub i64 32, %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %9, %13
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = lshr i32 %15, %16
%18 = or i32 %14, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @rcb_fast_circular_shift_right(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshr.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ implicitUnsignedTruncation(int);
int main(int argc, char **argv) { return !implicitUnsignedTruncation(-1); }


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    $0xffffffff,%edi
call   1030 <implicitUnsignedTruncation@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):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <implicitUnsignedTruncation@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%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 @implicitUnsignedTruncation(i32 -1)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @implicitUnsignedTruncation(i32 -1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char *strchr(char *, char);
void CountTerms(char *exp_minterms, unsigned int *cMinterms) {
  char *ptr = strchr(exp_minterms, ',');
  for (*cMinterms = 1; ptr != NULL; (*cMinterms)++)
    ptr = strchr(ptr + 1, ',');
}


x86 assembly (clang, -O0):
<CountTerms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     116d <CountTerms+0x5d>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    113c <CountTerms+0x2c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountTerms>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    $0x2c,%esi
call   1030 <strchr@plt>
movl   $0x1,(%rbx)
test   %rax,%rax
je     114b <CountTerms+0x3b>
mov    $0x2,%ebp
add    $0x1,%rax
mov    %rax,%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
mov    %ebp,(%rbx)
add    $0x1,%ebp
test   %rax,%rax
jne    1130 <CountTerms+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @CountTerms(i8* %0, i32* nocapture %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 44)
store i32 1, i32* %1
%4 = icmp eq i8* %3, null
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %3, %2 ]
%7 = phi i32 [ %10, %5 ], [ 1, %2 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i8* @strchr(i8* %8, i8 signext 44)
%10 = add i32 %7, 1
store i32 %10, i32* %1
%11 = icmp eq i8* %9, null
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
int errno;
void set_err(int number) { errno = number + 256; }


x86 assembly (clang, -O0):
<set_err>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x100,%ecx
mov    0x2ec9(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_err>:
add    $0x100,%edi
mov    0x2ed3(%rip),%rax
mov    %edi,(%rax)
ret

LLVM IR (-O0):
@errno = global i32 0
define void @set_err(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 256
store i32 %4, i32* @errno
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @set_err(i32 %0) {
%2 = add nsw i32 %0, 256
store i32 %2, i32* @errno
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ root;
};
typedef TYPE_1__ XKeyEvent;

/* Variables and functions */
unsigned long get_XKeyEvent_root(void *_p) {
  return (unsigned long)((XKeyEvent *)_p)->root;
}


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

x86 assembly (clang, -O2):
<get_XKeyEvent_root>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XKeyEvent_root(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XKeyEvent_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;

/* Variables and functions */
u_int8_t isakmp_spi_size(u_int8_t proto) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isakmp_spi_size(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ quit(int /*<<< orphan*/);
void terminate() { quit(0); }


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <quit@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @terminate() {
%1 = call i32 @quit(i32 0)
ret void
}

LLVM IR (-O2):
define void @terminate() {
%1 = tail call i32 @quit(i32 0)
ret void
}
void pollen_interfaces_Led_toggle__E() {}


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

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

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

LLVM IR (-O2):
define void @pollen_interfaces_Led_toggle__E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pwm_read(char *, char *, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int pwm_get_polarity(char *pwm_key, int *polarity) {
  if (pwm_key == NULL)
    return -1;
  char value[64];
  pwm_read(pwm_key, "polarity", value, 64);
  sscanf(value, "%d", polarity);
  return 0;
}


x86 assembly (clang, -O0):
<pwm_get_polarity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <pwm_get_polarity+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <pwm_get_polarity+0x5b>
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xeaa(%rip),%rsi
mov    $0x40,%ecx
call   1040 <pwm_read@plt>
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe9a(%rip),%rsi
call   1030 <sscanf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwm_get_polarity>:
test   %rdi,%rdi
je     1162 <pwm_get_polarity+0x42>
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbx
lea    0xeca(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdx
mov    $0x40,%ecx
call   1040 <pwm_read@plt>
lea    0xebc(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <sscanf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"polarity\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @pwm_get_polarity(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca [64 x i8]
store i8* %0, i8** %4
store i32* %1, i32** %5
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %17
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%13 = call i32 @pwm_read(i8* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %12, i32 64)
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%15 = load i32*, i32** %5
%16 = call i32 @sscanf(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
store i32 0, i32* %3
br label %17
17: ; preds = %10, %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [9 x i8] c"polarity\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @pwm_get_polarity(i8* %0, i32* %1) {
%3 = alloca [64 x i8]
%4 = icmp eq i8* %0, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%7 = call i32 @pwm_read(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6, i32 64)
%8 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %10
}
__attribute__((always_)) void inc_syscr(struct task_struct *tsk) {}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
define void @inc_syscr(%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 opaque
define void @inc_syscr(%struct.task_struct* nocapture %0) {
ret void
}
int NotOver(int Val) {
  if (Val > 127) {
    return 127;
  } else if (Val < -127) {
    return -127;
  } else {
    return Val;
  }
}


x86 assembly (clang, -O0):
<NotOver>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jle    111d <NotOver+0x1d>
movl   $0x7f,-0x4(%rbp)
jmp    1139 <NotOver+0x39>
cmpl   $0xffffff81,-0x8(%rbp)
jge    1133 <NotOver+0x33>
movl   $0xffffff81,-0x4(%rbp)
jmp    1139 <NotOver+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NotOver>:
cmp    $0xffffff82,%edi
mov    $0xffffff81,%ecx
cmovge %edi,%ecx
cmp    $0x7f,%ecx
mov    $0x7f,%eax
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @NotOver(i32 %0) {
%2 = icmp sgt i32 %0, -127
%3 = select i1 %2, i32 %0, i32 -127
%4 = icmp slt i32 %3, 127
%5 = select i1 %4, i32 %3, i32 127
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
int main() {
  int i;
  char c;
  for (i = 0; i <= 255; i++) {
    printf("'%c'=#%d\n", c = i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1159 <main+0x49>
mov    -0x8(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
movsbl %bl,%esi
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"'%c'=#%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %3, i32 %2)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 256
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
int cmp_uint_des(const void *x, const void *y) {
  if (*(unsigned int *)x > *(unsigned int *)y) {
    return -1;
  } else if (*(unsigned int *)x < *(unsigned int *)y) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmp_uint_des>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jbe    112a <cmp_uint_des+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <cmp_uint_des+0x54>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jae    1148 <cmp_uint_des+0x48>
movl   $0x1,-0x4(%rbp)
jmp    1154 <cmp_uint_des+0x54>
jmp    114d <cmp_uint_des+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_uint_des>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setb   %cl
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_uint_des(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp ugt i32 %4, %6
%8 = icmp ult i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int rand();
int newrand(int top) {
  return (int)(((rand() & 0x7fff) / ((float)0x7fff)) * top);
}


x86 assembly (clang, -O0):
<newrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
and    $0x7fff,%eax
cvtsi2ss %eax,%xmm0
movss  0xecd(%rip),%xmm1
divss  %xmm1,%xmm0
cvtsi2ssl -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newrand>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
and    $0x7fff,%eax
cvtsi2ss %eax,%xmm0
divss  0xed5(%rip),%xmm0
cvtsi2ss %ebx,%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @newrand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = and i32 %3, 32767
%5 = sitofp i32 %4 to float
%6 = fdiv float %5, 3.276700e+04
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to float
%9 = fmul float %6, %8
%10 = fptosi float %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @newrand(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = and i32 %2, 32767
%4 = sitofp i32 %3 to float
%5 = fdiv float %4, 3.276700e+04
%6 = sitofp i32 %0 to float
%7 = fmul float %5, %6
%8 = fptosi float %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ print_string(char *);
int /*<<< orphan*/ stop();
void _start() {
  print_string("Hello world!\n");
  stop();
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <print_string@plt>
mov    $0x0,%al
call   1030 <stop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <print_string@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <stop@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
define void @_start() {
%1 = call i32 @print_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @stop()
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello world!\0A\00"
define void @_start() {
%1 = tail call i32 @print_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @stop()
ret void
}
void delay(void) {
  long x;
  for (x = 0; x < 150000; x++)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
cmpq   $0x249f0,-0x8(%rbp)
jge    1130 <delay+0x30>
jmp    111f <delay+0x1f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <delay+0xc>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delay() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printVersion() {
  printf("Userspace Tunnel with buildin Firewall ver. %s\nThis programm will "
         "be distributed unter GPL2.0\n\n",
         "0.3-20110605");
}


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

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

LLVM IR (-O0):
@.str = [96 x i8] c"Userspace Tunnel with buildin Firewall ver. %s\0AThis programm will be distributed unter GPL2.0\0A\0A\00"
@.str.1 = [13 x i8] c"0.3-20110605\00"
define void @printVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [96 x i8] c"Userspace Tunnel with buildin Firewall ver. %s\0AThis programm will be distributed unter GPL2.0\0A\0A\00"
@.str.1 = [13 x i8] c"0.3-20110605\00"
define void @printVersion() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(char *);
void print_emerg(char *str) { __console_tx_string(str); }


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

x86 assembly (clang, -O2):
<print_emerg>:
jmp    1030 <__console_tx_string@plt>

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

LLVM IR (-O2):
define void @print_emerg(i8* %0) {
%2 = tail call i32 @__console_tx_string(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void init() { puts("Init Module..\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Init Module..\0A\00"
define void @init() {
%1 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Init Module..\0A\00"
define void @init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main_program() { printf("You reach the secret stuff!!"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"You reach the secret stuff!!\00"
define void @main_program() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"You reach the secret stuff!!\00"
define void @main_program() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t be32dec(const void *pp) {
  uint8_t const *p = (uint8_t const *)pp;
  return (((unsigned)p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
}


x86 assembly (clang, -O0):
<be32dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32dec>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @be32dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = shl i32 %8, 24
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = shl i32 %12, 16
%14 = or i32 %9, %13
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 2
%17 = load i32, i32* %16
%18 = shl i32 %17, 8
%19 = or i32 %14, %18
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = load i32, i32* %21
%23 = or i32 %19, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @be32dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 8
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 12
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = or i32 %14, %17
ret i32 %18
}
char *bam_aux2Z(const unsigned char *s) {
  int type = *s++;
  if (s == 0)
    return 0;
  if ((type == 'Z') || (type == 'H'))
    return (char *)s;
  else
    return 0;
}


x86 assembly (clang, -O0):
<bam_aux2Z>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1135 <bam_aux2Z+0x35>
movq   $0x0,-0x8(%rbp)
jmp    115e <bam_aux2Z+0x5e>
cmpl   $0x5a,-0x14(%rbp)
je     1149 <bam_aux2Z+0x49>
cmpl   $0x48,-0x14(%rbp)
jne    1156 <bam_aux2Z+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <bam_aux2Z+0x5e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bam_aux2Z>:
mov    (%rdi),%cl
lea    0x1(%rdi),%rdx
xor    %eax,%eax
cmp    $0x48,%cl
cmove  %rdx,%rax
cmp    $0x5a,%cl
cmove  %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @bam_aux2Z(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 90
%5 = icmp eq i8 %3, 72
%6 = or i1 %4, %5
%7 = select i1 %6, i8* %2, i8* null
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ bgnpolygon();
void bgnpol_() { bgnpolygon(); }


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

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

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

LLVM IR (-O2):
define void @bgnpol_() {
%1 = tail call i32 (...) @bgnpolygon()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void adafree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<adafree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @adafree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_XCore(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_XCore() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fun();
int /*<<< orphan*/ printf(char *);
int main() {
  fun();
  printf("next\n");
  fun();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fun@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <fun@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"next\0A\00"
define i32 @main() {
%1 = call i32 (...) @fun()
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @fun()
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"next\00"
define i32 @main() {
%1 = tail call i32 (...) @fun()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @fun()
ret i32 0
}
int stress_thrash_start(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @stress_thrash_start() {
ret i32 0
}
int dlz_version(unsigned int *flags) {
  (void)(flags);
  return (3);
}


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

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

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

LLVM IR (-O2):
define i32 @dlz_version(i32* nocapture readnone %0) {
ret i32 3
}
int main() { return sizeof(signed char); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
void proceed(void (*drawscreen)(void)) {}


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

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

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

LLVM IR (-O2):
define void @proceed(void ()* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_CIPHER_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) {
  if (ctx == NULL)
    return;
  EVP_CIPHER_CTX_cleanup(ctx);
  free(ctx);
}


x86 assembly (clang, -O0):
<EVP_CIPHER_CTX_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <EVP_CIPHER_CTX_free+0x1c>
jmp    114e <EVP_CIPHER_CTX_free+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <EVP_CIPHER_CTX_cleanup@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_CIPHER_CTX_free>:
test   %rdi,%rdi
je     1137 <EVP_CIPHER_CTX_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <EVP_CIPHER_CTX_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @EVP_CIPHER_CTX_cleanup(i32* %0)
%5 = tail call i32 @free(i32* %0)
br label %6
6: ; preds = %1, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void DestroyDestTemp(FILE *outfile) { fprintf(outfile, "}\n"); }


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

x86 assembly (clang, -O2):
<DestroyDestTemp>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"}\0A\00"
define void @DestroyDestTemp(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 2, i64 1, i32* %0)
ret void
}
extern float load_atomic_float(const float *loc) {
  const int *p = (const int *)loc;
  int val = __atomic_load_n(p, 2);
  void *pp1 = (void *)&val;
  const float *pp2 = (const float *)pp1;
  return *pp2;
}


x86 assembly (clang, -O0):
<load_atomic_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_atomic_float>:
movss  (%rdi),%xmm0
ret

LLVM IR (-O0):
define float @load_atomic_float(float* %0) {
%2 = alloca float*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca float*
store float* %0, float** %2
%8 = load float*, float** %2
%9 = bitcast float* %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = load atomic i32, i32* %10 acquire
store i32 %11, i32* %5
%12 = load i32, i32* %5
store i32 %12, i32* %4
%13 = bitcast i32* %4 to i8*
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = bitcast i8* %14 to float*
store float* %15, float** %7
%16 = load float*, float** %7
%17 = load float, float* %16
ret float %17
}

LLVM IR (-O2):
define float @load_atomic_float(float* nocapture %0) {
%2 = bitcast float* %0 to i32*
%3 = load atomic i32, i32* %2 acquire
%4 = bitcast i32 %3 to float
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
size_t pwrite64(int, void *, size_t, int /*<<< orphan*/);
size_t __libc_pwrite(int fd, void *buf, size_t count, off_t offset) {
  return pwrite64(fd, buf, count, offset);
}


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

x86 assembly (clang, -O2):
<__libc_pwrite>:
jmp    1030 <pwrite64@plt>

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

LLVM IR (-O2):
define i64 @__libc_pwrite(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i64 @pwrite64(i32 %0, i8* %1, i64 %2, i32 %3)
ret i64 %5
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  int z;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  while (x > y + z) {
    y = y + 1;
    z = z + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jle    1165 <main+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hal_delay(int);
int /*<<< orphan*/ hal_usr_led_toggle(int);
void main() {
  while (1) {
    hal_usr_led_toggle(1);
    hal_delay(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <main+0x9>
mov    $0x1,%edi
call   1040 <hal_usr_led_toggle@plt>
mov    $0x1,%edi
call   1030 <hal_delay@plt>
jmp    1129 <main+0x9>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <hal_usr_led_toggle@plt>
mov    $0x1,%edi
call   1030 <hal_delay@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @hal_usr_led_toggle(i32 1)
%3 = call i32 @hal_delay(i32 1)
br label %1
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @hal_usr_led_toggle(i32 1)
%3 = tail call i32 @hal_delay(i32 1)
br label %1
}
/* Variables and functions */
bool isLowercase(char c) { return c >= 97 && c <= 122; }


x86 assembly (clang, -O0):
<isLowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <isLowercase+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLowercase>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isLowercase(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
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 @isLowercase(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
short int kernel__Float___62d(double self, double p0) {
  short int var;
  short int var1;
  var1 = self > p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Float___62d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %ax,-0x14(%rbp)
mov    -0x14(%rbp),%ax
mov    %ax,-0x12(%rbp)
movswl -0x12(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Float___62d>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret

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

LLVM IR (-O2):
define signext i16 @kernel__Float___62d(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = zext i1 %3 to i16
ret i16 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef long long FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(long long *);
int read_int64_from_file(long long *, int /*<<< orphan*/ *);
int read_long_long_int_from_file(FILE *f, long long *num) {
  assert(f);
  assert(num);
  return read_int64_from_file(f, (int64_t *)num);
}


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

x86 assembly (clang, -O2):
<read_long_long_int_from_file>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %r14,%rdi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <read_int64_from_file@plt>

LLVM IR (-O0):
define i32 @read_long_long_int_from_file(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = call i32 @assert(i64* %5)
%7 = load i64*, i64** %4
%8 = call i32 @assert(i64* %7)
%9 = load i64*, i64** %3
%10 = load i64*, i64** %4
%11 = bitcast i64* %10 to i32*
%12 = call i32 @read_int64_from_file(i64* %9, i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_long_long_int_from_file(i64* %0, i64* %1) {
%3 = tail call i32 @assert(i64* %0)
%4 = tail call i32 @assert(i64* %1)
%5 = bitcast i64* %1 to i32*
%6 = tail call i32 @read_int64_from_file(i64* %0, i32* %5)
ret i32 %6
}