xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ foo(char *, char *, int, char *);
int main(int argc, char *argv[]) { foo("%s,%d,%s", "hello", 4, "world!"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
lea    0xedc(%rip),%rsi
mov    $0x4,%edx
lea    0xed6(%rip),%rcx
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"%s,%d,%s\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [7 x i8] c"world!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @foo(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s,%d,%s\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [7 x i8] c"world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ one();
int main() { one(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @one()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @one()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int kidfunc(void *arg) {
  fprintf(stderr, "child\n");
  sleep(5);
  fprintf(stderr, "child done\n");
}


x86 assembly (clang, -O0):
<kidfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kidfunc>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
mov    (%rbx),%edi
lea    0xebe(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"child\0A\00"
@.str.1 = [12 x i8] c"child done\0A\00"
define i32 @kidfunc(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @sleep(i32 5)
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"child\0A\00"
@.str.1 = [12 x i8] c"child done\0A\00"
define i32 @kidfunc(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 5)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ isless(long double, long double);
void uninitvar_isless(void) {
  float f1, f2;
  (void)isless(f1, f2);
  double d1, d2;
  (void)isless(d1, d2);
  long double ld1, ld2;
  (void)isless(ld1, ld2);
}


x86 assembly (clang, -O0):
<uninitvar_isless>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
flds   -0x4(%rbp)
flds   -0x8(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <isless@plt>
fldl   -0x10(%rbp)
fldl   -0x18(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <isless@plt>
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <isless@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_isless>:
sub    $0x28,%rsp
call   1030 <isless@plt>
call   1030 <isless@plt>
call   1030 <isless@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_isless() {
%1 = alloca float
%2 = alloca float
%3 = alloca double
%4 = alloca double
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = load float, float* %1
%8 = fpext float %7 to x86_fp80
%9 = load float, float* %2
%10 = fpext float %9 to x86_fp80
%11 = call i32 @isless(x86_fp80 %8, x86_fp80 %10)
%12 = load double, double* %3
%13 = fpext double %12 to x86_fp80
%14 = load double, double* %4
%15 = fpext double %14 to x86_fp80
%16 = call i32 @isless(x86_fp80 %13, x86_fp80 %15)
%17 = load x86_fp80, x86_fp80* %5
%18 = load x86_fp80, x86_fp80* %6
%19 = call i32 @isless(x86_fp80 %17, x86_fp80 %18)
ret void
}

LLVM IR (-O2):
define void @uninitvar_isless() {
%1 = tail call i32 @isless(x86_fp80 undef, x86_fp80 undef)
%2 = tail call i32 @isless(x86_fp80 undef, x86_fp80 undef)
%3 = tail call i32 @isless(x86_fp80 undef, x86_fp80 undef)
ret void
}
void initialisePlatform() {}


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

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

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

LLVM IR (-O2):
define void @initialisePlatform() {
ret void
}
/* Type definitions */
struct device {
  int dummy;
};

/* Variables and functions */
int _dev_close(struct device *, int);
int dev_close_immediate(struct device *dev) { return _dev_close(dev, 1); }


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

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

LLVM IR (-O0):
%struct.device = type { i32 }
define i32 @dev_close_immediate(%struct.device* %0) {
%2 = alloca %struct.device*
store %struct.device* %0, %struct.device** %2
%3 = load %struct.device*, %struct.device** %2
%4 = call i32 @_dev_close(%struct.device* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.device = type { i32 }
define i32 @dev_close_immediate(%struct.device* %0) {
%2 = tail call i32 @_dev_close(%struct.device* %0, i32 1)
ret i32 %2
}
__attribute__((always_)) void optnone3() {}


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

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

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

LLVM IR (-O2):
define void @optnone3() {
ret void
}
void RTLogGroupSettings(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLogGroupSettings() {
ret void
}
int f(int j) { return j + sizeof(j); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = add i64 %4, 4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add i32 %0, 4
ret i32 %2
}
void vifm_try_leave(int write_info, int cquit, int force) {}


x86 assembly (clang, -O0):
<vifm_try_leave>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vifm_try_leave(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
ret void
}

LLVM IR (-O2):
define void @vifm_try_leave(i32 %0, i32 %1, i32 %2) {
ret void
}
int ft_isascii(char c) { return (!(c <= 0 && c >= 127)); }


x86 assembly (clang, -O0):
<ft_isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jg     1129 <ft_isascii+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7f,%eax
setge  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ft_isascii(i8 signext %0) {
ret i32 1
}
/* Variables and functions */
long double erfc(double);
long double erfcl(long double x) { return erfc((double)x); }


x86 assembly (clang, -O0):
<erfcl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <erfc@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfcl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <erfc@plt>

LLVM IR (-O0):
define x86_fp80 @erfcl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @erfc(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @erfcl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @erfc(double %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assume(int);
void __VERIFIER_atomic_acquire(int *m) {
  __VERIFIER_assume(*m == 0);
  *m = 1;
}


x86 assembly (clang, -O0):
<__VERIFIER_atomic_acquire>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assume@plt>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_atomic_acquire>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmpl   $0x0,(%rbx)
sete   %dil
call   1030 <__VERIFIER_assume@plt>
movl   $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__VERIFIER_atomic_acquire(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @__VERIFIER_assume(i32 %6)
%8 = load i32*, i32** %2
store i32 1, i32* %8
ret void
}

LLVM IR (-O2):
define void @__VERIFIER_atomic_acquire(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @__VERIFIER_assume(i32 %4)
store i32 1, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ code;

/* Variables and functions */
int /*<<< orphan*/ __console_write(char const *, int);
void console_bold() {
  static const char code[] = {0x1b, '[', '0', '1', 'm'};
  __console_write(code, sizeof(code));
}


x86 assembly (clang, -O0):
<console_bold>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x5,%esi
call   1030 <__console_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_bold>:
lea    0xee9(%rip),%rdi
mov    $0x5,%esi
jmp    1030 <__console_write@plt>

LLVM IR (-O0):
@console_bold.code = internal constant [5 x i8] c"\1B[01m"
define void @console_bold() {
%1 = call i32 @__console_write(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @console_bold.code, i64 0, i64 0), i32 5)
ret void
}

LLVM IR (-O2):
@console_bold.code = internal constant [5 x i8] c"\1B[01m"
define void @console_bold() {
%1 = tail call i32 @__console_write(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @console_bold.code, i64 0, i64 0), i32 5)
ret void
}
/* Variables and functions */
unsigned long abs64_entry(long);
unsigned long labs(long i) { return abs64_entry(i); }


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

x86 assembly (clang, -O2):
<labs>:
jmp    1030 <abs64_entry@plt>

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @abs64_entry(i64 %0)
ret i64 %2
}
int test_imm_82int16_mem(short *val) {
  return ((*val) & (-0x82 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_82int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -130
%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_82int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -130
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int LZ4_compress_fast_extState(void *, char const *, char *, int, int, int);
int LZ4F_localLZ4_compress_limitedOutput_withState(void *ctx, const char *src,
                                                   char *dst, int srcSize,
                                                   int dstCapacity, int level) {
  (void)level;
  return LZ4_compress_fast_extState(ctx, src, dst, srcSize, dstCapacity, 1);
}


x86 assembly (clang, -O0):
<LZ4F_localLZ4_compress_limitedOutput_withState>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    $0x1,%r9d
call   1030 <LZ4_compress_fast_extState@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @LZ4F_localLZ4_compress_limitedOutput_withState(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %12
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = load i8*, i8** %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = call i32 @LZ4_compress_fast_extState(i8* %14, i8* %15, i8* %16, i32 %17, i32 %18, i32 1)
ret i32 %19
}

LLVM IR (-O2):
define i32 @LZ4F_localLZ4_compress_limitedOutput_withState(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @LZ4_compress_fast_extState(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 1)
ret i32 %7
}
int check_prime(int num) {
  int i, j, a, p;
  for (i = num;; i++) {
    p = 1;
    for (j = 2; j <= i - 1; j++) {
      a = i % j;
      if (a == 0)
        break;
    }
    if (a != 0)
      return (i);
    else
      continue;
  }
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1158 <check_prime+0x58>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1145 <check_prime+0x45>
jmp    1158 <check_prime+0x58>
jmp    114a <check_prime+0x4a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111b <check_prime+0x1b>
cmpl   $0x0,-0x10(%rbp)
je     1167 <check_prime+0x67>
mov    -0x8(%rbp),%eax
pop    %rbp
ret
jmp    116c <check_prime+0x6c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110d <check_prime+0xd>

x86 assembly (clang, -O2):
<check_prime>:
jmp    1113 <check_prime+0x13>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%edi
cmp    $0x3,%edi
jl     1110 <check_prime+0x10>
mov    $0x2,%ecx
nopl   (%rax)
mov    %edi,%eax
cltd
idiv   %ecx
add    $0x1,%ecx
test   %edx,%edx
je     1110 <check_prime+0x10>
cmp    %ecx,%edi
jne    1120 <check_prime+0x20>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
br label %2
2: ; preds = %13, %1
%3 = phi i32 [ %0, %1 ], [ %14, %13 ]
%4 = icmp sgt i32 %3, 2
br i1 %4, label %7, label %13
5: ; preds = %7
%6 = icmp eq i32 %11, %3
br i1 %6, label %12, label %7
7: ; preds = %2, %5
%8 = phi i32 [ %11, %5 ], [ 2, %2 ]
%9 = srem i32 %3, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %13, label %5
12: ; preds = %5
ret i32 %3
13: ; preds = %7, %2
%14 = add nsw i32 %3, 1
br label %2
}
int main(void) {
  int a[4][5] = {0};
  *(*a + 3 + 4);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [5 x i32]]
store i32 0, i32* %1
%3 = bitcast [4 x [5 x i32]]* %2 to i8*
%4 = getelementptr inbounds [4 x [5 x i32]], [4 x [5 x i32]]* %2, i64 0, i64 0
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%6 = getelementptr inbounds i32, i32* %5, i64 3
%7 = getelementptr inbounds i32, i32* %6, i64 4
%8 = load i32, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct OutputStream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ PrintInt(long, int, int /*<<< orphan*/, int /*<<< orphan*/,
                            struct OutputStream *);
void PrintSimpleInt(long Num, struct OutputStream *Stream) {
  PrintInt(Num, -1, 0, 0, Stream);
}


x86 assembly (clang, -O0):
<PrintSimpleInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%r8
mov    $0xffffffff,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <PrintInt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintSimpleInt>:
mov    %rsi,%r8
mov    $0xffffffff,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <PrintInt@plt>

LLVM IR (-O0):
%struct.OutputStream = type { i32 }
define void @PrintSimpleInt(i64 %0, %struct.OutputStream* %1) {
%3 = alloca i64
%4 = alloca %struct.OutputStream*
store i64 %0, i64* %3
store %struct.OutputStream* %1, %struct.OutputStream** %4
%5 = load i64, i64* %3
%6 = load %struct.OutputStream*, %struct.OutputStream** %4
%7 = call i32 @PrintInt(i64 %5, i32 -1, i32 0, i32 0, %struct.OutputStream* %6)
ret void
}

LLVM IR (-O2):
%struct.OutputStream = type { i32 }
define void @PrintSimpleInt(i64 %0, %struct.OutputStream* %1) {
%3 = tail call i32 @PrintInt(i64 %0, i32 -1, i32 0, i32 0, %struct.OutputStream* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printIncSeq(int, int, int /*<<< orphan*/, int *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int arr[50];
  printIncSeq(n, m, 0, arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
lea    -0xe0(%rbp),%rcx
xor    %edx,%edx
call   1040 <printIncSeq@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xd8,%rsp
lea    0xed2(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rcx
xor    %edx,%edx
call   1040 <printIncSeq@plt>
xor    %eax,%eax
add    $0xd8,%rsp
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [50 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%7 = bitcast [50 x i32]* %3 to i8*
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 0
%11 = call i32 @printIncSeq(i32 %8, i32 %9, i32 0, i32* %10)
ret i32 0
}
setmod(f, n) int f, n;
{ return (adjustmode(1, 0)); }


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

x86 assembly (clang, -O2):
<setmod>:
mov    $0x1,%edi
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <adjustmode@plt>

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

LLVM IR (-O2):
define i32 @setmod(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @adjustmode to i32 (i32, i32, ...)*)(i32 1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ atanf(float);
float sinf(int /*<<< orphan*/);
float __attribute__((no)) sinatanf_(float x) { return sinf(atanf(x)); }


x86 assembly (clang, -O0):
<sinatanf_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <atanf@plt>
mov    %eax,%edi
call   1030 <sinf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @sinatanf_(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @atanf(float %3)
%5 = call float @sinf(i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @sinatanf_(float %0) {
%2 = tail call i32 @atanf(float %0)
%3 = tail call float @sinf(i32 %2)
ret float %3
}
void sched_ticker_init(void) {}


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

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

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

LLVM IR (-O2):
define void @sched_ticker_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printw(char *);
void ion_cmd_restart(char *cmd) { printw("\n\rrestart command\n\r\n\r"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"\0A\0Drestart command\0A\0D\0A\0D\00"
define void @ion_cmd_restart(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printw(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0A\0Drestart command\0A\0D\0A\0D\00"
define void @ion_cmd_restart(i8* nocapture readnone %0) {
%2 = tail call i32 @printw(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread_safe(int *, int, int, int /*<<< orphan*/ *);
int load_int(FILE *fp) {
  int value;
  fread_safe(&value, sizeof(int), 1, fp);
  return value;
}


x86 assembly (clang, -O0):
<load_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread_safe@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_int>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread_safe@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @load_int(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fread_safe(i32* %2, i32 4, i32 1, i32* %0)
%5 = load i32, i32* %2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_GENERALIZEDTIME;

/* Variables and functions */
int asn1_generalizedtime_to_tm(int /*<<< orphan*/ *,
                               int /*<<< orphan*/ const *);
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d) {
  return asn1_generalizedtime_to_tm(NULL, d);
}


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

x86 assembly (clang, -O2):
<ASN1_GENERALIZEDTIME_check>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <asn1_generalizedtime_to_tm@plt>

LLVM IR (-O0):
define i32 @ASN1_GENERALIZEDTIME_check(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @asn1_generalizedtime_to_tm(i32* null, i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @ASN1_GENERALIZEDTIME_check(i32* %0) {
%2 = tail call i32 @asn1_generalizedtime_to_tm(i32* null, i32* %0)
ret i32 %2
}
/* Variables and functions */
double to_feet(double);
double calc_mps(double miles, double seconds) {
  double mps, feet, kms;
  feet = to_feet(miles);
  kms = feet / 3282.0;
  mps = (kms * 1000.0) / seconds;
  return mps;
}


x86 assembly (clang, -O0):
<calc_mps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <to_feet@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeb1(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_mps>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <to_feet@plt>
divsd  0xedd(%rip),%xmm0
mulsd  0xedd(%rip),%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @calc_mps(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = load double, double* %3
%9 = call double @to_feet(double %8)
store double %9, double* %6
%10 = load double, double* %6
%11 = fdiv double %10, 3.282000e+03
store double %11, double* %7
%12 = load double, double* %7
%13 = fmul double %12, 1.000000e+03
%14 = load double, double* %4
%15 = fdiv double %13, %14
store double %15, double* %5
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @calc_mps(double %0, double %1) {
%3 = tail call double @to_feet(double %0)
%4 = fdiv double %3, 3.282000e+03
%5 = fmul double %4, 1.000000e+03
%6 = fdiv double %5, %1
ret double %6
}
double testm0(void) { return -0.0; }


x86 assembly (clang, -O0):
<testm0>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<testm0>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @testm0() {
ret double -0.000000e+00
}

LLVM IR (-O2):
define double @testm0() {
ret double -0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int __infer_nondet_int();
int vsprintf(char *s, const char *format, va_list arg) {
  int res;
  res = __infer_nondet_int();
  if (res < 0)
    while (1)
      ;
  return res;
}


x86 assembly (clang, -O0):
<vsprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1141 <vsprintf+0x31>
jmp    113c <vsprintf+0x2c>
jmp    113c <vsprintf+0x2c>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %eax,%eax
js     1120 <vsprintf+0x10>
pop    %rcx
ret
xchg   %ax,%ax
jmp    1120 <vsprintf+0x10>

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

LLVM IR (-O2):
define i32 @vsprintf(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (...) @__infer_nondet_int()
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3, %6
br label %6
7: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reload_services();
int /*<<< orphan*/ unlink(char *);
void cleanup(int signal) {
  printf("Try to recover from endless waiting.\n");
  reload_services();
  unlink("/tmp/tmp_afp_lock");
  exit(1);
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <reload_services@plt>
lea    0xec1(%rip),%rdi
call   1030 <unlink@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <reload_services@plt>
lea    0xea5(%rip),%rdi
call   1030 <unlink@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Try to recover from endless waiting.\0A\00"
@.str.1 = [18 x i8] c"/tmp/tmp_afp_lock\00"
define void @cleanup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @reload_services()
%5 = call i32 @unlink(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"/tmp/tmp_afp_lock\00"
@str = [37 x i8] c"Try to recover from endless waiting.\00"
define void @cleanup(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @reload_services()
%4 = tail call i32 @unlink(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ XResizeRequestEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XResizeRequestEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XResizeRequestEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XResizeRequestEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XResizeRequestEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XResizeRequestEvent>:
test   %rdi,%rdi
je     112a <free_XResizeRequestEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

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

LLVM IR (-O2):
define void @free_XResizeRequestEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
unsigned short parse_to_ushort(unsigned char *data) {
  return (unsigned short)((*(data) << 8) & 0xFF00) | (*(data + 1) & 0xFF);
}


x86 assembly (clang, -O0):
<parse_to_ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
and    $0xff00,%eax
movzwl %ax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
and    $0xff,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_to_ushort>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @parse_to_ushort(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 = shl i32 %5, 8
%7 = and i32 %6, 65280
%8 = trunc i32 %7 to i16
%9 = zext i16 %8 to i32
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 255
%15 = or i32 %9, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @parse_to_ushort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct elhash_h256 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sha3_256(int /*<<< orphan*/ *, int,
                            int /*<<< orphan*/ const *, size_t const);
void SHA3_256(struct elhash_h256 const *ret, uint8_t const *data,
              size_t const size) {
  sha3_256((uint8_t *)ret, 32, data, size);
}


x86 assembly (clang, -O0):
<SHA3_256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x20,%esi
call   1030 <sha3_256@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA3_256>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x20,%esi
jmp    1030 <sha3_256@plt>

LLVM IR (-O0):
%struct.elhash_h256 = type { i32 }
define void @SHA3_256(%struct.elhash_h256* %0, i32* %1, i64 %2) {
%4 = alloca %struct.elhash_h256*
%5 = alloca i32*
%6 = alloca i64
store %struct.elhash_h256* %0, %struct.elhash_h256** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load %struct.elhash_h256*, %struct.elhash_h256** %4
%8 = bitcast %struct.elhash_h256* %7 to i32*
%9 = load i32*, i32** %5
%10 = load i64, i64* %6
%11 = call i32 @sha3_256(i32* %8, i32 32, i32* %9, i64 %10)
ret void
}

LLVM IR (-O2):
%struct.elhash_h256 = type { i32 }
define void @SHA3_256(%struct.elhash_h256* %0, i32* %1, i64 %2) {
%4 = getelementptr %struct.elhash_h256, %struct.elhash_h256* %0, i64 0, i32 0
%5 = tail call i32 @sha3_256(i32* %4, i32 32, i32* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int SetMapSize() {
  int size;
  printf("Set the width and height of the map.[Default:10](6~24):");
  scanf("%d", &size);
  printf("\n");
  return size;
}


x86 assembly (clang, -O0):
<SetMapSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetMapSize>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"Set the width and height of the map.[Default:10](6~24):\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @SetMapSize() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [56 x i8] c"Set the width and height of the map.[Default:10](6~24):\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @SetMapSize() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @putchar(i32 10)
%6 = load i32, i32* %1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ safe_shutdown();
void safe_shutdown_and_die(int code) {
  safe_shutdown();
  exit(code);
}


x86 assembly (clang, -O0):
<safe_shutdown_and_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <safe_shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<safe_shutdown_and_die>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <safe_shutdown@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @safe_shutdown_and_die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @safe_shutdown()
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
define void @safe_shutdown_and_die(i32 %0) {
%2 = tail call i32 (...) @safe_shutdown()
%3 = tail call i32 @exit(i32 %0)
unreachable
}
int main(void) {
  char *memoryArea = malloc(10);
  __ESBMC_assume(memoryArea);
  char *newArea = malloc(10);
  __ESBMC_assume(newArea);
  memoryArea[3] = newArea;
  free(memoryArea);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <__ESBMC_assume@plt>
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <__ESBMC_assume@plt>
mov    -0x18(%rbp),%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <__ESBMC_assume@plt>
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <__ESBMC_assume@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @malloc(i64 10)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @__ESBMC_assume to i32 (i8*, ...)*)(i8* %5)
%7 = call i8* @malloc(i64 10)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @__ESBMC_assume to i32 (i8*, ...)*)(i8* %8)
%10 = load i8*, i8** %3
%11 = ptrtoint i8* %10 to i8
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 3
store i8 %11, i8* %13
%14 = load i8*, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(10) i8* @malloc(i64 10)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @__ESBMC_assume to i32 (i8*, ...)*)(i8* %1)
%3 = tail call dereferenceable_or_null(10) i8* @malloc(i64 10)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @__ESBMC_assume to i32 (i8*, ...)*)(i8* %3)
tail call void @free(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("./client.o [connections] [data_size]\n"); }


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"./client.o [connections] [data_size]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"./client.o [connections] [data_size]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret void
}
void hypre_BigSwap(int *v, int i, int j) {
  int temp;
  temp = v[i];
  v[i] = v[j];
  v[j] = temp;
}


x86 assembly (clang, -O0):
<hypre_BigSwap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypre_BigSwap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @hypre_BigSwap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
const char *strnull(const char *s) { return s ?: "(null)"; }


x86 assembly (clang, -O0):
<strnull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1127 <strnull+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1137 <strnull+0x37>
lea    0xed2(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1137 <strnull+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnull>:
test   %rdi,%rdi
lea    0xef6(%rip),%rax
cmovne %rdi,%rax
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"(null)\00"
define i8* @strnull(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %3
}