xunge/DecIR huggingface dataset:
unsigned char nibble_dec(unsigned char nibble) {
  if (nibble > 9)
    nibble += 7;
  return nibble + 0x30;
}


x86 assembly (clang, -O0):
<nibble_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x9,%eax
jle    1121 <nibble_dec+0x21>
movzbl -0x1(%rbp),%eax
add    $0x7,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x30,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_dec>:
lea    0x7(%rdi),%eax
cmp    $0xa,%dil
movzbl %al,%eax
cmovb  %edi,%eax
add    $0x30,%al
ret

LLVM IR (-O0):
define zeroext i8 @nibble_dec(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sgt i32 %4, 9
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = add nsw i32 %8, 7
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %6, %1
%12 = load i8, i8* %2
%13 = zext i8 %12 to i32
%14 = add nsw i32 %13, 48
%15 = trunc i32 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @nibble_dec(i8 zeroext %0) {
%2 = icmp ugt i8 %0, 9
%3 = add i8 %0, 7
%4 = select i1 %2, i8 %3, i8 %0
%5 = add i8 %4, 48
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int isOdd(int);
int main() {
  int n = __VERIFIER_nondet_int();
  if (n < 0) {
    return 0;
  }
  int result = isOdd(n);
  int mod = n % 2;
  if (result < 0 || result == mod) {
    return 0;
  } else {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    115f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    11a6 <main+0x76>
mov    -0x8(%rbp),%edi
call   1030 <isOdd@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     118e <main+0x5e>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    119a <main+0x6a>
movl   $0x0,-0x4(%rbp)
jmp    11a6 <main+0x76>
jmp    119f <main+0x6f>
mov    $0x0,%al
call   1050 <__VERIFIER_error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     1157 <main+0x27>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <isOdd@plt>
test   %eax,%eax
js     1157 <main+0x27>
and    $0x1,%ebx
cmp    %ebx,%eax
je     1157 <main+0x27>
xor    %eax,%eax
call   1050 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rbx
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* %2
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 0, i32* %1
br label %24
9: ; preds = %0
%10 = load i32, i32* %2
%11 = call i32 @isOdd(i32 %10)
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = srem i32 %12, 2
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16, %9
store i32 0, i32* %1
br label %24
21: ; preds = %16
br label %22
22: ; preds = %21
%23 = call i32 (...) @__VERIFIER_error()
br label %24
24: ; preds = %8, %20, %22
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 0
br i1 %2, label %11, label %3
3: ; preds = %0
%4 = tail call i32 @isOdd(i32 %1)
%5 = icmp slt i32 %4, 0
%6 = and i32 %1, 1
%7 = icmp eq i32 %4, %6
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 (...) @__VERIFIER_error()
br label %11
11: ; preds = %9, %3, %0
ret i32 0
}
int vmir_llvm_alignment(int align, int default_alignment) {
  if (align == 0)
    return default_alignment;
  if (align > 9)
    return 256;
  return (1 << align) >> 1;
}


x86 assembly (clang, -O0):
<vmir_llvm_alignment>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <vmir_llvm_alignment+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <vmir_llvm_alignment+0x45>
cmpl   $0x9,-0x8(%rbp)
jle    1135 <vmir_llvm_alignment+0x35>
movl   $0x100,-0x4(%rbp)
jmp    1145 <vmir_llvm_alignment+0x45>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmir_llvm_alignment>:
mov    %esi,%eax
test   %edi,%edi
je     111b <vmir_llvm_alignment+0x1b>
mov    $0x100,%eax
cmp    $0x9,%edi
jg     111b <vmir_llvm_alignment+0x1b>
mov    $0x1,%eax
mov    %edi,%ecx
shl    %cl,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @vmir_llvm_alignment(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, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %5
store i32 %9, i32* %3
br label %18
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 9
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 256, i32* %3
br label %18
14: ; preds = %10
%15 = load i32, i32* %4
%16 = shl i32 1, %15
%17 = ashr i32 %16, 1
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %13, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @vmir_llvm_alignment(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = icmp sgt i32 %0, 9
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = shl nuw nsw i32 1, %0
%8 = ashr i32 %7, 1
br label %9
9: ; preds = %4, %2, %6
%10 = phi i32 [ %8, %6 ], [ %1, %2 ], [ 256, %4 ]
ret i32 %10
}
/* Variables and functions */
char *mem_strndup(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *mem_strdup(const char *str) { return mem_strndup(str, strlen(str)); }


x86 assembly (clang, -O0):
<mem_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <mem_strndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_strdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <mem_strndup@plt>

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

LLVM IR (-O2):
define i8* @mem_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @mem_strndup(i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ sleep(int);
void *start0(void *arg) {
  sleep(1);
  exit(42);
}


x86 assembly (clang, -O0):
<start0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    $0x2a,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<start0>:
push   %rax
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    $0x2a,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i8* @start0(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @sleep(i32 1)
%4 = call i32 @exit(i32 42)
unreachable
}

LLVM IR (-O2):
define noalias i8* @start0(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 @exit(i32 42)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ pause();
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *func(void *p) {
  while (1)
    pause();
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pause@plt>
jmp    111c <func+0xc>

x86 assembly (clang, -O2):
<func>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pause@plt>
jmp    1120 <func+0x10>

LLVM IR (-O0):
define i8* @func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (...) @pause()
br label %3
}

LLVM IR (-O2):
define noalias i8* @func(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (...) @pause()
br label %2
}
/* Variables and functions */
scalar_t__ malloc(int);
int *new_int(int value) {
  int *ip = (int *)malloc(sizeof(int));
  *ip = value;
  return ip;
}


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

x86 assembly (clang, -O2):
<new_int>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i32* @new_int(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32, i32* %2
%7 = load i32*, i32** %3
store i32 %6, i32* %7
%8 = load i32*, i32** %3
ret i32* %8
}

LLVM IR (-O2):
define i32* @new_int(i32 %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 %0, i32* %3
ret i32* %3
}
void ff_hevc_put_hevc_uni_w_qpel_h8_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h8_8_sse4() {
ret void
}
int is_prime(unsigned int _n) {
  if (_n < 4)
    return 1;
  unsigned int i;
  for (i = 2; i < _n; i++) {
    if ((_n % i) == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jae    111d <is_prime+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1167 <is_prime+0x67>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1160 <is_prime+0x60>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
cmp    $0x0,%edx
jne    114d <is_prime+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1167 <is_prime+0x67>
jmp    1152 <is_prime+0x52>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <is_prime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
cmp    $0x4,%edi
jb     1121 <is_prime+0x21>
mov    $0x2,%esi
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %edi,%eax
xor    %edx,%edx
div    %esi
test   %edx,%edx
je     1127 <is_prime+0x27>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <is_prime+0x10>
mov    $0x1,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = icmp ugt i32 %0, 3
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = urem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %3, %5, %1
%11 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %5 ]
ret i32 %11
}
/* Variables and functions */
void *sbrkx(int);
int brkx(void *addr) {
  return sbrkx((char *)addr - (char *)sbrkx(0)) == (void *)-1 ? -1 : 0;
}


x86 assembly (clang, -O0):
<brkx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
call   1030 <sbrkx@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %eax,%edi
call   1030 <sbrkx@plt>
mov    %rax,%rdx
mov    $0xffffffffffffffff,%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brkx>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <sbrkx@plt>
sub    %eax,%ebx
mov    %ebx,%edi
call   1030 <sbrkx@plt>
xor    %ecx,%ecx
cmp    $0xffffffffffffffff,%rax
sete   %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @brkx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @sbrkx(i32 0)
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %4 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = call i8* @sbrkx(i32 %8)
%10 = icmp eq i8* %9, inttoptr (i64 -1 to i8*)
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 -1, i32 0
ret i32 %12
}

LLVM IR (-O2):
define i32 @brkx(i8* %0) {
%2 = tail call i8* @sbrkx(i32 0)
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %2 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = tail call i8* @sbrkx(i32 %6)
%8 = icmp eq i8* %7, inttoptr (i64 -1 to i8*)
%9 = sext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
bool freeMemory(void) { return true; }


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

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

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

LLVM IR (-O2):
define i32 @freeMemory() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ line_statement();
scalar_t__ tokenizer_finished();
void vvtbi_run(void) {
  if (tokenizer_finished())
    return;
  line_statement();
}


x86 assembly (clang, -O0):
<vvtbi_run>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tokenizer_finished@plt>
cmp    $0x0,%rax
je     113a <vvtbi_run+0x1a>
jmp    1141 <vvtbi_run+0x21>
mov    $0x0,%al
call   1040 <line_statement@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vvtbi_run>:
push   %rax
xor    %eax,%eax
call   1030 <tokenizer_finished@plt>
test   %rax,%rax
je     112f <vvtbi_run+0xf>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <line_statement@plt>

LLVM IR (-O0):
define void @vvtbi_run() {
%1 = call i64 (...) @tokenizer_finished()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %6
4: ; preds = %0
%5 = call i32 (...) @line_statement()
br label %6
6: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
define void @vvtbi_run() {
%1 = tail call i64 (...) @tokenizer_finished()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @line_statement()
br label %5
5: ; preds = %0, %3
ret void
}
/* Variables and functions */
int rand();
int foo(int *p, int c) {
  int r;
  int y = c;
  r = rand();
  if (0 != r) {
    y = *p;
  }
  return y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%eax
je     1143 <foo+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <rand@plt>
test   %eax,%eax
je     1127 <foo+0x17>
mov    (%r14),%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = load i32, i32* %0
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ %6, %5 ], [ %1, %2 ]
ret i32 %8
}
/* Variables and functions */
int strlen(char *);
int size_of_string(char *input_string) { return strlen(input_string); }


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

x86 assembly (clang, -O2):
<size_of_string>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @size_of_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
void WebPRescalerDspInitMSA(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XtAppSetErrorHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
char *getcwd(char *buf, size_t size) {
  if (!buf || size <= 1) {
    errno = EINVAL;
    return 0;
  }
  buf[0] = '/';
  buf[1] = 0;
  return buf;
}


x86 assembly (clang, -O0):
<getcwd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1122 <getcwd+0x22>
cmpq   $0x1,-0x18(%rbp)
ja     1141 <getcwd+0x41>
mov    0x2eaf(%rip),%rax
mov    (%rax),%ecx
mov    0x2eae(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    1158 <getcwd+0x58>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcwd>:
test   %rdi,%rdi
je     1114 <getcwd+0x14>
cmp    $0x1,%rsi
jbe    1114 <getcwd+0x14>
mov    %rdi,%rax
movw   $0x2f,(%rdi)
ret
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    0x2ebc(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i8* @getcwd(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i64, i64* %5
%10 = icmp ule i64 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = load i32, i32* @EINVAL
store i32 %12, i32* @errno
store i8* null, i8** %3
br label %19
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 0
store i8 47, i8* %15
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 0, i8* %17
%18 = load i8*, i8** %4
store i8* %18, i8** %3
br label %19
19: ; preds = %13, %11
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i8* @getcwd(i8* writeonly %0, i64 %1) {
%3 = icmp eq i8* %0, null
%4 = icmp ult i64 %1, 2
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = load i32, i32* @EINVAL
store i32 %7, i32* @errno
br label %10
8: ; preds = %2
store i8 47, i8* %0
%9 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %9
br label %10
10: ; preds = %8, %6
%11 = phi i8* [ null, %6 ], [ %0, %8 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  long long a = 3257349183693658109;
  long long b = 11815251415798;
  assert(a / b == 275690);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0x2d346dd30b7817fd,%rax
6d 34 2d
mov    %rax,-0x10(%rbp)
movabs $0xabef3dd12f6,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x434ea,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 3257349183693658109, i64* %2
store i64 11815251415798, i64* %3
%4 = load i64, i64* %2
%5 = load i64, i64* %3
%6 = sdiv i64 %4, %5
%7 = icmp eq i64 %6, 275690
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void xprintf(char *string) {
  return;
  printf("%s", string);
}


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

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

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

LLVM IR (-O2):
define void @xprintf(i8* nocapture %0) {
ret void
}
void INT_Excep_PERIB_INTB161(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB161() {
ret void
}
int test_imm_0Cint64_highword_reg(long long val) {
  return ((val >> 32) & (0x0C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Cint64_highword_reg(i64 %0) {
%2 = and i64 %0, 51539607552
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int posix_memalign(void **, size_t, size_t);
void *_aligned_malloc(size_t size, size_t alignment) {
  void *p;
  int ret = posix_memalign(&p, alignment, size);
  return (ret == 0) ? p : 0;
}


x86 assembly (clang, -O0):
<_aligned_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    -0x18(%rbp),%rdi
call   1030 <posix_memalign@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    114b <_aligned_malloc+0x3b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1156 <_aligned_malloc+0x46>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1156 <_aligned_malloc+0x46>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_aligned_malloc>:
push   %rax
mov    %rdi,%rdx
mov    %rsp,%rdi
call   1030 <posix_memalign@plt>
test   %eax,%eax
jne    1126 <_aligned_malloc+0x16>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @_aligned_malloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = load i64, i64* %3
%9 = call i32 @posix_memalign(i8** %5, i64 %7, i64 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i8*, i8** %5
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %12
%16 = phi i8* [ %13, %12 ], [ null, %14 ]
ret i8* %16
}

LLVM IR (-O2):
define i8* @_aligned_malloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @posix_memalign(i8** %3, i64 %1, i64 %0)
%6 = icmp eq i32 %5, 0
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* %7, i8* null
ret i8* %8
}
/* Variables and functions */
unsigned long hash_str_djb2(unsigned char const *);
unsigned long hashstr(void const *key) {
  unsigned char const *s = (unsigned char const *)key;
  return hash_str_djb2(s);
}


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

x86 assembly (clang, -O2):
<hashstr>:
jmp    1030 <hash_str_djb2@plt>

LLVM IR (-O0):
define i64 @hashstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @hash_str_djb2(i8* %5)
ret i64 %6
}

LLVM IR (-O2):
define i64 @hashstr(i8* %0) {
%2 = tail call i64 @hash_str_djb2(i8* %0)
ret i64 %2
}
int fun1357() { return 1357; }


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

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

LLVM IR (-O0):
define i32 @fun1357() {
ret i32 1357
}

LLVM IR (-O2):
define i32 @fun1357() {
ret i32 1357
}
void mdp4_mddi_blt_dmap_busy_wait(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_mddi_blt_dmap_busy_wait(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ failure();
int /*<<< orphan*/ success();
scalar_t__ validate_user();
int main(int argc, char *argv[]) {
  if (validate_user()) {
    success();
  } else {
    failure();
  }
  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   1040 <validate_user@plt>
cmp    $0x0,%rax
je     1163 <main+0x33>
mov    $0x0,%al
call   1030 <success@plt>
jmp    116a <main+0x3a>
mov    $0x0,%al
call   1050 <failure@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <validate_user@plt>
test   %rax,%rax
je     1146 <main+0x16>
xor    %eax,%eax
call   1030 <success@plt>
jmp    114d <main+0x1d>
xor    %eax,%eax
call   1050 <failure@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 i64 (...) @validate_user()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @success()
br label %12
10: ; preds = %2
%11 = call i32 (...) @failure()
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @validate_user()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @success()
br label %9
7: ; preds = %2
%8 = tail call i32 (...) @failure()
br label %9
9: ; preds = %7, %5
ret i32 0
}
void genbgtzl_out() {}


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

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

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

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

/* Variables and functions */
extern uint16_t htons(uint16_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @htons(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ function_c();
int /*<<< orphan*/ scanf(char *, int *);
void function_a() {
  int input;
  scanf("%d", &input);
  if (input == 1) {
    exit(1);
  } else if (input == 2) {
    function_c();
  } else {
    return;
  }
}


x86 assembly (clang, -O0):
<function_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    115c <function_a+0x2c>
mov    $0x1,%edi
call   1050 <exit@plt>
cmpl   $0x2,-0x4(%rbp)
jne    1172 <function_a+0x42>
mov    $0x0,%al
call   1030 <function_c@plt>
jmp    1177 <function_a+0x47>
jmp    117c <function_a+0x4c>
jmp    117c <function_a+0x4c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_a>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
je     1152 <function_a+0x22>
cmp    $0x1,%eax
je     115b <function_a+0x2b>
pop    %rax
ret
xor    %eax,%eax
call   1030 <function_c@plt>
pop    %rax
ret
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @function_a() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @exit(i32 1)
unreachable
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @function_c()
br label %13
12: ; preds = %7
br label %14
13: ; preds = %10
br label %14
14: ; preds = %12, %13
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @function_a() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %7
]
5: ; preds = %0
%6 = call i32 @exit(i32 1)
unreachable
7: ; preds = %0
%8 = call i32 (...) @function_c()
br label %9
9: ; preds = %0, %7
ret void
}
/* Variables and functions */
#define TPACKET_V1 129
#define TPACKET_V2 128
int /*<<< orphan*/ __v1_tx_user_ready(void *);
int /*<<< orphan*/ __v2_tx_user_ready(void *);
void __v1_v2_tx_user_ready(void *base, int version) {
  switch (version) {
  case TPACKET_V1:
    __v1_tx_user_ready(base);
    break;
  case TPACKET_V2:
    __v2_tx_user_ready(base);
    break;
  }
}


x86 assembly (clang, -O0):
<__v1_v2_tx_user_ready>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x80,%eax
je     1166 <__v1_v2_tx_user_ready+0x46>
jmp    1145 <__v1_v2_tx_user_ready+0x25>
mov    -0x10(%rbp),%eax
sub    $0x81,%eax
jne    116f <__v1_v2_tx_user_ready+0x4f>
jmp    1158 <__v1_v2_tx_user_ready+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <__v1_tx_user_ready@plt>
jmp    116f <__v1_v2_tx_user_ready+0x4f>
mov    -0x8(%rbp),%rdi
call   1040 <__v2_tx_user_ready@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__v1_v2_tx_user_ready>:
cmp    $0x80,%esi
je     1135 <__v1_v2_tx_user_ready+0x15>
cmp    $0x81,%esi
jne    113a <__v1_v2_tx_user_ready+0x1a>
jmp    1030 <__v1_tx_user_ready@plt>
jmp    1040 <__v2_tx_user_ready@plt>
ret

LLVM IR (-O0):
define void @__v1_v2_tx_user_ready(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %12 [
i32 129, label %6
i32 128, label %9
]
6: ; preds = %2
%7 = load i8*, i8** %3
%8 = call i32 @__v1_tx_user_ready(i8* %7)
br label %12
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 @__v2_tx_user_ready(i8* %10)
br label %12
12: ; preds = %2, %9, %6
ret void
}

LLVM IR (-O2):
define void @__v1_v2_tx_user_ready(i8* %0, i32 %1) {
switch i32 %1, label %7 [
i32 129, label %3
i32 128, label %5
]
3: ; preds = %2
%4 = tail call i32 @__v1_tx_user_ready(i8* %0)
br label %7
5: ; preds = %2
%6 = tail call i32 @__v2_tx_user_ready(i8* %0)
br label %7
7: ; preds = %2, %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFL;
int /*<<< orphan*/ O_NONBLOCK;
scalar_t__ fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int _setnonblock(int fd) {
  if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<_setnonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
cmp    $0x0,%rax
jge    114b <_setnonblock+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1152 <_setnonblock+0x42>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_setnonblock>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @_setnonblock(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @O_NONBLOCK
%4 = tail call i64 @fcntl(i32 %0, i32 %2, i32 %3)
%5 = lshr i64 %4, 63
%6 = trunc i64 %5 to i32
%7 = xor i32 %6, 1
ret i32 %7
}
void display_println(char *s) {}


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

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

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

LLVM IR (-O2):
define void @display_println(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ capture_deinit();
int /*<<< orphan*/ capture_init();
int /*<<< orphan*/ capture_mainloop();
int /*<<< orphan*/ capture_start();
int /*<<< orphan*/ catputre_stop();
int main(int argc, char **argv) {
  capture_init();
  capture_start();
  while (1)
    capture_mainloop();
  catputre_stop();
  capture_deinit();
  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 <capture_init@plt>
mov    $0x0,%al
call   1040 <capture_start@plt>
mov    $0x0,%al
call   1050 <capture_mainloop@plt>
jmp    1154 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <capture_init@plt>
xor    %eax,%eax
call   1040 <capture_start@plt>
nop
xor    %eax,%eax
call   1050 <capture_mainloop@plt>
jmp    1140 <main+0x10>

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 (...) @capture_init()
%7 = call i32 (...) @capture_start()
br label %8
8: ; preds = %2, %8
%9 = call i32 (...) @capture_mainloop()
br label %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @capture_init()
%4 = tail call i32 (...) @capture_start()
br label %5
5: ; preds = %2, %5
%6 = tail call i32 (...) @capture_mainloop()
br label %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int screen;
};
typedef TYPE_1__ XVisualInfo;

/* Variables and functions */
void set_XVisualInfo_screen(void *_p, int _v) {
  ((XVisualInfo *)_p)->screen = (int)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XVisualInfo_screen(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XVisualInfo_screen(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct fcb_ctx {
  int dummy;
};

/* Variables and functions */
int fcb_advance(struct fcb_ctx *, int);
int fcb_flush(struct fcb_ctx *ctx) { return fcb_advance(ctx, -1); }


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

x86 assembly (clang, -O2):
<fcb_flush>:
mov    $0xffffffff,%esi
jmp    1030 <fcb_advance@plt>

LLVM IR (-O0):
%struct.fcb_ctx = type { i32 }
define i32 @fcb_flush(%struct.fcb_ctx* %0) {
%2 = alloca %struct.fcb_ctx*
store %struct.fcb_ctx* %0, %struct.fcb_ctx** %2
%3 = load %struct.fcb_ctx*, %struct.fcb_ctx** %2
%4 = call i32 @fcb_advance(%struct.fcb_ctx* %3, i32 -1)
ret i32 %4
}

LLVM IR (-O2):
%struct.fcb_ctx = type { i32 }
define i32 @fcb_flush(%struct.fcb_ctx* %0) {
%2 = tail call i32 @fcb_advance(%struct.fcb_ctx* %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *getenv(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char *prob_home = getenv("PROBLEM_HOME");
  if (prob_home != NULL)
    printf("yes\n");
  else
    printf("no\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116b <main+0x3b>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
jmp    1177 <main+0x47>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xec6(%rip),%rax
lea    0xec2(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"PROBLEM_HOME\00"
@.str.1 = [5 x i8] c"yes\0A\00"
@.str.2 = [4 x i8] c"no\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"PROBLEM_HOME\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *xml_findstart(char *, char *);
char *modsin_startptr(char *p) {
  char *startptr;
  startptr = xml_findstart(p, "mods");
  if (!startptr)
    startptr = xml_findstart(p, "mods:mods");
  return startptr;
}


x86 assembly (clang, -O0):
<modsin_startptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xede(%rip),%rsi
call   1030 <xml_findstart@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <modsin_startptr+0x3f>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <xml_findstart@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modsin_startptr>:
push   %rbx
mov    %rdi,%rbx
lea    0xeea(%rip),%rsi
call   1030 <xml_findstart@plt>
test   %rax,%rax
je     1127 <modsin_startptr+0x17>
pop    %rbx
ret
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <xml_findstart@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"mods\00"
@.str.1 = [10 x i8] c"mods:mods\00"
define i8* @modsin_startptr(i8* %0) {
%2 = tail call i8* @xml_findstart(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @xml_findstart(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %2, %1 ], [ %5, %4 ]
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __REV(uint32_t value) {
  uint32_t result;
  return (result);
}


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

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

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

LLVM IR (-O2):
define i32 @__REV(i32 %0) {
ret i32 undef
}
/* Type definitions */
struct uwsgi_buffer {
  int dummy;
};

/* Variables and functions */
scalar_t__ uwsgi_buffer_append(struct uwsgi_buffer *, char *, int);
int uwsgi_webdav_multistatus_response_close(struct uwsgi_buffer *ub) {
  if (uwsgi_buffer_append(ub, "</D:response>\n", 14))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<uwsgi_webdav_multistatus_response_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0xe,%edx
call   1030 <uwsgi_buffer_append@plt>
cmp    $0x0,%rax
je     1147 <uwsgi_webdav_multistatus_response_close+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <uwsgi_webdav_multistatus_response_close+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_webdav_multistatus_response_close>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0xe,%edx
call   1030 <uwsgi_buffer_append@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.uwsgi_buffer = type { i32 }
@.str = [15 x i8] c"</D:response>\0A\00"
define i32 @uwsgi_webdav_multistatus_response_close(%struct.uwsgi_buffer* %0) {
%2 = alloca i32
%3 = alloca %struct.uwsgi_buffer*
store %struct.uwsgi_buffer* %0, %struct.uwsgi_buffer** %3
%4 = load %struct.uwsgi_buffer*, %struct.uwsgi_buffer** %3
%5 = call i64 @uwsgi_buffer_append(%struct.uwsgi_buffer* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
%struct.uwsgi_buffer = type { i32 }
@.str = [15 x i8] c"</D:response>\0A\00"
define i32 @uwsgi_webdav_multistatus_response_close(%struct.uwsgi_buffer* %0) {
%2 = tail call i64 @uwsgi_buffer_append(%struct.uwsgi_buffer* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%3 = icmp ne i64 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}