xunge/DecIR huggingface dataset:
long int __arch_fetch_and_add(void *pointer, long int delta) {
  return __sync_fetch_and_add((long int *)pointer, delta);
}


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

x86 assembly (clang, -O2):
<__arch_fetch_and_add>:
mov    %rsi,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i64 @__arch_fetch_and_add(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %4
%8 = atomicrmw add i64* %6, i64 %7 seq_cst
ret i64 %8
}

LLVM IR (-O2):
define i64 @__arch_fetch_and_add(i8* nocapture %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
%4 = atomicrmw add i64* %3, i64 %1 seq_cst
ret i64 %4
}
short BigShort(short x) {
  return (short)((((unsigned short)x) >> 8) | (((unsigned short)x) << 8));
}


x86 assembly (clang, -O0):
<BigShort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
movzwl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<BigShort>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define signext i16 @BigShort(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = ashr i32 %4, 8
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @BigShort(i16 signext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *mystrdup(const char *str) {
  char *answer = malloc(strlen(str) + 1);
  if (answer)
    strcpy(answer, str);
  return answer;
}


x86 assembly (clang, -O0):
<mystrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <mystrdup+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <mystrdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @mystrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Type definitions */
struct rq_side_rate {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct rq_side_rate *);
int /*<<< orphan*/ rq_side_rate_clear(struct rq_side_rate *);
void rq_side_rate_free(struct rq_side_rate *p) {
  rq_side_rate_clear(p);
  free(p);
}


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

x86 assembly (clang, -O2):
<rq_side_rate_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <rq_side_rate_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.rq_side_rate = type { i32 }
define void @rq_side_rate_free(%struct.rq_side_rate* %0) {
%2 = tail call i32 @rq_side_rate_clear(%struct.rq_side_rate* %0)
%3 = tail call i32 @free(%struct.rq_side_rate* %0)
ret void
}
int test_imm_11int8_reg(signed char val) {
  return ((val) & (0x11 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_11int8_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, 17
%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_11int8_reg(i8 signext %0) {
%2 = and i8 %0, 17
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void ShowVersion(void) { fprintf(stdout, "version %s\n", "0.1.2"); }


x86 assembly (clang, -O0):
<ShowVersion>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xee1(%rip),%rdx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowVersion>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xee5(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"version %s\0A\00"
@.str.1 = [6 x i8] c"0.1.2\00"
define void @ShowVersion() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"version %s\0A\00"
@.str.1 = [6 x i8] c"0.1.2\00"
define void @ShowVersion() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned addval_404(unsigned x) { return x + 3281178249U; }


x86 assembly (clang, -O0):
<addval_404>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc392ce89,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addval_404>:
lea    -0x3c6d3177(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addval_404(i32 %0) {
%2 = add i32 %0, -1013789047
ret i32 %2
}
int spellcheck_suggest(void *chk, char ***sug, const char *word) { return 0; }


x86 assembly (clang, -O0):
<spellcheck_suggest>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @spellcheck_suggest(i8* nocapture readnone %0, i8*** nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *mempcpy(void *__restrict__ dst, const void *__restrict__ src, size_t n) {
  return memcpy(dst, src, n) + n;
}


x86 assembly (clang, -O0):
<mempcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mempcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mempcpy(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = load i64, i64* %6
%11 = getelementptr i8, i8* %7, i64 %10
ret i8* %11
}

LLVM IR (-O2):
define i8* @mempcpy(i8* noalias writeonly %0, i8* noalias nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
%4 = getelementptr i8, i8* %0, i64 %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ pelgum_(double *, double *);
void cpelgum(double *xmom, double *para) { pelgum_(xmom, para); }


x86 assembly (clang, -O0):
<cpelgum>:
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 <pelgum_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpelgum>:
jmp    1030 <pelgum_@plt>

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

LLVM IR (-O2):
define void @cpelgum(double* %0, double* %1) {
%3 = tail call i32 @pelgum_(double* %0, double* %1)
ret void
}
int msm_unclamp_secondary_arm_cpu_sim(unsigned int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_unclamp_secondary_arm_cpu_sim(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assign(int, int **, int **);
int main() {
  int stack_val = 5;
  int stack_val2 = 10;
  int *p1 = &stack_val;
  int *p2 = &stack_val2;
  assign(2, &p1, &p2);
  if (p1 == &stack_val) {
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x2,%edi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <assign@plt>
lea    -0x8(%rbp),%rax
cmp    %rax,-0x18(%rbp)
jne    1169 <main+0x59>
movl   $0x0,-0x4(%rbp)
jmp    1170 <main+0x60>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0x5,0xc(%rsp)
movl   $0xa,0x8(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,0x10(%rsp)
lea    0x8(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
mov    $0x2,%edi
call   1030 <assign@plt>
xor    %eax,%eax
cmp    %rbx,0x10(%rsp)
setne  %al
neg    %eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
%5 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%6 = bitcast i32* %2 to i8*
store i32 10, i32* %2
%7 = bitcast i32** %3 to i8*
store i32* %1, i32** %3
%8 = bitcast i32** %4 to i8*
store i32* %2, i32** %4
%9 = call i32 @assign(i32 2, i32** %3, i32** %4)
%10 = load i32*, i32** %3
%11 = icmp ne i32* %10, %1
%12 = sext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, int);
int main() {
  unsigned count;
  printf("Found %d primes under %d\n", count, 100000000);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [26 x i8] c"Found %d primes under %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 undef, i32 100000000)
ret i32 0
}
void ScaleRowDown2Linear_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Linear_SSSE3() {
ret void
}
int test_imm_70uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x70 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_70uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 112
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, hard world!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Hello, hard world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = 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"Hello, hard world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct rtavl_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *rtavl_delete(struct rtavl_table *, void *);
void *(rtavl_assert_delete)(struct rtavl_table *table, void *item) {
  void *p = rtavl_delete(table, item);
  assert(p != NULL);
  return p;
}


x86 assembly (clang, -O0):
<rtavl_assert_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <rtavl_delete@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtavl_assert_delete>:
push   %rbx
call   1030 <rtavl_delete@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rtavl_table = type { i32 }
define i8* @rtavl_assert_delete(%struct.rtavl_table* %0, i8* %1) {
%3 = alloca %struct.rtavl_table*
%4 = alloca i8*
%5 = alloca i8*
store %struct.rtavl_table* %0, %struct.rtavl_table** %3
store i8* %1, i8** %4
%6 = load %struct.rtavl_table*, %struct.rtavl_table** %3
%7 = load i8*, i8** %4
%8 = call i8* @rtavl_delete(%struct.rtavl_table* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
%struct.rtavl_table = type { i32 }
define i8* @rtavl_assert_delete(%struct.rtavl_table* %0, i8* %1) {
%3 = tail call i8* @rtavl_delete(%struct.rtavl_table* %0, i8* %1)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "Usage: "
      "fconv"
      " [options] [action] [source [destination]]\n"
      "\navailable options:\n"
      "    -f --force		Overwrite destination if already exists\n"
      "    -q --quiet		Don't print messages to stdout\n"
      "\navailable actions:\n"
      "    -h --help		Show short description and exit\n"
      "    -j --jgl		Convert to Juno-G library\n"
      "    -V --version	Print version information\n");
}


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

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

LLVM IR (-O0):
@.str = [329 x i8] c"Usage: fconv [options] [action] [source [destination]]\0A\0Aavailable options:\0A -f --force\09\09Overwrite destination if already exists\0A -q --quiet\09\09Don't print messages to stdout\0A\0Aavailable actions:\0A -h --help\09\09Show short description and exit\0A -j --jgl\09\09Convert to Juno-G library\0A -V --version\09Print version information\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([329 x i8], [329 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [328 x i8] c"Usage: fconv [options] [action] [source [destination]]\0A\0Aavailable options:\0A -f --force\09\09Overwrite destination if already exists\0A -q --quiet\09\09Don't print messages to stdout\0A\0Aavailable actions:\0A -h --help\09\09Show short description and exit\0A -j --jgl\09\09Convert to Juno-G library\0A -V --version\09Print version information\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([328 x i8], [328 x i8]* @str, i64 0, i64 0))
ret void
}
void gpio_set_value(unsigned gpio, int value) {}


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

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

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

LLVM IR (-O2):
define void @gpio_set_value(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char const *, char);
bool is_valid_filetype_name(const char *name) {
  return name[0] != '\0' && !strchr(name, '/');
}


x86 assembly (clang, -O0):
<is_valid_filetype_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     114a <is_valid_filetype_name+0x3a>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_filetype_name>:
push   %rax
cmpb   $0x0,(%rdi)
je     112b <is_valid_filetype_name+0x1b>
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_valid_filetype_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @strchr(i8* %9, i8 signext 47)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %8, %1
%14 = phi i1 [ false, %1 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @is_valid_filetype_name(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strchr(i8* %0, i8 signext 47)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
int GetPid() {
  int pid;
  asm("int $48; movl %%eax, %0" : "=g"(pid) : : "eax");
  return pid;
}


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

x86 assembly (clang, -O2):
<GetPid>:
int    $0x30
mov    %eax,-0x4(%rsp)
mov    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @GetPid() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* %1
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcscmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void uninitvar_wcscmp(void) {
  wchar_t *str1;
  wchar_t *str2;
  (void)wcscmp(str1, str2);
}


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

x86 assembly (clang, -O2):
<uninitvar_wcscmp>:
jmp    1030 <wcscmp@plt>

LLVM IR (-O0):
define void @uninitvar_wcscmp() {
%1 = alloca i32*
%2 = alloca i32*
%3 = load i32*, i32** %1
%4 = load i32*, i32** %2
%5 = call i32 @wcscmp(i32* %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_wcscmp() {
%1 = tail call i32 @wcscmp(i32* undef, i32* undef)
ret void
}
void Jmp(int adr1, int *ip) { *ip = adr1; }


x86 assembly (clang, -O0):
<Jmp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jmp>:
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @Jmp(i32 %0, i32* nocapture writeonly %1) {
store i32 %0, i32* %1
ret void
}
/* Type definitions */
typedef size_t uint32_t;

/* Variables and functions */
void store_DOUBLE(double *arr, uint32_t idx, double value) { arr[idx] = value; }


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

x86 assembly (clang, -O2):
<store_DOUBLE>:
movsd  %xmm0,(%rdi,%rsi,8)
ret

LLVM IR (-O0):
define void @store_DOUBLE(double* %0, i64 %1, double %2) {
%4 = alloca double*
%5 = alloca i64
%6 = alloca double
store double* %0, double** %4
store i64 %1, i64* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds double, double* %8, i64 %9
store double %7, double* %10
ret void
}

LLVM IR (-O2):
define void @store_DOUBLE(double* nocapture writeonly %0, i64 %1, double %2) {
%4 = getelementptr inbounds double, double* %0, i64 %1
store double %2, double* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: pdir [-?a] [-rwxfl] [-p pathname] file ...\n");
  return;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"usage: pdir [-?a] [-rwxfl] [-p pathname] file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"usage: pdir [-?a] [-rwxfl] [-p pathname] file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}
void __exita(int status) { *(int *)-1 = -1; }


x86 assembly (clang, -O0):
<__exita>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xffffffffffffffff,%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__exita>:
movl   $0xffffffff,0xffffffffffffffff
ff ff ff ff
ret

LLVM IR (-O0):
define void @__exita(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* inttoptr (i64 -1 to i32*)
ret void
}

LLVM IR (-O2):
define void @__exita(i32 %0) {
store i32 -1, i32* inttoptr (i64 -1 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_bfr(void *b, unsigned size) {
  char *c;
  while (size--) {
    c = (char *)b++;
    printf("0x%x ", *c);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_bfr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1160 <print_bfr+0x50>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    111f <print_bfr+0xf>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bfr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1158 <print_bfr+0x38>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1140 <print_bfr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"0x%x \00"
define void @print_bfr(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = add i32 %6, -1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp eq i32 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
unsigned long hash_str(const char *key, size_t key_length) {
  char *end = (char *)key + key_length;
  unsigned long h = 5381;
  while (key < end) {
    h += h << 5;
    h ^= (unsigned long)*key++;
  }
  return h;
}


x86 assembly (clang, -O0):
<hash_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x1505,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    115e <hash_str+0x5e>
mov    -0x20(%rbp),%rax
shl    $0x5,%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbq (%rax),%rax
xor    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1120 <hash_str+0x20>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_str>:
test   %rsi,%rsi
jle    112b <hash_str+0x2b>
add    %rdi,%rsi
mov    $0x1505,%eax
nopl   (%rax)
mov    %rax,%rcx
shl    $0x5,%rcx
add    %rax,%rcx
movsbq (%rdi),%rax
add    $0x1,%rdi
xor    %rcx,%rax
cmp    %rsi,%rdi
jb     1110 <hash_str+0x10>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i64 @hash_str(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %5
store i64 5381, i64* %6
br label %10
10: ; preds = %14, %2
%11 = load i8*, i8** %3
%12 = load i8*, i8** %5
%13 = icmp ult i8* %11, %12
br i1 %13, label %14, label %25
14: ; preds = %10
%15 = load i64, i64* %6
%16 = shl i64 %15, 5
%17 = load i64, i64* %6
%18 = add i64 %17, %16
store i64 %18, i64* %6
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
%21 = load i8, i8* %19
%22 = sext i8 %21 to i64
%23 = load i64, i64* %6
%24 = xor i64 %23, %22
store i64 %24, i64* %6
br label %10
25: ; preds = %10
%26 = load i64, i64* %6
ret i64 %26
}

LLVM IR (-O2):
define i64 @hash_str(i8* %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = icmp sgt i64 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ 5381, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = mul i64 %6, 33
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = sext i8 %10 to i64
%12 = xor i64 %8, %11
%13 = icmp ult i8* %9, %3
br i1 %13, label %5, label %14
14: ; preds = %5, %2
%15 = phi i64 [ 5381, %2 ], [ %12, %5 ]
ret i64 %15
}
void do_sndmsgto(char *user) {}


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

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

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

LLVM IR (-O2):
define void @do_sndmsgto(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("¡Hola mundo!\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"\C2\A1Hola mundo!\0A\00"
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 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"\C2\A1Hola mundo!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void oz_remember_urb(struct urb *urb) {}


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

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

LLVM IR (-O0):
%struct.urb = type opaque
define void @oz_remember_urb(%struct.urb* %0) {
%2 = alloca %struct.urb*
store %struct.urb* %0, %struct.urb** %2
ret void
}

LLVM IR (-O2):
%struct.urb = type opaque
define void @oz_remember_urb(%struct.urb* nocapture %0) {
ret void
}
unsigned xrop3_253_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S | stk3;
  stk1 = T | stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

x86 assembly (clang, -O2):
<xrop3_253_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
or     %edi,%esi
and    $0xff00,%eax
or     %esi,%eax
xor    $0xffffff00,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_253_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i8 %1, %0
%8 = zext i8 %7 to i32
%9 = or i32 %6, %4
%10 = and i32 %9, 65280
%11 = or i32 %10, %8
%12 = xor i32 %11, -256
ret i32 %12
}
int light_test_air_metal(struct light *in, int lam) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.light = type opaque
define i32 @light_test_air_metal(%struct.light* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int check_name(char *, int, int /*<<< orphan*/);
int check_labelname(char *name) { return check_name(name, 6, 0); }


x86 assembly (clang, -O0):
<check_labelname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
xor    %edx,%edx
call   1030 <check_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_labelname>:
mov    $0x6,%esi
xor    %edx,%edx
jmp    1030 <check_name@plt>

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

LLVM IR (-O2):
define i32 @check_labelname(i8* %0) {
%2 = tail call i32 @check_name(i8* %0, i32 6, i32 0)
ret i32 %2
}
int arch_spin_lock_held(unsigned long *lock) { return *lock != 0; }


x86 assembly (clang, -O0):
<arch_spin_lock_held>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_spin_lock_held>:
xor    %eax,%eax
cmpq   $0x0,(%rdi)
setne  %al
ret

LLVM IR (-O0):
define i32 @arch_spin_lock_held(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @arch_spin_lock_held(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a, b;
  int MAX = 4000000;
  int sum = 0;
  a = 1;
  b = 2;
  while (a < MAX) {
    if (a % 2 == 0)
      sum += a;
    int temp = b;
    b = a + b;
    a = temp;
  }
  printf(
      "The sum of all the even-valued Fibonacci numbers less than %d is %d\n",
      MAX, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3d0900,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    117e <main+0x6e>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1164 <main+0x54>
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x2b>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3d0900,%esi
mov    $0x466664,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [69 x i8] c"The sum of all the even-valued Fibonacci numbers less than %d is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 4000000, i32* %4
store i32 0, i32* %5
store i32 1, i32* %2
store i32 2, i32* %3
br label %7
7: ; preds = %19, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %25
11: ; preds = %7
%12 = load i32, i32* %2
%13 = srem i32 %12, 2
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i32, i32* %2
%17 = load i32, i32* %5
%18 = add nsw i32 %17, %16
store i32 %18, i32* %5
br label %19
19: ; preds = %15, %11
%20 = load i32, i32* %3
store i32 %20, i32* %6
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = add nsw i32 %21, %22
store i32 %23, i32* %3
%24 = load i32, i32* %6
store i32 %24, i32* %2
br label %7
25: ; preds = %7
%26 = load i32, i32* %4
%27 = load i32, i32* %5
%28 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 %26, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [69 x i8] c"The sum of all the even-valued Fibonacci numbers less than %d is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 4000000, i32 4613732)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_multprec_start_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(283, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_multprec_start_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x11b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_multprec_start_system_to_container>:
mov    $0x11b,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_multprec_start_system_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 283, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_multprec_start_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 283, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int mt_unregister(void *);
int mt_free(void *addr) { return mt_unregister(addr); }


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

x86 assembly (clang, -O2):
<mt_free>:
jmp    1030 <mt_unregister@plt>

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

LLVM IR (-O2):
define i32 @mt_free(i8* %0) {
%2 = tail call i32 @mt_unregister(i8* %0)
ret i32 %2
}
void rop3_254_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_254_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_254_1_0>:
or     %esi,%edx
mov    (%rdi),%al
or     %al,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_254_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_254_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %4, %5
%7 = xor i8 %1, -1
%8 = and i8 %6, %7
%9 = and i8 %5, %1
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int test_and(int, int, int);
int main() {
  int a = 7;
  int b = 8;
  int c = 1;
  return test_and(a, b, c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <test_and@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x7,%edi
mov    $0x8,%esi
mov    $0x1,%edx
jmp    1030 <test_and@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_and(i32 7, i32 8, i32 1)
ret i32 %1
}
/* Type definitions */
struct udev_queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
__attribute__((visibility("default"))) int
udev_queue_get_queue_is_empty(struct udev_queue *udev_queue) {
  return access("/run/udev/queue", F_OK) < 0;
}


x86 assembly (clang, -O0):
<udev_queue_get_queue_is_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
call   1030 <access@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udev_queue_get_queue_is_empty>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <access@plt>
shr    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.udev_queue = type { i32 }
@.str = [16 x i8] c"/run/udev/queue\00"
@F_OK = global i32 0
define i32 @udev_queue_get_queue_is_empty(%struct.udev_queue* %0) {
%2 = alloca %struct.udev_queue*
store %struct.udev_queue* %0, %struct.udev_queue** %2
%3 = load i32, i32* @F_OK
%4 = call i64 @access(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp slt i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.udev_queue = type { i32 }
@.str = [16 x i8] c"/run/udev/queue\00"
@F_OK = global i32 0
define i32 @udev_queue_get_queue_is_empty(%struct.udev_queue* nocapture readnone %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i64 @access(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}