xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ test(int, int *);
main() {
  int *iptr, j, k = 2;
  iptr = &j;
  j = k;
  printf("%d %d ", k, j);
  test(j, iptr);
  printf("%d %d\n", k, j);
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d \00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 2, i32 2)
%4 = call i32 @test(i32 2, i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %5)
ret i32 0
}
/* Variables and functions */
char toupper(char);
void maiuscola(char *s) {
  for (; *s; s++)
    *s = toupper(*s);
}


x86 assembly (clang, -O0):
<maiuscola>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <maiuscola+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <maiuscola+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maiuscola>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <maiuscola+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <maiuscola+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @maiuscola(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int k;
  int j;
  int n;
  assume(n >= 1 && k >= n && j == 0);
  while (j <= n - 1) {
    j++;
    k--;
  }
  assert(k >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jl     1159 <main+0x39>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x11(%rbp)
jl     1159 <main+0x39>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     118e <main+0x6e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <main+0x46>
cmpl   $0x0,-0x8(%rbp)
setge  %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
xor    %edi,%edi
call   1030 <assume@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 1
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %11, %7, %0
%15 = phi i1 [ false, %7 ], [ false, %0 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
%17 = call i32 @assume(i32 %16)
br label %18
18: ; preds = %23, %14
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, 1
%22 = icmp sle i32 %19, %21
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
%26 = load i32, i32* %2
%27 = add nsw i32 %26, -1
store i32 %27, i32* %2
br label %18
28: ; preds = %18
%29 = load i32, i32* %2
%30 = icmp sge i32 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
unreachable
}
void upload_error_callback_dummy(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @upload_error_callback_dummy(i8* nocapture %0, ...) {
ret void
}
call_for_me(int (*f)(int), int arg) { return f(arg); }


x86 assembly (clang, -O0):
<call_for_me>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_for_me>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @call_for_me(i32 (i32)* nocapture %0, i32 %1) {
%3 = tail call i32 %0(i32 %1)
ret i32 %3
}
int C_Utils_compare_ulong(const unsigned long item1,
                          const unsigned long item2) {
  if (item1 == item2)
    return 0;
  return item1 < item2 ? -1 : 1;
}


x86 assembly (clang, -O0):
<C_Utils_compare_ulong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1126 <C_Utils_compare_ulong+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1141 <C_Utils_compare_ulong+0x41>
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rsi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovb  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_compare_ulong>:
xor    %ecx,%ecx
xor    %eax,%eax
cmp    %rsi,%rdi
setae  %al
lea    -0x1(%rax,%rax,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @C_Utils_compare_ulong(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = icmp ult i64 %0, %1
%5 = select i1 %4, i32 -1, i32 1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
void *c_pointer_return(void *x) { return x; }


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

x86 assembly (clang, -O2):
<c_pointer_return>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @c_pointer_return(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ will_not_return();
void no_ret() { will_not_return(); }


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

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

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

LLVM IR (-O2):
define void @no_ret() {
%1 = tail call i32 (...) @will_not_return()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_barrier_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int pthread_barrier_wait(int /*<<< orphan*/ *);
int pthread_self();
void *dowait(void *arg) {
  pthread_barrier_t *barrier = arg;
  int ret;
  ret = pthread_barrier_wait(barrier);
  printf("%d ", pthread_self());
  return (void *)ret;
}


x86 assembly (clang, -O0):
<dowait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_barrier_wait@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
movslq -0x14(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dowait>:
push   %rbx
call   1030 <pthread_barrier_wait@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movslq %ebx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define i8* @dowait(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 @pthread_barrier_wait(i32* %7)
store i32 %8, i32* %4
%9 = call i32 (...) @pthread_self()
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i8* @dowait(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @pthread_barrier_wait(i32* %2)
%4 = tail call i32 (...) @pthread_self()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = sext i32 %3 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Variables and functions */
unsigned int *__ia64_mk_io_addr(unsigned long);
int /*<<< orphan*/ ia64_mfa();
unsigned int ___ia64_inl(unsigned long port) {
  volatile unsigned int *addr = __ia64_mk_io_addr(port);
  unsigned int ret;
  ret = *addr;
  ia64_mfa();
  return ret;
}


x86 assembly (clang, -O0):
<___ia64_inl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__ia64_mk_io_addr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <ia64_mfa@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<___ia64_inl>:
push   %rbx
call   1030 <__ia64_mk_io_addr@plt>
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <ia64_mfa@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @___ia64_inl(i64 %0) {
%2 = alloca i64
%3 = alloca i32*
%4 = alloca i32
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = call i32* @__ia64_mk_io_addr(i64 %5)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = load volatile i32, i32* %7
store i32 %8, i32* %4
%9 = call i32 (...) @ia64_mfa()
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @___ia64_inl(i64 %0) {
%2 = tail call i32* @__ia64_mk_io_addr(i64 %0)
%3 = load volatile i32, i32* %2
%4 = tail call i32 (...) @ia64_mfa()
ret i32 %3
}
/* Variables and functions */
scalar_t__ is(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int i;
  for (i = 2; i < 1000; i++) {
    if (is(i))
      printf("%d  ", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
cmpl   $0x3e8,-0x14(%rbp)
jge    117e <main+0x5e>
mov    -0x14(%rbp),%edi
call   1040 <is@plt>
cmp    $0x0,%rax
je     116b <main+0x4b>
mov    -0x14(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x2,%ebx
lea    0xed0(%rip),%r14
jmp    114b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x3e8,%ebx
je     1163 <main+0x43>
mov    %ebx,%edi
call   1040 <is@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %9
%4 = phi i32 [ 2, %2 ], [ %10, %9 ]
%5 = tail call i64 @is(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %9
9: ; preds = %3, %7
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 1000
br i1 %11, label %12, label %3
12: ; preds = %9
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printq();
void shellCmd_q(void) { printq(); }


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

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

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

LLVM IR (-O2):
define void @shellCmd_q() {
%1 = tail call i32 (...) @printq()
ret void
}
int test_imm_92int16_reg(short val) {
  return ((val) & (-0x92 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_92int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff6e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_92int16_reg>:
test   $0xff6e,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_92int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -146
%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_92int16_reg(i16 signext %0) {
%2 = and i16 %0, -146
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, ...);
int main() {
  char a[10];
  char *b;
  printf("%d %d %d\n", sizeof(a), sizeof(*a), sizeof(a[0]));
  printf("%d %d\n", sizeof(b), sizeof(*b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    $0x0,%al
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    $0x1,%ecx
mov    $0xa,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 10, i32 1, i64 1)
%2 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 1)
ret i32 0
}
int do_756() { return 756; }


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

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

LLVM IR (-O0):
define i32 @do_756() {
ret i32 756
}

LLVM IR (-O2):
define i32 @do_756() {
ret i32 756
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char const *);
void nasm_fputs(const char *line, FILE *outfile) {
  if (outfile) {
    fputs(line, outfile);
    putc('\n', outfile);
  } else
    puts(line);
}


x86 assembly (clang, -O0):
<nasm_fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116b <nasm_fputs+0x3b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rsi
mov    $0xa,%edi
call   1050 <putc@plt>
jmp    1174 <nasm_fputs+0x44>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nasm_fputs>:
test   %rsi,%rsi
je     114c <nasm_fputs+0x1c>
push   %rbx
mov    %rsi,%rbx
call   1040 <fputs@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1050 <putc@plt>
jmp    1030 <puts@plt>

LLVM IR (-O0):
define void @nasm_fputs(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 = icmp ne i32* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i32*, i32** %4
%10 = call i32 @fputs(i8* %8, i32* %9)
%11 = load i32*, i32** %4
%12 = call i32 @putc(i8 signext 10, i32* %11)
br label %16
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = call i32 @puts(i8* %14)
br label %16
16: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
define void @nasm_fputs(i8* nocapture %0, i32* %1) {
%3 = icmp eq i32* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @fputs(i8* %0, i32* %1)
%6 = tail call i32 @putc(i8 signext 10, i32* %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) %0)
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int *p;
  {
    int a = 42;
    p = &a;
  }
  printf("%d\n", *p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2a,-0x1c(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xebe(%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    $0x2a,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 42)
ret i32 0
}
int xmlUCSIsMathematicalAlphanumericSymbols(int code) {
  return (((code >= 0x1D400) && (code <= 0x1D7FF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsMathematicalAlphanumericSymbols>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1d400,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsMathematicalAlphanumericSymbols+0x26>
cmpl   $0x1d7ff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsMathematicalAlphanumericSymbols>:
and    $0xfffffc00,%edi
xor    %eax,%eax
cmp    $0x1d400,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsMathematicalAlphanumericSymbols(i32 %0) {
%2 = and i32 %0, -1024
%3 = icmp eq i32 %2, 119808
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void delay() { sleep(1); }


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

x86 assembly (clang, -O2):
<delay>:
mov    $0x1,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @delay() {
%1 = call i32 @sleep(i32 1)
ret void
}

LLVM IR (-O2):
define void @delay() {
%1 = tail call i32 @sleep(i32 1)
ret void
}
main() {
  __label__ z;
  void *y = &&z;
  void *p;
  int i = 0;
  {
    __label__ z;
  z:
    p = &&z;
    if (i++ == 5)
      goto *y;
  }
  goto *p;
z:
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    0x44(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x5,%eax
jne    1149 <main+0x49>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    115b <main+0x5b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    115b <main+0x5b>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret
mov    -0x28(%rbp),%rax
jmp    *%rax

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 6
}
/* Variables and functions */
char *malloc(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *xstrdup(const char *str) {
  char *copy = malloc(strlen(str));
  char *p = copy;
  for (; *str; str++, p++) {
    *p = *str;
  }
  return copy;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     117e <xstrdup+0x5e>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1148 <xstrdup+0x28>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%edi
call   1040 <malloc@plt>
mov    (%rbx),%cl
test   %cl,%cl
je     1150 <xstrdup+0x30>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rbx,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1140 <xstrdup+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @xstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @malloc(i32 %2)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1, %6
%7 = phi i8 [ %12, %6 ], [ %4, %1 ]
%8 = phi i8* [ %11, %6 ], [ %3, %1 ]
%9 = phi i8* [ %10, %6 ], [ %0, %1 ]
store i8 %7, i8* %8
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %1
ret i8* %3
}
/* Variables and functions */
int execl(char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int main(void) {
  int ret = 0;
  ret = execl("/usr/bin/vim", "vi", NULL);
  if (ret == -1) {
    perror("open fail\n");
    exit(0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
lea    0xeb9(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <execl@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    117d <main+0x4d>
lea    0xe9f(%rip),%rdi
call   1030 <perror@plt>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xece(%rip),%rsi
xor    %edx,%edx
call   1050 <execl@plt>
cmp    $0xffffffff,%eax
je     114f <main+0x1f>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1030 <perror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/usr/bin/vim\00"
@.str.1 = [3 x i8] c"vi\00"
@.str.2 = [11 x i8] c"open fail\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @execl(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* null)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"/usr/bin/vim\00"
@.str.1 = [3 x i8] c"vi\00"
@.str.2 = [11 x i8] c"open fail\0A\00"
define i32 @main() {
%1 = tail call i32 @execl(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* null)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EPIDMATxCount(uint32_t ui32Base, uint32_t ui32Count) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000208))) = ui32Count & 0x00ff;
}


x86 assembly (clang, -O0):
<EPIDMATxCount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
mov    -0x4(%rbp),%eax
add    $0x208,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIDMATxCount>:
movzbl %sil,%eax
movslq %edi,%rcx
mov    %eax,0x208(%rcx)
ret

LLVM IR (-O0):
define void @EPIDMATxCount(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 520
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %6, i32* %10
ret void
}

LLVM IR (-O2):
define void @EPIDMATxCount(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = add nsw i32 %0, 520
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store volatile i32 %3, i32* %6
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_BOOTTIME;
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int main(void) {
  struct timespec ts;
  if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
    return 111;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
jge    1147 <main+0x37>
movl   $0x6f,-0x4(%rbp)
jmp    114e <main+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
sar    $0x3f,%rax
and    $0x6f,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_BOOTTIME = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timespec
store i32 0, i32* %1
%3 = load i32, i32* @CLOCK_BOOTTIME
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 111, i32* %1
br label %8
7: ; preds = %0
store i32 0, i32* %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_BOOTTIME = global i32 0
define i32 @main() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_BOOTTIME
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp slt i64 %4, 0
%6 = select i1 %5, i32 111, i32 0
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rotl32(int, int);
uint32_t mixin(uint32_t hash, uint32_t block) {
  block *= 0xCC9E2D51;
  block = rotl32(block, 15);
  block *= 0x1B873593;
  return hash ^ block;
}


x86 assembly (clang, -O0):
<mixin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0xcc9e2d51,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0xf,%esi
call   1030 <rotl32@plt>
mov    %eax,-0x8(%rbp)
imul   $0x1b873593,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixin>:
push   %rbx
mov    %edi,%ebx
imul   $0xcc9e2d51,%esi,%edi
mov    $0xf,%esi
call   1030 <rotl32@plt>
imul   $0x1b873593,%eax,%eax
xor    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mixin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = mul i32 %5, -862048943
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @rotl32(i32 %7, i32 15)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = mul nsw i32 %9, 461845907
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = xor i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @mixin(i32 %0, i32 %1) {
%3 = mul i32 %1, -862048943
%4 = tail call i32 @rotl32(i32 %3, i32 15)
%5 = mul nsw i32 %4, 461845907
%6 = xor i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int main_backflow(int, char **);
int main(int c, char *v[]) { return main_backflow(c, v); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <main_backflow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <main_backflow@plt>

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @main_backflow(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @main_backflow(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ui_field_navigate_down();
void switch_s2_down(const uint32_t repeat_count) {
  (void)repeat_count;
  ui_field_navigate_down();
}


x86 assembly (clang, -O0):
<switch_s2_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <ui_field_navigate_down@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @switch_s2_down(i32 %0) {
%2 = tail call i32 (...) @ui_field_navigate_down()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void print_prompt(void) {
  printf("> ");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<print_prompt>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_prompt>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"> \00"
@stdout = global i32 0
define void @print_prompt() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"> \00"
@stdout = global i32 0
define void @print_prompt() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
unsigned int check_read(int, char *);
unsigned int inl_p(unsigned short int port) {
  return check_read((int)port, "inl_p");
}


x86 assembly (clang, -O0):
<inl_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
lea    0xed6(%rip),%rsi
call   1030 <check_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl_p>:
lea    0xee9(%rip),%rsi
jmp    1030 <check_read@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"inl_p\00"
define i32 @inl_p(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = call i32 @check_read(i32 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"inl_p\00"
define i32 @inl_p(i16 zeroext %0) {
%2 = zext i16 %0 to i32
%3 = tail call i32 @check_read(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
void PDMCritSectEnter(void) {}


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

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

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

LLVM IR (-O2):
define void @PDMCritSectEnter() {
ret void
}
int get_salt_size(void) { return 64; }


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

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

LLVM IR (-O0):
define i32 @get_salt_size() {
ret i32 64
}

LLVM IR (-O2):
define i32 @get_salt_size() {
ret i32 64
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg8setBank2(int);
void m82setParams7EFC(uint16_t addr, uint8_t val) {
  (void)addr;
  prg8setBank2((val & 0xFC) << 11);
}


x86 assembly (clang, -O0):
<m82setParams7EFC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0xfc,%edi
shl    $0xb,%edi
call   1030 <prg8setBank2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m82setParams7EFC>:
mov    %esi,%edi
shl    $0xb,%edi
and    $0x7e000,%edi
jmp    1030 <prg8setBank2@plt>

LLVM IR (-O0):
define void @m82setParams7EFC(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
%7 = and i32 %6, 252
%8 = shl i32 %7, 11
%9 = call i32 @prg8setBank2(i32 %8)
ret void
}

LLVM IR (-O2):
define void @m82setParams7EFC(i32 %0, i32 %1) {
%3 = shl i32 %1, 11
%4 = and i32 %3, 516096
%5 = tail call i32 @prg8setBank2(i32 %4)
ret void
}
/* Variables and functions */
scalar_t__ bitc_exiting();
int /*<<< orphan*/ peergroup_check_liveness();
int /*<<< orphan*/ peergroup_refill(int /*<<< orphan*/);
void peergroup_periodic_cb(void *clientData) {
  if (bitc_exiting()) {
    return;
  }
  peergroup_refill(0);
  peergroup_check_liveness();
}


x86 assembly (clang, -O0):
<peergroup_periodic_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <bitc_exiting@plt>
cmp    $0x0,%rax
je     1152 <peergroup_periodic_cb+0x22>
jmp    1160 <peergroup_periodic_cb+0x30>
xor    %edi,%edi
call   1030 <peergroup_refill@plt>
mov    $0x0,%al
call   1040 <peergroup_check_liveness@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peergroup_periodic_cb>:
push   %rax
xor    %eax,%eax
call   1050 <bitc_exiting@plt>
test   %rax,%rax
je     113f <peergroup_periodic_cb+0xf>
pop    %rax
ret
xor    %edi,%edi
call   1030 <peergroup_refill@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <peergroup_check_liveness@plt>

LLVM IR (-O0):
define void @peergroup_periodic_cb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @bitc_exiting()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = call i32 @peergroup_refill(i32 0)
%8 = call i32 (...) @peergroup_check_liveness()
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @peergroup_periodic_cb(i8* nocapture readnone %0) {
%2 = tail call i64 (...) @bitc_exiting()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @peergroup_refill(i32 0)
%6 = tail call i32 (...) @peergroup_check_liveness()
br label %7
7: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void ShowData(unsigned int value) {
  int i;
  for (i = 0; i < 32; i++)
    printf("%d", (value >> (31 - i)) & 1);
  printf(" (%08X)\n", value);
}


x86 assembly (clang, -O0):
<ShowData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    1156 <ShowData+0x46>
mov    -0x4(%rbp),%esi
mov    $0x1f,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%esi
and    $0x1,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ShowData+0x12>
mov    -0x4(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowData>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x1f,%ebp
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%esi
mov    %ebp,%ecx
shr    %cl,%esi
and    $0x1,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jb     1130 <ShowData+0x20>
lea    0xeb6(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c" (%08X)\0A\00"
define void @ShowData(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = sub nsw i32 31, %9
%11 = lshr i32 %8, %10
%12 = and i32 %11, 1
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = load i32, i32* %2
%19 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c" (%08X)\0A\00"
define void @ShowData(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = sub nuw nsw i32 31, %3
%5 = lshr i32 %0, %4
%6 = and i32 %5, 1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = add nuw nsw i32 %3, 1
%9 = icmp eq i32 %8, 32
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int is_not_same_char(char *ch, char *sep) { return (strcmp(ch, sep) != 0); }


x86 assembly (clang, -O0):
<is_not_same_char>:
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 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_not_same_char>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_not_same_char(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void gdk_window_iconify() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_iconify() {
ret void
}
int get_operator_associativity(char op) {
  switch (op) {
  case '^':
    return 2;
  case '*':
  case '/':
  case '+':
  case '-':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_operator_associativity>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffd6,%eax
sub    $0x2,%eax
jb     1161 <get_operator_associativity+0x61>
jmp    1122 <get_operator_associativity+0x22>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     1161 <get_operator_associativity+0x61>
jmp    1133 <get_operator_associativity+0x33>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     1161 <get_operator_associativity+0x61>
jmp    1144 <get_operator_associativity+0x44>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
jne    116d <get_operator_associativity+0x6d>
jmp    1155 <get_operator_associativity+0x55>
movl   $0x2,-0x4(%rbp)
jmp    1174 <get_operator_associativity+0x74>
movl   $0x1,-0x4(%rbp)
jmp    1174 <get_operator_associativity+0x74>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_operator_associativity>:
add    $0xffffffd6,%edi
cmp    $0x34,%edi
ja     1125 <get_operator_associativity+0x25>
mov    $0x2b,%eax
bt     %rdi,%rax
jae    1119 <get_operator_associativity+0x19>
mov    $0x1,%eax
ret
mov    $0x2,%eax
cmp    $0x34,%rdi
jne    1125 <get_operator_associativity+0x25>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @get_operator_associativity(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 94, label %6
i32 42, label %7
i32 47, label %7
i32 43, label %7
i32 45, label %7
]
6: ; preds = %1
store i32 2, i32* %2
br label %9
7: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_operator_associativity(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 94, label %5
i32 42, label %3
i32 47, label %3
i32 43, label %3
i32 45, label %3
]
3: ; preds = %1, %1, %1, %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3
%6 = phi i32 [ 0, %4 ], [ 1, %3 ], [ 2, %1 ]
ret i32 %6
}