xunge/DecIR huggingface dataset:
unsigned xrop3_159_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ S;
  stk1 = T & stk2;
  stk1 = ~stk1;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_159_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_159_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %eax,%edx
xor    $0xff,%edx
and    %ecx,%edx
not    %edx
and    %eax,%edx
not    %ecx
not    %eax
and    %esi,%eax
or     %ecx,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_159_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = and i32 %30, %31
%33 = load i32, i32* %8
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = or i32 %32, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = and i32 %41, %42
%44 = or i32 %37, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_159_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = and i32 %6, %7
%9 = xor i32 %8, -1
%10 = and i32 %4, %9
%11 = xor i32 %6, -1
%12 = xor i32 %4, -1
%13 = and i32 %12, %5
%14 = or i32 %13, %11
%15 = or i32 %14, %10
ret i32 %15
}
/* Type definitions */
struct event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void printErrMsg(void *stateData, struct event *event) {
  puts("ENTERED ERROR STATE!");
}


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

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

LLVM IR (-O0):
%struct.event = type { i32 }
@.str = [21 x i8] c"ENTERED ERROR STATE!\00"
define void @printErrMsg(i8* %0, %struct.event* %1) {
%3 = alloca i8*
%4 = alloca %struct.event*
store i8* %0, i8** %3
store %struct.event* %1, %struct.event** %4
%5 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.event = type { i32 }
@.str = [21 x i8] c"ENTERED ERROR STATE!\00"
define void @printErrMsg(i8* nocapture readnone %0, %struct.event* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned char hexToInt(unsigned int h) {
  h += 9 * (1 & (h >> 6));
  return h & 0xf;
}


x86 assembly (clang, -O0):
<hexToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x6,%eax
and    $0x1,%eax
imul   $0x9,%eax,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexToInt>:
mov    %edi,%eax
shr    $0x6,%eax
and    $0x1,%eax
lea    (%rax,%rax,8),%eax
add    %edi,%eax
and    $0xf,%al
ret

LLVM IR (-O0):
define zeroext i8 @hexToInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 6
%5 = and i32 1, %4
%6 = mul i32 9, %5
%7 = load i32, i32* %2
%8 = add i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, 15
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @hexToInt(i32 %0) {
%2 = lshr i32 %0, 6
%3 = and i32 %2, 1
%4 = mul nuw nsw i32 %3, 9
%5 = add i32 %4, %0
%6 = trunc i32 %5 to i8
%7 = and i8 %6, 15
ret i8 %7
}
int _isdigit(char c) { return c >= '0' && c <= '9'; }


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

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

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

LLVM IR (-O2):
define i32 @_isdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ doStuff_pointerToConstInt(int *);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int f_malloc_1(void) {
  int *ptr;
  ptr = (int *)malloc(sizeof(int));
  doStuff_pointerToConstInt(ptr);
  free(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<f_malloc_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <doStuff_pointerToConstInt@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_malloc_1>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <doStuff_pointerToConstInt@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f_malloc_1() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @doStuff_pointerToConstInt(i32* %4)
%6 = load i32*, i32** %1
%7 = call i32 @free(i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @f_malloc_1() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @doStuff_pointerToConstInt(i32* %2)
%4 = tail call i32 @free(i32* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("./../../../Files/33.sh");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"./../../../Files/33.sh\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"./../../../Files/33.sh\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void gtk_quit_remove_by_data() {}


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

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

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

LLVM IR (-O2):
define void @gtk_quit_remove_by_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void converse(int N, int r) {
  if (N) {
    converse(N / r, r);
    printf("%d\t", N % r);
  }
}


x86 assembly (clang, -O0):
<converse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115e <converse+0x3e>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1030 <converse@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%esi
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<converse>:
test   %edi,%edi
je     1142 <converse+0x22>
push   %rbx
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%ebx
mov    %eax,%edi
call   1030 <converse@plt>
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\09\00"
define void @converse(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sdiv i32 %8, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = srem i32 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
define void @converse(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %5
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = sdiv i32 %0, %1
tail call void @converse(i32 %6, i32 %1)
%7 = srem i32 %0, %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %4
}
int Filter2(int A, int B) { return (A * 3 + B + 2) >> 2; }


x86 assembly (clang, -O0):
<Filter2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x3,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x2,%eax
sar    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Filter2>:
lea    (%rdi,%rdi,2),%eax
add    %esi,%eax
add    $0x2,%eax
sar    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @Filter2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = add nsw i32 %8, 2
%10 = ashr i32 %9, 2
ret i32 %10
}

LLVM IR (-O2):
define i32 @Filter2(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 3
%4 = add i32 %1, 2
%5 = add i32 %4, %3
%6 = ashr i32 %5, 2
ret i32 %6
}
/* Variables and functions */
scalar_t__ isalnum(unsigned char);
scalar_t__ isascii(unsigned char);
scalar_t__ strchr(char const *, unsigned char);
int goodchar(unsigned char x, const char *extra) {
  return (isascii(x) && isalnum(x)) || strchr(extra, x);
}


x86 assembly (clang, -O0):
<goodchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%edi
call   1050 <isascii@plt>
cmp    $0x0,%rax
je     1170 <goodchar+0x40>
movzbl -0x1(%rbp),%edi
call   1040 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    1187 <goodchar+0x57>
mov    -0x10(%rbp),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goodchar>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1050 <isascii@plt>
movzbl %bpl,%ebp
test   %rax,%rax
je     115a <goodchar+0x2a>
mov    %ebp,%edi
call   1040 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    116f <goodchar+0x3f>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @goodchar(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = call i64 @isascii(i8 zeroext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8, i8* %3
%10 = call i64 @isalnum(i8 zeroext %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %4
%14 = load i8, i8* %3
%15 = call i64 @strchr(i8* %13, i8 zeroext %14)
%16 = icmp ne i64 %15, 0
br label %17
17: ; preds = %12, %8
%18 = phi i1 [ true, %8 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @goodchar(i8 zeroext %0, i8* %1) {
%3 = tail call i64 @isascii(i8 zeroext %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i64 @isalnum(i8 zeroext %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5, %2
%9 = tail call i64 @strchr(i8* %1, i8 zeroext %0)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 1, %5 ], [ %11, %8 ]
ret i32 %13
}
void bu_compile_hunkp(args) struct conscell *args;
{
  int n = bu_compile_arg_list(args);
  if (n != 1)
    goto er;
  EMIT1ATM("HUNKP");
  EMITEND();
  return;
er:
  cerror("hunkp: wrong # of args", args);
}


x86 assembly (clang, -O0):
<bu_compile_hunkp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <bu_compile_arg_list@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1169 <bu_compile_hunkp+0x29>
jmp    1183 <bu_compile_hunkp+0x43>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <EMIT1ATM@plt>
mov    $0x0,%al
call   1030 <EMITEND@plt>
jmp    1195 <bu_compile_hunkp+0x55>
mov    -0x8(%rbp),%rsi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1060 <cerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bu_compile_hunkp>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <bu_compile_arg_list@plt>
cmp    $0x1,%eax
jne    1166 <bu_compile_hunkp+0x26>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1050 <EMIT1ATM@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <EMITEND@plt>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1060 <cerror@plt>

LLVM IR (-O0):
%struct.conscell = type opaque
@.str = [6 x i8] c"HUNKP\00"
@.str.1 = [23 x i8] c"hunkp: wrong # of args\00"
define void @bu_compile_hunkp(%struct.conscell* %0) {
%2 = alloca %struct.conscell*
%3 = alloca i32
store %struct.conscell* %0, %struct.conscell** %2
%4 = load %struct.conscell*, %struct.conscell** %2
%5 = call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
br label %12
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @EMITEND()
br label %15
12: ; preds = %8
%13 = load %struct.conscell*, %struct.conscell** %2
%14 = call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %13)
br label %15
15: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
%struct.conscell = type opaque
@.str = [6 x i8] c"HUNKP\00"
@.str.1 = [23 x i8] c"hunkp: wrong # of args\00"
define void @bu_compile_hunkp(%struct.conscell* %0) {
%2 = tail call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @EMITEND()
br label %9
7: ; preds = %1
%8 = tail call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %0)
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void gateway_brutal_end() { _exit(30); }


x86 assembly (clang, -O0):
<gateway_brutal_end>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<gateway_brutal_end>:
push   %rax
mov    $0x1e,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @gateway_brutal_end() {
%1 = call i32 @_exit(i32 30)
unreachable
}

LLVM IR (-O2):
define void @gateway_brutal_end() {
%1 = tail call i32 @_exit(i32 30)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
void writeHex(unsigned long long i) { printf("%llx", i); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%llx\00"
define void @writeHex(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dir_sort(int *, int);
int *get_random_arr(int);
int /*<<< orphan*/ show(int *, int);
int main() {
  int len = 25;
  int *arr = get_random_arr(len);
  show(arr, len);
  dir_sort(arr, len);
  show(arr, len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x19,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <get_random_arr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <show@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <dir_sort@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <show@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x19,%edi
call   1040 <get_random_arr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x19,%esi
call   1050 <show@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
call   1030 <dir_sort@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
call   1050 <show@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 25, i32* %2
%4 = load i32, i32* %2
%5 = call i32* @get_random_arr(i32 %4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %2
%8 = call i32 @show(i32* %6, i32 %7)
%9 = load i32*, i32** %3
%10 = load i32, i32* %2
%11 = call i32 @dir_sort(i32* %9, i32 %10)
%12 = load i32*, i32** %3
%13 = load i32, i32* %2
%14 = call i32 @show(i32* %12, i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @get_random_arr(i32 25)
%2 = tail call i32 @show(i32* %1, i32 25)
%3 = tail call i32 @dir_sort(i32* %1, i32 25)
%4 = tail call i32 @show(i32* %1, i32 25)
ret i32 0
}
void logical_clock_update_overflow_period(
    struct task_clock_group_info *group_info, int id) {}


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

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

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

LLVM IR (-O2):
%struct.task_clock_group_info = type opaque
define void @logical_clock_update_overflow_period(%struct.task_clock_group_info* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M227_f(char *s) {
  debug("M227_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M227_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M227_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M227_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M227_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M227_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M227_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
int gcp_wrap(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @gcp_wrap() {
ret i32 1
}
/* Variables and functions */
int strlen(const char *str) {
  const char *eos = str;
  while (*eos++)
    ;
  return ((int)(eos - str - 1));
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     112d <strlen+0x2d>
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %10, %1
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %5
br label %5
11: ; preds = %5
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = ptrtoint i8* %12 to i64
%15 = ptrtoint i8* %13 to i64
%16 = sub i64 %14, %15
%17 = sub nsw i64 %16, 1
%18 = trunc i64 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = xor i64 %9, -1
%11 = add i64 %8, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
scalar_t__ isprint(int);
int /*<<< orphan*/ isspace(int);
int ispunct(int c) { return isprint(c) && !isspace(c); }


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isprint@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1158 <ispunct+0x38>
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
push   %rbx
mov    %edi,%ebx
call   1040 <isprint@plt>
test   %rax,%rax
je     113f <ispunct+0x1f>
mov    %ebx,%edi
call   1030 <isspace@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isprint(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @isspace(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = tail call i64 @isprint(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @isspace(i32 %0)
%6 = icmp eq i32 %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
}
int test_imm_6Duint32_mem(unsigned int *val) {
  return ((*val) & (0x6D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_6Duint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 109
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int rt_thread_numprocessors(void) {
  int a = 1;
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @rt_thread_numprocessors() {
ret i32 1
}
int test1(int a, int b) { return a - b == a; }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
xor    %eax,%eax
test   %esi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @test1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @test1(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ntohl(int);
uint32_t ReadInt(char *buffer, int ofs) {
  return ntohl(*((int *)(buffer + ofs)));
}


x86 assembly (clang, -O0):
<ReadInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%edi
call   1030 <ntohl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadInt>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%edi
jmp    1030 <ntohl@plt>

LLVM IR (-O0):
define i32 @ReadInt(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = call i32 @ntohl(i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @ReadInt(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @ntohl(i32 %6)
ret i32 %7
}
/* Variables and functions */
int __syscall(int, int);
int close(int fd) { return __syscall(3, fd); }


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

x86 assembly (clang, -O2):
<close>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <__syscall@plt>

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 @__syscall(i32 3, i32 %0)
ret i32 %2
}
/* Variables and functions */
void nn_alloc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @nn_alloc_init() {
ret void
}
void dlclose() {}


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

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

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

LLVM IR (-O2):
define void @dlclose() {
ret void
}
/* Variables and functions */
scalar_t__ chdir(char *);
int /*<<< orphan*/ errnoAbort(char *, char *);
void setCurrentDir(char *newDir) {
  if (chdir(newDir) != 0)
    errnoAbort("setCurrentDir: can't to set current directory: %s", newDir);
}


x86 assembly (clang, -O0):
<setCurrentDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chdir@plt>
cmp    $0x0,%rax
je     114f <setCurrentDir+0x2f>
mov    -0x8(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <errnoAbort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setCurrentDir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <chdir@plt>
test   %rax,%rax
je     113e <setCurrentDir+0x1e>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <errnoAbort@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"setCurrentDir: can't to set current directory: %s\00"
define void @setCurrentDir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @chdir(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @errnoAbort(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"setCurrentDir: can't to set current directory: %s\00"
define void @setCurrentDir(i8* %0) {
%2 = tail call i64 @chdir(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @errnoAbort(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
void spnego_destroy(void) {}


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

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

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

LLVM IR (-O2):
define void @spnego_destroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ linkat(int /*<<< orphan*/, char *, int /*<<< orphan*/, char *,
                  int /*<<< orphan*/);
int main(void) {
  if (0 > linkat(AT_FDCWD, "see.emily.play/gnome", AT_FDCWD,
                 "arnold.layne.hard", 0))
    return EXIT_FAILURE;
  else
    return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
lea    0xec8(%rip),%rsi
lea    0xed6(%rip),%rcx
xor    %r8d,%r8d
call   1030 <linkat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    1166 <main+0x56>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <main+0x62>
mov    0x2e6b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
lea    0xeed(%rip),%rcx
mov    %edi,%edx
xor    %r8d,%r8d
call   1030 <linkat@plt>
test   %rax,%rax
jns    1140 <main+0x30>
mov    0x2ea2(%rip),%rax
jmp    1147 <main+0x37>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@AT_FDCWD = global i32 0
@.str = [21 x i8] c"see.emily.play/gnome\00"
@.str.1 = [18 x i8] c"arnold.layne.hard\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @AT_FDCWD
%3 = load i32, i32* @AT_FDCWD
%4 = call i64 @linkat(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 0)
%5 = icmp sgt i64 0, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_FAILURE
store i32 %7, i32* %1
br label %10
8: ; preds = %0
%9 = load i32, i32* @EXIT_SUCCESS
store i32 %9, i32* %1
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
@.str = [21 x i8] c"see.emily.play/gnome\00"
@.str.1 = [18 x i8] c"arnold.layne.hard\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @AT_FDCWD
%2 = tail call i64 @linkat(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = icmp slt i64 %2, 0
%4 = load i32, i32* @EXIT_FAILURE
%5 = load i32, i32* @EXIT_SUCCESS
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put4_16(int, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ const *, int, int);
void MC_put_xy_16_3dnow(uint8_t *dest, const uint8_t *ref, int stride,
                        int height) {
  MC_put4_16(height, dest, ref, stride, 1);
}


x86 assembly (clang, -O0):
<MC_put_xy_16_3dnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%r8d
call   1030 <MC_put4_16@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_put_xy_16_3dnow>:
mov    %edx,%eax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %ecx,%edi
mov    %eax,%ecx
mov    $0x1,%r8d
jmp    1030 <MC_put4_16@plt>

LLVM IR (-O0):
define void @MC_put_xy_16_3dnow(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = call i32 @MC_put4_16(i32 %9, i32* %10, i32* %11, i32 %12, i32 1)
ret void
}

LLVM IR (-O2):
define void @MC_put_xy_16_3dnow(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put4_16(i32 %3, i32* %0, i32* %1, i32 %2, i32 1)
ret void
}
/* Variables and functions */
int ENODEV;
int qpnp_get_reset_en(int pon_type) { return -ENODEV; }


x86 assembly (clang, -O0):
<qpnp_get_reset_en>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed0(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qpnp_get_reset_en>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@ENODEV = global i32 0
define i32 @qpnp_get_reset_en(i32 %0) {
%2 = load i32, i32* @ENODEV
%3 = sub nsw i32 0, %2
ret i32 %3
}
void outw(unsigned short port, unsigned short value) {
  __asm__ __volatile__("outw %0, %1" : : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outw>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
mov    -0x2(%rbp),%dx
out    %ax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outw>:
mov    %esi,%eax
mov    %edi,%edx
out    %ax,(%dx)
ret

LLVM IR (-O0):
define void @outw(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @outw(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outw $0, $1", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %1, i16 %0)
ret void
}
int ptrEqual(void *left, void *right) {
  if (left == right)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<ptrEqual>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1126 <ptrEqual+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    112d <ptrEqual+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrEqual>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @ptrEqual(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void smpte_hbrmt_set_reserved(uint8_t *p_hbrmt) { p_hbrmt[3] &= ~0x1f; }


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

x86 assembly (clang, -O2):
<smpte_hbrmt_set_reserved>:
andb   $0xe0,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @smpte_hbrmt_set_reserved(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = and i32 %3, -32
store i32 %4, i32* %2
ret void
}
int xmlUCSIsOgham(int code) { return (((code >= 0x1680) && (code <= 0x169F))); }


x86 assembly (clang, -O0):
<xmlUCSIsOgham>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1680,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsOgham+0x26>
cmpl   $0x169f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsOgham>:
and    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x1680,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsOgham(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 5760
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 5791
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsOgham(i32 %0) {
%2 = and i32 %0, -32
%3 = icmp eq i32 %2, 5760
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void action(char new_char, int new_num) {
  int i;
  for (i = 0; i < new_num; i++) {
    printf("%c\n", new_char);
  }
}


x86 assembly (clang, -O0):
<action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1152 <action+0x42>
lea    0xec5(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <action+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<action>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    113f <action+0x2f>
mov    %esi,%ebx
movsbl %dil,%ebp
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <action+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define void @action(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
void INT_Excep_TMR2_CMI2B(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR2_CMI2B() {
ret void
}
int main() {
  int x = 1;
  int i;
  for (i = 0; i < 100000000; i++) {
    x = x / 2;
    x = x / 64;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5f5e100,-0xc(%rbp)
jge    1150 <main+0x50>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ irmo_alloc_fail(size_t);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *irmo_malloc0(size_t bytes) {
  void *result;
  result = malloc(bytes);
  if (result == NULL) {
    irmo_alloc_fail(bytes);
  }
  memset(result, 0, bytes);
  return result;
}


x86 assembly (clang, -O0):
<irmo_malloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115d <irmo_malloc0+0x2d>
mov    -0x8(%rbp),%rdi
call   1050 <irmo_alloc_fail@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irmo_malloc0>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <irmo_malloc0+0x1c>
mov    %r14,%rdi
call   1050 <irmo_alloc_fail@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @irmo_malloc0(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i32 @irmo_alloc_fail(i64 %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
%13 = load i64, i64* %2
%14 = call i32 @memset(i8* %12, i32 0, i64 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @irmo_malloc0(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @irmo_alloc_fail(i64 %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}