xunge/DecIR huggingface dataset:
/* Variables and functions */
int gr_textEx(int, int, char const *, int /*<<< orphan*/ *);
int gr_text(int x, int y, const char *s) { return gr_textEx(x, y, s, NULL); }


x86 assembly (clang, -O0):
<gr_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <gr_textEx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gr_text>:
xor    %ecx,%ecx
jmp    1030 <gr_textEx@plt>

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

LLVM IR (-O2):
define i32 @gr_text(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @gr_textEx(i32 %0, i32 %1, i8* %2, i32* null)
ret i32 %4
}
void EVP_PKEY_add1_attr_by_NID(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_add1_attr_by_NID() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_platform_id;
typedef int /*<<< orphan*/ cl_context_properties;
typedef int /*<<< orphan*/ *cl_context;

/* Variables and functions */
int /*<<< orphan*/ CL_CONTEXT_PLATFORM;
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int CreateContext(cl_context *ctx, cl_platform_id platform) {
  cl_context_properties prop[3] = {CL_CONTEXT_PLATFORM,
                                   (cl_context_properties)platform, 0};
  assert(*ctx != NULL);
  return 0;
}


x86 assembly (clang, -O0):
<CreateContext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateContext>:
push   %rax
xor    %eax,%eax
cmpq   $0x0,(%rdi)
setne  %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@CL_CONTEXT_PLATFORM = global i32 0
define i32 @CreateContext(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca [3 x i32]
store i32** %0, i32*** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%7 = load i32, i32* @CL_CONTEXT_PLATFORM
store i32 %7, i32* %6
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = load i32, i32* %4
store i32 %9, i32* %8
%10 = getelementptr inbounds i32, i32* %8, i64 1
store i32 0, i32* %10
%11 = load i32**, i32*** %3
%12 = load i32*, i32** %11
%13 = icmp ne i32* %12, null
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret i32 0
}

LLVM IR (-O2):
@CL_CONTEXT_PLATFORM = global i32 0
define i32 @CreateContext(i32** nocapture %0, i32 %1) {
%3 = load i32*, i32** %0
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i32 0
}
/* Type definitions */
struct evf_filter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *);
void status(struct evf_filter *self, char *buf, int len) {
  snprintf(buf, len, "Commit filter");
}


