xunge/DecIR huggingface dataset:
void StorePointer(void **addr, void *val) {
  void *v;
  v = *addr;
  while (!__sync_bool_compare_and_swap(addr, v, val))
    v = *addr;
}


x86 assembly (clang, -O0):
<StorePointer>:
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    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
xor    $0xff,%al
test   $0x1,%al
jne    113d <StorePointer+0x3d>
jmp    114d <StorePointer+0x4d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <StorePointer+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StorePointer>:
mov    (%rdi),%rax
lock cmpxchg %rsi,(%rdi)
jne    1100 <StorePointer>
ret

LLVM IR (-O0):
define void @StorePointer(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
br label %8
8: ; preds = %18, %2
%9 = load i8**, i8*** %3
%10 = bitcast i8** %9 to i64*
%11 = load i8*, i8** %5
%12 = ptrtoint i8* %11 to i64
%13 = load i8*, i8** %4
%14 = ptrtoint i8* %13 to i64
%15 = cmpxchg i64* %10, i64 %12, i64 %14 seq_cst seq_cst
%16 = extractvalue { i64, i1 } %15, 1
%17 = xor i1 %16, true
br i1 %17, label %18, label %21
18: ; preds = %8
%19 = load i8**, i8*** %3
%20 = load i8*, i8** %19
store i8* %20, i8** %5
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @StorePointer(i8** nocapture %0, i8* %1) {
%3 = bitcast i8** %0 to i64*
%4 = ptrtoint i8* %1 to i64
br label %5
5: ; preds = %5, %2
%6 = load i8*, i8** %0
%7 = ptrtoint i8* %6 to i64
%8 = cmpxchg i64* %3, i64 %7, i64 %4 seq_cst seq_cst
%9 = extractvalue { i64, i1 } %8, 1
br i1 %9, label %10, label %5
10: ; preds = %5
ret void
}
int __attribute__((no, noclone)) data(void) { return 10; }


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

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

LLVM IR (-O0):
define i32 @data() {
ret i32 10
}

LLVM IR (-O2):
define i32 @data() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) { printf("%s\n", "Hello World!"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int edge_flip(int cubieval) { return cubieval ^ 1; }


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

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

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

LLVM IR (-O2):
define i32 @edge_flip(i32 %0) {
%2 = xor i32 %0, 1
ret i32 %2
}
void increment_nonce(unsigned char *n, int length) {
  int p;
  for (p = 0; p < length; p++) {
    n[p]++;
    if (!n[p]) {
      p++;
      continue;
    } else {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<increment_nonce>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1162 <increment_nonce+0x62>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
add    $0x1,%dl
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
jne    114f <increment_nonce+0x4f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <increment_nonce+0x54>
jmp    1162 <increment_nonce+0x62>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <increment_nonce+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment_nonce>:
test   %esi,%esi
jle    111e <increment_nonce+0x1e>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
addb   $0x1,(%rdi,%rax,1)
jne    111e <increment_nonce+0x1e>
add    $0x2,%rax
cmp    %esi,%eax
jl     1110 <increment_nonce+0x10>
ret

LLVM IR (-O0):
define void @increment_nonce(i8* %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 = %27, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %30
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = add i8 %15, 1
store i8 %16, i8* %14
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = icmp ne i8 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %10
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %27
26: ; preds = %10
br label %30
27: ; preds = %23
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %6
30: ; preds = %26, %6
ret void
}

LLVM IR (-O2):
define void @increment_nonce(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = add i8 %7, 1
store i8 %8, i8* %6
%9 = icmp eq i8 %8, 0
%10 = add nuw i64 %5, 2
%11 = trunc i64 %10 to i32
%12 = icmp slt i32 %11, %1
%13 = select i1 %9, i1 %12, i1 false
br i1 %13, label %4, label %14
14: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rgb565(uint32_t r, uint32_t g, uint32_t b) {
  return (((r & 0xf8ul) >> 3) << 11) | (((g & 0xfcul) >> 2) << 5) |
         ((b & 0xf8ul) >> 3);
}


x86 assembly (clang, -O0):
<rgb565>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movslq -0x4(%rbp),%rax
and    $0xf8,%rax
shr    $0x3,%rax
shl    $0xb,%rax
movslq -0x8(%rbp),%rcx
and    $0xfc,%rcx
shr    $0x2,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
movslq -0xc(%rbp),%rcx
and    $0xf8,%rcx
shr    $0x3,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb565>:
shl    $0x8,%edi
and    $0xf800,%edi
and    $0xfc,%esi
lea    (%rdi,%rsi,8),%eax
shr    $0x3,%edx
and    $0x1f,%edx
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @rgb565(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = and i64 %8, 248
%10 = lshr i64 %9, 3
%11 = shl i64 %10, 11
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = and i64 %13, 252
%15 = lshr i64 %14, 2
%16 = shl i64 %15, 5
%17 = or i64 %11, %16
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = and i64 %19, 248
%21 = lshr i64 %20, 3
%22 = or i64 %17, %21
%23 = trunc i64 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @rgb565(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 8
%5 = and i32 %4, 63488
%6 = shl i32 %1, 3
%7 = and i32 %6, 2016
%8 = or i32 %7, %5
%9 = lshr i32 %2, 3
%10 = and i32 %9, 31
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int *malloc(int);
int *mistake2() {
  int *buf = malloc(sizeof(int) * 4);
  buf[1] = 2;
  return buf;
}


x86 assembly (clang, -O0):
<mistake2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,0x4(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mistake2>:
push   %rax
mov    $0x10,%edi
call   1030 <malloc@plt>
movl   $0x2,0x4(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i32* @mistake2() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 16)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 1
store i32 2, i32* %4
%5 = load i32*, i32** %1
ret i32* %5
}

LLVM IR (-O2):
define noalias i32* @mistake2() {
%1 = tail call i32* @malloc(i32 16)
%2 = getelementptr inbounds i32, i32* %1, i64 1
store i32 2, i32* %2
ret i32* %1
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISFIFO(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int unary_p(char *s) {
  struct stat buf;
  if (stat(s, &buf))
    return 0;
  return S_ISFIFO(buf.st_mode);
}


x86 assembly (clang, -O0):
<unary_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114f <unary_p+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115a <unary_p+0x3a>
mov    -0x18(%rbp),%edi
call   1030 <S_ISFIFO@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unary_p>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <unary_p+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISFIFO@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @unary_p(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISFIFO(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @unary_p(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISFIFO(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
float fmaf(float x, float y, float z) { return ((double)x * y + z); }


x86 assembly (clang, -O0):
<fmaf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaf>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fmaf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = load float, float* %6
%12 = fpext float %11 to double
%13 = call double @llvm.fmuladd.f64(double %8, double %10, double %12)
%14 = fptrunc double %13 to float
ret float %14
}

LLVM IR (-O2):
define float @fmaf(float %0, float %1, float %2) {
%4 = fpext float %0 to double
%5 = fpext float %1 to double
%6 = fpext float %2 to double
%7 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %6)
%8 = fptrunc double %7 to float
ret float %8
}
float DistanceAttenuation(float distanceSq, float power) {
  return power / (distanceSq + 1.f);
}


x86 assembly (clang, -O0):
<DistanceAttenuation>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xee5(%rip),%xmm1
addss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<DistanceAttenuation>:
addss  0xef8(%rip),%xmm0
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @DistanceAttenuation(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = fadd float %6, 1.000000e+00
%8 = fdiv float %5, %7
ret float %8
}

LLVM IR (-O2):
define float @DistanceAttenuation(float %0, float %1) {
%3 = fadd float %0, 1.000000e+00
%4 = fdiv float %1, %3
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGSTOP;
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)());
int /*<<< orphan*/ term_restore();
void term_ctrlz() {
  signal(SIGTSTP, term_ctrlz);
  term_restore();
  kill(getpid(), SIGSTOP);
}


x86 assembly (clang, -O0):
<term_ctrlz>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    0x2e94(%rip),%rsi
call   1050 <signal@plt>
mov    $0x0,%al
call   1040 <term_restore@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2e60(%rip),%rax
mov    (%rax),%esi
call   1060 <kill@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_ctrlz>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
mov    0x2e97(%rip),%rsi
call   1050 <signal@plt>
xor    %eax,%eax
call   1040 <term_restore@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2e65(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
pop    %rax
jmp    1060 <kill@plt>

LLVM IR (-O0):
@SIGTSTP = global i32 0
@SIGSTOP = global i32 0
define void @term_ctrlz() {
%1 = load i32, i32* @SIGTSTP
%2 = call i32 @signal(i32 %1, void (...)* bitcast (void ()* @term_ctrlz to void (...)*))
%3 = call i32 (...) @term_restore()
%4 = call i32 (...) @getpid()
%5 = load i32, i32* @SIGSTOP
%6 = call i32 @kill(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@SIGTSTP = global i32 0
@SIGSTOP = global i32 0
define void @term_ctrlz() {
%1 = load i32, i32* @SIGTSTP
%2 = tail call i32 @signal(i32 %1, void (...)* bitcast (void ()* @term_ctrlz to void (...)*))
%3 = tail call i32 (...) @term_restore()
%4 = tail call i32 (...) @getpid()
%5 = load i32, i32* @SIGSTOP
%6 = tail call i32 @kill(i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void divider() { printf("----------\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"----------\00"
define void @divider() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void screwUp() { print("You made a mistake entering something; try again!"); }


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"You made a mistake entering something; try again!\00"
define void @screwUp() {
%1 = call i32 @print(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"You made a mistake entering something; try again!\00"
define void @screwUp() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
void p9_sysctl_unregister(void) {}


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

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

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

LLVM IR (-O2):
define void @p9_sysctl_unregister() {
ret void
}
/* Type definitions */
struct afile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EOPNOTSUPP;
int /*<<< orphan*/ errno;
int af_set(struct afile *a, const char *s, ...) {
  do {
    errno = (EOPNOTSUPP);
    return (-1);
  } while (0);
}


x86 assembly (clang, -O0):
<af_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<af_set>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.afile = type { i32 }
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @af_set(%struct.afile* %0, i8* %1, ...) {
%3 = alloca %struct.afile*
%4 = alloca i8*
store %struct.afile* %0, %struct.afile** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %2
%6 = load i32, i32* @EOPNOTSUPP
store i32 %6, i32* @errno
br label %7
7: ; preds = %5
ret i32 -1
}

LLVM IR (-O2):
%struct.afile = type { i32 }
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @af_set(%struct.afile* nocapture readnone %0, i8* nocapture readnone %1, ...) {
%3 = load i32, i32* @EOPNOTSUPP
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void nl(void) { write(1, "\n", 1); }


x86 assembly (clang, -O0):
<nl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edx
lea    0xee0(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nl>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @nl() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  int j;
  int r;
  if (!(r > i + j))
    return 0;
  while (i > 0) {
    i = i - 1;
    j = j + 1;
  }
  assert(r > i + j);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jg     113c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1181 <main+0x71>
jmp    1141 <main+0x31>
cmpl   $0x0,-0x8(%rbp)
jle    1162 <main+0x52>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <main+0x31>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
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
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = icmp sgt i32 %5, %8
br i1 %9, label %11, label %10
10: ; preds = %0
store i32 0, i32* %1
br label %28
11: ; preds = %0
br label %12
12: ; preds = %15, %11
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 1
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %12
20: ; preds = %12
%21 = load i32, i32* %4
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = add nsw i32 %22, %23
%25 = icmp sgt i32 %21, %24
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
store i32 0, i32* %1
br label %28
28: ; preds = %20, %10
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int az_ioctl(int cmd, void *arg) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @az_ioctl(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
int _Xthr_equal_stub_() { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @_Xthr_equal_stub_() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ system(char *);
int conf2dump(char filename[]) {
  char cmd[1000];
  sprintf(
      cmd,
      "grep -v \"#\" %s | grep -v \"^$\" | gawk -F\"=\" '{print $2}' > %s.dump",
      filename, filename);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<conf2dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xebb(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf2dump>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rcx,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [66 x i8] c"grep -v \22#\22 %s | grep -v \22^$\22 | gawk -F\22=\22 '{print $2}' > %s.dump\00"
define i32 @conf2dump(i8* %0) {
%2 = alloca i8*
%3 = alloca [1000 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%9 = call i32 @system(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [66 x i8] c"grep -v \22#\22 %s | grep -v \22^$\22 | gawk -F\22=\22 '{print $2}' > %s.dump\00"
define i32 @conf2dump(i8* %0) {
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%5 = call i32 @system(i8* %3)
ret i32 0
}
/* Variables and functions */
int extract_min(int *, int *);
int /*<<< orphan*/ printf(char *, ...);
void head_sort(int *head, int head_len) {
  int i = head_len;
  while (i >= 1) {
    printf("%d, ", extract_min(head, &i));
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<head_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     1161 <head_sort+0x41>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <extract_min@plt>
mov    %eax,%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1135 <head_sort+0x15>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<head_sort>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,0xc(%rsp)
test   %esi,%esi
jle    116e <head_sort+0x3e>
mov    %rdi,%rbx
lea    0xc(%rsp),%r14
lea    0xeb0(%rip),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <extract_min@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jg     1150 <head_sort+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d, \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @head_sort(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* %4
store i32 %6, i32* %5
br label %7
7: ; preds = %10, %2
%8 = load i32, i32* %5
%9 = icmp sge i32 %8, 1
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32*, i32** %3
%12 = call i32 @extract_min(i32* %11, i32* %5)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %7
14: ; preds = %7
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @head_sort(i32* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 %1, i32* %3
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %11
6: ; preds = %2, %6
%7 = call i32 @extract_min(i32* %0, i32* %3)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %6, label %11
11: ; preds = %6, %2
%12 = call i32 @putchar(i32 10)
ret void
}
void w17(void *x, long long y) { *(long long *)(x + 32751) = y; }


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

x86 assembly (clang, -O2):
<w17>:
mov    %rsi,0x7fef(%rdi)
ret

LLVM IR (-O0):
define void @w17(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32751
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w17(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32751
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
FNIEMOPRM_DEF(iemOp_InvalidWithRM) {
  IEMOP_MNEMONIC("InvalidWithRM");
  return IEMOP_RAISE_INVALID_OPCODE();
}


x86 assembly (clang, -O0):
<FNIEMOPRM_DEF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <IEMOP_MNEMONIC@plt>
mov    $0x0,%al
call   1030 <IEMOP_RAISE_INVALID_OPCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNIEMOPRM_DEF>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <IEMOP_MNEMONIC@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <IEMOP_RAISE_INVALID_OPCODE@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"InvalidWithRM\00"
define i32 @FNIEMOPRM_DEF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @IEMOP_MNEMONIC to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %4
}

LLVM IR (-O2):
@.str = [14 x i8] c"InvalidWithRM\00"
define i32 @FNIEMOPRM_DEF(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @IEMOP_MNEMONIC to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef scalar_t__ int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ dds_lookup(int /*<<< orphan*/);
int16_t dds(uint32_t *phase_acc, int32_t phase_rate) {
  int16_t amp;
  amp = dds_lookup(*phase_acc);
  *phase_acc += phase_rate;
  return amp;
}


x86 assembly (clang, -O0):
<dds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <dds_lookup@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq (%rax),%rcx
add    %rdx,%rcx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dds>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <dds_lookup@plt>
add    %r14d,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @dds(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @dds_lookup(i32 %7)
store i32 %8, i32* %5
%9 = load i64, i64* %4
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = add nsw i64 %12, %9
%14 = trunc i64 %13 to i32
store i32 %14, i32* %10
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @dds(i32* nocapture %0, i64 %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @dds_lookup(i32 %3)
%5 = load i32, i32* %0
%6 = trunc i64 %1 to i32
%7 = add i32 %5, %6
store i32 %7, i32* %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
int gdGetByte(int *result, FILE *in) {
  int r;
  r = getc(in);
  if (r == EOF) {
    return 0;
  }
  *result = r;
  return 1;
}


x86 assembly (clang, -O0):
<gdGetByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%eax
jne    114a <gdGetByte+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    115a <gdGetByte+0x4a>
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdGetByte>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <getc@plt>
mov    0x2ec5(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%eax
je     1130 <gdGetByte+0x20>
mov    %eax,(%rbx)
mov    $0x1,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @gdGetByte(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = load i32*, i32** %5
%8 = call i32 @getc(i32* %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %16
13: ; preds = %2
%14 = load i32, i32* %6
%15 = load i32*, i32** %4
store i32 %14, i32* %15
store i32 1, i32* %3
br label %16
16: ; preds = %13, %12
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @gdGetByte(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = tail call i32 @getc(i32* %1)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %7, label %6
6: ; preds = %2
store i32 %3, i32* %0
br label %7
7: ; preds = %2, %6
%8 = phi i32 [ 1, %6 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ log_stdout(char *, char *, char *, char *);
void version() {
  log_stdout("050 ducc_ling Version %s compiled %s at %s\n", "2.1.0",
             "Mar 18 2022", "02:18:17");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf0a(%rip),%rsi
lea    0xf09(%rip),%rdx
lea    0xf0e(%rip),%rcx
call   1030 <log_stdout@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
lea    0xf0e(%rip),%rsi
lea    0xf0d(%rip),%rdx
lea    0xf12(%rip),%rcx
jmp    1030 <log_stdout@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"050 ducc_ling Version %s compiled %s at %s\0A\00"
@.str.1 = [6 x i8] c"2.1.0\00"
@.str.2 = [12 x i8] c"Mar 18 2022\00"
@.str.3 = [9 x i8] c"02:18:17\00"
define void @version() {
%1 = call i32 @log_stdout(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"050 ducc_ling Version %s compiled %s at %s\0A\00"
@.str.1 = [6 x i8] c"2.1.0\00"
@.str.2 = [12 x i8] c"Mar 18 2022\00"
@.str.3 = [9 x i8] c"02:18:17\00"
define void @version() {
%1 = tail call i32 @log_stdout(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}
int test_imm_94int8_mem(signed char *val) {
  return ((*val) & (-0x94 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_94int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff6c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_94int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -148
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
float smootherstep(float, float, float);
float bismootherstep_interp(float tl, float tr, float bl, float br,
                            float x_amount, float y_amount) {
  float left = smootherstep(tl, bl, y_amount);
  float right = smootherstep(tr, br, y_amount);
  return smootherstep(right, left, x_amount);
}


x86 assembly (clang, -O0):
<bismootherstep_interp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
call   1030 <smootherstep@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
call   1030 <smootherstep@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <smootherstep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bismootherstep_interp>:
sub    $0x18,%rsp
movss  %xmm5,0x4(%rsp)
movss  %xmm4,0x14(%rsp)
movss  %xmm3,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
movaps %xmm2,%xmm1
movaps %xmm5,%xmm2
call   1030 <smootherstep@plt>
movss  %xmm0,0x8(%rsp)
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
call   1030 <smootherstep@plt>
movss  0x8(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
add    $0x18,%rsp
jmp    1030 <smootherstep@plt>

LLVM IR (-O0):
define float @bismootherstep_interp(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%15 = load float, float* %7
%16 = load float, float* %9
%17 = load float, float* %12
%18 = call float @smootherstep(float %15, float %16, float %17)
store float %18, float* %13
%19 = load float, float* %8
%20 = load float, float* %10
%21 = load float, float* %12
%22 = call float @smootherstep(float %19, float %20, float %21)
store float %22, float* %14
%23 = load float, float* %14
%24 = load float, float* %13
%25 = load float, float* %11
%26 = call float @smootherstep(float %23, float %24, float %25)
ret float %26
}

LLVM IR (-O2):
define float @bismootherstep_interp(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call float @smootherstep(float %0, float %2, float %5)
%8 = tail call float @smootherstep(float %1, float %3, float %5)
%9 = tail call float @smootherstep(float %8, float %7, float %4)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ ArgText();
int /*<<< orphan*/ Me();
int /*<<< orphan*/ SetHereMsg(int /*<<< orphan*/, char *);
char *TextOf(int /*<<< orphan*/);
void Act_SetHere(void) {
  char *x = TextOf(ArgText());
  SetHereMsg(Me(), x);
}


x86 assembly (clang, -O0):
<Act_SetHere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1060 <TextOf@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <Me@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <SetHereMsg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_SetHere>:
push   %rbx
xor    %eax,%eax
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1060 <TextOf@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <Me@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <SetHereMsg@plt>

LLVM IR (-O0):
define void @Act_SetHere() {
%1 = alloca i8*
%2 = call i32 (...) @ArgText()
%3 = call i8* @TextOf(i32 %2)
store i8* %3, i8** %1
%4 = call i32 (...) @Me()
%5 = load i8*, i8** %1
%6 = call i32 @SetHereMsg(i32 %4, i8* %5)
ret void
}

LLVM IR (-O2):
define void @Act_SetHere() {
%1 = tail call i32 (...) @ArgText()
%2 = tail call i8* @TextOf(i32 %1)
%3 = tail call i32 (...) @Me()
%4 = tail call i32 @SetHereMsg(i32 %3, i8* %2)
ret void
}
int do_241() { return 241; }


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

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

LLVM IR (-O0):
define i32 @do_241() {
ret i32 241
}

LLVM IR (-O2):
define i32 @do_241() {
ret i32 241
}
int check_astate(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @check_astate() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ EXTENDED_KEY_USAGE;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ EXTENDED_KEY_USAGE_it;
EXTENDED_KEY_USAGE *d2i_EXTENDED_KEY_USAGE(EXTENDED_KEY_USAGE **a,
                                           const unsigned char **in, long len) {
  return (EXTENDED_KEY_USAGE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                             &EXTENDED_KEY_USAGE_it);
}


x86 assembly (clang, -O0):
<d2i_EXTENDED_KEY_USAGE>:
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    0x2eb1(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_EXTENDED_KEY_USAGE>:
mov    0x2ed1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@EXTENDED_KEY_USAGE_it = global i32 0
define i32* @d2i_EXTENDED_KEY_USAGE(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @EXTENDED_KEY_USAGE_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@EXTENDED_KEY_USAGE_it = global i32 0
define i32* @d2i_EXTENDED_KEY_USAGE(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @EXTENDED_KEY_USAGE_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
int calculateLcd(int dividend, int divisor) {
  int remainder = dividend % divisor;
  if (remainder == 0)
    return divisor;
  calculateLcd(divisor, remainder);
}


x86 assembly (clang, -O0):
<calculateLcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    113d <calculateLcd+0x2d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <calculateLcd+0x38>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <calculateLcd@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateLcd>:
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     111b <calculateLcd+0x1b>
mov    %esi,%eax
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <calculateLcd+0x10>
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @calculateLcd(i32 %0, i32 returned %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ %3, %2 ]
%7 = phi i32 [ %6, %5 ], [ %1, %2 ]
%8 = srem i32 %7, %6
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret i32 %1
}
unsigned long hash_long(long long pid, int total) { return pid % total; }


x86 assembly (clang, -O0):
<hash_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cqto
idiv   %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_long>:
mov    %rdi,%rax
movslq %esi,%rcx
mov    %rdi,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111b <hash_long+0x1b>
cqto
idiv   %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @hash_long(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = srem i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @hash_long(i64 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = srem i64 %0, %3
ret i64 %4
}
XSetFillRule() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetFillRule() {
ret i32 undef
}
long get_or_default(const long p_clValue, const long p_clDefault) {
  if (p_clValue < 0)
    return p_clDefault;
  return p_clValue;
}


x86 assembly (clang, -O0):
<get_or_default>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1124 <get_or_default+0x24>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <get_or_default+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_or_default>:
mov    %rsi,%rax
test   %rdi,%rdi
cmovns %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @get_or_default(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, 0
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
extern unsigned vdlGetVersion(void) { return 100; }


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

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

LLVM IR (-O0):
define i32 @vdlGetVersion() {
ret i32 100
}

LLVM IR (-O2):
define i32 @vdlGetVersion() {
ret i32 100
}
void matrix_rigid_body_transform_get_3x1translation_matrix_4x4d(
    const double m[16], double t[3]) {
  t[0] = m[3];
  t[1] = m[7];
  t[2] = m[11];
}


x86 assembly (clang, -O0):
<matrix_rigid_body_transform_get_3x1translation_matrix_4x4d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x58(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_rigid_body_transform_get_3x1translation_matrix_4x4d>:
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x38(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0x58(%rdi),%xmm0
movsd  %xmm0,0x10(%rsi)
ret

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

LLVM IR (-O2):
define void @matrix_rigid_body_transform_get_3x1translation_matrix_4x4d(double* nocapture %0, double* nocapture writeonly %1) {
%3 = getelementptr inbounds double, double* %0, i64 3
%4 = load double, double* %3
store double %4, double* %1
%5 = getelementptr inbounds double, double* %0, i64 7
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
store double %6, double* %7
%8 = getelementptr inbounds double, double* %0, i64 11
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %1, i64 2
store double %9, double* %10
ret void
}
/* Type definitions */
struct kms_plane {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct kms_plane *);
void kms_plane_free(struct kms_plane *plane) { free(plane); }


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

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

LLVM IR (-O0):
%struct.kms_plane = type { i32 }
define void @kms_plane_free(%struct.kms_plane* %0) {
%2 = alloca %struct.kms_plane*
store %struct.kms_plane* %0, %struct.kms_plane** %2
%3 = load %struct.kms_plane*, %struct.kms_plane** %2
%4 = call i32 @free(%struct.kms_plane* %3)
ret void
}

LLVM IR (-O2):
%struct.kms_plane = type { i32 }
define void @kms_plane_free(%struct.kms_plane* nocapture %0) {
%2 = tail call i32 @free(%struct.kms_plane* %0)
ret void
}