xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c, x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x >= 0) {
    y = 1;
    while (x > y) {
      y = 2 * y;
      c = c + 1;
    }
    x = x - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     117c <main+0x6c>
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    116e <main+0x5e>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <main+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void foo642(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo642(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(unsigned int);
int main(void) {
  unsigned int x = 0;
  unsigned short N;
  while (x < N) {
    x += 2;
  }
  __VERIFIER_assert(x % 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jae    1143 <main+0x33>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%edi
and    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i16
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = icmp ult i32 %5, %7
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i32, i32* %2
%11 = add i32 %10, 2
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %2
%14 = urem i32 %13, 2
%15 = call i32 @__VERIFIER_assert(i32 %14)
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
void qnx_joypad_poll(void) {}


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

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

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

LLVM IR (-O2):
define void @qnx_joypad_poll() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int _symbolic_mode(char const **);
int _mode_alpha(char const *mode, mode_t *mask) {
  return _symbolic_mode(&mode);
}


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

x86 assembly (clang, -O2):
<_mode_alpha>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <_symbolic_mode@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_mode_alpha(i8* %0, i32* nocapture readnone %1) {
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @_symbolic_mode(i8** %3)
ret i32 %4
}
StrContainsNonWhite(str) char *str;
{
  while (*str) {
    if (!isspace(*str))
      return 1;
    (*str)++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<StrContainsNonWhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <StrContainsNonWhite+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114a <StrContainsNonWhite+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <StrContainsNonWhite+0x51>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
add    $0x1,%cl
mov    %cl,(%rax)
jmp    111c <StrContainsNonWhite+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrContainsNonWhite>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%bl
xor    %r14d,%r14d
test   %bl,%bl
je     113b <StrContainsNonWhite+0x2b>
mov    %rdi,%rbp
movsbl %bl,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1135 <StrContainsNonWhite+0x25>
inc    %bl
mov    %bl,0x0(%rbp)
jne    1120 <StrContainsNonWhite+0x10>
jmp    113b <StrContainsNonWhite+0x2b>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @StrContainsNonWhite(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %10, %9 ], [ %2, %1 ]
%6 = sext i8 %5 to i32
%7 = tail call i32 @isspace(i32 %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add i8 %5, 1
store i8 %10, i8* %0
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %9, %1
%13 = phi i32 [ 0, %1 ], [ 0, %9 ], [ 1, %4 ]
ret i32 %13
}
/* Type definitions */
typedef scalar_t__ uint_fast8_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_uint_fast8_t(uint_fast8_t const k1,
                                         uint_fast8_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_uint_fast8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_uint_fast8_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_uint_fast8_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_uint_fast8_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
float getBuddyBoxSampleMagnitude(float);
unsigned int isBuddyBoxRawInputAboveNoiseThreshold(float bufferSample) {
  return (getBuddyBoxSampleMagnitude(bufferSample) > 0.1f);
}


x86 assembly (clang, -O0):
<isBuddyBoxRawInputAboveNoiseThreshold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <getBuddyBoxSampleMagnitude@plt>
movss  0xed1(%rip),%xmm1
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBuddyBoxRawInputAboveNoiseThreshold>:
push   %rax
call   1030 <getBuddyBoxSampleMagnitude@plt>
xor    %eax,%eax
ucomiss 0xee1(%rip),%xmm0
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isBuddyBoxRawInputAboveNoiseThreshold(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @getBuddyBoxSampleMagnitude(float %3)
%5 = fcmp ogt float %4, 0x3FB99999A0000000
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isBuddyBoxRawInputAboveNoiseThreshold(float %0) {
%2 = tail call float @getBuddyBoxSampleMagnitude(float %0)
%3 = fcmp ogt float %2, 0x3FB99999A0000000
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
char *strpbrk(char *, char *);
extern char *wg_getline(char *line, int size, FILE *fp) {
  char *p;
  if (fgets(line, size, fp) == NULL) {
    return NULL;
  }
  if ((p = strpbrk(line, "\n\r"))) {
    *p = '\0';
  }
  return line;
}


x86 assembly (clang, -O0):
<wg_getline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <fgets@plt>
cmp    $0x0,%rax
jne    115a <wg_getline+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    1187 <wg_getline+0x67>
mov    -0x10(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     117f <wg_getline+0x5f>
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wg_getline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <fgets@plt>
test   %rax,%rax
je     1147 <wg_getline+0x27>
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strpbrk@plt>
test   %rax,%rax
je     1149 <wg_getline+0x29>
movb   $0x0,(%rax)
jmp    1149 <wg_getline+0x29>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0D\00"
define i8* @wg_getline(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = call i32* @fgets(i8* %9, i32 %10, i32* %11)
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %15
14: ; preds = %3
store i8* null, i8** %4
br label %23
15: ; preds = %3
%16 = load i8*, i8** %5
%17 = call i8* @strpbrk(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %17, i8** %8
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i8*, i8** %8
store i8 0, i8* %20
br label %21
21: ; preds = %19, %15
%22 = load i8*, i8** %5
store i8* %22, i8** %4
br label %23
23: ; preds = %21, %14
%24 = load i8*, i8** %4
ret i8* %24
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0A\0D\00"
define i8* @wg_getline(i8* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32* @fgets(i8* %0, i32 %1, i32* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i8* @strpbrk(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %6
store i8 0, i8* %7
br label %10
10: ; preds = %6, %9, %3
%11 = phi i8* [ null, %3 ], [ %0, %9 ], [ %0, %6 ]
ret i8* %11
}
float test_fmaxf(float x, float y) { return __builtin_fmaxf(x, y); }


x86 assembly (clang, -O0):
<test_fmaxf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordss %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
maxss  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fmaxf>:
movaps %xmm0,%xmm2
cmpunordss %xmm0,%xmm2
movaps %xmm2,%xmm3
andps  %xmm1,%xmm3
maxss  %xmm0,%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @test_fmaxf(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 = call float @llvm.maxnum.f32(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @test_fmaxf(float %0, float %1) {
%3 = tail call float @llvm.maxnum.f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
main() {
  int a = 1, b = 2;
  swap(&a, &b);
  printf("%d %d\n", a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x2,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 2, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: mkversion [-v version-file] [-a alpha-file] [outfile]\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"usage: mkversion [-v version-file] [-a alpha-file] [outfile]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"usage: mkversion [-v version-file] [-a alpha-file] [outfile]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
int sub(int a, int b) { return a; }


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

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

LLVM IR (-O0):
define i32 @sub(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @sub(i32 returned %0, i32 %1) {
ret i32 %0
}
int GetScreenSize() {
  int retval;
  __asm__ __volatile__("int $0x40" : "=a"(retval) : "a"(61), "b"(1));
  return retval;
}


x86 assembly (clang, -O0):
<GetScreenSize>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x3d,%eax
mov    $0x1,%ebx
int    $0x40
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetScreenSize>:
push   %rbx
mov    $0x3d,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define i32 @GetScreenSize() {
%1 = alloca i32
%2 = call i32 asm sideeffect "int $$0x40", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 61, i32 1)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @GetScreenSize() {
%1 = tail call i32 asm sideeffect "int $$0x40", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 61, i32 1)
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int getstatd(scalar_t__ *, int /*<<< orphan*/ *);
int is_freelimit() {
  uint64_t dfree;
  if (getstatd(&dfree, NULL) == -1) {
    return (-1);
  }
  return (dfree == 0);
}


x86 assembly (clang, -O0):
<is_freelimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <getstatd@plt>
cmp    $0xffffffff,%eax
jne    113a <is_freelimit+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    114a <is_freelimit+0x3a>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_freelimit>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <getstatd@plt>
xor    %ecx,%ecx
cmpq   $0x0,(%rsp)
sete   %cl
cmp    $0xffffffff,%eax
cmovne %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_freelimit() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @getstatd(i64* %1, i32* null)
%4 = icmp eq i32 %3, -1
%5 = load i64, i64* %1
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
%8 = select i1 %4, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ no_default();
void use1(void) { no_default(); }


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

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

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

LLVM IR (-O2):
define void @use1() {
%1 = tail call i32 (...) @no_default()
ret void
}
/* Variables and functions */
int yyparse();
int id3_parse(void) { return yyparse(); }


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

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

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

LLVM IR (-O2):
define i32 @id3_parse() {
%1 = tail call i32 (...) @yyparse()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XWMGeometry() {
  printf("XWMGeometry called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"XWMGeometry called\00"
define i32 @XWMGeometry() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void initFreelist() {}


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

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

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

LLVM IR (-O2):
define void @initFreelist() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_palette(int /*<<< orphan*/, int, unsigned char *);
void init_palette(void) {
  static unsigned char table_rgb[16 * 3] = {
      0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00,
      0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xc6, 0xc6, 0xc6, 0x84, 0x00, 0x00, 0x00, 0x84, 0x00, 0x84, 0x84, 0x00,
      0x00, 0x00, 0x84, 0x84, 0x00, 0x84, 0x00, 0x84, 0x84, 0x84, 0x84, 0x84};
  set_palette(0, 15, table_rgb);
  return;
}


x86 assembly (clang, -O0):
<init_palette>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0xf,%esi
lea    0x2f0e(%rip),%rdx
call   1030 <set_palette@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_palette>:
lea    0x2f19(%rip),%rdx
xor    %edi,%edi
mov    $0xf,%esi
jmp    1030 <set_palette@plt>

LLVM IR (-O0):
@init_palette.table_rgb = internal global [48 x i8] c"\00\00\00\FF\00\00\00\FF\00\FF\FF\00\00\00\FF\FF\00\FF\00\FF\FF\FF\FF\FF\C6\C6\C6\84\00\00\00\84\00\84\84\00\00\00\84\84\00\84\00\84\84\84\84\84"
define void @init_palette() {
%1 = call i32 @set_palette(i32 0, i32 15, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @init_palette.table_rgb, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@init_palette.table_rgb = internal global [48 x i8] c"\00\00\00\FF\00\00\00\FF\00\FF\FF\00\00\00\FF\FF\00\FF\00\FF\FF\FF\FF\FF\C6\C6\C6\84\00\00\00\84\00\84\84\00\00\00\84\84\00\84\00\84\84\84\84\84"
define void @init_palette() {
%1 = tail call i32 @set_palette(i32 0, i32 15, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @init_palette.table_rgb, i64 0, i64 0))
ret void
}
/* Variables and functions */
int Ten90CprNl(double);
int Ten90CprN(double lat, int fflag) {
  int nl = Ten90CprNl(lat) - (fflag ? 1 : 0);
  if (nl < 1)
    nl = 1;
  return nl;
}


x86 assembly (clang, -O0):
<Ten90CprN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <Ten90CprNl@plt>
mov    -0xc(%rbp),%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jge    1150 <Ten90CprN+0x40>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ten90CprN>:
push   %rbx
mov    %edi,%ebx
call   1030 <Ten90CprNl@plt>
cmp    $0x1,%ebx
adc    $0xffffffff,%eax
test   %eax,%eax
mov    $0x1,%ecx
cmovle %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Ten90CprN(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%6 = load double, double* %3
%7 = call i32 @Ten90CprNl(double %6)
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
%12 = sub nsw i32 %7, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 1, i32* %5
br label %16
16: ; preds = %15, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
define i32 @Ten90CprN(double %0, i32 %1) {
%3 = tail call i32 @Ten90CprNl(double %0)
%4 = icmp ne i32 %1, 0
%5 = sext i1 %4 to i32
%6 = add i32 %3, %5
%7 = icmp sgt i32 %6, 1
%8 = select i1 %7, i32 %6, i32 1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void display(int memory[]) {
  printf("Result:\n");
  printf("%d\n", memory[0]);
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbx
mov    %rdi,%rbx
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0xec7(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [8 x i8] c"Result:\00"
define void @display(i32* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M589_f(char *s) {
  debug("M589_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


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

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

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

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


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

x86 assembly (clang, -O2):
<Sleef_acos_u10>:
jmp    1030 <acos@plt>

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

LLVM IR (-O2):
define double @Sleef_acos_u10(double %0) {
%2 = tail call double @acos(double %0)
ret double %2
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int manglerFunction(int, int);
uint64_t computeDecryptionRound(int round_num, uint64_t input, uint64_t key) {
  uint32_t R = input;
  uint32_t L = (uint64_t)(input >> 32);
  uint64_t output = L;
  output = output | ((uint64_t)(manglerFunction(key, L) ^ R) << 32);
  return output;
}


x86 assembly (clang, -O0):
<computeDecryptionRound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <manglerFunction@plt>
mov    %eax,%edx
mov    -0x1c(%rbp),%eax
xor    -0x10(%rbp),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeDecryptionRound>:
mov    %edx,%edi
jmp    1030 <manglerFunction@plt>

LLVM IR (-O0):
define i32 @computeDecryptionRound(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
store i32 %10, i32* %7
%11 = load i32, i32* %5
%12 = ashr i32 %11, 32
store i32 %12, i32* %8
%13 = load i32, i32* %8
store i32 %13, i32* %9
%14 = load i32, i32* %9
%15 = load i32, i32* %6
%16 = load i32, i32* %8
%17 = call i32 @manglerFunction(i32 %15, i32 %16)
%18 = load i32, i32* %7
%19 = xor i32 %17, %18
%20 = shl i32 %19, 32
%21 = or i32 %14, %20
store i32 %21, i32* %9
%22 = load i32, i32* %9
ret i32 %22
}

LLVM IR (-O2):
define i32 @computeDecryptionRound(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @manglerFunction(i32 %2, i32 poison)
ret i32 poison
}
short dfn_rs(void) { return 2; }


x86 assembly (clang, -O0):
<dfn_rs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%ax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfn_rs>:
mov    $0x2,%ax
ret

LLVM IR (-O0):
define signext i16 @dfn_rs() {
ret i16 2
}

LLVM IR (-O2):
define signext i16 @dfn_rs() {
ret i16 2
}
void stack_guard_map(void) {}


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

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

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

LLVM IR (-O2):
define void @stack_guard_map() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DlRegister(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ dlclose;
int /*<<< orphan*/ dlerror;
int /*<<< orphan*/ dlopen;
int /*<<< orphan*/ dlsym;
void register_dl_routines() { DlRegister(dlopen, dlsym, dlerror, dlclose); }


x86 assembly (clang, -O0):
<register_dl_routines>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
mov    0x2e9a(%rip),%rax
mov    (%rax),%ecx
call   1030 <DlRegister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_dl_routines>:
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
mov    0x2e9e(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <DlRegister@plt>

LLVM IR (-O0):
@dlopen = global i32 0
@dlsym = global i32 0
@dlerror = global i32 0
@dlclose = global i32 0
define void @register_dl_routines() {
%1 = load i32, i32* @dlopen
%2 = load i32, i32* @dlsym
%3 = load i32, i32* @dlerror
%4 = load i32, i32* @dlclose
%5 = call i32 @DlRegister(i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@dlopen = global i32 0
@dlsym = global i32 0
@dlerror = global i32 0
@dlclose = global i32 0
define void @register_dl_routines() {
%1 = load i32, i32* @dlopen
%2 = load i32, i32* @dlsym
%3 = load i32, i32* @dlerror
%4 = load i32, i32* @dlclose
%5 = tail call i32 @DlRegister(i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
unsigned setbits(unsigned x, int p, int n, unsigned y) {
  unsigned mask = (~0 << p) | ~(~0 << (p - n));
  return (x & mask) | (y & ~mask);
}


x86 assembly (clang, -O0):
<setbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
and    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits>:
mov    %ecx,%r8d
mov    %esi,%ecx
mov    $0xffffffff,%eax
mov    $0xffffffff,%esi
shl    %cl,%esi
sub    %edx,%ecx
shl    %cl,%eax
not    %eax
or     %esi,%eax
xor    %r8d,%edi
and    %edi,%eax
xor    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = shl i32 -1, %10
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = sub nsw i32 %12, %13
%15 = shl i32 -1, %14
%16 = xor i32 %15, -1
%17 = or i32 %11, %16
store i32 %17, i32* %9
%18 = load i32, i32* %5
%19 = load i32, i32* %9
%20 = and i32 %18, %19
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = xor i32 %22, -1
%24 = and i32 %21, %23
%25 = or i32 %20, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 -1, %1
%6 = sub nsw i32 %1, %2
%7 = shl nsw i32 -1, %6
%8 = xor i32 %7, -1
%9 = or i32 %5, %8
%10 = and i32 %9, %0
%11 = xor i32 %9, -1
%12 = and i32 %11, %3
%13 = or i32 %10, %12
ret i32 %13
}
int set_filetype(out_path)
char *out_path;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_filetype(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hoic_get_edid(int, char *);
int hdoip_cli_get_edid(int fd, int fdr, char **argv, int argc) {
  hoic_get_edid(fd, argv[0]);
  return 0;
}


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

x86 assembly (clang, -O2):
<hdoip_cli_get_edid>:
push   %rax
mov    (%rdx),%rsi
call   1030 <hoic_get_edid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hdoip_cli_get_edid(i32 %0, i32 %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8**, i8*** %7
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @hoic_get_edid(i32 %9, i8* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @hdoip_cli_get_edid(i32 %0, i32 %1, i8** nocapture %2, i32 %3) {
%5 = load i8*, i8** %2
%6 = tail call i32 @hoic_get_edid(i32 %0, i8* %5)
ret i32 0
}
void cealtesthook_run_core() {}


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

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

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

LLVM IR (-O2):
define void @cealtesthook_run_core() {
ret void
}
/* Variables and functions */
int moreprolog(char *);
int /*<<< orphan*/ readpages();
int /*<<< orphan*/ trailer();
int /*<<< orphan*/ writepages();
void reverse(void) {
  if (moreprolog("%%EndProlog\n") == 1) {
    readpages();
    writepages();
    trailer();
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <moreprolog@plt>
cmp    $0x1,%eax
jne    116e <reverse+0x2e>
mov    $0x0,%al
call   1030 <readpages@plt>
mov    $0x0,%al
call   1050 <writepages@plt>
mov    $0x0,%al
call   1060 <trailer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <moreprolog@plt>
cmp    $0x1,%eax
jne    1168 <reverse+0x28>
xor    %eax,%eax
call   1030 <readpages@plt>
xor    %eax,%eax
call   1050 <writepages@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <trailer@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%%EndProlog\0A\00"
define void @reverse() {
%1 = call i32 @moreprolog(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @readpages()
%5 = call i32 (...) @writepages()
%6 = call i32 (...) @trailer()
br label %7
7: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%%EndProlog\0A\00"
define void @reverse() {
%1 = tail call i32 @moreprolog(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 (...) @readpages()
%5 = tail call i32 (...) @writepages()
%6 = tail call i32 (...) @trailer()
br label %7
7: ; preds = %3, %0
ret void
}
int fmEnablePorts(int errorLevel) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fmEnablePorts(i32 %0) {
ret i32 0
}
void gotfrec_(scan_no, feed_no, rec_no, num_rec, record,
              return_code) int *scan_no,
    *feed_no, *rec_no, *num_rec;
char *record;
int *return_code;
{ *return_code = -1; }


x86 assembly (clang, -O0):
<gotfrec_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotfrec_>:
movl   $0xffffffff,(%r9)
ret

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

LLVM IR (-O2):
define void @gotfrec_(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i8* nocapture readnone %4, i32* nocapture writeonly %5) {
store i32 -1, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_z(int);
void producer() {
  output_z(1);
  output_z(2);
  output_z(3);
  output_z(4);
  output_z(5);
  output_z(6);
  output_z(7);
  output_z(8);
  output_z(9);
  output_z(10);
}


x86 assembly (clang, -O0):
<producer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <output_z@plt>
mov    $0x2,%edi
call   1030 <output_z@plt>
mov    $0x3,%edi
call   1030 <output_z@plt>
mov    $0x4,%edi
call   1030 <output_z@plt>
mov    $0x5,%edi
call   1030 <output_z@plt>
mov    $0x6,%edi
call   1030 <output_z@plt>
mov    $0x7,%edi
call   1030 <output_z@plt>
mov    $0x8,%edi
call   1030 <output_z@plt>
mov    $0x9,%edi
call   1030 <output_z@plt>
mov    $0xa,%edi
call   1030 <output_z@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<producer>:
push   %rax
mov    $0x1,%edi
call   1030 <output_z@plt>
mov    $0x2,%edi
call   1030 <output_z@plt>
mov    $0x3,%edi
call   1030 <output_z@plt>
mov    $0x4,%edi
call   1030 <output_z@plt>
mov    $0x5,%edi
call   1030 <output_z@plt>
mov    $0x6,%edi
call   1030 <output_z@plt>
mov    $0x7,%edi
call   1030 <output_z@plt>
mov    $0x8,%edi
call   1030 <output_z@plt>
mov    $0x9,%edi
call   1030 <output_z@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <output_z@plt>

LLVM IR (-O0):
define void @producer() {
%1 = call i32 @output_z(i32 1)
%2 = call i32 @output_z(i32 2)
%3 = call i32 @output_z(i32 3)
%4 = call i32 @output_z(i32 4)
%5 = call i32 @output_z(i32 5)
%6 = call i32 @output_z(i32 6)
%7 = call i32 @output_z(i32 7)
%8 = call i32 @output_z(i32 8)
%9 = call i32 @output_z(i32 9)
%10 = call i32 @output_z(i32 10)
ret void
}

LLVM IR (-O2):
define void @producer() {
%1 = tail call i32 @output_z(i32 1)
%2 = tail call i32 @output_z(i32 2)
%3 = tail call i32 @output_z(i32 3)
%4 = tail call i32 @output_z(i32 4)
%5 = tail call i32 @output_z(i32 5)
%6 = tail call i32 @output_z(i32 6)
%7 = tail call i32 @output_z(i32 7)
%8 = tail call i32 @output_z(i32 8)
%9 = tail call i32 @output_z(i32 9)
%10 = tail call i32 @output_z(i32 10)
ret void
}
void XkbTranslateKeySym() {}


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

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

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

LLVM IR (-O2):
define void @XkbTranslateKeySym() {
ret void
}
void exchange(int a, int b) {
  int i = a;
  a = b;
  b = i;
}


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

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

LLVM IR (-O0):
define void @exchange(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
store i32 %6, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %3
%8 = load i32, i32* %5
store i32 %8, i32* %4
ret void
}

LLVM IR (-O2):
define void @exchange(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ stderr;
void some_default(unsigned int sig, void *data, void *gdata) {
  fprintf(stderr, "My default, signal %u\n", sig);
}


x86 assembly (clang, -O0):
<some_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<some_default>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"My default, signal %u\0A\00"
define void @some_default(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i32, i32* %4
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"My default, signal %u\0A\00"
define void @some_default(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int pwm_set_dtest(struct pwm_device *pwm, int enable) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pwm_device = type opaque
define i32 @pwm_set_dtest(%struct.pwm_device* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
size_t strcspn(char const *, char const *);
__attribute__((__weak__, __always___)) size_t
softboundcets_strcspn(const char *s, const char *reject) {
  return strcspn(s, reject);
}


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

x86 assembly (clang, -O2):
<softboundcets_strcspn>:
jmp    1030 <strcspn@plt>

LLVM IR (-O0):
define weak i64 @softboundcets_strcspn(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcspn(i8* %5, i8* %6)
ret i64 %7
}

LLVM IR (-O2):
define weak i64 @softboundcets_strcspn(i8* %0, i8* %1) {
%3 = tail call i64 @strcspn(i8* %0, i8* %1)
ret i64 %3
}
int isDigit(char c) { return ((c >= '0') && (c <= '9')); }


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

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

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

LLVM IR (-O2):
define i32 @isDigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned char vpeek(unsigned int address) { address; }


x86 assembly (clang, -O0):
<vpeek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @vpeek(i32 %0) {
ret i8 undef
}