xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DATA_tools();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_tools();
LIBRARY_tools() {
  LibraryHeader("tools", "Sat Feb  1 10:41:23 2014 ");
  DATA_tools();
  STARTUP_tools();
}


x86 assembly (clang, -O0):
<LIBRARY_tools>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1040 <LibraryHeader@plt>
mov    $0x0,%al
call   1050 <DATA_tools@plt>
mov    $0x0,%al
call   1030 <STARTUP_tools@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_tools>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1040 <LibraryHeader@plt>
xor    %eax,%eax
call   1050 <DATA_tools@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <STARTUP_tools@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"tools\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:23 2014 \00"
define i32 @LIBRARY_tools() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_tools()
%4 = call i32 (...) @STARTUP_tools()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"tools\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:23 2014 \00"
define i32 @LIBRARY_tools() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_tools()
%3 = tail call i32 (...) @STARTUP_tools()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void gffi_set_uint_16_swapped(uint8_t *location, int offset, uint16_t value) {
  uint8_t *buf = (uint8_t *)&value;
  location[offset + 0] = buf[1];
  location[offset + 1] = buf[0];
}


x86 assembly (clang, -O0):
<gffi_set_uint_16_swapped>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gffi_set_uint_16_swapped>:
movslq %esi,%rax
mov    %edx,0x4(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @gffi_set_uint_16_swapped(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %2, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void indent(int nestingLevel) {
  while (nestingLevel--)
    puts("  ");
}


x86 assembly (clang, -O0):
<indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1140 <indent+0x30>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
jmp    111b <indent+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     113d <indent+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
jne    1130 <indent+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @indent(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void CG_HandleMessage(const char *_buffer, int _messagesize, int _commandtime) {
}


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

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

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

LLVM IR (-O2):
define void @CG_HandleMessage(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sql_header() {
  printf("Username | Enabled |\n");
  printf("--------------------\n");
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Username | Enabled |\0A\00"
@.str.1 = [22 x i8] c"--------------------\0A\00"
define void @print_sql_header() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Username | Enabled |\00"
@str.2 = [21 x i8] c"--------------------\00"
define void @print_sql_header() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ utf8_char_len(char const *);
unsigned int utf8_len(const char *utf8) {
  unsigned int cnt = 0;
  unsigned int len = 0;
  while (utf8[len]) {
    len += utf8_char_len(utf8 + len);
    ++cnt;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<utf8_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1164 <utf8_len+0x54>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%eax
add    %rax,%rdi
call   1030 <utf8_char_len@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <utf8_len+0x1a>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_len>:
push   %rbp
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1137 <utf8_len+0x27>
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
call   1030 <utf8_char_len@plt>
add    %eax,%ebx
add    $0x1,%ebp
lea    (%r14,%rbx,1),%rdi
cmpb   $0x0,(%r14,%rbx,1)
jne    1120 <utf8_len+0x10>
jmp    1139 <utf8_len+0x29>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @utf8_len(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %12, %4 ], [ %0, %1 ]
%6 = phi i64 [ %11, %4 ], [ 0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = tail call i64 @utf8_char_len(i8* %5)
%9 = add nsw i64 %8, %6
%10 = add i32 %7, 1
%11 = and i64 %9, 4294967295
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print_help(char *runname) {
  printf(
      "Usage:\n %s [options]\n			Options:\n		"
      "		--interface|-i Name of used interface (default: %s)\n	"
      "			--mac|-m Mac address of other end (required)\n	"
      "			--type|-t ethernet type\n			"
      "	--uid|-u working uid (default: 65535)\n				"
      "--verbose|-v increase verbosity\n				"
      "--help|-h This message\n		\n",
      runname, "eth0");
}


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

x86 assembly (clang, -O2):
<print_help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
lea    0xff2(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [275 x i8] c"Usage:\0A %s [options]\0A\09\09\09Options:\0A\09\09\09\09--interface|-i Name of used interface (default: %s)\0A\09\09\09\09--mac|-m Mac address of other end (required)\0A\09\09\09\09--type|-t ethernet type\0A\09\09\09\09--uid|-u working uid (default: 65535)\0A\09\09\09\09--verbose|-v increase verbosity\0A\09\09\09\09--help|-h This message\0A\09\09\0A\00"
@.str.1 = [5 x i8] c"eth0\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([275 x i8], [275 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [275 x i8] c"Usage:\0A %s [options]\0A\09\09\09Options:\0A\09\09\09\09--interface|-i Name of used interface (default: %s)\0A\09\09\09\09--mac|-m Mac address of other end (required)\0A\09\09\09\09--type|-t ethernet type\0A\09\09\09\09--uid|-u working uid (default: 65535)\0A\09\09\09\09--verbose|-v increase verbosity\0A\09\09\09\09--help|-h This message\0A\09\09\0A\00"
@.str.1 = [5 x i8] c"eth0\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([275 x i8], [275 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int reverse(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int in;
  scanf("%d", &in);
  int count = reverse(in);
  printf("Integer after reverseing is : %d\n", count);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <reverse@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <reverse@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [34 x i8] c"Integer after reverseing is : %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @reverse(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [34 x i8] c"Integer after reverseing is : %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @reverse(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void fmt_convert_s20_to_s20(void *dest_v, void *src_v, int n) {
  memcpy(dest_v, src_v, n * sizeof(int32_t));
}


x86 assembly (clang, -O0):
<fmt_convert_s20_to_s20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmt_convert_s20_to_s20>:
shl    $0x2,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @fmt_convert_s20_to_s20(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 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(i8* %7, i8* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @fmt_convert_s20_to_s20(i8* %0, i8* %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %4)
ret void
}
/* Type definitions */
struct iovec {
  int dummy;
};
struct io_uring_sqe {
  int dummy;
};
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ io_uring_prep_rw(int, struct io_uring_sqe *, int,
                                    struct iovec const *, unsigned int,
                                    int /*<<< orphan*/);
void io_uring_prep_writev(struct io_uring_sqe *sqe, int fd,
                          const struct iovec *iovecs, unsigned nr_vecs,
                          off_t offset) {
  io_uring_prep_rw(2, sqe, fd, iovecs, nr_vecs, offset);
}


x86 assembly (clang, -O0):
<io_uring_prep_writev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    $0x2,%edi
call   1030 <io_uring_prep_rw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_uring_prep_writev>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x2,%edi
jmp    1030 <io_uring_prep_rw@plt>

LLVM IR (-O0):
%struct.io_uring_sqe = type { i32 }
%struct.iovec = type { i32 }
define void @io_uring_prep_writev(%struct.io_uring_sqe* %0, i32 %1, %struct.iovec* %2, i32 %3, i32 %4) {
%6 = alloca %struct.io_uring_sqe*
%7 = alloca i32
%8 = alloca %struct.iovec*
%9 = alloca i32
%10 = alloca i32
store %struct.io_uring_sqe* %0, %struct.io_uring_sqe** %6
store i32 %1, i32* %7
store %struct.iovec* %2, %struct.iovec** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.io_uring_sqe*, %struct.io_uring_sqe** %6
%12 = load i32, i32* %7
%13 = load %struct.iovec*, %struct.iovec** %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @io_uring_prep_rw(i32 2, %struct.io_uring_sqe* %11, i32 %12, %struct.iovec* %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.io_uring_sqe = type { i32 }
%struct.iovec = type { i32 }
define void @io_uring_prep_writev(%struct.io_uring_sqe* %0, i32 %1, %struct.iovec* %2, i32 %3, i32 %4) {
%6 = tail call i32 @io_uring_prep_rw(i32 2, %struct.io_uring_sqe* %0, i32 %1, %struct.iovec* %2, i32 %3, i32 %4)
ret void
}
void bar(int *buf, int size) {
  for (int i = 0; i < size; i++)
    buf[i] = 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <bar+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <bar+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
test   %esi,%esi
jle    1126 <bar+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @bar(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 = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 0, i32* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @bar(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
int f(int c) {
  while (c < 10) {
    if (c < 0) {
      break;
    }
    c = c - 1;
  }
  return 3;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    112e <f+0x2e>
cmpl   $0x0,-0x4(%rbp)
jge    1120 <f+0x20>
jmp    112e <f+0x2e>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <f+0x7>
mov    $0x3,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fldpi() {
  db(0xD9);
  db(0xEB);
}


x86 assembly (clang, -O0):
<fldpi>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xeb,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fldpi>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xeb,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fldpi() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 235)
ret void
}

LLVM IR (-O2):
define void @fldpi() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 235)
ret void
}
void stuffnum(n) int n;
{
  char buf[32];
  sprintf(buf, "%d", n);
  stuffin(buf);
}


x86 assembly (clang, -O0):
<stuffnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1030 <stuffin@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stuffnum>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <stuffin@plt>
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @stuffnum(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @stuffin to i32 (i8*, ...)*)(i8* %3)
ret void
}
int decimal__getDigitInDeclet(int declet, int pos) {
  switch (pos) {
  case 0:
    return ((declet) % 10);
  case 1:
    return (((declet) / 10) % 10);
  case 2:
    return ((declet) / 100);
  }
}


x86 assembly (clang, -O0):
<decimal__getDigitInDeclet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113f <decimal__getDigitInDeclet+0x3f>
jmp    111d <decimal__getDigitInDeclet+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1152 <decimal__getDigitInDeclet+0x52>
jmp    112e <decimal__getDigitInDeclet+0x2e>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     116d <decimal__getDigitInDeclet+0x6d>
jmp    117b <decimal__getDigitInDeclet+0x7b>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
jmp    117b <decimal__getDigitInDeclet+0x7b>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
jmp    117b <decimal__getDigitInDeclet+0x7b>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimal__getDigitInDeclet>:
mov    %edi,%eax
cmp    $0x2,%esi
je     111c <decimal__getDigitInDeclet+0x1c>
cmp    $0x1,%esi
je     1133 <decimal__getDigitInDeclet+0x33>
test   %esi,%esi
jne    1132 <decimal__getDigitInDeclet+0x32>
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rcx
jmp    1152 <decimal__getDigitInDeclet+0x52>
cltq
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
ret
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @decimal__getDigitInDeclet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
switch i32 %6, label %17 [
i32 0, label %7
i32 1, label %10
i32 2, label %14
]
7: ; preds = %2
%8 = load i32, i32* %4
%9 = srem i32 %8, 10
store i32 %9, i32* %3
br label %17
10: ; preds = %2
%11 = load i32, i32* %4
%12 = sdiv i32 %11, 10
%13 = srem i32 %12, 10
store i32 %13, i32* %3
br label %17
14: ; preds = %2
%15 = load i32, i32* %4
%16 = sdiv i32 %15, 100
store i32 %16, i32* %3
br label %17
17: ; preds = %7, %10, %14, %2
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @decimal__getDigitInDeclet(i32 %0, i32 %1) {
switch i32 %1, label %10 [
i32 0, label %3
i32 1, label %5
i32 2, label %8
]
3: ; preds = %2
%4 = srem i32 %0, 10
br label %10
5: ; preds = %2
%6 = sdiv i32 %0, 10
%7 = srem i32 %6, 10
br label %10
8: ; preds = %2
%9 = sdiv i32 %0, 100
br label %10
10: ; preds = %3, %5, %8, %2
%11 = phi i32 [ undef, %2 ], [ %9, %8 ], [ %7, %5 ], [ %4, %3 ]
ret i32 %11
}
int doADD(int v1, int v2) { return v1 + v2; }


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

x86 assembly (clang, -O2):
<doADD>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @doADD(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void foo637(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo637(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ mt_rand();
float mt_rand_lt1(void) {
  return ((float)mt_rand() / ((float)0xffffffffUL + 1.0f));
}


x86 assembly (clang, -O0):
<mt_rand_lt1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mt_rand@plt>
cvtsi2ss %rax,%xmm0
movss  0xed8(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_rand_lt1>:
push   %rax
xor    %eax,%eax
call   1030 <mt_rand@plt>
cvtsi2ss %rax,%xmm0
mulss  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @mt_rand_lt1() {
%1 = call i64 (...) @mt_rand()
%2 = sitofp i64 %1 to float
%3 = fdiv float %2, 0x41F0000000000000
ret float %3
}

LLVM IR (-O2):
define float @mt_rand_lt1() {
%1 = tail call i64 (...) @mt_rand()
%2 = sitofp i64 %1 to float
%3 = fmul float %2, 0x3DF0000000000000
ret float %3
}
int opena(a) const char *const a;
{
  yell("Opening", a);
  ;
  {
    int fd;
    return (fd = ropen(a, 1, 0)) < 0
               ? creat(a, (0400 | 0200 | 0040 | 0020 | 0004 | 0002 | 0001))
               : fd;
  }
}


x86 assembly (clang, -O0):
<opena>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <yell@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1050 <ropen@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1184 <opena+0x54>
mov    -0x8(%rbp),%rdi
mov    $0x1b7,%esi
mov    $0x0,%al
call   1040 <creat@plt>
mov    %eax,-0x10(%rbp)
jmp    118a <opena+0x5a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opena>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <yell@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <ropen@plt>
test   %eax,%eax
js     115c <opena+0x2c>
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x1b7,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <creat@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Opening\00"
define i32 @opena(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @yell to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ropen to i32 (i8*, i32, i32, ...)*)(i8* %6, i32 1, i32 0)
store i32 %7, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @creat to i32 (i8*, i32, ...)*)(i8* %10, i32 439)
br label %14
12: ; preds = %1
%13 = load i32, i32* %3
br label %14
14: ; preds = %12, %9
%15 = phi i32 [ %11, %9 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"Opening\00"
define i32 @opena(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @yell to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ropen to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 1, i32 0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @creat to i32 (i8*, i32, ...)*)(i8* %0, i32 439)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ %6, %5 ], [ %3, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegWriteWord(int /*<<< orphan*/, int,
                                      int /*<<< orphan*/);
void wiznetSetSocketDestPort(uint8_t socket, uint16_t port) {
  wiznetRegWriteWord(socket, (0x0000 + 0x0010), port);
}


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

x86 assembly (clang, -O2):
<wiznetSetSocketDestPort>:
mov    %esi,%edx
mov    $0x10,%esi
jmp    1030 <wiznetRegWriteWord@plt>

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

LLVM IR (-O2):
define void @wiznetSetSocketDestPort(i32 %0, i32 %1) {
%3 = tail call i32 @wiznetRegWriteWord(i32 %0, i32 16, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_zi_free_numeric(void **);
void umf4zfnum(void **Numeric) { umfpack_zi_free_numeric(Numeric); }


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

x86 assembly (clang, -O2):
<umf4zfnum>:
jmp    1030 <umfpack_zi_free_numeric@plt>

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

LLVM IR (-O2):
define void @umf4zfnum(i8** %0) {
%2 = tail call i32 @umfpack_zi_free_numeric(i8** %0)
ret void
}
unsigned int get_NextMonth(unsigned int time) {
  int month;
  month = (time / 10000) % 100;
  if (month < 12)
    return (time + 10000);
  return (time + 1000000 - 110000);
}


x86 assembly (clang, -O0):
<get_NextMonth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %ecx
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0xc,-0xc(%rbp)
jge    1139 <get_NextMonth+0x39>
mov    -0x8(%rbp),%eax
add    $0x2710,%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <get_NextMonth+0x49>
mov    -0x8(%rbp),%eax
add    $0xf4240,%eax
sub    $0x1adb0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_NextMonth>:
mov    %edi,%eax
mov    $0xd1b71759,%ecx
imul   %rax,%rcx
shr    $0x2d,%rcx
imul   $0x51eb851f,%rcx,%rax
shr    $0x25,%rax
imul   $0x64,%eax,%eax
sub    %eax,%ecx
lea    0xd9490(%rdi),%edx
lea    0x2710(%rdi),%eax
cmp    $0xc,%ecx
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @get_NextMonth(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = udiv i32 %5, 10000
%7 = urem i32 %6, 100
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 12
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = add i32 %11, 10000
store i32 %12, i32* %2
br label %17
13: ; preds = %1
%14 = load i32, i32* %3
%15 = add i32 %14, 1000000
%16 = sub i32 %15, 110000
store i32 %16, i32* %2
br label %17
17: ; preds = %13, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @get_NextMonth(i32 %0) {
%2 = udiv i32 %0, 10000
%3 = urem i32 %2, 100
%4 = icmp ult i32 %3, 12
%5 = select i1 %4, i32 10000, i32 890000
%6 = add i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int rand();
int rollDice(void) {
  int die1;
  int die2;
  int workSum;
  die1 = 1 + (rand() % 6);
  die2 = 1 + (rand() % 6);
  workSum = die1 + die2;
  printf("Player rolled %d + %d = %d\n", die1, die2, workSum);
  return workSum;
}


x86 assembly (clang, -O0):
<rollDice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rollDice>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x1,%ebx
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edx
add    $0x1,%edx
lea    (%rdx,%rbx,1),%ebp
lea    0xe7f(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%ecx
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Player rolled %d + %d = %d\0A\00"
define i32 @rollDice() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 6
%6 = add nsw i32 1, %5
store i32 %6, i32* %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 6
%9 = add nsw i32 1, %8
store i32 %9, i32* %2
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [28 x i8] c"Player rolled %d + %d = %d\0A\00"
define i32 @rollDice() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = add nsw i32 %2, 1
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, 6
%6 = add nsw i32 %5, 1
%7 = add nsw i32 %6, %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6, i32 %7)
ret i32 %7
}
void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @usb_disable_xhci_ports(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printid(char);
void MAIN() {
  char a = 'a';
  printid(a);
  a = '\n';
  printid(a);
  a = '\t';
  printid(a);
  a = '\0';
  printid(a);
}


x86 assembly (clang, -O0):
<MAIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x61,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <printid@plt>
movb   $0xa,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <printid@plt>
movb   $0x9,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <printid@plt>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAIN>:
push   %rax
mov    $0x61,%edi
call   1030 <printid@plt>
mov    $0xa,%edi
call   1030 <printid@plt>
mov    $0x9,%edi
call   1030 <printid@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <printid@plt>

LLVM IR (-O0):
define void @MAIN() {
%1 = alloca i8
store i8 97, i8* %1
%2 = load i8, i8* %1
%3 = call i32 @printid(i8 signext %2)
store i8 10, i8* %1
%4 = load i8, i8* %1
%5 = call i32 @printid(i8 signext %4)
store i8 9, i8* %1
%6 = load i8, i8* %1
%7 = call i32 @printid(i8 signext %6)
store i8 0, i8* %1
%8 = load i8, i8* %1
%9 = call i32 @printid(i8 signext %8)
ret void
}

LLVM IR (-O2):
define void @MAIN() {
%1 = tail call i32 @printid(i8 signext 97)
%2 = tail call i32 @printid(i8 signext 10)
%3 = tail call i32 @printid(i8 signext 9)
%4 = tail call i32 @printid(i8 signext 0)
ret void
}
int test_imm_D5uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xD5 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D5uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 13959168
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int debug_active_process();
int /*<<< orphan*/ debug_display_pcb_pid(int);
int /*<<< orphan*/ printf(char *);
int debug_display_pcb() {
  int pid = debug_active_process();
  if (pid > -1) {
    debug_display_pcb_pid(pid);
    return 1;
  }
  printf("No active processes.\n");
  return 0;
}


x86 assembly (clang, -O0):
<debug_display_pcb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <debug_active_process@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jle    1160 <debug_display_pcb+0x30>
mov    -0x8(%rbp),%edi
call   1050 <debug_display_pcb_pid@plt>
movl   $0x1,-0x4(%rbp)
jmp    1173 <debug_display_pcb+0x43>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_display_pcb>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <debug_active_process@plt>
test   %eax,%eax
js     114c <debug_display_pcb+0x1c>
mov    %eax,%edi
call   1050 <debug_display_pcb_pid@plt>
mov    $0x1,%ebx
jmp    1158 <debug_display_pcb+0x28>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"No active processes.\0A\00"
define i32 @debug_display_pcb() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @debug_active_process()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @debug_display_pcb_pid(i32 %7)
store i32 1, i32* %1
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@str = [21 x i8] c"No active processes.\00"
define i32 @debug_display_pcb() {
%1 = tail call i32 (...) @debug_active_process()
%2 = icmp sgt i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @debug_display_pcb_pid(i32 %1)
br label %7
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ 1, %3 ], [ 0, %5 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ctranspose(double *, int, int, double *);
int /*<<< orphan*/ stranspose(double *, int, int, double *);
void mtranspose(double *sig, int rows, int cols, double *col) {
  int block;
  block = (int)64 * 16;
  if (rows >= block && cols >= block) {
    ctranspose(sig, rows, cols, col);
  } else {
    stranspose(sig, rows, cols, col);
  }
}


x86 assembly (clang, -O0):
<mtranspose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x400,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     116d <mtranspose+0x4d>
mov    -0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     116d <mtranspose+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <ctranspose@plt>
jmp    1180 <mtranspose+0x60>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1040 <stranspose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtranspose>:
cmp    $0x400,%esi
jl     1135 <mtranspose+0x15>
cmp    $0x400,%edx
jl     1135 <mtranspose+0x15>
jmp    1030 <ctranspose@plt>
jmp    1040 <stranspose@plt>

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

LLVM IR (-O2):
define void @mtranspose(double* %0, i32 %1, i32 %2, double* %3) {
%5 = icmp sgt i32 %1, 1023
%6 = icmp sgt i32 %2, 1023
%7 = and i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @ctranspose(double* %0, i32 %1, i32 %2, double* %3)
br label %12
10: ; preds = %4
%11 = tail call i32 @stranspose(double* %0, i32 %1, i32 %2, double* %3)
br label %12
12: ; preds = %10, %8
ret void
}
int test_imm_C5uint8_reg(unsigned char val) {
  return ((val) & (0xC5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C5uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xc5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_C5uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -59
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
trace(const char *call) { printf("-- %s --\n", call); }


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

x86 assembly (clang, -O2):
<trace>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"-- %s --\0A\00"
define i32 @trace(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
int _isdigit(char ch) { return (ch >= '0' && ch <= '9') ? 1 : 0; }


x86 assembly (clang, -O0):
<_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <_isdigit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isdigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @_isdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
double opr_pi(struct lifo *stack) { return 3.141592653589793238462643; }


x86 assembly (clang, -O0):
<opr_pi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.lifo = type opaque
define double @opr_pi(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
store %struct.lifo* %0, %struct.lifo** %2
ret double 0x400921FB54442D18
}

LLVM IR (-O2):
%struct.lifo = type opaque
define double @opr_pi(%struct.lifo* nocapture readnone %0) {
ret double 0x400921FB54442D18
}
/* Variables and functions */
int /*<<< orphan*/ appaserver_output_error_message(char *, char *, char *);
void m2(char *application_name, char *message) {
  appaserver_output_error_message(application_name, message, (char *)0);
}


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

x86 assembly (clang, -O2):
<m2>:
xor    %edx,%edx
jmp    1030 <appaserver_output_error_message@plt>

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

LLVM IR (-O2):
define void @m2(i8* %0, i8* %1) {
%3 = tail call i32 @appaserver_output_error_message(i8* %0, i8* %1, i8* null)
ret void
}