xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ setbitu(unsigned char *, int, int, unsigned int);
extern void setbits(unsigned char *buff, int pos, int len, int data) {
  if (data < 0) {
    data |= 1 << (len - 1);
  } else {
    data &= ~(1 << (len - 1));
  }
  setbitu(buff, pos, len, (unsigned int)data);
}


x86 assembly (clang, -O0):
<setbits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1147 <setbits+0x37>
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    115d <setbits+0x4d>
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <setbitu@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits>:
lea    -0x1(%rdx),%r8d
mov    %ecx,%r9d
bts    %r8d,%r9d
mov    %ecx,%eax
btr    %r8d,%eax
test   %ecx,%ecx
cmovs  %r9d,%eax
mov    %eax,%ecx
jmp    1030 <setbitu@plt>

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

LLVM IR (-O2):
define void @setbits(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %3, 0
%6 = add nsw i32 %2, -1
%7 = shl nuw i32 1, %6
%8 = or i32 %7, %3
%9 = xor i32 %7, -1
%10 = and i32 %9, %3
%11 = select i1 %5, i32 %8, i32 %10
%12 = tail call i32 @setbitu(i8* %0, i32 %1, i32 %2, i32 %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compchar(char);
void compstr(char *str) {
  char x = *str++;
  while (x) {
    compchar(x);
    x = *str++;
  };
}


x86 assembly (clang, -O0):
<compstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
je     115c <compstr+0x4c>
movsbl -0x9(%rbp),%edi
call   1030 <compchar@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
jmp    1130 <compstr+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <compstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <compchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <compstr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @compstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @compchar(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FP_COMPARE_MEM();
int /*<<< orphan*/ addbyte(int);
void FP_COMPARE_D() {
  addbyte(0x66);
  addbyte(0x48);
  addbyte(0x0f);
  addbyte(0x6e);
  addbyte(0xc8);
  FP_COMPARE_MEM();
}


x86 assembly (clang, -O0):
<FP_COMPARE_D>:
push   %rbp
mov    %rsp,%rbp
mov    $0x66,%edi
call   1040 <addbyte@plt>
mov    $0x48,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x6e,%edi
call   1040 <addbyte@plt>
mov    $0xc8,%edi
call   1040 <addbyte@plt>
mov    $0x0,%al
call   1030 <FP_COMPARE_MEM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_COMPARE_D>:
push   %rax
mov    $0x66,%edi
call   1040 <addbyte@plt>
mov    $0x48,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x6e,%edi
call   1040 <addbyte@plt>
mov    $0xc8,%edi
call   1040 <addbyte@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <FP_COMPARE_MEM@plt>

LLVM IR (-O0):
define void @FP_COMPARE_D() {
%1 = call i32 @addbyte(i32 102)
%2 = call i32 @addbyte(i32 72)
%3 = call i32 @addbyte(i32 15)
%4 = call i32 @addbyte(i32 110)
%5 = call i32 @addbyte(i32 200)
%6 = call i32 (...) @FP_COMPARE_MEM()
ret void
}

LLVM IR (-O2):
define void @FP_COMPARE_D() {
%1 = tail call i32 @addbyte(i32 102)
%2 = tail call i32 @addbyte(i32 72)
%3 = tail call i32 @addbyte(i32 15)
%4 = tail call i32 @addbyte(i32 110)
%5 = tail call i32 @addbyte(i32 200)
%6 = tail call i32 (...) @FP_COMPARE_MEM()
ret void
}
void zzTraceReset(void) {}


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

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

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

LLVM IR (-O2):
define void @zzTraceReset() {
ret void
}
/* Type definitions */
struct sigaction {
  scalar_t__ sa_flags;
  int /*<<< orphan*/ sa_mask;
  int /*<<< orphan*/ sa_handler;
};

/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             struct sigaction *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void ignoreSIGPIPE() {
  struct sigaction vAction;
  vAction.sa_handler = SIG_IGN;
  sigemptyset(&vAction.sa_mask);
  vAction.sa_flags = 0;
  sigaction(SIGPIPE, &vAction, (struct sigaction *)NULL);
}


x86 assembly (clang, -O0):
<ignoreSIGPIPE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1040 <sigemptyset@plt>
movq   $0x0,-0x10(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignoreSIGPIPE>:
sub    $0x18,%rsp
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
lea    0x10(%rsp),%rdi
call   1040 <sigemptyset@plt>
movq   $0x0,0x8(%rsp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sigaction = type { i64, i32, i32 }
@SIG_IGN = global i32 0
@SIGPIPE = global i32 0
define void @ignoreSIGPIPE() {
%1 = alloca %struct.sigaction
%2 = load i32, i32* @SIG_IGN
%3 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 2
store i32 %2, i32* %3
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 1
%5 = call i32 @sigemptyset(i32* %4)
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 0
store i64 0, i64* %6
%7 = load i32, i32* @SIGPIPE
%8 = call i32 @sigaction(i32 %7, %struct.sigaction* %1, %struct.sigaction* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { i64, i32, i32 }
@SIG_IGN = global i32 0
@SIGPIPE = global i32 0
define void @ignoreSIGPIPE() {
%1 = alloca %struct.sigaction
%2 = bitcast %struct.sigaction* %1 to i8*
%3 = load i32, i32* @SIG_IGN
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 2
store i32 %3, i32* %4
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 1
%6 = call i32 @sigemptyset(i32* %5)
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 0
store i64 0, i64* %7
%8 = load i32, i32* @SIGPIPE
%9 = call i32 @sigaction(i32 %8, %struct.sigaction* %1, %struct.sigaction* null)
ret void
}
/* Variables and functions */
scalar_t__ learnFrom(int);
int /*<<< orphan*/ reportError(int /*<<< orphan*/ *);
int target(int fd) {
  if (learnFrom(fd) < 0) {
    reportError(NULL);
    return -2;
  }
  return 8;
}


x86 assembly (clang, -O0):
<target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <learnFrom@plt>
cmp    $0x0,%rax
jge    1152 <target+0x32>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <reportError@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1159 <target+0x39>
movl   $0x8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target>:
push   %rax
call   1030 <learnFrom@plt>
mov    %rax,%rcx
mov    $0x8,%eax
test   %rcx,%rcx
js     1135 <target+0x15>
pop    %rcx
ret
xor    %edi,%edi
call   1040 <reportError@plt>
mov    $0xfffffffe,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @target(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @learnFrom(i32 %4)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @reportError(i32* null)
store i32 -2, i32* %2
br label %10
9: ; preds = %1
store i32 8, i32* %2
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @target(i32 %0) {
%2 = tail call i64 @learnFrom(i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @reportError(i32* null)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -2, %4 ], [ 8, %1 ]
ret i32 %7
}
void g_list_free_1() {}


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

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

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

LLVM IR (-O2):
define void @g_list_free_1() {
ret void
}
int compareInt(const int *a, const int *b) { return *a - *b; }


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

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

LLVM IR (-O0):
define i32 @compareInt(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @compareInt(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
ret i32 %5
}
eq(float a, float b) { return a == b; }


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
cmpeqss %xmm1,%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @eq(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oeq float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @eq(float %0, float %1) {
%3 = fcmp oeq float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int encodeShift(int code, int amount) { return ((amount & 0x1f) << 2) | code; }


x86 assembly (clang, -O0):
<encodeShift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
shl    $0x2,%eax
or     -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encodeShift>:
lea    0x0(,%rsi,4),%eax
and    $0x7c,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @encodeShift(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 = and i32 %5, 31
%7 = shl i32 %6, 2
%8 = load i32, i32* %3
%9 = or i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @encodeShift(i32 %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = and i32 %3, 124
%5 = or i32 %4, %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t read_int4(const char *buf) { return *(int32_t *)buf; }


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

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

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

LLVM IR (-O2):
define i32 @read_int4(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int get_black_captured();
int get_white_captured();
int brain_capture(void) {
  int value = get_black_captured() - get_white_captured();
  return value;
}


x86 assembly (clang, -O0):
<brain_capture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_black_captured@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <get_white_captured@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brain_capture>:
push   %rbx
xor    %eax,%eax
call   1030 <get_black_captured@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <get_white_captured@plt>
sub    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @brain_capture() {
%1 = alloca i32
%2 = call i32 (...) @get_black_captured()
%3 = call i32 (...) @get_white_captured()
%4 = sub nsw i32 %2, %3
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @brain_capture() {
%1 = tail call i32 (...) @get_black_captured()
%2 = tail call i32 (...) @get_white_captured()
%3 = sub nsw i32 %1, %2
ret i32 %3
}
void ft_swap(char **a, char **b) {
  char *c;
  c = *a;
  *a = *b;
  *b = c;
}


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

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

LLVM IR (-O0):
define void @ft_swap(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @ft_swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
int make_move(int s, int m) {
  int p = ((s) >> 18);
  s &= ~0xc0000;
  return s | (1 << (m + 9 * (p - 1))) | (1 << (18 + (p & 0x1)));
}


x86 assembly (clang, -O0):
<make_move>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x12,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfff3ffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
imul   $0x9,%edx,%edx
add    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0x1,%ecx
add    $0x12,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_move>:
mov    %edi,%eax
mov    %edi,%ecx
sar    $0x12,%ecx
and    $0xfff3ffff,%eax
lea    (%rcx,%rcx,8),%edx
add    %esi,%edx
add    $0xf7,%dl
and    $0x1,%cl
or     $0x12,%cl
bts    %ecx,%eax
bts    %edx,%eax
ret

LLVM IR (-O0):
define i32 @make_move(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = ashr i32 %6, 18
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = and i32 %8, -786433
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = sub nsw i32 %12, 1
%14 = mul nsw i32 9, %13
%15 = add nsw i32 %11, %14
%16 = shl i32 1, %15
%17 = or i32 %10, %16
%18 = load i32, i32* %5
%19 = and i32 %18, 1
%20 = add nsw i32 18, %19
%21 = shl i32 1, %20
%22 = or i32 %17, %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @make_move(i32 %0, i32 %1) {
%3 = ashr i32 %0, 18
%4 = and i32 %0, -786433
%5 = mul nsw i32 %3, 9
%6 = add i32 %1, -9
%7 = add i32 %6, %5
%8 = shl nuw i32 1, %7
%9 = and i32 %3, 1
%10 = or i32 %9, 18
%11 = shl nuw i32 1, %10
%12 = or i32 %11, %4
%13 = or i32 %12, %8
ret i32 %13
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int32_t WriteUint24Be(uint32_t value, void *out) {
  assert(out != NULL);
  uint8_t *buf = (uint8_t *)out;
  buf[0] = (uint8_t)(value >> 16);
  buf[1] = (uint8_t)(value >> 8);
  buf[2] = (uint8_t)(value >> 0);
  return 3;
}


x86 assembly (clang, -O0):
<WriteUint24Be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x4(%rbp),%eax
sar    $0x0,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    $0x3,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteUint24Be>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1030 <assert@plt>
mov    %ebp,%eax
sar    $0x10,%eax
cltq
mov    %rax,(%rbx)
movslq %ebp,%rax
sar    $0x8,%ebp
movslq %ebp,%rcx
mov    %rcx,0x8(%rbx)
mov    %rax,0x10(%rbx)
mov    $0x3,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @WriteUint24Be(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %5
%12 = load i32, i32* %3
%13 = ashr i32 %12, 16
%14 = sext i32 %13 to i64
%15 = load i64*, i64** %5
%16 = getelementptr inbounds i64, i64* %15, i64 0
store i64 %14, i64* %16
%17 = load i32, i32* %3
%18 = ashr i32 %17, 8
%19 = sext i32 %18 to i64
%20 = load i64*, i64** %5
%21 = getelementptr inbounds i64, i64* %20, i64 1
store i64 %19, i64* %21
%22 = load i32, i32* %3
%23 = ashr i32 %22, 0
%24 = sext i32 %23 to i64
%25 = load i64*, i64** %5
%26 = getelementptr inbounds i64, i64* %25, i64 2
store i64 %24, i64* %26
ret i32 3
}

LLVM IR (-O2):
define i32 @WriteUint24Be(i32 %0, i8* writeonly %1) {
%3 = icmp ne i8* %1, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = bitcast i8* %1 to i64*
%7 = ashr i32 %0, 16
%8 = sext i32 %7 to i64
store i64 %8, i64* %6
%9 = ashr i32 %0, 8
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %1, i64 8
%12 = bitcast i8* %11 to i64*
store i64 %10, i64* %12
%13 = sext i32 %0 to i64
%14 = getelementptr inbounds i8, i8* %1, i64 16
%15 = bitcast i8* %14 to i64*
store i64 %13, i64* %15
ret i32 3
}
int test_imm_AAuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xAA << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_AAuint64_highword_reg>:
movabs $0xaa00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_AAuint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 170
%6 = icmp ne i64 %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_AAuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 730144440320
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
__attribute__((no)) foo(short unsigned int *p1, short unsigned int *p2) {
  short unsigned int x1, x4;
  int x2, x3, x5, x6;
  unsigned int x7;
  x1 = *p1;
  x2 = (int)x1;
  x3 = x2 * 65536;
  x4 = *p2;
  x5 = (int)x4;
  x6 = x3 + x4;
  x7 = (unsigned int)x6;
  if (x7 <= 268435455U)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
movzwl -0x14(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
cmpl   $0xfffffff,-0x28(%rbp)
ja     1183 <foo+0x63>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<foo>:
push   %rax
movzwl (%rdi),%eax
cmp    $0xfff,%eax
ja     1132 <foo+0x12>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @foo(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca i16
%6 = alloca i16
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i16* %0, i16** %3
store i16* %1, i16** %4
%12 = load i16*, i16** %3
%13 = load i16, i16* %12
store i16 %13, i16* %5
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = mul nsw i32 %16, 65536
store i32 %17, i32* %8
%18 = load i16*, i16** %4
%19 = load i16, i16* %18
store i16 %19, i16* %6
%20 = load i16, i16* %6
%21 = zext i16 %20 to i32
store i32 %21, i32* %9
%22 = load i32, i32* %8
%23 = load i16, i16* %6
%24 = zext i16 %23 to i32
%25 = add nsw i32 %22, %24
store i32 %25, i32* %10
%26 = load i32, i32* %10
store i32 %26, i32* %11
%27 = load i32, i32* %11
%28 = icmp ule i32 %27, 268435455
br i1 %28, label %29, label %31
29: ; preds = %2
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %2
%32 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @foo(i16* nocapture %0, i16* nocapture readnone %1) {
%3 = load i16, i16* %0
%4 = icmp ult i16 %3, 4096
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = tail call i32 @exit(i32 0)
unreachable
}
jump(n) {
  xwrite('x ');
  xwrite('1f');
  xwrite('+');
  number(n);
  gen('\nn', 6);
}


x86 assembly (clang, -O0):
<jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x7820,%edi
mov    $0x0,%al
call   1030 <xwrite@plt>
mov    $0x3166,%edi
mov    $0x0,%al
call   1030 <xwrite@plt>
mov    $0x2b,%edi
mov    $0x0,%al
call   1030 <xwrite@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <number@plt>
mov    $0xa6e,%edi
mov    $0x6,%esi
mov    $0x0,%al
call   1050 <gen@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jump>:
push   %rbx
mov    %edi,%ebx
mov    $0x7820,%edi
xor    %eax,%eax
call   1030 <xwrite@plt>
mov    $0x3166,%edi
xor    %eax,%eax
call   1030 <xwrite@plt>
mov    $0x2b,%edi
xor    %eax,%eax
call   1030 <xwrite@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <number@plt>
mov    $0xa6e,%edi
mov    $0x6,%esi
xor    %eax,%eax
pop    %rbx
jmp    1050 <gen@plt>

LLVM IR (-O0):
define i32 @jump(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @xwrite to i32 (i32, ...)*)(i32 30752)
%5 = call i32 (i32, ...) bitcast (i32 (...)* @xwrite to i32 (i32, ...)*)(i32 12646)
%6 = call i32 (i32, ...) bitcast (i32 (...)* @xwrite to i32 (i32, ...)*)(i32 43)
%7 = load i32, i32* %3
%8 = call i32 (i32, ...) bitcast (i32 (...)* @number to i32 (i32, ...)*)(i32 %7)
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @gen to i32 (i32, i32, ...)*)(i32 2670, i32 6)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @jump(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @xwrite to i32 (i32, ...)*)(i32 30752)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @xwrite to i32 (i32, ...)*)(i32 12646)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @xwrite to i32 (i32, ...)*)(i32 43)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @number to i32 (i32, ...)*)(i32 %0)
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @gen to i32 (i32, i32, ...)*)(i32 2670, i32 6)
ret i32 undef
}
/* Variables and functions */
int send(int, void *, int, int /*<<< orphan*/);
int envia(int sockConexion, void *datos, int nDatos) {
  return send(sockConexion, datos, nDatos, 0);
}


x86 assembly (clang, -O0):
<envia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @envia(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Type definitions */
struct quat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quat_power(float *, float *, float);
__attribute__((always_)) struct quat *
psquat_power(struct quat *result, struct quat *a, float exponent) {
  quat_power((float *)result, (float *)a, exponent);
  return result;
}


x86 assembly (clang, -O0):
<psquat_power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
call   1030 <quat_power@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psquat_power>:
push   %rbx
mov    %rdi,%rbx
call   1030 <quat_power@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.quat = type { i32 }
define %struct.quat* @psquat_power(%struct.quat* %0, %struct.quat* %1, float %2) {
%4 = alloca %struct.quat*
%5 = alloca %struct.quat*
%6 = alloca float
store %struct.quat* %0, %struct.quat** %4
store %struct.quat* %1, %struct.quat** %5
store float %2, float* %6
%7 = load %struct.quat*, %struct.quat** %4
%8 = bitcast %struct.quat* %7 to float*
%9 = load %struct.quat*, %struct.quat** %5
%10 = bitcast %struct.quat* %9 to float*
%11 = load float, float* %6
%12 = call i32 @quat_power(float* %8, float* %10, float %11)
%13 = load %struct.quat*, %struct.quat** %4
ret %struct.quat* %13
}

LLVM IR (-O2):
%struct.quat = type { i32 }
define %struct.quat* @psquat_power(%struct.quat* returned %0, %struct.quat* %1, float %2) {
%4 = bitcast %struct.quat* %0 to float*
%5 = bitcast %struct.quat* %1 to float*
%6 = tail call i32 @quat_power(float* %4, float* %5, float %2)
ret %struct.quat* %0
}
/* Variables and functions */
char *getenv(char *);
const char *conf_get_autoconfig_name(void) {
  char *name = getenv("KCONFIG_AUTOCONFIG");
  return name ? name : "include/config/auto.conf";
}


x86 assembly (clang, -O0):
<conf_get_autoconfig_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <conf_get_autoconfig_name+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_autoconfig_name+0x40>
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_autoconfig_name+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_get_autoconfig_name>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xeec(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"KCONFIG_AUTOCONFIG\00"
@.str.1 = [25 x i8] c"include/config/auto.conf\00"
define i8* @conf_get_autoconfig_name() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %1
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %5
%9 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), %7 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [19 x i8] c"KCONFIG_AUTOCONFIG\00"
@.str.1 = [25 x i8] c"include/config/auto.conf\00"
define i8* @conf_get_autoconfig_name() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
/* Type definitions */
struct triple {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
struct triple **do_triple_targ(struct compile_state *, struct triple *,
                               struct triple **, int, int);
struct triple **triple_targ(struct compile_state *state, struct triple *ins,
                            struct triple **last) {
  return do_triple_targ(state, ins, last, 1, 1);
}


x86 assembly (clang, -O0):
<triple_targ>:
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
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1030 <do_triple_targ@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triple_targ>:
mov    $0x1,%ecx
mov    $0x1,%r8d
jmp    1030 <do_triple_targ@plt>

LLVM IR (-O0):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define %struct.triple** @triple_targ(%struct.compile_state* %0, %struct.triple* %1, %struct.triple** %2) {
%4 = alloca %struct.compile_state*
%5 = alloca %struct.triple*
%6 = alloca %struct.triple**
store %struct.compile_state* %0, %struct.compile_state** %4
store %struct.triple* %1, %struct.triple** %5
store %struct.triple** %2, %struct.triple*** %6
%7 = load %struct.compile_state*, %struct.compile_state** %4
%8 = load %struct.triple*, %struct.triple** %5
%9 = load %struct.triple**, %struct.triple*** %6
%10 = call %struct.triple** @do_triple_targ(%struct.compile_state* %7, %struct.triple* %8, %struct.triple** %9, i32 1, i32 1)
ret %struct.triple** %10
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define %struct.triple** @triple_targ(%struct.compile_state* %0, %struct.triple* %1, %struct.triple** %2) {
%4 = tail call %struct.triple** @do_triple_targ(%struct.compile_state* %0, %struct.triple* %1, %struct.triple** %2, i32 1, i32 1)
ret %struct.triple** %4
}
void pthread_cleanup_push(void (*routine)(void *), void *arg) {}


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

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

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

LLVM IR (-O2):
define void @pthread_cleanup_push(void (i8*)* nocapture %0, i8* nocapture %1) {
ret void
}
void glmCrossProduct2d(double result[2], const double v1[2]) {
  result[0] = v1[1];
  result[1] = -v1[0];
}


x86 assembly (clang, -O0):
<glmCrossProduct2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmCrossProduct2d>:
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  (%rsi),%xmm0
xorps  0xeec(%rip),%xmm0
movlps %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmCrossProduct2d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 1
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
store double %7, double* %9
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fneg double %12
%14 = load double*, double** %3
%15 = getelementptr inbounds double, double* %14, i64 1
store double %13, double* %15
ret void
}

LLVM IR (-O2):
define void @glmCrossProduct2d(double* nocapture writeonly %0, double* nocapture %1) {
%3 = getelementptr inbounds double, double* %1, i64 1
%4 = load double, double* %3
store double %4, double* %0
%5 = load double, double* %1
%6 = fneg double %5
%7 = getelementptr inbounds double, double* %0, i64 1
store double %6, double* %7
ret void
}
void socket_teardown() {}


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

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

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

LLVM IR (-O2):
define void @socket_teardown() {
ret void
}
int execute_rt_sigtimedwait() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_rt_sigtimedwait() {
ret i32 0
}
int fibo_recur(int n) {
  if (n == 0) {
    return 0;
  } else if (n == 1) {
    return 1;
  }
  return fibo_recur(n - 2) + fibo_recur(n - 1);
}


x86 assembly (clang, -O0):
<fibo_recur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fibo_recur+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116f <fibo_recur+0x5f>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fibo_recur+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116f <fibo_recur+0x5f>
jmp    114c <fibo_recur+0x3c>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo_recur@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo_recur@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo_recur>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fibo_recur+0x22>
nopl   0x0(%rax)
lea    -0x2(%rbx),%edi
call   1030 <fibo_recur@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
jae    1120 <fibo_recur+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibo_recur(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -2
%8 = tail call i32 @fibo_recur(i32 %7)
%9 = add nsw i32 %4, -1
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
int color_offset_f4(int x, int y) {
  return ((y << 10) + (((x << 10) * 523) / 173) - (12111 << 10)) >> 10;
}


x86 assembly (clang, -O0):
<color_offset_f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
imul   $0x20b,%eax,%eax
mov    $0xad,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
sub    $0xbd3c00,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f4>:
shl    $0xa,%esi
imul   $0x82c00,%edi,%eax
cltq
imul   $0x17ad2209,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rax
add    %ecx,%eax
add    %esi,%eax
add    $0xff42c400,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f4(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 %5, 10
%7 = load i32, i32* %3
%8 = shl i32 %7, 10
%9 = mul nsw i32 %8, 523
%10 = sdiv i32 %9, 173
%11 = add nsw i32 %6, %10
%12 = sub nsw i32 %11, 12401664
%13 = ashr i32 %12, 10
ret i32 %13
}

LLVM IR (-O2):
define i32 @color_offset_f4(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = mul i32 %0, 535552
%5 = sdiv i32 %4, 173
%6 = add nsw i32 %5, -12401664
%7 = add i32 %6, %3
%8 = ashr i32 %7, 10
ret i32 %8
}
waste_a_second() {
  int i;
  for (i = 0; i < 8000000; i++)
    ;
}


x86 assembly (clang, -O0):
<waste_a_second>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
cmpl   $0x7a1200,-0x8(%rbp)
jge    112b <waste_a_second+0x2b>
jmp    111d <waste_a_second+0x1d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110b <waste_a_second+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @waste_a_second() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ decorators_destroy();
int destroy_tests(void) {
  decorators_destroy();
  return 0;
}


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

x86 assembly (clang, -O2):
<destroy_tests>:
push   %rax
xor    %eax,%eax
call   1030 <decorators_destroy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @destroy_tests() {
%1 = call i32 (...) @decorators_destroy()
ret i32 0
}

LLVM IR (-O2):
define i32 @destroy_tests() {
%1 = tail call i32 (...) @decorators_destroy()
ret i32 0
}
int ft_toclosingparenthesis(int c) {
  if (c == '(')
    return (')');
  else if (c == '[')
    return (']');
  else if (c == '{')
    return ('}');
  else
    return (c);
}


x86 assembly (clang, -O0):
<ft_toclosingparenthesis>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x28,-0x8(%rbp)
jne    111d <ft_toclosingparenthesis+0x1d>
movl   $0x29,-0x4(%rbp)
jmp    114f <ft_toclosingparenthesis+0x4f>
cmpl   $0x5b,-0x8(%rbp)
jne    1133 <ft_toclosingparenthesis+0x33>
movl   $0x5d,-0x4(%rbp)
jmp    114f <ft_toclosingparenthesis+0x4f>
cmpl   $0x7b,-0x8(%rbp)
jne    1149 <ft_toclosingparenthesis+0x49>
movl   $0x7d,-0x4(%rbp)
jmp    114f <ft_toclosingparenthesis+0x4f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_toclosingparenthesis>:
cmp    $0x28,%edi
je     1117 <ft_toclosingparenthesis+0x17>
mov    %edi,%eax
cmp    $0x7b,%edi
je     111d <ft_toclosingparenthesis+0x1d>
cmp    $0x5b,%eax
jne    1122 <ft_toclosingparenthesis+0x22>
mov    $0x5d,%eax
ret
mov    $0x29,%eax
ret
mov    $0x7d,%eax
ret

LLVM IR (-O0):
define i32 @ft_toclosingparenthesis(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 40
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 41, i32* %2
br label %17
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 91
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 93, i32* %2
br label %17
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 123
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 125, i32* %2
br label %17
15: ; preds = %11
%16 = load i32, i32* %3
store i32 %16, i32* %2
br label %17
17: ; preds = %15, %14, %10, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_toclosingparenthesis(i32 %0) {
switch i32 %0, label %4 [
i32 40, label %5
i32 91, label %2
i32 123, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i32 [ 93, %2 ], [ 125, %3 ], [ %0, %4 ], [ 41, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ islower(char);
char toupper(char);
void strupr(char *str) {
  while (*str != 0) {
    if (islower(*str)) {
      *str = toupper(*str);
    }
    str++;
  }
}


x86 assembly (clang, -O0):
<strupr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1177 <strupr+0x57>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1166 <strupr+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <strupr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1155 <strupr+0x35>
mov    %rdi,%rbx
jmp    113c <strupr+0x1c>
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1155 <strupr+0x35>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1130 <strupr+0x10>
movsbl (%rbx),%edi
call   1040 <toupper@plt>
mov    %al,(%rbx)
jmp    1130 <strupr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @strupr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i64 @islower(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = tail call signext i8 @toupper(i8 signext %10)
store i8 %11, i8* %6
br label %12
12: ; preds = %9, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret void
}
int bit_is_clear(int reg, int bit) {
  if (reg & (1 << bit)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<bit_is_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1130 <bit_is_clear+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <bit_is_clear+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_is_clear>:
mov    %esi,%ecx
mov    %edi,%eax
not    %eax
shr    %cl,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @bit_is_clear(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = lshr i32 %3, %1
%5 = and i32 %4, 1
ret i32 %5
}
void neko_free_jit() {}


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

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

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

LLVM IR (-O2):
define void @neko_free_jit() {
ret void
}
void foo108(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo108(i32 %0) {
ret void
}
int ioprio_set(int which, int who, int ioprio) { return -1; }


x86 assembly (clang, -O0):
<ioprio_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ioprio_set(i32 %0, i32 %1, i32 %2) {
ret i32 -1
}
void XOMOfOC() {}


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

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

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

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