x86 assembly (clang, -O0):
<status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xecf(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<status>:
mov    %rsi,%rdi
lea    0xee6(%rip),%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
%struct.evf_filter = type { i32 }
@.str = [14 x i8] c"Commit filter\00"
define void @status(%struct.evf_filter* %0, i8* %1, i32 %2) {
%4 = alloca %struct.evf_filter*
%5 = alloca i8*
%6 = alloca i32
store %struct.evf_filter* %0, %struct.evf_filter** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.evf_filter = type { i32 }
@.str = [14 x i8] c"Commit filter\00"
define void @status(%struct.evf_filter* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf2(char *);
void GenWordAlignment(int bss) {
  (void)bss;
  printf2("\talign($2)\n");
}


x86 assembly (clang, -O0):
<GenWordAlignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf2@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"\09align($2)\0A\00"
define void @GenWordAlignment(i32 %0) {
%2 = tail call i32 @printf2(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
int fun844() { return 844; }


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

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

LLVM IR (-O0):
define i32 @fun844() {
ret i32 844
}

LLVM IR (-O2):
define i32 @fun844() {
ret i32 844
}
/* Variables and functions */
int /*<<< orphan*/ UtilsDelay(int);
void RTCU16MSecRegWrite(unsigned short u16Msec) {
  unsigned short usRegValue;
  usRegValue = (*(unsigned short *)(0x4402F800 + 0x00000420 + 2));
  UtilsDelay((80 * 200) / 3);
  (*(unsigned short *)(0x4402F800 + 0x00000420 + 2)) =
      ((usRegValue & ~0x3FF) | u16Msec);
}


x86 assembly (clang, -O0):
<RTCU16MSecRegWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x4402fc22,%eax
mov    (%rax),%ax
mov    %ax,-0x4(%rbp)
mov    $0x14d5,%edi
call   1030 <UtilsDelay@plt>
movzwl -0x4(%rbp),%eax
and    $0xfffffc00,%eax
movzwl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %ax,%cx
mov    $0x4402fc22,%eax
mov    %cx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTCU16MSecRegWrite>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
movzwl 0x4402fc22,%ebp
44
mov    $0x14d5,%edi
call   1030 <UtilsDelay@plt>
and    $0xfffffc00,%ebp
or     %ebx,%ebp
mov    %bp,0x4402fc22
44
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @RTCU16MSecRegWrite(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* inttoptr (i64 1141046306 to i16*)
store i16 %4, i16* %3
%5 = call i32 @UtilsDelay(i32 5333)
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = and i32 %7, -1024
%9 = load i16, i16* %2
%10 = zext i16 %9 to i32
%11 = or i32 %8, %10
%12 = trunc i32 %11 to i16
store i16 %12, i16* inttoptr (i64 1141046306 to i16*)
ret void
}

LLVM IR (-O2):
define void @RTCU16MSecRegWrite(i16 zeroext %0) {
%2 = load i16, i16* inttoptr (i64 1141046306 to i16*)
%3 = tail call i32 @UtilsDelay(i32 5333)
%4 = and i16 %2, -1024
%5 = or i16 %4, %0
store i16 %5, i16* inttoptr (i64 1141046306 to i16*)
ret void
}
int do_156() { return 156; }


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

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

LLVM IR (-O0):
define i32 @do_156() {
ret i32 156
}

LLVM IR (-O2):
define i32 @do_156() {
ret i32 156
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t instruction_extension_extract_type(uint16_t instruction) {
  return (instruction >> 0x08) & 0x01;
}


x86 assembly (clang, -O0):
<instruction_extension_extract_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruction_extension_extract_type>:
mov    %edi,%eax
shr    $0x8,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @instruction_extension_extract_type(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @instruction_extension_extract_type(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void break_on_me(void) { printf("child in leaf!\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"child in leaf!\0A\00"
define void @break_on_me() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"child in leaf!\00"
define void @break_on_me() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int binarysearch(int find, int list[]) { return -1; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
void quux(jmp_buf buf) {
  printf("Inside quux\n");
  printf("Longjmping from quux: 927\n");
  longjmp(buf, 927);
}


x86 assembly (clang, -O0):
<quux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x39f,%esi
call   1040 <longjmp@plt>

x86 assembly (clang, -O2):
<quux>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x39f,%esi
call   1040 <longjmp@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Inside quux\0A\00"
@.str.1 = [27 x i8] c"Longjmping from quux: 927\0A\00"
define void @quux(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @longjmp(i32 %5, i32 927)
unreachable
}

LLVM IR (-O2):
@str = [12 x i8] c"Inside quux\00"
@str.2 = [26 x i8] c"Longjmping from quux: 927\00"
define void @quux(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @longjmp(i32 %0, i32 927)
unreachable
}
void RTHeapSimpleAllocZ(void) {}


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

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

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

LLVM IR (-O2):
define void @RTHeapSimpleAllocZ() {
ret void
}
void waitroutine(int id) {}


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

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

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

LLVM IR (-O2):
define void @waitroutine(i32 %0) {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
char *get_debugfileprefix();
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ strcat(int /*<<< orphan*/, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int trace_file_exists(char *name) {
  struct stat sbuf;
  char *tracing_prefix = get_debugfileprefix();
  char path[256];
  strcat(strcpy(path, tracing_prefix), name);
  return stat(path, &sbuf) ? 0 : 1;
}


x86 assembly (clang, -O0):
<trace_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <get_debugfileprefix@plt>
mov    %rax,-0x18(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
lea    -0x120(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_file_exists>:
push   %r14
push   %rbx
sub    $0x118,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <get_debugfileprefix@plt>
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1060 <strcat@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1040 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @trace_file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %0, i8** %2
%6 = call i8* (...) @get_debugfileprefix()
store i8* %6, i8** %4
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %4
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 @strcat(i32 %9, i8* %10)
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%13 = call i64 @stat(i8* %12, %struct.stat* %3)
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @trace_file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = alloca [256 x i8]
%4 = bitcast %struct.stat* %2 to i8*
%5 = tail call i8* (...) @get_debugfileprefix()
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* %5)
%8 = call i32 @strcat(i32 %7, i8* %0)
%9 = call i64 @stat(i8* %6, %struct.stat* %2)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void printWht(char *str) { printf("%s%s%s", "\x1B[37m", str, "\x1B[0m"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [6 x i8] c"\1B[37m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @printWht(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int __attribute__((aligned(65536))) test_align64K(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @test_align64K() align 65536 {
ret i32 0
}

LLVM IR (-O2):
define i32 @test_align64K() align 65536 {
ret i32 0
}
/* Variables and functions */
int get_ticks();
void delay_usecs(int us) {
  register int endtime;
  endtime = get_ticks() + ((us >> 5) + 1);
  do {
  } while ((endtime - get_ticks()) > 0);
}


x86 assembly (clang, -O0):
<delay_usecs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <get_ticks@plt>
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
add    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <delay_usecs+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <get_ticks@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
cmp    $0x0,%eax
jg     1130 <delay_usecs+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_usecs>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <get_ticks@plt>
sar    $0x5,%ebx
add    %eax,%ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <get_ticks@plt>
cmp    %eax,%ebx
jg     1130 <delay_usecs+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @delay_usecs(i32 %0) {
%2 = tail call i32 (...) @get_ticks()
%3 = ashr i32 %0, 5
%4 = add nsw i32 %3, 1
%5 = add nsw i32 %4, %2
br label %6
6: ; preds = %6, %1
%7 = tail call i32 (...) @get_ticks()
%8 = icmp sgt i32 %5, %7
br i1 %8, label %6, label %9
9: ; preds = %6
ret void
}
int getAutonomousMode() { return 1; }


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

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

LLVM IR (-O0):
define i32 @getAutonomousMode() {
ret i32 1
}

LLVM IR (-O2):
define i32 @getAutonomousMode() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ do_something();
int /*<<< orphan*/ do_something_different();
int /*<<< orphan*/ do_something_else();
int /*<<< orphan*/ do_something_more();
int foo2(int op) {
  switch (op) {
  case 1:
    do_something();
    break;
  case 2:
    do_something_else();
  case 3:
    do_something_different();
    do_something_more();
    break;
  }
  return -1;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     1181 <foo2+0x41>
jmp    115f <foo2+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     118d <foo2+0x4d>
jmp    1170 <foo2+0x30>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
je     1194 <foo2+0x54>
jmp    11a2 <foo2+0x62>
mov    $0x0,%al
call   1030 <do_something@plt>
jmp    11a2 <foo2+0x62>
mov    $0x0,%al
call   1050 <do_something_else@plt>
mov    $0x0,%al
call   1040 <do_something_different@plt>
mov    $0x0,%al
call   1060 <do_something_more@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
push   %rax
cmp    $0x3,%edi
je     1160 <foo2+0x20>
cmp    $0x2,%edi
je     1159 <foo2+0x19>
cmp    $0x1,%edi
jne    116e <foo2+0x2e>
xor    %eax,%eax
call   1030 <do_something@plt>
jmp    116e <foo2+0x2e>
xor    %eax,%eax
call   1050 <do_something_else@plt>
xor    %eax,%eax
call   1040 <do_something_different@plt>
xor    %eax,%eax
call   1060 <do_something_more@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %11 [
i32 1, label %4
i32 2, label %6
i32 3, label %8
]
4: ; preds = %1
%5 = call i32 (...) @do_something()
br label %11
6: ; preds = %1
%7 = call i32 (...) @do_something_else()
br label %8
8: ; preds = %1, %6
%9 = call i32 (...) @do_something_different()
%10 = call i32 (...) @do_something_more()
br label %11
11: ; preds = %1, %8, %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @foo2(i32 %0) {
switch i32 %0, label %9 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
]
2: ; preds = %1
%3 = tail call i32 (...) @do_something()
br label %9
4: ; preds = %1
%5 = tail call i32 (...) @do_something_else()
br label %6
6: ; preds = %1, %4
%7 = tail call i32 (...) @do_something_different()
%8 = tail call i32 (...) @do_something_more()
br label %9
9: ; preds = %1, %6, %2
ret i32 -1
}
/* Variables and functions */
int shlibfunc();
int statlibfunc() { return shlibfunc(); }


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

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

LLVM IR (-O0):
define i32 @statlibfunc() {
%1 = call i32 (...) @shlibfunc()
ret i32 %1
}

LLVM IR (-O2):
define i32 @statlibfunc() {
%1 = tail call i32 (...) @shlibfunc()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int fun_b(void) {
  puts("hello i am static fun_b !");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"hello i am static fun_b !\00"
define i32 @fun_b() {
%1 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"hello i am static fun_b !\00"
define i32 @fun_b() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef int time_t;
typedef scalar_t__ suseconds_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
uint64_t diff_time(struct timeval start, struct timeval end) {
  time_t delta_seconds = end.tv_sec - start.tv_sec;
  suseconds_t delta_micro = end.tv_usec - start.tv_usec;
  uint64_t micros = delta_seconds * 1000000 + delta_micro;
  return micros;
}


x86 assembly (clang, -O0):
<diff_time>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %edx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x20(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
imul   $0xf4240,-0x24(%rbp),%eax
cltq
add    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff_time>:
sub    %edi,%edx
sub    %rsi,%rcx
imul   $0xf4240,%edx,%eax
cltq
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @diff_time(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
%10 = bitcast %struct.timeval* %5 to { i32, i64 }*
%11 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 0
store i32 %0, i32* %11
%12 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 1
store i64 %1, i64* %12
%13 = bitcast %struct.timeval* %6 to { i32, i64 }*
%14 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %13, i32 0, i32 0
store i32 %2, i32* %14
%15 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %13, i32 0, i32 1
store i64 %3, i64* %15
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%17 = load i32, i32* %16
%18 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%19 = load i32, i32* %18
%20 = sub nsw i32 %17, %19
store i32 %20, i32* %7
%21 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%22 = load i64, i64* %21
%23 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%24 = load i64, i64* %23
%25 = sub nsw i64 %22, %24
store i64 %25, i64* %8
%26 = load i32, i32* %7
%27 = mul nsw i32 %26, 1000000
%28 = sext i32 %27 to i64
%29 = load i64, i64* %8
%30 = add nsw i64 %28, %29
store i64 %30, i64* %9
%31 = load i64, i64* %9
ret i64 %31
}

LLVM IR (-O2):
define i64 @diff_time(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = sub nsw i32 %2, %0
%6 = sub i64 %3, %1
%7 = mul nsw i32 %5, 1000000
%8 = sext i32 %7 to i64
%9 = add nsw i64 %6, %8
ret i64 %9
}
void ignore_cb(int sig, short what, void *arg) {}


x86 assembly (clang, -O0):
<ignore_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @ignore_cb(i32 %0, i16 signext %1, i8* nocapture %2) {
ret void
}
int func(void) {
  int n = 3;
  int m = 5;
  n = m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
void silver(void) { return; }


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

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

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

LLVM IR (-O2):
define void @silver() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("%.1lf\n", 8 / 5);
  printf("%.1lf\n", 1);
  printf("%d\n", 8.0 / 5.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
movsd  0xeda(%rip),%xmm0
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
movsd  0xec6(%rip),%xmm0
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
movsd  0xeaa(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef8(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
movsd  0xecd(%rip),%xmm0
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
movsd  0xec1(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.1lf\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double 1.600000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.1lf\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double 1.600000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void Foo(const char *name) {
  printf("Hello, %s!\n", name == NULL ? "stranger" : name);
}


x86 assembly (clang, -O0):
<Foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1137 <Foo+0x27>
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    113f <Foo+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Foo>:
test   %rdi,%rdi
lea    0xef2(%rip),%rsi
cmovne %rdi,%rsi
lea    0xedb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Hello, %s!\0A\00"
@.str.1 = [9 x i8] c"stranger\00"
define void @Foo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i8*, i8** %2
br label %8
8: ; preds = %6, %5
%9 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), %5 ], [ %7, %6 ]
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello, %s!\0A\00"
@.str.1 = [9 x i8] c"stranger\00"
define void @Foo(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
void __attribute__((unused)) write_message(const char *message) {
  ssize_t unused __attribute__((unused));
  unused = write(STDOUT_FILENO, message, strlen(message));
}


x86 assembly (clang, -O0):
<write_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %eax,-0xc(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_message>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec3(%rip),%rax
mov    (%rax),%ebp
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @write_message(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @STDOUT_FILENO
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @write(i32 %4, i8* %5, i32 %7)
store i32 %8, i32* %3
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @write_message(i8* %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 %2, i8* %0, i32 %3)
ret void
}
void BN_RECP_CTX_new(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_RECP_CTX_new() {
ret void
}
void send_signal_debug_dump(int sig, struct task_struct *t) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @send_signal_debug_dump(i32 %0, %struct.task_struct* nocapture %1) {
ret void
}
void printANSI() {}


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

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

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

LLVM IR (-O2):
define void @printANSI() {
ret void
}
__attribute__((always_)) void mpol_cond_put(struct mempolicy *pol) {}


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

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

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

LLVM IR (-O2):
%struct.mempolicy = type opaque
define void @mpol_cond_put(%struct.mempolicy* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_reg64_preg64pimm32(int reg1, int reg2, unsigned int imm32) {
  put8(0x48);
  put8(0x8B);
  put8(0x80 | (reg1 << 3) | reg2);
  put32(imm32);
}


x86 assembly (clang, -O0):
<mov_reg64_preg64pimm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x8b,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0x80,%edi
or     -0x8(%rbp),%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_reg64_preg64pimm32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x8b,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0x80,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_reg64_preg64pimm32(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 = call i32 @put8(i32 72)
%8 = call i32 @put8(i32 139)
%9 = load i32, i32* %4
%10 = shl i32 %9, 3
%11 = or i32 128, %10
%12 = load i32, i32* %5
%13 = or i32 %11, %12
%14 = call i32 @put8(i32 %13)
%15 = load i32, i32* %6
%16 = call i32 @put32(i32 %15)
ret void
}

LLVM IR (-O2):
define void @mov_reg64_preg64pimm32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 72)
%5 = tail call i32 @put8(i32 139)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 128
%9 = tail call i32 @put8(i32 %8)
%10 = tail call i32 @put32(i32 %2)
ret void
}
signed char signedchar_ignoring_signedchar(signed char x, signed char y) {
  return x;
}


x86 assembly (clang, -O0):
<signedchar_ignoring_signedchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedchar_ignoring_signedchar>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @signedchar_ignoring_signedchar(i8 returned signext %0, i8 signext %1) {
ret i8 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char **argv) {
  int i = 0;
  for (i = 0; i < argc; i++) {
    printf("argv[%d] = %s\n", i, argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1169 <main+0x59>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"argv[%d] = %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"argv[%d] = %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int sendUnplace();
int game_unplace() { return sendUnplace(); }


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

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

LLVM IR (-O0):
define i32 @game_unplace() {
%1 = call i32 (...) @sendUnplace()
ret i32 %1
}

LLVM IR (-O2):
define i32 @game_unplace() {
%1 = tail call i32 (...) @sendUnplace()
ret i32 %1
}
/* Variables and functions */
scalar_t__ move_current(int /*<<< orphan*/);
int new_piece();
int /*<<< orphan*/ to_point(int /*<<< orphan*/, int);
int timeout() {
  if (move_current(to_point(0, -1)))
    return 1;
  return new_piece();
}


x86 assembly (clang, -O0):
<timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <to_point@plt>
mov    %eax,%edi
call   1050 <move_current@plt>
cmp    $0x0,%rax
je     1161 <timeout+0x31>
movl   $0x1,-0x4(%rbp)
jmp    116b <timeout+0x3b>
mov    $0x0,%al
call   1040 <new_piece@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeout>:
push   %rax
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <to_point@plt>
mov    %eax,%edi
call   1050 <move_current@plt>
test   %rax,%rax
je     1150 <timeout+0x20>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <new_piece@plt>

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

LLVM IR (-O2):
define i32 @timeout() {
%1 = tail call i32 @to_point(i32 0, i32 -1)
%2 = tail call i64 @move_current(i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @new_piece()
br label %6
6: ; preds = %0, %4
%7 = phi i32 [ %5, %4 ], [ 1, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ f0();
void f1() { f0(); }


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

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

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

LLVM IR (-O2):
define void @f1() {
%1 = tail call i32 (...) @f0()
ret void
}
/* Variables and functions */
scalar_t__ mt_malloc(int, char *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *mt_strdup(char *str, char *callfunc, char *file, int line) {
  char *buf;
  buf =
      (char *)mt_malloc(sizeof(char) * (strlen(str) + 1), callfunc, file, line);
  if (buf) {
    strcpy(buf, str);
  }
  return buf;
}


x86 assembly (clang, -O0):
<mt_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1050 <mt_malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1187 <mt_strdup+0x57>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_strdup>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r15d,%ecx
call   1050 <mt_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     116c <mt_strdup+0x3c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @mt_strdup(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = mul i64 1, %13
%15 = trunc i64 %14 to i32
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
%18 = load i32, i32* %8
%19 = call i64 @mt_malloc(i32 %15, i8* %16, i8* %17, i32 %18)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %9
%21 = load i8*, i8** %9
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %27
23: ; preds = %4
%24 = load i8*, i8** %9
%25 = load i8*, i8** %5
%26 = call i32 @strcpy(i8* %24, i8* %25)
br label %27
27: ; preds = %23, %4
%28 = load i8*, i8** %9
ret i8* %28
}

LLVM IR (-O2):
define i8* @mt_strdup(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, 1
%7 = tail call i64 @mt_malloc(i32 %6, i8* %1, i8* %2, i32 %3)
%8 = inttoptr i64 %7 to i8*
%9 = icmp eq i64 %7, 0
br i1 %9, label %12, label %10
10: ; preds = %4
%11 = tail call i32 @strcpy(i8* %8, i8* %0)
br label %12
12: ; preds = %10, %4
ret i8* %8
}
/* Variables and functions */
int d(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @d() {
ret i32 0
}
char xed_tolower(char c) {
  if (c >= 'A' && c <= 'Z')
    return c - 'A' + 'a';
  return c;
}


x86 assembly (clang, -O0):
<xed_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <xed_tolower+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <xed_tolower+0x36>
movsbl -0x2(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    113c <xed_tolower+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xed_tolower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @xed_tolower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 65
%15 = add nsw i32 %14, 97
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %19
17: ; preds = %7, %1
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %11
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @xed_tolower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int j;
  int k;
  int n;
  assume((j == 0) && (k == n) && (n > 0));
  while (j < n && n > 0) {
    j++;
    k--;
  }
  assert((k == 0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    1159 <main+0x39>
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x11(%rbp)
jne    1159 <main+0x39>
cmpl   $0x0,-0x10(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x12(%rbp)
jge    1181 <main+0x61>
cmpl   $0x0,-0x10(%rbp)
setg   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
test   $0x1,%al
jne    1191 <main+0x71>
jmp    11a8 <main+0x88>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1166 <main+0x46>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 0
br label %14
14: ; preds = %11, %7, %0
%15 = phi i1 [ false, %7 ], [ false, %0 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
%17 = call i32 @assume(i32 %16)
br label %18
18: ; preds = %27, %14
%19 = load i32, i32* %2
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i32, i32* %4
%24 = icmp sgt i32 %23, 0
br label %25
25: ; preds = %22, %18
%26 = phi i1 [ false, %18 ], [ %24, %22 ]
br i1 %26, label %27, label %32
27: ; preds = %25
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
%30 = load i32, i32* %3
%31 = add nsw i32 %30, -1
store i32 %31, i32* %3
br label %18
32: ; preds = %25
%33 = load i32, i32* %3
%34 = icmp eq i32 %33, 0
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}