xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void EMACHashFilterGet(uint32_t ui32Base, uint32_t *pui32HashHi,
                       uint32_t *pui32HashLo) {
  ;
  ;
  *pui32HashLo = (*((volatile uint32_t *)(ui32Base + 0x0000000C)));
  *pui32HashHi = (*((volatile uint32_t *)(ui32Base + 0x00000008)));
}


x86 assembly (clang, -O0):
<EMACHashFilterGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACHashFilterGet>:
mov    0xc(%rdi),%rax
mov    %rax,(%rdx)
mov    0x8(%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @EMACHashFilterGet(i64 %0, i64* %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64*
store i64 %0, i64* %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = add nsw i64 %7, 12
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = load i64*, i64** %6
store i64 %10, i64* %11
%12 = load i64, i64* %4
%13 = add nsw i64 %12, 8
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = load i64*, i64** %5
store i64 %15, i64* %16
ret void
}

LLVM IR (-O2):
define void @EMACHashFilterGet(i64 %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
%4 = add nsw i64 %0, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
store i64 %6, i64* %2
%7 = add nsw i64 %0, 8
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Platform_Halt(int);
int errno;
scalar_t__ unlink(char *);
int Platform_Unlink(unsigned char *n, long long n__len) {
  int _o_result;
  if (unlink((char *)n) < 0) {
    _o_result = errno;
    return _o_result;
  } else {
    _o_result = 0;
    return _o_result;
  }
__retchk:
  Platform_Halt(-3);
  return 0;
  ;
}


x86 assembly (clang, -O0):
<Platform_Unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
jge    114a <Platform_Unlink+0x3a>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <Platform_Unlink+0x47>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Platform_Unlink>:
push   %rax
call   1030 <unlink@plt>
mov    0x2ec3(%rip),%rcx
sar    $0x3f,%rax
and    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @Platform_Unlink(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = call i64 @unlink(i8* %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @errno
store i32 %11, i32* %6
%12 = load i32, i32* %6
store i32 %12, i32* %3
br label %17
13: ; preds = %2
store i32 0, i32* %6
%14 = load i32, i32* %6
store i32 %14, i32* %3
br label %17
15: ; No predecessors!
%16 = call i32 @Platform_Halt(i32 -3)
store i32 0, i32* %3
br label %17
17: ; preds = %15, %13, %10
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @Platform_Unlink(i8* nocapture %0, i64 %1) {
%3 = tail call i64 @unlink(i8* %0)
%4 = icmp slt i64 %3, 0
%5 = load i32, i32* @errno
%6 = select i1 %4, i32 %5, i32 0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
size_t ece_min_block_pad_length(size_t padLen, size_t maxBlockLen) {
  assert(maxBlockLen >= 1);
  size_t blockPadLen = maxBlockLen - 1;
  if (padLen && !blockPadLen) {
    blockPadLen++;
  }
  return blockPadLen > padLen ? padLen : blockPadLen;
}


x86 assembly (clang, -O0):
<ece_min_block_pad_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1160 <ece_min_block_pad_length+0x50>
cmpq   $0x0,-0x18(%rbp)
jne    1160 <ece_min_block_pad_length+0x50>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    117b <ece_min_block_pad_length+0x6b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1183 <ece_min_block_pad_length+0x73>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ece_min_block_pad_length>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
mov    %rsi,%r15
add    $0xffffffffffffffff,%r15
setb   %dil
call   1030 <assert@plt>
test   %r15,%r15
cmovne %r15,%rbx
test   %r14,%r14
cmove  %r15,%rbx
cmp    %r14,%rbx
cmova  %r14,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @ece_min_block_pad_length(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = icmp uge i64 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i64, i64* %4
%11 = sub i64 %10, 1
store i64 %11, i64* %5
%12 = load i64, i64* %3
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load i64, i64* %5
%16 = icmp ne i64 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i64, i64* %5
%19 = add i64 %18, 1
store i64 %19, i64* %5
br label %20
20: ; preds = %17, %14, %2
%21 = load i64, i64* %5
%22 = load i64, i64* %3
%23 = icmp ugt i64 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i64, i64* %3
br label %28
26: ; preds = %20
%27 = load i64, i64* %5
br label %28
28: ; preds = %26, %24
%29 = phi i64 [ %25, %24 ], [ %27, %26 ]
ret i64 %29
}

LLVM IR (-O2):
define i64 @ece_min_block_pad_length(i64 %0, i64 %1) {
%3 = icmp ne i64 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = add i64 %1, -1
%7 = icmp eq i64 %0, 0
%8 = icmp ne i64 %6, 0
%9 = or i1 %7, %8
%10 = select i1 %9, i64 %6, i64 %1
%11 = icmp ugt i64 %10, %0
%12 = select i1 %11, i64 %0, i64 %10
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_drop() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_drop"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"NOT IMPLEMENTED:pa_memblockq_drop\0A\00"
define i32 @pa_memblockq_drop() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_memblockq_drop\00"
define i32 @pa_memblockq_drop() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void free_ulong(unsigned long *val) {}


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

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

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

LLVM IR (-O2):
define void @free_ulong(i64* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
int strtol(char *, char **, int);
int nttp_get_status_code(char *buffer) {
  char status_code[4];
  int code;
  strncpy(status_code, buffer, 3);
  status_code[3] = '\0';
  code = strtol(status_code, (char **)NULL, 10);
  return (int)code;
}


x86 assembly (clang, -O0):
<nttp_get_status_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x9(%rbp)
lea    -0xc(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nttp_get_status_code>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xf(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nttp_get_status_code(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @strncpy(i8* %5, i8* %6, i32 3)
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 0, i8* %8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%10 = call i32 @strtol(i8* %9, i8** null, i32 10)
store i32 %10, i32* %4
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @nttp_get_status_code(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @strncpy(i8* %3, i8* %0, i32 3)
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 0, i8* %5
%6 = call i32 @strtol(i8* nocapture %3, i8** null, i32 10)
ret i32 %6
}
/* Variables and functions */
int strnunvisx(char *, size_t, char const *, int /*<<< orphan*/);
int strnunvis(char *dst, size_t dlen, const char *src) {
  return strnunvisx(dst, dlen, src, 0);
}


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

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

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

LLVM IR (-O2):
define i32 @strnunvis(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @strnunvisx(i8* %0, i64 %1, i8* %2, i32 0)
ret i32 %4
}
int nisdomain_del(const char *ifname, int ifindex, const char *domain) {
  return 0;
}


x86 assembly (clang, -O0):
<nisdomain_del>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nisdomain_del(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_err(char const *);
void error(const char *msg) {
  write_err("sysloguread: Error: ");
  write_err(msg);
  write_err("\n");
}


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

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <write_err@plt>
mov    %rbx,%rdi
call   1030 <write_err@plt>
lea    0xee6(%rip),%rdi
pop    %rbx
jmp    1030 <write_err@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"sysloguread: Error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @write_err(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @write_err(i8* %4)
%6 = call i32 @write_err(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"sysloguread: Error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @error(i8* %0) {
%2 = tail call i32 @write_err(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @write_err(i8* %0)
%4 = tail call i32 @write_err(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int x(int a) { return -1 * a; }


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

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

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

LLVM IR (-O2):
define i32 @x(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int main() {
  int a = 22;
  putchar(a ^ 89);
  int b = 1200;
  putchar(b >> 4);
  int c = 0x6f;
  putchar(c & 0x5f);
  int d = 0x42;
  putchar(d | 0x09);
  int e = 0xffffde;
  putchar(~e);
  int f = 5;
  putchar(5 << 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x16,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    $0x59,%edi
call   1030 <putchar@plt>
movl   $0x4b0,-0xc(%rbp)
mov    -0xc(%rbp),%edi
sar    $0x4,%edi
call   1030 <putchar@plt>
movl   $0x6f,-0x10(%rbp)
mov    -0x10(%rbp),%edi
and    $0x5f,%edi
call   1030 <putchar@plt>
movl   $0x42,-0x14(%rbp)
mov    -0x14(%rbp),%edi
or     $0x9,%edi
call   1030 <putchar@plt>
movl   $0xffffde,-0x18(%rbp)
mov    -0x18(%rbp),%edi
xor    $0xffffffff,%edi
call   1030 <putchar@plt>
movl   $0x5,-0x1c(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4f,%edi
call   1030 <putchar@plt>
mov    $0x4b,%edi
call   1030 <putchar@plt>
mov    $0x4f,%edi
call   1030 <putchar@plt>
mov    $0x4b,%edi
call   1030 <putchar@plt>
mov    $0xff000021,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@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
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 22, i32* %2
%8 = load i32, i32* %2
%9 = xor i32 %8, 89
%10 = call i32 @putchar(i32 %9)
store i32 1200, i32* %3
%11 = load i32, i32* %3
%12 = ashr i32 %11, 4
%13 = call i32 @putchar(i32 %12)
store i32 111, i32* %4
%14 = load i32, i32* %4
%15 = and i32 %14, 95
%16 = call i32 @putchar(i32 %15)
store i32 66, i32* %5
%17 = load i32, i32* %5
%18 = or i32 %17, 9
%19 = call i32 @putchar(i32 %18)
store i32 16777182, i32* %6
%20 = load i32, i32* %6
%21 = xor i32 %20, -1
%22 = call i32 @putchar(i32 %21)
store i32 5, i32* %7
%23 = call i32 @putchar(i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 79)
%2 = tail call i32 @putchar(i32 75)
%3 = tail call i32 @putchar(i32 79)
%4 = tail call i32 @putchar(i32 75)
%5 = tail call i32 @putchar(i32 -16777183)
%6 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_create();
int /*<<< orphan*/ my_read();
int /*<<< orphan*/ my_write();
int /*<<< orphan*/ read_only();
int main() {
  read_only();
  my_create();
  my_write();
  my_read();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <read_only@plt>
mov    $0x0,%al
call   1040 <my_create@plt>
mov    $0x0,%al
call   1050 <my_write@plt>
mov    $0x0,%al
call   1030 <my_read@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <read_only@plt>
xor    %eax,%eax
call   1040 <my_create@plt>
xor    %eax,%eax
call   1050 <my_write@plt>
xor    %eax,%eax
call   1030 <my_read@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @read_only()
%3 = call i32 (...) @my_create()
%4 = call i32 (...) @my_write()
%5 = call i32 (...) @my_read()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @read_only()
%2 = tail call i32 (...) @my_create()
%3 = tail call i32 (...) @my_write()
%4 = tail call i32 (...) @my_read()
ret i32 0
}
int test_imm_B3int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xB3 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B3int64_highword_mem>:
testb  $0xb3,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B3int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 179
%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_B3int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 768799145984
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_pin(volatile uint8_t *port, uint8_t bit_i) { *port |= 1 << bit_i; }


x86 assembly (clang, -O0):
<set_pin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pin>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     %eax,(%rdi)
ret

LLVM IR (-O0):
define void @set_pin(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = load i32*, i32** %3
%8 = load volatile i32, i32* %7
%9 = or i32 %8, %6
store volatile i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @set_pin(i32* %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = load volatile i32, i32* %0
%5 = or i32 %4, %3
store volatile i32 %5, i32* %0
ret void
}
void exit_qemu(int val) {
  int *quemu_test = (int *)0x3ff005f0;
  if (*quemu_test == 0x42) {
    *quemu_test = val;
  } else {
  }
  return;
}


x86 assembly (clang, -O0):
<exit_qemu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x3ff005f0,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x42,(%rax)
jne    112b <exit_qemu+0x2b>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1130 <exit_qemu+0x30>
jmp    1130 <exit_qemu+0x30>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exit_qemu>:
cmpl   $0x42,0x3ff005f0
42
jne    1111 <exit_qemu+0x11>
mov    %edi,0x3ff005f0
ret

LLVM IR (-O0):
define void @exit_qemu(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
store i32* inttoptr (i64 1072694768 to i32*), i32** %3
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 66
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = load i32*, i32** %3
store i32 %8, i32* %9
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
define void @exit_qemu(i32 %0) {
%2 = load i32, i32* inttoptr (i64 1072694768 to i32*)
%3 = icmp eq i32 %2, 66
br i1 %3, label %4, label %5
4: ; preds = %1
store i32 %0, i32* inttoptr (i64 1072694768 to i32*)
br label %5
5: ; preds = %1, %4
ret void
}
int upcall(int a) { return a + 1; }


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

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

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

LLVM IR (-O2):
define i32 @upcall(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Type definitions */
struct wbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wbuf_term(struct wbuf *);
void free_wbuf(void const *p, void const *ctx) {
  (void)ctx;
  wbuf_term((struct wbuf *)p);
}


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

x86 assembly (clang, -O2):
<free_wbuf>:
jmp    1030 <wbuf_term@plt>

LLVM IR (-O0):
%struct.wbuf = type { i32 }
define void @free_wbuf(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.wbuf*
%8 = call i32 @wbuf_term(%struct.wbuf* %7)
ret void
}

LLVM IR (-O2):
%struct.wbuf = type { i32 }
define void @free_wbuf(i8* %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to %struct.wbuf*
%4 = tail call i32 @wbuf_term(%struct.wbuf* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g();
int /*<<< orphan*/ pause();
void f(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  g();
  pause();
}


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

x86 assembly (clang, -O2):
<f>:
push   %rax
xor    %eax,%eax
call   1040 <g@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pause@plt>

LLVM IR (-O0):
define void @f(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 (...) @g()
%8 = call i32 (...) @pause()
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @g()
%4 = tail call i32 (...) @pause()
ret void
}
/* Variables and functions */
char *goNum(char *);
int /*<<< orphan*/ isNum(char);
char *fraqValue(char *ptr) {
  if (!isNum(*ptr))
    return 0;
  ptr = goNum(++ptr);
  if (!ptr)
    return 0;
  return ptr;
}


x86 assembly (clang, -O0):
<fraqValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isNum@plt>
cmp    $0x0,%eax
jne    114e <fraqValue+0x2e>
movq   $0x0,-0x8(%rbp)
jmp    1183 <fraqValue+0x63>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x10(%rbp)
call   1040 <goNum@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <fraqValue+0x5b>
movq   $0x0,-0x8(%rbp)
jmp    1183 <fraqValue+0x63>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fraqValue>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <isNum@plt>
test   %eax,%eax
je     113d <fraqValue+0x1d>
add    $0x1,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <goNum@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @fraqValue(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = call i32 @isNum(i8 signext %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %1
store i8* null, i8** %2
br label %18
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
%12 = call i8* @goNum(i8* %11)
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = icmp ne i8* %13, null
br i1 %14, label %16, label %15
15: ; preds = %9
store i8* null, i8** %2
br label %18
16: ; preds = %9
%17 = load i8*, i8** %3
store i8* %17, i8** %2
br label %18
18: ; preds = %16, %15, %8
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @fraqValue(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @isNum(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i8* @goNum(i8* %6)
br label %8
8: ; preds = %5, %1
%9 = phi i8* [ null, %1 ], [ %7, %5 ]
ret i8* %9
}
/* Variables and functions */
char *l_saveTopologies(char *, int);
char *macexpTopLoopMark(char *arg) { return l_saveTopologies(arg, 1); }


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

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

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

LLVM IR (-O2):
define i8* @macexpTopLoopMark(i8* %0) {
%2 = tail call i8* @l_saveTopologies(i8* %0, i32 1)
ret i8* %2
}
int nacl_secure_random_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nacl_secure_random_init() {
ret i32 0
}
double mul_df(double *p, double *q) {
  double d1 = *p;
  double d2 = *q;
  __asm__("# reg %x0, %x1" : "+v"(d1), "+v"(d2));
  return d1 * d2;
}


x86 assembly (clang, -O0):
<mul_df>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_df>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @mul_df(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%7 = load double*, double** %3
%8 = load double, double* %7
store double %8, double* %5
%9 = load double*, double** %4
%10 = load double, double* %9
store double %10, double* %6
%11 = load double, double* %5
%12 = load double, double* %6
%13 = call { double, double } asm "# reg ${0:x}, ${1:x}", "=v,=v,0,1,~{dirflag},~{fpsr},~{flags}"(double %11, double %12)
%14 = extractvalue { double, double } %13, 0
%15 = extractvalue { double, double } %13, 1
store double %14, double* %5
store double %15, double* %6
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fmul double %16, %17
ret double %18
}

LLVM IR (-O2):
define double @mul_df(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call { double, double } asm "# reg ${0:x}, ${1:x}", "=v,=v,0,1,~{dirflag},~{fpsr},~{flags}"(double %3, double %4)
%6 = extractvalue { double, double } %5, 0
%7 = extractvalue { double, double } %5, 1
%8 = fmul double %6, %7
ret double %8
}
void LexEntryStatsBegin() {}


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

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

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

LLVM IR (-O2):
define void @LexEntryStatsBegin() {
ret void
}
/* Variables and functions */
unsigned short __gnu_f2h_internal(unsigned int, int /*<<< orphan*/);
unsigned short __gnu_f2h_alternative(unsigned int x) {
  return __gnu_f2h_internal(x, 0);
}


x86 assembly (clang, -O0):
<__gnu_f2h_alternative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <__gnu_f2h_internal@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnu_f2h_alternative>:
xor    %esi,%esi
jmp    1030 <__gnu_f2h_internal@plt>

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

LLVM IR (-O2):
define zeroext i16 @__gnu_f2h_alternative(i32 %0) {
%2 = tail call zeroext i16 @__gnu_f2h_internal(i32 %0, i32 0)
ret i16 %2
}
int test_imm_F2int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xF2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F2int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 242
%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_F2int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 15859712
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void giveup(char *msg) {
  fprintf(stderr, "z3dClient: %s\r\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<giveup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<giveup>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"z3dClient: %s\0D\0A\00"
define void @giveup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"z3dClient: %s\0D\0A\00"
define void @giveup(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int f(int *const p) { return *p != 5; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x5,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmpl   $0x5,(%rdi)
setne  %al
ret

LLVM IR (-O0):
define i32 @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 5
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ne i32 %2, 5
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t randLIB_get_random_in_range(uint16_t min, uint16_t max) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @randLIB_get_random_in_range(i32 %0, i32 %1) {
ret i32 0
}
void test_one() {
#pragma omp parallel sections
  { ; }
}


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

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

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

LLVM IR (-O2):
define void @test_one() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int height;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_height(void *_p, int _v) { ((Screen *)_p)->height = (int)_v; }


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

x86 assembly (clang, -O2):
<set_Screen_height>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_Screen_height(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_Screen_height(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int knot_map_errno_code_def(int, int);
int knot_map_errno_def(int dflt_error) {
  return knot_map_errno_code_def(-1, dflt_error);
}


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

x86 assembly (clang, -O2):
<knot_map_errno_def>:
mov    %edi,%esi
mov    $0xffffffff,%edi
jmp    1030 <knot_map_errno_code_def@plt>

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

LLVM IR (-O2):
define i32 @knot_map_errno_def(i32 %0) {
%2 = tail call i32 @knot_map_errno_code_def(i32 -1, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SOCK_NONBLOCK;
int accept4(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
            int /*<<< orphan*/);
int main(int argc, char **argv) {
  int res = accept4(0, NULL, NULL, SOCK_NONBLOCK);
  (void)res;
  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)
mov    0x2eb3(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <accept4@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <accept4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SOCK_NONBLOCK = global i32 0
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
%7 = load i32, i32* @SOCK_NONBLOCK
%8 = call i32 @accept4(i32 0, i32* null, i32* null, i32 %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
ret i32 0
}

LLVM IR (-O2):
@SOCK_NONBLOCK = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SOCK_NONBLOCK
%4 = tail call i32 @accept4(i32 0, i32* null, i32* null, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dfs(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n, l;
  scanf("%d%d", &n, &l);
  dfs(0, l, n);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = call i32 @dfs(i32 0, i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ join_minmax_with_sum_unsigned_Good(int, int);
void call_join_minmax_with_sum_unsigned_Good() {
  join_minmax_with_sum_unsigned_Good(15, 50);
}


x86 assembly (clang, -O0):
<call_join_minmax_with_sum_unsigned_Good>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
mov    $0x32,%esi
call   1030 <join_minmax_with_sum_unsigned_Good@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_join_minmax_with_sum_unsigned_Good>:
mov    $0xf,%edi
mov    $0x32,%esi
jmp    1030 <join_minmax_with_sum_unsigned_Good@plt>

LLVM IR (-O0):
define void @call_join_minmax_with_sum_unsigned_Good() {
%1 = call i32 @join_minmax_with_sum_unsigned_Good(i32 15, i32 50)
ret void
}

LLVM IR (-O2):
define void @call_join_minmax_with_sum_unsigned_Good() {
%1 = tail call i32 @join_minmax_with_sum_unsigned_Good(i32 15, i32 50)
ret void
}
int add_char(void) { return (char)127 + (char)127 + (char)2; }


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

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

LLVM IR (-O0):
define i32 @add_char() {
ret i32 256
}

LLVM IR (-O2):
define i32 @add_char() {
ret i32 256
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void StartTimer1(void) {
  outb(0x56, 0x43);
  outb(0x12, 0x41);
}


x86 assembly (clang, -O0):
<StartTimer1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56,%edi
mov    $0x43,%esi
call   1030 <outb@plt>
mov    $0x12,%edi
mov    $0x41,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartTimer1>:
push   %rax
mov    $0x56,%edi
mov    $0x43,%esi
call   1030 <outb@plt>
mov    $0x12,%edi
mov    $0x41,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @StartTimer1() {
%1 = call i32 @outb(i32 86, i32 67)
%2 = call i32 @outb(i32 18, i32 65)
ret void
}

LLVM IR (-O2):
define void @StartTimer1() {
%1 = tail call i32 @outb(i32 86, i32 67)
%2 = tail call i32 @outb(i32 18, i32 65)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int create_standard_Laurent_cascade_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(789, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<create_standard_Laurent_cascade_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x315,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_standard_Laurent_cascade_homotopy>:
mov    $0x315,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @create_standard_Laurent_cascade_homotopy() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 789, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @create_standard_Laurent_cascade_homotopy() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 789, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t sub_int64_t(int64_t a, int64_t b) { return a - b; }


x86 assembly (clang, -O0):
<sub_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_int64_t>:
mov    %rdi,%rax
sub    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @sub_int64_t(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
mkstemp(path) char *path;
{
  int fd;
  return (_gettemp(path, &fd) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <_gettemp@plt>
cmp    $0x0,%eax
je     113f <mkstemp+0x2f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114c <mkstemp+0x3c>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    114c <mkstemp+0x3c>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <_gettemp@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkstemp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i32*, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, ...)*)(i8* %4, i32* %3)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %7
%11 = phi i32 [ %8, %7 ], [ -1, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, i32*, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, ...)*)(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 -1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ memcpy_test_1(int);
int /*<<< orphan*/ mempcpy_test_1(int);
int /*<<< orphan*/ memset_test_1(int);
void test_stringops_1(int len) {
  memcpy_test_1(len);
  mempcpy_test_1(len);
  memset_test_1(len);
}


x86 assembly (clang, -O0):
<test_stringops_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <memcpy_test_1@plt>
mov    -0x4(%rbp),%edi
call   1040 <mempcpy_test_1@plt>
mov    -0x4(%rbp),%edi
call   1050 <memset_test_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stringops_1>:
push   %rbx
mov    %edi,%ebx
call   1030 <memcpy_test_1@plt>
mov    %ebx,%edi
call   1040 <mempcpy_test_1@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <memset_test_1@plt>

LLVM IR (-O0):
define void @test_stringops_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @memcpy_test_1(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @mempcpy_test_1(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @memset_test_1(i32 %7)
ret void
}

LLVM IR (-O2):
define void @test_stringops_1(i32 %0) {
%2 = tail call i32 @memcpy_test_1(i32 %0)
%3 = tail call i32 @mempcpy_test_1(i32 %0)
%4 = tail call i32 @memset_test_1(i32 %0)
ret void
}
/* Variables and functions */
int at_tok_hasmore(char **p_cur) {
  return !(*p_cur == NULL || **p_cur == '\0');
}


x86 assembly (clang, -O0):
<at_tok_hasmore>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpq   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
je     112e <at_tok_hasmore+0x2e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<at_tok_hasmore>:
mov    (%rdi),%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1110 <at_tok_hasmore+0x10>
cmpb   $0x0,(%rcx)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @at_tok_hasmore(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp ne i8 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cheese_key_destroy(void *value) { free(value); }


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

x86 assembly (clang, -O2):
<cheese_key_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cheese_key_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
char test_171_6(char *mem) {
  char expected = 1;
  char desired = 5;
  return __atomic_compare_exchange(mem + 4, &expected, &desired, 0, 4, 0);
}


x86 assembly (clang, -O0):
<test_171_6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x1,-0x9(%rbp)
movb   $0x5,-0xa(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x9(%rbp),%al
mov    -0xa(%rbp),%dl
lock cmpxchg %dl,0x4(%rcx)
mov    %al,%cl
sete   %al
mov    %al,-0xd(%rbp)
mov    %cl,-0xc(%rbp)
test   $0x1,%al
jne    1138 <test_171_6+0x38>
mov    -0xc(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
and    $0x1,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_171_6>:
mov    $0x5,%cl
mov    $0x1,%al
lock cmpxchg %cl,0x4(%rdi)
sete   %al
ret

LLVM IR (-O0):
define signext i8 @test_171_6(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8* %0, i8** %2
store i8 1, i8* %3
store i8 5, i8* %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 4
%8 = load i8, i8* %3
%9 = load i8, i8* %4
%10 = cmpxchg i8* %7, i8 %8, i8 %9 acq_rel monotonic
%11 = extractvalue { i8, i1 } %10, 0
%12 = extractvalue { i8, i1 } %10, 1
br i1 %12, label %14, label %13
13: ; preds = %1
store i8 %11, i8* %3
br label %14
14: ; preds = %13, %1
%15 = zext i1 %12 to i8
store i8 %15, i8* %5
%16 = load i8, i8* %5
%17 = trunc i8 %16 to i1
%18 = zext i1 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @test_171_6(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = cmpxchg i8* %2, i8 1, i8 5 acq_rel monotonic
%4 = extractvalue { i8, i1 } %3, 1
%5 = zext i1 %4 to i8
ret i8 %5
}