xunge/DecIR huggingface dataset:
/* Variables and functions */
int generic_test(char const *, char const *, int, int);
int /*<<< orphan*/ test_title(char *);
int test9(void) {
  const char *rd, *wr;
  rd = wr = "uart16550";
  test_title("Test 9. Back-to-back, high speed");
  return generic_test(rd, wr, 2, 5);
}


x86 assembly (clang, -O0):
<test9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec6(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xec5(%rip),%rdi
call   1040 <test_title@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x2,%edx
mov    $0x5,%ecx
call   1030 <generic_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test9>:
push   %rax
lea    0xee2(%rip),%rdi
call   1040 <test_title@plt>
lea    0xecc(%rip),%rdi
mov    %rdi,%rsi
mov    $0x2,%edx
mov    $0x5,%ecx
pop    %rax
jmp    1030 <generic_test@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"uart16550\00"
@.str.1 = [33 x i8] c"Test 9. Back-to-back, high speed\00"
define i32 @test9() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = call i32 @test_title(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = call i32 @generic_test(i8* %4, i8* %5, i32 2, i32 5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [10 x i8] c"uart16550\00"
@.str.1 = [33 x i8] c"Test 9. Back-to-back, high speed\00"
define i32 @test9() {
%1 = tail call i32 @test_title(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @generic_test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i32 5)
ret i32 %2
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef scalar_t__ clockid_t;

/* Variables and functions */
scalar_t__ _syscall5(int, void *, void *, void *, void *, void *);
int errno;
int clock_settime(clockid_t clock_id, const struct timespec *tp) {
  int ret = (int)_syscall5(76, (void *)clock_id, (void *)tp, ((void *)0),
                           ((void *)0), ((void *)0));
  if (ret < 0) {
    errno = -ret;
    return -1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<clock_settime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x4c,%edi
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%rcx
mov    %r9,%r8
call   1030 <_syscall5@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1164 <clock_settime+0x54>
xor    %ecx,%ecx
sub    -0x1c(%rbp),%ecx
mov    0x2e8a(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <clock_settime+0x5a>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_settime>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x4c,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <_syscall5@plt>
test   %eax,%eax
js     112f <clock_settime+0x1f>
pop    %rcx
ret
neg    %eax
mov    0x2ea8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@errno = global i32 0
define i32 @clock_settime(i64 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca %struct.timespec*
%6 = alloca i32
store i64 %0, i64* %4
store %struct.timespec* %1, %struct.timespec** %5
%7 = load i64, i64* %4
%8 = inttoptr i64 %7 to i8*
%9 = load %struct.timespec*, %struct.timespec** %5
%10 = bitcast %struct.timespec* %9 to i8*
%11 = call i64 @_syscall5(i32 76, i8* %8, i8* %10, i8* null, i8* null, i8* null)
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = load i32, i32* %6
%17 = sub nsw i32 0, %16
store i32 %17, i32* @errno
store i32 -1, i32* %3
br label %20
18: ; preds = %2
%19 = load i32, i32* %6
store i32 %19, i32* %3
br label %20
20: ; preds = %18, %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@errno = global i32 0
define i32 @clock_settime(i64 %0, %struct.timespec* %1) {
%3 = inttoptr i64 %0 to i8*
%4 = bitcast %struct.timespec* %1 to i8*
%5 = tail call i64 @_syscall5(i32 76, i8* %3, i8* %4, i8* null, i8* null, i8* null)
%6 = trunc i64 %5 to i32
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = sub nsw i32 0, %6
store i32 %9, i32* @errno
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ -1, %8 ], [ %6, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int **);
void g(int m, int a[m][m]) { f(m, a); }


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

x86 assembly (clang, -O2):
<g>:
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define void @g(i32 %0, i32* %1) {
%3 = bitcast i32* %1 to i32**
%4 = tail call i32 @f(i32 %0, i32** %3)
ret void
}
/* Variables and functions */
int read(int, char *, int);
int local_read(int s) {
  int rc;
  char buf[500];
  rc = read(s, buf, 500);
  if (rc <= 0)
    return rc;
  return 1;
}


x86 assembly (clang, -O0):
<local_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x200(%rbp),%rsi
mov    $0x1f4,%edx
call   1030 <read@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     114a <local_read+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <local_read+0x41>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_read>:
sub    $0x1f8,%rsp
mov    %rsp,%rsi
mov    $0x1f4,%edx
call   1030 <read@plt>
test   %eax,%eax
mov    $0x1,%ecx
cmovg  %ecx,%eax
add    $0x1f8,%rsp
ret

LLVM IR (-O0):
define i32 @local_read(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [500 x i8]
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%8 = call i32 @read(i32 %6, i8* %7, i32 500)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 1, i32* %2
br label %14
14: ; preds = %13, %11
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @local_read(i32 %0) {
%2 = alloca [500 x i8]
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 %0, i8* %3, i32 500)
%5 = icmp slt i32 %4, 1
%6 = select i1 %5, i32 %4, i32 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ts_free(void *buffer) { free(buffer); }


x86 assembly (clang, -O0):
<ts_free>:
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):
<ts_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ts_free(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 @ts_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ use(char *);
void test_small_same() {
  char a[] = {'a', 'a', 'a', 'a'};
  use(a);
}


x86 assembly (clang, -O0):
<test_small_same>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <use@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_small_same>:
push   %rax
movl   $0x61616161,0x4(%rsp)
61
lea    0x4(%rsp),%rdi
call   1030 <use@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.test_small_same.a = [4 x i8] c"aaaa"
define void @test_small_same() {
%1 = alloca [4 x i8]
%2 = bitcast [4 x i8]* %1 to i8*
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%4 = call i32 @use(i8* %3)
ret void
}

LLVM IR (-O2):
define void @test_small_same() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1633771873, i32* %1
%3 = call i32 @use(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MIDI_ResetUserChannelVolume();
void MUSIC_ResetMidiChannelVolumes(void) { MIDI_ResetUserChannelVolume(); }


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

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

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

LLVM IR (-O2):
define void @MUSIC_ResetMidiChannelVolumes() {
%1 = tail call i32 (...) @MIDI_ResetUserChannelVolume()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __gnuc_va_list;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ vwarnx(char const *, int /*<<< orphan*/);
void verrx(int status, const char *format, __gnuc_va_list ap) {
  vwarnx(format, ap);
  exit(status);
}


x86 assembly (clang, -O0):
<verrx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <vwarnx@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<verrx>:
push   %rbx
mov    %edi,%ebx
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <vwarnx@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @verrx(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @vwarnx(i8* %7, i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
define void @verrx(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @vwarnx(i8* %1, i32 %2)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int snprintf(char *, size_t, char const *);
int scnprintf(char *buf, size_t size, const char *fmt, ...) {
  int i;
  i = snprintf(buf, size, fmt);
  return (i >= size) ? (size - 1) : i;
}


x86 assembly (clang, -O0):
<scnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1157 <scnprintf+0x47>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    115f <scnprintf+0x4f>
movslq -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scnprintf>:
push   %rbx
mov    %rsi,%rbx
call   1030 <snprintf@plt>
cltq
lea    -0x1(%rbx),%ecx
cmp    %rbx,%rax
cmovae %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @scnprintf(i8* %0, i64 %1, i8* %2, ...) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = load i8*, i8** %6
%11 = call i32 @snprintf(i8* %8, i64 %9, i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = load i64, i64* %5
%15 = icmp uge i64 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %3
%17 = load i64, i64* %5
%18 = sub i64 %17, 1
br label %22
19: ; preds = %3
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
br label %22
22: ; preds = %19, %16
%23 = phi i64 [ %18, %16 ], [ %21, %19 ]
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @scnprintf(i8* nocapture writeonly %0, i64 %1, i8* nocapture %2, ...) {
%4 = tail call i32 @snprintf(i8* %0, i64 %1, i8* %2)
%5 = sext i32 %4 to i64
%6 = icmp ult i64 %5, %1
%7 = add i64 %1, 4294967295
%8 = select i1 %6, i64 %5, i64 %7
%9 = trunc i64 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("hello world"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define void @hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define void @hello() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void blink() {
  while (1) {
    *(int *)0xC02200F0 = 0x46;
    *(int *)0xC02200A0 = 0x46;
    sleep(100);
    *(int *)0xC02200A0 = 0x44;
    *(int *)0xC02200F0 = 0x44;
    sleep(100);
  }
}


x86 assembly (clang, -O0):
<blink>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <blink+0x9>
mov    $0xc02200f0,%eax
movl   $0x46,(%rax)
mov    $0xc02200a0,%eax
movl   $0x46,(%rax)
mov    $0x64,%edi
call   1030 <sleep@plt>
mov    $0xc02200a0,%eax
movl   $0x44,(%rax)
mov    $0xc02200f0,%eax
movl   $0x44,(%rax)
mov    $0x64,%edi
call   1030 <sleep@plt>
jmp    1119 <blink+0x9>

x86 assembly (clang, -O2):
<blink>:
push   %rbx
mov    $0xc02200a0,%ebx
cs nopw 0x0(%rax,%rax,1)
movl   $0x46,0x50(%rbx)
movl   $0x46,(%rbx)
mov    $0x64,%edi
call   1030 <sleep@plt>
movl   $0x44,(%rbx)
movl   $0x44,0x50(%rbx)
mov    $0x64,%edi
call   1030 <sleep@plt>
jmp    1120 <blink+0x10>

LLVM IR (-O0):
define void @blink() {
br label %1
1: ; preds = %0, %1
store i32 70, i32* inttoptr (i64 3223453936 to i32*)
store i32 70, i32* inttoptr (i64 3223453856 to i32*)
%2 = call i32 @sleep(i32 100)
store i32 68, i32* inttoptr (i64 3223453856 to i32*)
store i32 68, i32* inttoptr (i64 3223453936 to i32*)
%3 = call i32 @sleep(i32 100)
br label %1
}

LLVM IR (-O2):
define void @blink() {
br label %1
1: ; preds = %0, %1
store i32 70, i32* inttoptr (i64 3223453936 to i32*)
store i32 70, i32* inttoptr (i64 3223453856 to i32*)
%2 = tail call i32 @sleep(i32 100)
store i32 68, i32* inttoptr (i64 3223453856 to i32*)
store i32 68, i32* inttoptr (i64 3223453936 to i32*)
%3 = tail call i32 @sleep(i32 100)
br label %1
}
void syslog_none(int priority, const char *format, ...) {}


x86 assembly (clang, -O0):
<syslog_none>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @syslog_none(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @syslog_none(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Type definitions */
struct server {
  int dummy;
};
typedef struct server irc_message;

/* Variables and functions */
int /*<<< orphan*/ UNUSED(struct server *);
int irc_recv(struct server *s, struct irc_message *m) {
  UNUSED(s);
  UNUSED(m);
  return 0;
}


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

x86 assembly (clang, -O2):
<irc_recv>:
push   %rbx
mov    %rsi,%rbx
call   1030 <UNUSED@plt>
mov    %rbx,%rdi
call   1030 <UNUSED@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.server = type { i32 }
%struct.irc_message = type opaque
define i32 @irc_recv(%struct.server* %0, %struct.irc_message* %1) {
%3 = alloca %struct.server*
%4 = alloca %struct.irc_message*
store %struct.server* %0, %struct.server** %3
store %struct.irc_message* %1, %struct.irc_message** %4
%5 = load %struct.server*, %struct.server** %3
%6 = call i32 @UNUSED(%struct.server* %5)
%7 = load %struct.irc_message*, %struct.irc_message** %4
%8 = bitcast %struct.irc_message* %7 to %struct.server*
%9 = call i32 @UNUSED(%struct.server* %8)
ret i32 0
}

LLVM IR (-O2):
%struct.server = type { i32 }
%struct.irc_message = type opaque
define i32 @irc_recv(%struct.server* %0, %struct.irc_message* %1) {
%3 = tail call i32 @UNUSED(%struct.server* %0)
%4 = bitcast %struct.irc_message* %1 to %struct.server*
%5 = tail call i32 @UNUSED(%struct.server* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *xfree(void *mem) {
  if (mem)
    free(mem);
  return 0;
}


x86 assembly (clang, -O0):
<xfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <xfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfree>:
test   %rdi,%rdi
je     111f <xfree+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @xfree(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 %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @xfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i8* null
}
/* Variables and functions */
int memory_pressure_get();
int /*<<< orphan*/ memory_pressure_set();
int cfs_memory_pressure_get_and_set(void) {
  int old = memory_pressure_get();
  if (!old) {
    memory_pressure_set();
  }
  return old;
}


x86 assembly (clang, -O0):
<cfs_memory_pressure_get_and_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <memory_pressure_get@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1143 <cfs_memory_pressure_get_and_set+0x23>
mov    $0x0,%al
call   1040 <memory_pressure_set@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_memory_pressure_get_and_set>:
push   %rbx
xor    %eax,%eax
call   1030 <memory_pressure_get@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1135 <cfs_memory_pressure_get_and_set+0x15>
xor    %eax,%eax
call   1040 <memory_pressure_set@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cfs_memory_pressure_get_and_set() {
%1 = alloca i32
%2 = call i32 (...) @memory_pressure_get()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 (...) @memory_pressure_set()
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @cfs_memory_pressure_get_and_set() {
%1 = tail call i32 (...) @memory_pressure_get()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @memory_pressure_set()
br label %5
5: ; preds = %3, %0
ret i32 %1
}
void i2d_OCSP_ONEREQ(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_OCSP_ONEREQ() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test122_SleepWakeImpl_wake__E();
void test122_TestProg_bar__I() { test122_SleepWakeImpl_wake__E(); }


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

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

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

LLVM IR (-O2):
define void @test122_TestProg_bar__I() {
%1 = tail call i32 (...) @test122_SleepWakeImpl_wake__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void txt_trackend() { printf("Track end\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Track end\0A\00"
define void @txt_trackend() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"Track end\00"
define void @txt_trackend() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned int clip(float f) {
  if (f > 255.0f) {
    f = 255.0f;
  } else if (f < 0.0f) {
    f = 0.0f;
  }
  return (unsigned int)f;
}


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1131 <clip+0x31>
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    114b <clip+0x4b>
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1146 <clip+0x46>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    114b <clip+0x4b>
cvttss2si -0x4(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
movss  0xef8(%rip),%xmm1
ucomiss %xmm1,%xmm0
ja     111b <clip+0x1b>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
movaps %xmm0,%xmm1
jbe    111b <clip+0x1b>
xorps  %xmm1,%xmm1
cvttss2si %xmm1,%rax
ret

LLVM IR (-O0):
define i32 @clip(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 2.550000e+02
br i1 %4, label %5, label %6
5: ; preds = %1
store float 2.550000e+02, float* %2
br label %11
6: ; preds = %1
%7 = load float, float* %2
%8 = fcmp olt float %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
store float 0.000000e+00, float* %2
br label %10
10: ; preds = %9, %6
br label %11
11: ; preds = %10, %5
%12 = load float, float* %2
%13 = fptoui float %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @clip(float %0) {
%2 = fcmp ogt float %0, 2.550000e+02
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fcmp olt float %0, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %3
br label %6
6: ; preds = %1, %3, %5
%7 = phi float [ 0.000000e+00, %5 ], [ %0, %3 ], [ 2.550000e+02, %1 ]
%8 = fptoui float %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int wwrite(long long);
main() {
  if (wwrite((long long)0) != 123)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <wwrite@plt>
cmp    $0x7b,%eax
je     1158 <main+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <wwrite@plt>
cmp    $0x7b,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @wwrite(i64 0)
%3 = icmp ne i32 %2, 123
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @wwrite(i64 0)
%2 = icmp eq i32 %1, 123
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
int search(int val, int *v, int size) {
  int i;
  for (i = 0; i < size; i++)
    if (v[i] == val)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <search+0x54>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x8(%rbp),%eax
jne    1141 <search+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <search+0x5b>
jmp    1146 <search+0x46>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <search+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
test   %edx,%edx
jle    111e <search+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edi,(%rsi,%rcx,4)
je     1121 <search+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <search+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @search(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Variables and functions */
float __infer_nondet_float();
float roundf(float x) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<roundf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @roundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @roundf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
void reb_integrator_wh_reset(struct reb_simulation *r) {}


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

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

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

LLVM IR (-O2):
%struct.reb_simulation = type opaque
define void @reb_integrator_wh_reset(%struct.reb_simulation* nocapture %0) {
ret void
}
/* Type definitions */
struct translation {
  int dummy;
};

/* Variables and functions */
struct translation *table_translation(char const *, char const *, int *,
                                      int /*<<< orphan*/, int /*<<< orphan*/,
                                      int /*<<< orphan*/, int /*<<< orphan*/);
struct translation *simple_table_translation(const char *from, const char *to,
                                             int *table) {
  return table_translation(from, to, table, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<simple_table_translation>:
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),%rsi
mov    -0x18(%rbp),%rdx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <table_translation@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_table_translation>:
push   %rax
movl   $0x0,(%rsp)
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <table_translation@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.translation = type { i32 }
define %struct.translation* @simple_table_translation(i8* %0, i8* %1, i32* %2) {
%4 = tail call %struct.translation* @table_translation(i8* %0, i8* %1, i32* %2, i32 0, i32 0, i32 0, i32 0)
ret %struct.translation* %4
}
int f() {
  static int x = 0;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@f.x = internal global i32 0
define i32 @f() {
%1 = load i32, i32* @f.x
ret i32 %1
}

LLVM IR (-O2):
define i32 @f() {
ret i32 0
}
/* Variables and functions */
double c_dasum(int, double *, int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double x[] = {1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0};
  int N = 8;
  int strideX = 1;
  double sum = c_dasum(N, x, strideX);
  printf("sum: %lf\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x8,-0x44(%rbp)
movl   $0x1,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   1050 <c_dasum@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edi
mov    $0x1,%edx
call   1040 <c_dasum@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double -2.000000e+00, double 3.000000e+00, double -4.000000e+00, double 5.000000e+00, double -6.000000e+00, double 7.000000e+00, double -8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 8, i32* %2
store i32 1, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @c_dasum(i32 %6, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double -2.000000e+00, double 3.000000e+00, double -4.000000e+00, double 5.000000e+00, double -6.000000e+00, double 7.000000e+00, double -8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @c_dasum(i32 8, double* %3, i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Type definitions */
struct rlimit {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_CORE;
int /*<<< orphan*/ assert(struct rlimit *const);
int errno;
scalar_t__ getrlimit(int /*<<< orphan*/, struct rlimit *const);
int core_rlimit_get(struct rlimit *const lim) {
  assert(lim);
  return getrlimit(RLIMIT_CORE, lim) ? errno : 0;
}


x86 assembly (clang, -O0):
<core_rlimit_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1040 <getrlimit@plt>
cmp    $0x0,%rax
je     1162 <core_rlimit_get+0x42>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    116c <core_rlimit_get+0x4c>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    116c <core_rlimit_get+0x4c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<core_rlimit_get>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1040 <getrlimit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     114d <core_rlimit_get+0x2d>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@RLIMIT_CORE = global i32 0
@errno = global i32 0
define i32 @core_rlimit_get(%struct.rlimit* %0) {
%2 = alloca %struct.rlimit*
store %struct.rlimit* %0, %struct.rlimit** %2
%3 = load %struct.rlimit*, %struct.rlimit** %2
%4 = call i32 @assert(%struct.rlimit* %3)
%5 = load i32, i32* @RLIMIT_CORE
%6 = load %struct.rlimit*, %struct.rlimit** %2
%7 = call i64 @getrlimit(i32 %5, %struct.rlimit* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* @errno
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %9
%13 = phi i32 [ %10, %9 ], [ 0, %11 ]
ret i32 %13
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@RLIMIT_CORE = global i32 0
@errno = global i32 0
define i32 @core_rlimit_get(%struct.rlimit* %0) {
%2 = tail call i32 @assert(%struct.rlimit* %0)
%3 = load i32, i32* @RLIMIT_CORE
%4 = tail call i64 @getrlimit(i32 %3, %struct.rlimit* %0)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @errno
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
int *get_command_line_size() {
  static int command_line_size = 256;
  return &command_line_size;
}


x86 assembly (clang, -O0):
<get_command_line_size>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_command_line_size>:
lea    0x2f19(%rip),%rax
ret

LLVM IR (-O0):
@get_command_line_size.command_line_size = internal global i32 256
define i32* @get_command_line_size() {
ret i32* @get_command_line_size.command_line_size
}

LLVM IR (-O2):
@get_command_line_size.command_line_size = internal global i32 256
define i32* @get_command_line_size() {
ret i32* @get_command_line_size.command_line_size
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void fooA(int *iptr) {
  printf("%d\n", *iptr);
  printf("%p\n", &iptr);
  printf("%p\n", iptr);
}


x86 assembly (clang, -O0):
<fooA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fooA>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
mov    (%rdi),%esi
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define void @fooA(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32** %2)
%6 = load i32*, i32** %2
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %6)
ret void
}
void enable_bsd_fragmentation(int fd) {}


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

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

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

LLVM IR (-O2):
define void @enable_bsd_fragmentation(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ckKeyboardIsInputBufferFull();
void ckKeyboardWaitForInput(void) {
  for (int i = 0; i < 0xffff; i++) {
    if (!ckKeyboardIsInputBufferFull())
      return;
  }
}


x86 assembly (clang, -O0):
<ckKeyboardWaitForInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xffff,-0x4(%rbp)
jge    1154 <ckKeyboardWaitForInput+0x44>
mov    $0x0,%al
call   1030 <ckKeyboardIsInputBufferFull@plt>
cmp    $0x0,%eax
jne    1141 <ckKeyboardWaitForInput+0x31>
jmp    1154 <ckKeyboardWaitForInput+0x44>
jmp    1146 <ckKeyboardWaitForInput+0x36>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <ckKeyboardWaitForInput+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckKeyboardWaitForInput>:
push   %rbx
mov    $0xfffe,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <ckKeyboardIsInputBufferFull@plt>
sub    $0x1,%ebx
setb   %cl
test   %eax,%eax
je     1135 <ckKeyboardWaitForInput+0x25>
test   %cl,%cl
je     1120 <ckKeyboardWaitForInput+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ckKeyboardWaitForInput() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 65535
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = call i32 (...) @ckKeyboardIsInputBufferFull()
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %5
br label %13
9: ; preds = %5
br label %10
10: ; preds = %9
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @ckKeyboardWaitForInput() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 (...) @ckKeyboardIsInputBufferFull()
%4 = icmp eq i32 %3, 0
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 65535
%7 = select i1 %4, i1 true, i1 %6
br i1 %7, label %8, label %1
8: ; preds = %1
ret void
}
void XtUnmanageChildren() {}


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

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

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

LLVM IR (-O2):
define void @XtUnmanageChildren() {
ret void
}
float *extend_vector(vec, old_nl, old_nh, new_nh)
float *vec;
register int old_nl, old_nh, new_nh;
{
  register float *new_v;
  new_v = (float *)gp_realloc(
      (void *)(vec + old_nl),
      (unsigned long)(new_nh - old_nl + 1) * sizeof(float), "extend vector");
  return new_v - old_nl;
}


x86 assembly (clang, -O0):
<extend_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rsi
shl    $0x2,%rsi
lea    0xeb5(%rip),%rdx
mov    $0x0,%al
call   1030 <gp_realloc@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0xc(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extend_vector>:
push   %rbx
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
lea    0x0(,%rax,4),%rbx
sub    %eax,%ecx
add    $0x1,%ecx
movslq %ecx,%rsi
shl    $0x2,%rsi
lea    0xecd(%rip),%rdx
xor    %eax,%eax
call   1030 <gp_realloc@plt>
cltq
sub    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"extend vector\00"
define float* @extend_vector(float* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca float*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float*
store float* %0, float** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load float*, float** %5
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds float, float* %10, i64 %12
%14 = bitcast float* %13 to i8*
%15 = load i32, i32* %8
%16 = load i32, i32* %6
%17 = sub nsw i32 %15, %16
%18 = add nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = mul i64 %19, 4
%21 = call i32 (i8*, i64, i8*, ...) bitcast (i32 (...)* @gp_realloc to i32 (i8*, i64, i8*, ...)*)(i8* %14, i64 %20, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to float*
store float* %23, float** %9
%24 = load float*, float** %9
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = sub i64 0, %26
%28 = getelementptr inbounds float, float* %24, i64 %27
ret float* %28
}

LLVM IR (-O2):
@.str = [14 x i8] c"extend vector\00"
define float* @extend_vector(float* %0, i32 %1, i32 %2, i32 %3) {
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds float, float* %0, i64 %5
%7 = bitcast float* %6 to i8*
%8 = sub i32 1, %1
%9 = add i32 %8, %3
%10 = sext i32 %9 to i64
%11 = shl nsw i64 %10, 2
%12 = tail call i32 (i8*, i64, i8*, ...) bitcast (i32 (...)* @gp_realloc to i32 (i8*, i64, i8*, ...)*)(i8* %7, i64 %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to float*
%15 = sub nsw i64 0, %5
%16 = getelementptr inbounds float, float* %14, i64 %15
ret float* %16
}
/* Variables and functions */
int /*<<< orphan*/ zcoredown();
int /*<<< orphan*/ zcoreinit();
int /*<<< orphan*/ zcoreloop();
int /*<<< orphan*/ zresmdown();
int /*<<< orphan*/ zresminit();
int main(int argc, char *argv[]) {
  zresminit();
  zcoreinit();
  zcoreloop();
  zresmdown();
  zcoredown();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <zresminit@plt>
mov    $0x0,%al
call   1030 <zcoreinit@plt>
mov    $0x0,%al
call   1050 <zcoreloop@plt>
mov    $0x0,%al
call   1040 <zresmdown@plt>
mov    $0x0,%al
call   1070 <zcoredown@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <zresminit@plt>
xor    %eax,%eax
call   1030 <zcoreinit@plt>
xor    %eax,%eax
call   1050 <zcoreloop@plt>
xor    %eax,%eax
call   1040 <zresmdown@plt>
xor    %eax,%eax
call   1070 <zcoredown@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @zresminit()
%7 = call i32 (...) @zcoreinit()
%8 = call i32 (...) @zcoreloop()
%9 = call i32 (...) @zresmdown()
%10 = call i32 (...) @zcoredown()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @zresminit()
%4 = tail call i32 (...) @zcoreinit()
%5 = tail call i32 (...) @zcoreloop()
%6 = tail call i32 (...) @zresmdown()
%7 = tail call i32 (...) @zcoredown()
ret i32 0
}
/* Variables and functions */
scalar_t__ divide(int, int);
int main() {
  int a = 5, b = 0;
  if (b && divide(a, b)) {
  }
  if (a || divide(a, b)) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1151 <main+0x41>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <divide@plt>
cmp    $0x0,%rax
je     1151 <main+0x41>
jmp    1151 <main+0x41>
cmpl   $0x0,-0x8(%rbp)
jne    1170 <main+0x60>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <divide@plt>
cmp    $0x0,%rax
je     1175 <main+0x65>
jmp    1175 <main+0x65>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double drand48();
__attribute__((__weak__, __always___)) double softboundmpx_drand48() {
  return drand48();
}


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

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

LLVM IR (-O0):
define weak double @softboundmpx_drand48() {
%1 = call double (...) @drand48()
ret double %1
}

LLVM IR (-O2):
define weak double @softboundmpx_drand48() {
%1 = tail call double (...) @drand48()
ret double %1
}
int test_imm_06int64_lowword_reg(long long val) {
  return ((val) & (0x06 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_06int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x6,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_06int64_lowword_reg>:
test   $0x6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_06int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 6
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}