xunge/DecIR huggingface dataset:
/* Variables and functions */
int islower(int);
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  printf("0x%x %u %d\n", islower('a'), islower('a'), islower('a'));
  printf("%x\n", islower(1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x61,%edi
call   1030 <islower@plt>
mov    %eax,-0xc(%rbp)
mov    $0x61,%edi
call   1030 <islower@plt>
mov    %eax,-0x8(%rbp)
mov    $0x61,%edi
call   1030 <islower@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    %eax,%ecx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <islower@plt>
mov    %eax,%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
mov    %eax,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <islower@plt>
lea    0xebc(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"0x%x %u %d\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define i32 @main() {
%1 = tail call i32 @islower(i32 97)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %1, i32 %1)
%3 = tail call i32 @islower(i32 1)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (!(x == y)) {
    if (x > y) {
      y = y + 1;
    } else {
      x = x + 1;
    }
    c = c + 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)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
xor    $0xff,%al
test   $0x1,%al
jne    1152 <main+0x42>
jmp    1183 <main+0x73>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    116c <main+0x5c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1175 <main+0x65>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%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 = %22, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp eq i32 %8, %9
%11 = xor i1 %10, true
br i1 %11, label %12, label %25
12: ; preds = %7
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %22
19: ; preds = %12
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %22
22: ; preds = %19, %16
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %7
25: ; 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
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void set_key_and_mask(uint32_t addr[8], uint32_t key_and_mask) {
  addr[7] = key_and_mask;
}


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

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

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

LLVM IR (-O2):
define void @set_key_and_mask(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %1, i32* %3
ret void
}
void machdep_restore_float_state(void) { return; }


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

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

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

LLVM IR (-O2):
define void @machdep_restore_float_state() {
ret void
}
void pcrossl(l, cp) long l;
char *cp;
{
  union {
    long l;
    char c[4];
  } u;
  u.l = l;
  *(long *)cp = l;
}


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

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

LLVM IR (-O0):
%union.anon = type { i64 }
define void @pcrossl(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca %union.anon
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = bitcast %union.anon* %5 to i64*
store i64 %6, i64* %7
%8 = load i64, i64* %3
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
store i64 %8, i64* %10
ret void
}

LLVM IR (-O2):
define void @pcrossl(i64 %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i64*
store i64 %0, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ avifCodecVersions(char *);
char *avifVersion();
int /*<<< orphan*/ printf(char *, char *, char *);
void avifPrintVersions(void) {
  char codecVersions[256];
  avifCodecVersions(codecVersions);
  printf("Version: %s (%s)\n\n", avifVersion(), codecVersions);
}


x86 assembly (clang, -O0):
<avifPrintVersions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
call   1050 <avifCodecVersions@plt>
mov    $0x0,%al
call   1030 <avifVersion@plt>
mov    %rax,%rsi
lea    -0x100(%rbp),%rdx
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avifPrintVersions>:
push   %rbx
sub    $0x100,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <avifCodecVersions@plt>
xor    %eax,%eax
call   1030 <avifVersion@plt>
lea    0xeaf(%rip),%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1040 <printf@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Version: %s (%s)\0A\0A\00"
define void @avifPrintVersions() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @avifCodecVersions(i8* %2)
%4 = call i8* (...) @avifVersion()
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Version: %s (%s)\0A\0A\00"
define void @avifPrintVersions() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @avifCodecVersions(i8* %2)
%4 = call i8* (...) @avifVersion()
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
char *malloc(int);
char *getWorkingDirectory() {
  char *cwd = malloc(1024);
  getcwd(cwd, 1024);
  return cwd;
}


x86 assembly (clang, -O0):
<getWorkingDirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x400,%esi
call   1030 <getcwd@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWorkingDirectory>:
push   %rbx
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x400,%esi
call   1030 <getcwd@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @getWorkingDirectory() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 1024)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @getcwd(i8* %3, i32 1024)
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
define i8* @getWorkingDirectory() {
%1 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%2 = tail call i32 @getcwd(i8* %1, i32 1024)
ret i8* %1
}
float Oct2Dec(int *target, float multi, int index) {
  if (index == 1) {
    return *target * multi;
  } else {
    return (*target * multi) + Oct2Dec(++target, multi / 8, --index);
  }
}


x86 assembly (clang, -O0):
<Oct2Dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    1145 <Oct2Dec+0x35>
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a1 <Oct2Dec+0x91>
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
mov    %rdi,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xe8b(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x18(%rbp),%esi
add    $0xffffffff,%esi
mov    %esi,-0x18(%rbp)
call   1030 <Oct2Dec@plt>
movss  -0x20(%rbp),%xmm2
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Oct2Dec>:
push   %rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ssl (%rdi),%xmm0
cmp    $0x1,%esi
jne    1126 <Oct2Dec+0x16>
mulss  %xmm1,%xmm0
pop    %rax
ret
add    $0x4,%rdi
movss  %xmm0,0x4(%rsp)
movss  0xec8(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0xffffffff,%esi
movss  %xmm1,(%rsp)
call   1030 <Oct2Dec@plt>
movss  0x4(%rsp),%xmm1
mulss  (%rsp),%xmm1
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Oct2Dec(i32* %0, float %1, i32 %2) {
%4 = alloca float
%5 = alloca i32*
%6 = alloca float
%7 = alloca i32
store i32* %0, i32** %5
store float %1, float* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = sitofp i32 %12 to float
%14 = load float, float* %6
%15 = fmul float %13, %14
store float %15, float* %4
br label %29
16: ; preds = %3
%17 = load i32*, i32** %5
%18 = load i32, i32* %17
%19 = sitofp i32 %18 to float
%20 = load float, float* %6
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %5
%23 = load float, float* %6
%24 = fdiv float %23, 8.000000e+00
%25 = load i32, i32* %7
%26 = add nsw i32 %25, -1
store i32 %26, i32* %7
%27 = call float @Oct2Dec(i32* %22, float %24, i32 %26)
%28 = call float @llvm.fmuladd.f32(float %19, float %20, float %27)
store float %28, float* %4
br label %29
29: ; preds = %16, %10
%30 = load float, float* %4
ret float %30
}

LLVM IR (-O2):
define float @Oct2Dec(i32* nocapture %0, float %1, i32 %2) {
%4 = icmp eq i32 %2, 1
%5 = load i32, i32* %0
%6 = sitofp i32 %5 to float
br i1 %4, label %7, label %11
7: ; preds = %3
%8 = fmul float %6, %1
br label %9
9: ; preds = %7, %11
%10 = phi float [ %16, %11 ], [ %8, %7 ]
ret float %10
11: ; preds = %3
%12 = getelementptr inbounds i32, i32* %0, i64 1
%13 = fmul float %1, 1.250000e-01
%14 = add nsw i32 %2, -1
%15 = tail call float @Oct2Dec(i32* %12, float %13, i32 %14)
%16 = tail call float @llvm.fmuladd.f32(float %6, float %1, float %15)
br label %9
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glVertex4fv(int /*<<< orphan*/ *);
void Vertex4fv(GLfloat v[4]) { glVertex4fv(v); }


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

x86 assembly (clang, -O2):
<Vertex4fv>:
jmp    1030 <glVertex4fv@plt>

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

LLVM IR (-O2):
define void @Vertex4fv(i32* %0) {
%2 = tail call i32 @glVertex4fv(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ idct_M128ASM_scalar(short *);
void idct(signed short int *block) { idct_M128ASM_scalar(block); }


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

x86 assembly (clang, -O2):
<idct>:
jmp    1030 <idct_M128ASM_scalar@plt>

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

LLVM IR (-O2):
define void @idct(i16* %0) {
%2 = tail call i32 @idct_M128ASM_scalar(i16* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_to_rw_run_from_rx();
int /*<<< orphan*/ run_from_rwx();
int main(int argc, char **argv) {
  run_from_rwx();
  emit_to_rw_run_from_rx();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <run_from_rwx@plt>
mov    $0x0,%al
call   1040 <emit_to_rw_run_from_rx@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @run_from_rwx()
%7 = call i32 (...) @emit_to_rw_run_from_rx()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run_from_rwx()
%4 = tail call i32 (...) @emit_to_rw_run_from_rx()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a(int);
int /*<<< orphan*/ printf(char *, int);
void b(int c) {
  printf("b(%i)\n", c);
  if (!c)
    return;
  a(c - 1);
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1149 <b+0x29>
jmp    1154 <b+0x34>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <a@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
test   %ebx,%ebx
je     1140 <b+0x20>
add    $0xffffffff,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <a@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"b(%i)\0A\00"
define void @b(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp eq i32 %0, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -1
%6 = tail call i32 @a(i32 %5)
br label %7
7: ; preds = %1, %4
ret void
}
/* Type definitions */
struct mnqtt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ mnqtt_ping(struct mnqtt *);
char *mqtt_strerror(int);
int /*<<< orphan*/ stderr;
void conn_cb(struct mnqtt *mnqtt, int ret) {
  fprintf(stderr, "connected (%s)\n", mqtt_strerror(ret));
  mnqtt_ping(mnqtt);
}


x86 assembly (clang, -O0):
<conn_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <mqtt_strerror@plt>
mov    -0x10(%rbp),%edi
mov    %rax,%rdx
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <mnqtt_ping@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conn_cb>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    %esi,%edi
call   1050 <mqtt_strerror@plt>
lea    0xeb3(%rip),%rsi
mov    %ebp,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <mnqtt_ping@plt>

LLVM IR (-O0):
%struct.mnqtt = type { i32 }
@stderr = global i32 0
@.str = [16 x i8] c"connected (%s)\0A\00"
define void @conn_cb(%struct.mnqtt* %0, i32 %1) {
%3 = alloca %struct.mnqtt*
%4 = alloca i32
store %struct.mnqtt* %0, %struct.mnqtt** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %4
%7 = call i8* @mqtt_strerror(i32 %6)
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load %struct.mnqtt*, %struct.mnqtt** %3
%10 = call i32 @mnqtt_ping(%struct.mnqtt* %9)
ret void
}

LLVM IR (-O2):
%struct.mnqtt = type { i32 }
@stderr = global i32 0
@.str = [16 x i8] c"connected (%s)\0A\00"
define void @conn_cb(%struct.mnqtt* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i8* @mqtt_strerror(i32 %1)
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call i32 @mnqtt_ping(%struct.mnqtt* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void show_usage() {
  printf("Usage:\n"
         "\tshow [options] kabi_file...\n"
         "\nOptions:\n"
         "    -h, --help:\t\tshow this message\n"
         "    -k, --hide-kabi:\thide changes made by RH_KABI_REPLACE()\n"
         "    -n, --hide-kabi-new:\n\t\t\thide the kabi trickery made by"
         " RH_KABI_REPLACE, but show the new field\n"
         "    -d, --debug:\tprint the raw tree\n"
         "    --no-offset:\tdon't display the offset of struct fields\n");
  exit(1);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [336 x i8] c"Usage:\0A\09show [options] kabi_file...\0A\0AOptions:\0A -h, --help:\09\09show this message\0A -k, --hide-kabi:\09hide changes made by RH_KABI_REPLACE()\0A -n, --hide-kabi-new:\0A\09\09\09hide the kabi trickery made by RH_KABI_REPLACE, but show the new field\0A -d, --debug:\09print the raw tree\0A --no-offset:\09don't display the offset of struct fields\0A\00"
define void @show_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([336 x i8], [336 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [335 x i8] c"Usage:\0A\09show [options] kabi_file...\0A\0AOptions:\0A -h, --help:\09\09show this message\0A -k, --hide-kabi:\09hide changes made by RH_KABI_REPLACE()\0A -n, --hide-kabi-new:\0A\09\09\09hide the kabi trickery made by RH_KABI_REPLACE, but show the new field\0A -d, --debug:\09print the raw tree\0A --no-offset:\09don't display the offset of struct fields\00"
define void @show_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([335 x i8], [335 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x6a() {
  Assert_real((isalpha(106)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              535, ("isalpha should be 1 for j"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x6a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6a,%edi
call   1030 <isalpha@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x217,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x6a>:
push   %rax
mov    $0x6a,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x217,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for j\00"
define void @t_isalpha_0x6a() {
%1 = call i32 @isalpha(i32 106)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 535, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for j\00"
define void @t_isalpha_0x6a() {
%1 = tail call i32 @isalpha(i32 106)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 535, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/);
double get_real_time() { return (double)time(0); }


x86 assembly (clang, -O0):
<get_real_time>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <time@plt>
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_real_time>:
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_real_time() {
%1 = call i64 @time(i32 0)
%2 = sitofp i64 %1 to double
ret double %2
}

LLVM IR (-O2):
define double @get_real_time() {
%1 = tail call i64 @time(i32 0)
%2 = sitofp i64 %1 to double
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tick_func() { printf("*\n\nTick interrupt come on,the func running!*\n"); }


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"*\0A\0ATick interrupt come on,the func running!*\0A\00"
define void @tick_func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"*\0A\0ATick interrupt come on,the func running!*\00"
define void @tick_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void childfunc(int sig) {
  fprintf(stderr, "Get Sig\n");
  exit(6);
}


x86 assembly (clang, -O0):
<childfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x6,%edi
call   1040 <exit@plt>

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"Get Sig\0A\00"
define void @childfunc(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 6)
unreachable
}
int udpserver() {}


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

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

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

LLVM IR (-O2):
define i32 @udpserver() {
ret i32 undef
}
void XSetFunction() {}


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

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

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

LLVM IR (-O2):
define void @XSetFunction() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_dev_open();
int /*<<< orphan*/ pwm_dev_open();
void wiringNPiSetup(void) {
  gpio_dev_open();
  pwm_dev_open();
}


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

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

LLVM IR (-O0):
define void @wiringNPiSetup() {
%1 = call i32 (...) @gpio_dev_open()
%2 = call i32 (...) @pwm_dev_open()
ret void
}

LLVM IR (-O2):
define void @wiringNPiSetup() {
%1 = tail call i32 (...) @gpio_dev_open()
%2 = tail call i32 (...) @pwm_dev_open()
ret void
}
/* Variables and functions */
float __infer_nondet_float();
float fdimf(float x, float y) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<fdimf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @fdimf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float (...) @__infer_nondet_float()
ret float %5
}

LLVM IR (-O2):
define float @fdimf(float %0, float %1) {
%3 = tail call float (...) @__infer_nondet_float()
ret float %3
}
/* Variables and functions */
int io_read_bit(int);
int elev_get_obstruction_signal(void) { return io_read_bit((0x300 + 23)); }


x86 assembly (clang, -O0):
<elev_get_obstruction_signal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x317,%edi
call   1030 <io_read_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<elev_get_obstruction_signal>:
mov    $0x317,%edi
jmp    1030 <io_read_bit@plt>

LLVM IR (-O0):
define i32 @elev_get_obstruction_signal() {
%1 = call i32 @io_read_bit(i32 791)
ret i32 %1
}

LLVM IR (-O2):
define i32 @elev_get_obstruction_signal() {
%1 = tail call i32 @io_read_bit(i32 791)
ret i32 %1
}
void S_ExtraUpdate(void) {}


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

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

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

LLVM IR (-O2):
define void @S_ExtraUpdate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_help() {
  printf("Usage: -s [command] -c [content]\n");
  printf("    -s    use create,write,read,close to start with different "
         "function\n");
  printf(
      "    -c    with \"-s write\" set put object in share memory content\n");
}


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

x86 assembly (clang, -O2):
<show_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf38(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Usage: -s [command] -c [content]\0A\00"
@.str.1 = [72 x i8] c" -s use create,write,read,close to start with different function\0A\00"
@.str.2 = [66 x i8] c" -c with \22-s write\22 set put object in share memory content\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"Usage: -s [command] -c [content]\00"
@str.3 = [71 x i8] c" -s use create,write,read,close to start with different function\00"
@str.4 = [65 x i8] c" -c with \22-s write\22 set put object in share memory content\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.4, i64 0, i64 0))
ret void
}
int test_imm_16int8_reg(signed char val) {
  return ((val) & (0x16 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_16int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x16,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_16int8_reg>:
test   $0x16,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_16int8_reg(i8 signext %0) {
%2 = and i8 %0, 22
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
long __attribute__((__const__)) popcountl(unsigned long x) {
  return __builtin_popcountl(x);
}


x86 assembly (clang, -O0):
<popcountl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcountl>:
mov    %rdi,%rax
shr    %rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rax,%rcx
sub    %rcx,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rdi,%rax
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rax,%rcx
movabs $0xf0f0f0f0f0f0f0f,%rdx
0f 0f 0f
and    %rcx,%rdx
movabs $0x101010101010101,%rax
01 01 01
imul   %rdx,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i64 @popcountl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctpop.i64(i64 %3)
%5 = trunc i64 %4 to i32
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @popcountl(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int larger(int *a, int *b) {
  if (a == NULL)
    return -1;
  if (b == NULL)
    return 1;
  return (*a > *b);
}


x86 assembly (clang, -O0):
<larger>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <larger+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <larger+0x51>
cmpq   $0x0,-0x18(%rbp)
jne    113a <larger+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <larger+0x51>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<larger>:
test   %rdi,%rdi
je     1114 <larger+0x14>
test   %rsi,%rsi
je     111a <larger+0x1a>
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret
mov    $0xffffffff,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @larger(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = icmp eq i32* %1, null
br i1 %5, label %11, label %6
6: ; preds = %4
%7 = load i32, i32* %0
%8 = load i32, i32* %1
%9 = icmp sgt i32 %7, %8
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %2, %6
%12 = phi i32 [ %10, %6 ], [ -1, %2 ], [ 1, %4 ]
ret i32 %12
}
void pointer_to_integral_type_conv(char *ptr) {
  char ch = (char)ptr;
  short sh = (short)ptr;
  ch = (char)ptr;
  sh = (short)ptr;
}


x86 assembly (clang, -O0):
<pointer_to_integral_type_conv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pointer_to_integral_type_conv(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int _exit(int n __attribute__((unused))) { return 0; }


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @_exit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %2
unreachable
}

LLVM IR (-O2):
OP(fd, ea) { op_ea(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_ea@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_ea()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_ea()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ pktmode(int);
int devsettings(char *s) {
  if (!pktmode(1))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<devsettings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <pktmode@plt>
cmp    $0x0,%eax
jne    113b <devsettings+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1142 <devsettings+0x32>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<devsettings>:
push   %rax
mov    $0x1,%edi
call   1030 <pktmode@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @devsettings(i8* nocapture readnone %0) {
%2 = tail call i32 @pktmode(i32 1)
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void SCR_DebugGraph(float value, int color) {}


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

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

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

LLVM IR (-O2):
define void @SCR_DebugGraph(float %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _ptrc_glBindVertexArray(int /*<<< orphan*/);
bool unbind() {
  _ptrc_glBindVertexArray(0);
  return true;
}


x86 assembly (clang, -O0):
<unbind>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <_ptrc_glBindVertexArray@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unbind>:
push   %rax
xor    %edi,%edi
call   1030 <_ptrc_glBindVertexArray@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @unbind() {
%1 = call i32 @_ptrc_glBindVertexArray(i32 0)
ret i32 1
}

LLVM IR (-O2):
define i32 @unbind() {
%1 = tail call i32 @_ptrc_glBindVertexArray(i32 0)
ret i32 1
}
int do_003() { return 3; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @do_003() {
ret i32 3
}

LLVM IR (-O2):
define i32 @do_003() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int stackerr(int i) {
  error(i ? "stack overflow" : "stack empty");
  return (0);
}


x86 assembly (clang, -O0):
<stackerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xeea(%rip),%rdi
lea    0xed4(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
call   1030 <error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stackerr>:
push   %rax
test   %edi,%edi
lea    0xef5(%rip),%rax
lea    0xedf(%rip),%rdi
cmove  %rax,%rdi
call   1030 <error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"stack overflow\00"
@.str.1 = [12 x i8] c"stack empty\00"
define i32 @stackerr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)
%7 = call i32 @error(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"stack overflow\00"
@.str.1 = [12 x i8] c"stack empty\00"
define i32 @stackerr(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @error(i8* %3)
ret i32 0
}
float simulate_work(float theta, float mass, float distance) {
  return mass * 10 * distance;
}


x86 assembly (clang, -O0):
<simulate_work>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  0xee5(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<simulate_work>:
movaps %xmm1,%xmm0
mulss  0xef5(%rip),%xmm0
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @simulate_work(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* %5
%8 = fmul float %7, 1.000000e+01
%9 = load float, float* %6
%10 = fmul float %8, %9
ret float %10
}

LLVM IR (-O2):
define float @simulate_work(float %0, float %1, float %2) {
%4 = fmul float %1, 1.000000e+01
%5 = fmul float %4, %2
ret float %5
}
int test_imm_9Cint16_mem(short *val) {
  return ((*val) & (-0x9C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Cint16_mem>:
movzwl (%rdi),%eax
test   $0xff64,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Cint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -156
%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_9Cint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -156
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ raw();
void done_parse(void) { raw(); }


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

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

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

LLVM IR (-O2):
define void @done_parse() {
%1 = tail call i32 (...) @raw()
ret void
}
add21(a, b, c) float a[2], b[2], c[2];
{
  c[0] = a[0] + b[0];
  c[1] = a[1] + b[1];
}


x86 assembly (clang, -O0):
<add21>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
addss  0x4(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add21>:
movss  (%rdi),%xmm0
addss  (%rsi),%xmm0
movss  %xmm0,(%rdx)
movss  0x4(%rdi),%xmm0
addss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdx)
ret

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

LLVM IR (-O2):
define i32 @add21(float* nocapture %0, float* nocapture %1, float* nocapture writeonly %2) {
%4 = load float, float* %0
%5 = load float, float* %1
%6 = fadd float %4, %5
store float %6, float* %2
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 1
%10 = load float, float* %9
%11 = fadd float %8, %10
%12 = getelementptr inbounds float, float* %2, i64 1
store float %11, float* %12
ret i32 undef
}
/* Variables and functions */
char *map_dev_preferred(int, int, int, int /*<<< orphan*/ *);
char *map_dev(int major, int minor, int create) {
  return map_dev_preferred(major, minor, create, NULL);
}


x86 assembly (clang, -O0):
<map_dev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <map_dev_preferred@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @map_dev(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 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i8* @map_dev_preferred(i32 %7, i32 %8, i32 %9, i32* null)
ret i8* %10
}

LLVM IR (-O2):
define i8* @map_dev(i32 %0, i32 %1, i32 %2) {
%4 = tail call i8* @map_dev_preferred(i32 %0, i32 %1, i32 %2, i32* null)
ret i8* %4
}