xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ numeric(unsigned char const *, int const, int /*<<< orphan*/, int,
                   int, int *, int *, char *);
int n4(const unsigned char *data, const int data_len, int *p_err_no,
       int *p_err_posn, char err_msg[50]) {
  return data_len == 4 &&
         numeric(data, data_len, 0, 4, 4, p_err_no, p_err_posn, err_msg);
}


x86 assembly (clang, -O0):
<n4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
cmpl   $0x4,-0xc(%rbp)
mov    %al,-0x29(%rbp)
jne    1170 <n4+0x60>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x28(%rbp),%rax
xor    %edx,%edx
mov    $0x4,%r8d
mov    %r8d,%ecx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <numeric@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n4>:
xor    %eax,%eax
cmp    $0x4,%esi
jne    114f <n4+0x3f>
push   %rax
mov    %r8,%r11
mov    %rcx,%r10
mov    %rdx,%r9
mov    $0x4,%esi
xor    %edx,%edx
mov    $0x4,%ecx
mov    $0x4,%r8d
push   %r11
push   %r10
call   1030 <numeric@plt>
add    $0x10,%rsp
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @n4(i8* %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = icmp eq i32 %1, 4
br i1 %6, label %7, label %11
7: ; preds = %5
%8 = tail call i64 @numeric(i8* %0, i32 4, i32 0, i32 4, i32 4, i32* %2, i32* %3, i8* %4)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %5
%12 = phi i32 [ 0, %5 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ logger(int, int /*<<< orphan*/, char *);
long sysconf(int /*<<< orphan*/);
int get_pagesize(void) {
  long pagesize;
  if ((pagesize = sysconf(_SC_PAGESIZE)) == -1) {
    logger(-1, errno, "Unable to get page size");
    return -1;
  }
  return pagesize;
}


x86 assembly (clang, -O0):
<get_pagesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
cmp    $0xffffffffffffffff,%rax
jne    116a <get_pagesize+0x4a>
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edi
lea    0xea7(%rip),%rdx
call   1030 <logger@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <get_pagesize+0x51>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pagesize>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
cmp    $0xffffffffffffffff,%rax
je     113a <get_pagesize+0x1a>
mov    %rax,%rbx
jmp    1159 <get_pagesize+0x39>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
lea    0xeb6(%rip),%rdx
mov    $0xffffffff,%ebx
mov    $0xffffffff,%edi
call   1030 <logger@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
@errno = global i32 0
@.str = [24 x i8] c"Unable to get page size\00"
define i32 @get_pagesize() {
%1 = alloca i32
%2 = alloca i64
%3 = load i32, i32* @_SC_PAGESIZE
%4 = call i64 @sysconf(i32 %3)
store i64 %4, i64* %2
%5 = icmp eq i64 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @errno
%8 = call i32 @logger(i32 -1, i32 %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %12
9: ; preds = %0
%10 = load i64, i64* %2
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
@errno = global i32 0
@.str = [24 x i8] c"Unable to get page size\00"
define i32 @get_pagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
%3 = icmp eq i64 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @errno
%6 = tail call i32 @logger(i32 -1, i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = trunc i64 %2 to i32
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ -1, %4 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
int gmult(int, int);
void scale_poly(int k, int poly[]) {
  int i;
  for (i = 0; i < (32 * 2); i++)
    poly[i] = gmult(k, poly[i]);
}


x86 assembly (clang, -O0):
<scale_poly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    115e <scale_poly+0x4e>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <gmult@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <scale_poly+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_poly>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%rbx,%rbp,4),%esi
mov    %r14d,%edi
call   1030 <gmult@plt>
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    $0x40,%rbp
jne    1120 <scale_poly+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @scale_poly(i32 %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %8, %3 ]
%5 = getelementptr inbounds i32, i32* %1, i64 %4
%6 = load i32, i32* %5
%7 = tail call i32 @gmult(i32 %0, i32 %6)
store i32 %7, i32* %5
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 64
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("ddcommit by Graham Houston, release date: "
         "2012.10.20"
         "\n"
         "\n"
         "Apply the delta file to the target and update the checksum file\n"
         "\n"
         "	ddcommit	[-d] -a <show|apply> -x <delta> -t <target> "
         "[-c checksum] [-v]\n"
         "\n"
         "Parameters\n"
         "	-d	direct io enabled (i.e. bypasses buffer cache)\n"
         "\n"
         "	-a	action - show or apply\n"
         "	-c	checksum file\n"
         "	-t	target device\n"
         "	-v	verbose\n"
         "\n"
         "Exit codes:\n"
         "	0	successful\n"
         "	1	a runtime error code, unable to complete task "
         "(detailed perror\n"
         "		and logical error message are output via stderr)\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 = [476 x i8] c"ddcommit by Graham Houston, release date: 2012.10.20\0A\0AApply the delta file to the target and update the checksum file\0A\0A\09ddcommit\09[-d] -a <show|apply> -x <delta> -t <target> [-c checksum] [-v]\0A\0AParameters\0A\09-d\09direct io enabled (i.e. bypasses buffer cache)\0A\0A\09-a\09action - show or apply\0A\09-c\09checksum file\0A\09-t\09target device\0A\09-v\09verbose\0A\0AExit codes:\0A\090\09successful\0A\091\09a runtime error code, unable to complete task (detailed perror\0A\09\09and logical error message are output via stderr)\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([476 x i8], [476 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [475 x i8] c"ddcommit by Graham Houston, release date: 2012.10.20\0A\0AApply the delta file to the target and update the checksum file\0A\0A\09ddcommit\09[-d] -a <show|apply> -x <delta> -t <target> [-c checksum] [-v]\0A\0AParameters\0A\09-d\09direct io enabled (i.e. bypasses buffer cache)\0A\0A\09-a\09action - show or apply\0A\09-c\09checksum file\0A\09-t\09target device\0A\09-v\09verbose\0A\0AExit codes:\0A\090\09successful\0A\091\09a runtime error code, unable to complete task (detailed perror\0A\09\09and logical error message are output via stderr)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([475 x i8], [475 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned int rgb_to_pixel32(unsigned int r, unsigned int g, unsigned int b) {
  return (r << 16) | (g << 8) | b;
}


x86 assembly (clang, -O0):
<rgb_to_pixel32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb_to_pixel32>:
mov    %esi,%eax
shl    $0x10,%edi
shl    $0x8,%eax
or     %edi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @rgb_to_pixel32(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = shl i32 %7, 16
%9 = load i32, i32* %5
%10 = shl i32 %9, 8
%11 = or i32 %8, %10
%12 = load i32, i32* %6
%13 = or i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @rgb_to_pixel32(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 16
%5 = shl i32 %1, 8
%6 = or i32 %5, %4
%7 = or i32 %6, %2
ret i32 %7
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t retx_get_seqnum(const uint8_t *p_retx) {
  return ((uint16_t)p_retx[4] << 8) | p_retx[5];
}


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

x86 assembly (clang, -O2):
<retx_get_seqnum>:
mov    0x10(%rdi),%eax
shl    $0x8,%eax
or     0x14(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @retx_get_seqnum(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 5
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @retx_get_seqnum(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 5
%6 = load i32, i32* %5
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
void panic(const char *message, char *context) {
  fprintf(stderr, "Error: %s %s", message, context);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"Error: %s %s\00"
@EXIT_FAILURE = global i32 0
define void @panic(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"Error: %s %s\00"
@EXIT_FAILURE = global i32 0
define void @panic(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
int checkL1Cache(int vAddress) {}


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

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

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

LLVM IR (-O2):
define i32 @checkL1Cache(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int *realloc(int *, int);
void ignore2(int *x, int *ignored_x) {
  x = realloc(x, 800);
  x = realloc(x, 400);
  ignored_x = realloc(ignored_x, 800);
  ignored_x = realloc(ignored_x, 400);
}


x86 assembly (clang, -O0):
<ignore2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x320,%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x190,%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x320,%esi
call   1030 <realloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x190,%esi
call   1030 <realloc@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore2>:
push   %rbx
mov    %rsi,%rbx
mov    $0x320,%esi
call   1030 <realloc@plt>
mov    %rax,%rdi
mov    $0x190,%esi
call   1030 <realloc@plt>
mov    %rbx,%rdi
mov    $0x320,%esi
call   1030 <realloc@plt>
mov    %rax,%rdi
mov    $0x190,%esi
pop    %rbx
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define void @ignore2(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 = call i32* @realloc(i32* %5, i32 800)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32* @realloc(i32* %7, i32 400)
store i32* %8, i32** %3
%9 = load i32*, i32** %4
%10 = call i32* @realloc(i32* %9, i32 800)
store i32* %10, i32** %4
%11 = load i32*, i32** %4
%12 = call i32* @realloc(i32* %11, i32 400)
store i32* %12, i32** %4
ret void
}

LLVM IR (-O2):
define void @ignore2(i32* %0, i32* %1) {
%3 = tail call i32* @realloc(i32* %0, i32 800)
%4 = tail call i32* @realloc(i32* %3, i32 400)
%5 = tail call i32* @realloc(i32* %1, i32 800)
%6 = tail call i32* @realloc(i32* %5, i32 400)
ret void
}
int f(int month) {
  int tmp_month = month;
  int tmp_sum;
  if (month > 0) {
    if (1 == tmp_month || 2 == tmp_month) {
      tmp_sum = 1;
    } else {
      tmp_sum = f(month - 1) + f(month - 2);
    }
    return tmp_sum;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1181 <f+0x71>
mov    $0x1,%eax
cmp    -0xc(%rbp),%eax
je     1147 <f+0x37>
mov    $0x2,%eax
cmp    -0xc(%rbp),%eax
jne    1153 <f+0x43>
movl   $0x1,-0x10(%rbp)
jmp    1176 <f+0x66>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1188 <f+0x78>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1146 <f+0x36>
mov    %edi,%ebp
add    $0xffffffff,%ebp
mov    $0x1,%ebx
cmp    $0x2,%ebp
jb     1148 <f+0x38>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <f@plt>
add    %eax,%ebx
add    $0xfffffffe,%ebp
cmp    $0x1,%ebp
ja     1130 <f+0x20>
add    $0x1,%ebx
jmp    1148 <f+0x38>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %17
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = icmp ult i32 %4, 2
br i1 %5, label %17, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %13, %6 ], [ %4, %3 ]
%8 = phi i32 [ %12, %6 ], [ 0, %3 ]
%9 = phi i32 [ %11, %6 ], [ %0, %3 ]
%10 = tail call i32 @f(i32 %7)
%11 = add nsw i32 %9, -2
%12 = add nsw i32 %10, %8
%13 = add nsw i32 %9, -3
%14 = icmp ult i32 %13, 2
br i1 %14, label %15, label %6
15: ; preds = %6
%16 = add i32 %12, 1
br label %17
17: ; preds = %3, %15, %1
%18 = phi i32 [ 0, %1 ], [ %16, %15 ], [ 1, %3 ]
ret i32 %18
}
void dummy(struct lvalue *lval, int label) {}


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

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

LLVM IR (-O0):
%struct.lvalue = type opaque
define void @dummy(%struct.lvalue* %0, i32 %1) {
%3 = alloca %struct.lvalue*
%4 = alloca i32
store %struct.lvalue* %0, %struct.lvalue** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.lvalue = type opaque
define void @dummy(%struct.lvalue* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double);
char *strclone(char *);
char *seconds_to_xml_duration(double seconds) {
  char maxbuf[100];
  if (seconds >= 0)
    sprintf(maxbuf, "PT%.8fS", seconds);
  return strclone(maxbuf);
}


x86 assembly (clang, -O0):
<seconds_to_xml_duration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1154 <seconds_to_xml_duration+0x34>
lea    -0x70(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xeb1(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <strclone@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seconds_to_xml_duration>:
sub    $0x68,%rsp
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113d <seconds_to_xml_duration+0x1d>
lea    0xecb(%rip),%rsi
mov    %rsp,%rdi
call   1030 <sprintf@plt>
mov    %rsp,%rdi
call   1040 <strclone@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"PT%.8fS\00"
define i8* @seconds_to_xml_duration(double %0) {
%2 = alloca double
%3 = alloca [100 x i8]
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = load double, double* %2
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %8)
br label %10
10: ; preds = %6, %1
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i8* @strclone(i8* %11)
ret i8* %12
}

LLVM IR (-O2):
@.str = [8 x i8] c"PT%.8fS\00"
define i8* @seconds_to_xml_duration(double %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = fcmp ult double %0, 0.000000e+00
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %0)
br label %7
7: ; preds = %5, %1
%8 = call i8* @strclone(i8* %3)
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ Cmd_Look(int /*<<< orphan*/);
int /*<<< orphan*/ Me();
void Act_Desc(void) { Cmd_Look(Me()); }


x86 assembly (clang, -O0):
<Act_Desc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Me@plt>
mov    %eax,%edi
call   1030 <Cmd_Look@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_Desc>:
push   %rax
xor    %eax,%eax
call   1040 <Me@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <Cmd_Look@plt>

LLVM IR (-O0):
define void @Act_Desc() {
%1 = call i32 (...) @Me()
%2 = call i32 @Cmd_Look(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Act_Desc() {
%1 = tail call i32 (...) @Me()
%2 = tail call i32 @Cmd_Look(i32 %1)
ret void
}
__attribute__((always_)) void enable_x2apic(void) {}


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

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

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

LLVM IR (-O2):
define void @enable_x2apic() {
ret void
}
void _M2_deviceIf_finish(__attribute__((unused)) int argc,
                         __attribute__((unused)) char *argv[]) {}


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

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

LLVM IR (-O0):
define void @_M2_deviceIf_finish(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 @_M2_deviceIf_finish(i32 %0, i8** nocapture %1) {
ret void
}
/* Type definitions */
typedef unsigned int __u8;

/* Variables and functions */
unsigned int get_hc_erase_grp_size(__u8 *ext_csd) { return ext_csd[224]; }


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

x86 assembly (clang, -O2):
<get_hc_erase_grp_size>:
mov    0x380(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_hc_erase_grp_size(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 224
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_hc_erase_grp_size(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 224
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int strlen(unsigned char *);
int asciicheck(unsigned char *string) {
  int i;
  int length = strlen(string);
  for (i = 0; i < length; i++) {
    if (string[i] > 127) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<asciicheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    116f <asciicheck+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x7f,%eax
jle    115c <asciicheck+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1176 <asciicheck+0x66>
jmp    1161 <asciicheck+0x51>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112f <asciicheck+0x1f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asciicheck>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
jle    113f <asciicheck+0x2f>
mov    %ecx,%ecx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,(%rbx,%rdx,1)
js     1141 <asciicheck+0x31>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1130 <asciicheck+0x20>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @asciicheck(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp slt i8 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %14, label %6
14: ; preds = %8, %6, %1
%15 = phi i32 [ 1, %1 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %15
}
void test_bzero(void) {}


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

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

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

LLVM IR (-O2):
define void @test_bzero() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int *malloc(int);
void main() {
  int *p = malloc(sizeof(int));
  int i;
  *p = 0;
  for (i = 0; i < 10; i++) {
    assert(*p == 0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1173 <main+0x53>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <main+0x27>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = tail call i32 @assert(i32 1)
%7 = tail call i32 @assert(i32 1)
%8 = tail call i32 @assert(i32 1)
%9 = tail call i32 @assert(i32 1)
%10 = tail call i32 @assert(i32 1)
%11 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ asserter_crash_if(int, int);
int runner_main(void) {
  asserter_crash_if(1 == 0, 6);
  asserter_crash_if(0 == 0, 0);
  return 8;
}


x86 assembly (clang, -O0):
<runner_main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x6,%esi
call   1030 <asserter_crash_if@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <asserter_crash_if@plt>
mov    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<runner_main>:
push   %rax
xor    %edi,%edi
mov    $0x6,%esi
call   1030 <asserter_crash_if@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <asserter_crash_if@plt>
mov    $0x8,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @runner_main() {
%1 = call i32 @asserter_crash_if(i32 0, i32 6)
%2 = call i32 @asserter_crash_if(i32 1, i32 0)
ret i32 8
}

LLVM IR (-O2):
define i32 @runner_main() {
%1 = tail call i32 @asserter_crash_if(i32 0, i32 6)
%2 = tail call i32 @asserter_crash_if(i32 1, i32 0)
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_plot_QP(int /*<<< orphan*/, float, float);
void g2_plot_qp_(float *dev, float *x, float *y) {
  g2_plot_QP(dtoi(*dev), *x, *y);
}


x86 assembly (clang, -O0):
<g2_plot_qp_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1040 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
call   1030 <g2_plot_QP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_plot_qp_>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1040 <dtoi@plt>
movss  (%rbx),%xmm0
movss  (%r14),%xmm1
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <g2_plot_QP@plt>

LLVM IR (-O0):
define void @g2_plot_qp_(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = call i32 @dtoi(float %8)
%10 = load float*, float** %5
%11 = load float, float* %10
%12 = load float*, float** %6
%13 = load float, float* %12
%14 = call i32 @g2_plot_QP(i32 %9, float %11, float %13)
ret void
}

LLVM IR (-O2):
define void @g2_plot_qp_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = tail call i32 @dtoi(float %4)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = tail call i32 @g2_plot_QP(i32 %5, float %6, float %7)
ret void
}
unsigned int count_digits(const unsigned int num) {
  unsigned int c = 0;
  unsigned int n = num;
  while (n) {
    n /= 10;
    c++;
  }
  return c;
}


x86 assembly (clang, -O0):
<count_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113b <count_digits+0x3b>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1114 <count_digits+0x14>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_digits>:
xor    %eax,%eax
test   %edi,%edi
je     1124 <count_digits+0x24>
mov    $0xcccccccd,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <count_digits+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_digits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = udiv i32 %4, 10
%7 = add i32 %5, 1
%8 = icmp ult i32 %4, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
void error(void) { perror("install"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"install\00"
define void @error() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ oss_mixer_close();
void hw_close_mixer(void) { oss_mixer_close(); }


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

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

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

LLVM IR (-O2):
define void @hw_close_mixer() {
%1 = tail call i32 (...) @oss_mixer_close()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Absolute(int);
int /*<<< orphan*/ STA8(int /*<<< orphan*/);
void Op8DM1(void) { STA8(Absolute(2)); }


x86 assembly (clang, -O0):
<Op8DM1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <Absolute@plt>
mov    %eax,%edi
call   1030 <STA8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op8DM1>:
push   %rax
mov    $0x2,%edi
call   1040 <Absolute@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STA8@plt>

LLVM IR (-O0):
define void @Op8DM1() {
%1 = call i32 @Absolute(i32 2)
%2 = call i32 @STA8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op8DM1() {
%1 = tail call i32 @Absolute(i32 2)
%2 = tail call i32 @STA8(i32 %1)
ret void
}
int main(int argc, char **argv) {
  int *ptr = 0;
  {
    int a;
    ptr = &a;
    *ptr = 12345;
  }
  return *ptr;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x3039,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
store i32* %7, i32** %6
%8 = load i32*, i32** %6
store i32 12345, i32* %8
%9 = load i32*, i32** %6
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 12345
}
/* Variables and functions */
int /*<<< orphan*/ print2(char *);
void writeDict(void) {
  print2("This function has not been implemented yet.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"This function has not been implemented yet.\0A\00"
define void @writeDict() {
%1 = call i32 @print2(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"This function has not been implemented yet.\0A\00"
define void @writeDict() {
%1 = tail call i32 @print2(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mew_debug_die_with_message(char *);
void hard_fault_handler(void) {
  mew_debug_die_with_message("hard_fault_handler");
}


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

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"hard_fault_handler\00"
define void @hard_fault_handler() {
%1 = tail call i32 @mew_debug_die_with_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
int do_264() { return 264; }


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

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

LLVM IR (-O0):
define i32 @do_264() {
ret i32 264
}

LLVM IR (-O2):
define i32 @do_264() {
ret i32 264
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void msleep(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


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

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

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

LLVM IR (-O2):
define void @msleep() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void pit_init(int f) {
  int c = 1193182 / f;
  outb(0x43, 0x34);
  outb(0x40, c & 0xFF);
  outb(0x40, c >> 8);
}


x86 assembly (clang, -O0):
<pit_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1234de,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <outb@plt>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
mov    -0x8(%rbp),%esi
sar    $0x8,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pit_init>:
push   %rbx
mov    $0x1234de,%eax
xor    %edx,%edx
idiv   %edi
mov    %eax,%ebx
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <outb@plt>
movzbl %bl,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
sar    $0x8,%ebx
mov    $0x40,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @pit_init(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 1193182, %4
store i32 %5, i32* %3
%6 = call i32 @outb(i32 67, i32 52)
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = call i32 @outb(i32 64, i32 %8)
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = call i32 @outb(i32 64, i32 %11)
ret void
}

LLVM IR (-O2):
define void @pit_init(i32 %0) {
%2 = sdiv i32 1193182, %0
%3 = tail call i32 @outb(i32 67, i32 52)
%4 = and i32 %2, 255
%5 = tail call i32 @outb(i32 64, i32 %4)
%6 = ashr i32 %2, 8
%7 = tail call i32 @outb(i32 64, i32 %6)
ret void
}
int main() {
  int a = 30;
  int b = 9;
  int c;
  c = b * 4;
  if (c > 10) {
    c = c - 10;
  }
  return c * (60 / a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0x8(%rbp)
movl   $0x9,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jle    1135 <main+0x35>
mov    -0x10(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x3c,%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %2
store i32 9, i32* %3
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 4
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 10
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 10
store i32 %11, i32* %4
br label %12
12: ; preds = %9, %0
%13 = load i32, i32* %4
%14 = load i32, i32* %2
%15 = sdiv i32 60, %14
%16 = mul nsw i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 52
}
int main(void) {
  int **const b;
  int **c;
  c = b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
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
%4 = load i32**, i32*** %2
store i32** %4, i32*** %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
yyerror(msg) char *msg;
{
  long pos;
  yyGetPos(&pos);
  MESSAGE(msg, pos);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <yyGetPos@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <MESSAGE@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1040 <yyGetPos@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <MESSAGE@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @yyerror(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = call i32 (i64*, ...) bitcast (i32 (...)* @yyGetPos to i32 (i64*, ...)*)(i64* %4)
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @MESSAGE to i32 (i8*, i64, ...)*)(i8* %6, i64 %7)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @yyerror(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 (i64*, ...) bitcast (i32 (...)* @yyGetPos to i32 (i64*, ...)*)(i64* %2)
%5 = load i64, i64* %2
%6 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @MESSAGE to i32 (i8*, i64, ...)*)(i8* %0, i64 %5)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ TTWAIN_CloseSourceManager(int /*<<< orphan*/ *);
int TTWAIN_UnloadSourceManagerPD();
int TTWAIN_UnloadSourceManager(void) {
  TTWAIN_CloseSourceManager(NULL);
  return TTWAIN_UnloadSourceManagerPD();
}


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

x86 assembly (clang, -O2):
<TTWAIN_UnloadSourceManager>:
push   %rax
xor    %edi,%edi
call   1040 <TTWAIN_CloseSourceManager@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <TTWAIN_UnloadSourceManagerPD@plt>

LLVM IR (-O0):
define i32 @TTWAIN_UnloadSourceManager() {
%1 = call i32 @TTWAIN_CloseSourceManager(i32* null)
%2 = call i32 (...) @TTWAIN_UnloadSourceManagerPD()
ret i32 %2
}

LLVM IR (-O2):
define i32 @TTWAIN_UnloadSourceManager() {
%1 = tail call i32 @TTWAIN_CloseSourceManager(i32* null)
%2 = tail call i32 (...) @TTWAIN_UnloadSourceManagerPD()
ret i32 %2
}
void plat_swiotlb_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @plat_swiotlb_setup() {
ret void
}
/* Variables and functions */
void __nv_sincospif(float, float *, float *);
void sincospif(float __a, float *__sptr, float *__cptr) {
  return __nv_sincospif(__a, __sptr, __cptr);
}


x86 assembly (clang, -O0):
<sincospif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <__nv_sincospif@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sincospif>:
jmp    1030 <__nv_sincospif@plt>

LLVM IR (-O0):
define void @sincospif(float %0, float* %1, float* %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = load float*, float** %5
%9 = load float*, float** %6
ret void
}

LLVM IR (-O2):
define void @sincospif(float %0, float* %1, float* %2) {
tail call void @__nv_sincospif(float %0, float* %1, float* %2)
ret void
}
void l8(int a, int b, int c, int d, int e, int f, int g, int h) {}


x86 assembly (clang, -O0):
<l8>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @l8(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
ret void
}

LLVM IR (-O2):
define void @l8(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
ret void
}
void _exit(int n) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

x86 assembly (clang, -O2):
<_exit>:
jmp    1100 <_exit>

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Type definitions */
struct buffer {
  int dummy;
};
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ buffer_write(struct buffer *, short *, int);
void buffer_write_short(struct buffer *__restrict buf, short data) {
  buffer_write(buf, &data, sizeof(data));
}


x86 assembly (clang, -O0):
<buffer_write_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xa(%rbp),%rsi
mov    $0x2,%edx
call   1030 <buffer_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_write_short>:
push   %rax
mov    %si,0x6(%rsp)
lea    0x6(%rsp),%rsi
mov    $0x2,%edx
call   1030 <buffer_write@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.buffer = type { i32 }
define void @buffer_write_short(%struct.buffer* noalias %0, i16 signext %1) {
%3 = alloca %struct.buffer*
%4 = alloca i16
store %struct.buffer* %0, %struct.buffer** %3
store i16 %1, i16* %4
%5 = load %struct.buffer*, %struct.buffer** %3
%6 = call i32 @buffer_write(%struct.buffer* %5, i16* %4, i32 2)
ret void
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define void @buffer_write_short(%struct.buffer* noalias %0, i16 signext %1) {
%3 = alloca i16
store i16 %1, i16* %3
%4 = call i32 @buffer_write(%struct.buffer* %0, i16* %3, i32 2)
ret void
}