xunge/DecIR huggingface dataset:
/* Variables and functions */
int trio_fpclassify_and_signbit(double, int *);
int trio_fpclassify(double number) {
  int dummy;
  return trio_fpclassify_and_signbit(number, &dummy);
}


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

x86 assembly (clang, -O2):
<trio_fpclassify>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <trio_fpclassify_and_signbit@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @trio_fpclassify(double %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @trio_fpclassify_and_signbit(double %0, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ueBytesFromChar(char const);
const char *ueConstStrSeek(const char *src, size_t n) {
  size_t i = 0;
  const char *iter = src;
  for (i = 0; i < n; i++) {
    iter += ueBytesFromChar(iter[0]);
  }
  return iter;
}


x86 assembly (clang, -O0):
<ueConstStrSeek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1173 <ueConstStrSeek+0x63>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ueBytesFromChar@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1138 <ueConstStrSeek+0x28>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ueConstStrSeek>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rsi,%rsi
je     1133 <ueConstStrSeek+0x23>
mov    %rsi,%r14
nop
movsbl (%rbx),%edi
call   1030 <ueBytesFromChar@plt>
cltq
add    %rax,%rbx
add    $0xffffffffffffffff,%r14
jne    1120 <ueConstStrSeek+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ueConstStrSeek(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %10, %4 ], [ %0, %2 ]
%6 = phi i64 [ %11, %4 ], [ 0, %2 ]
%7 = load i8, i8* %5
%8 = tail call i32 @ueBytesFromChar(i8 signext %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i8* [ %0, %2 ], [ %10, %4 ]
ret i8* %14
}
int to_upper(int c) { return (c >= 'a' && c <= 'z' ? c - ('a' - 'A') : c); }


x86 assembly (clang, -O0):
<to_upper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1129 <to_upper+0x29>
cmpl   $0x7a,-0x4(%rbp)
jg     1129 <to_upper+0x29>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <to_upper+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_upper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @to_upper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @to_upper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_import(int /*<<< orphan*/, int, int, int,
                              int /*<<< orphan*/, int /*<<< orphan*/, char *);
char *sidh_get_random_str(int);
void sidh_get_random_mpz(mpz_t x) {
  int num_bytes = 20;
  char *a = sidh_get_random_str(num_bytes);
  mpz_import(x, num_bytes, 1, sizeof(char), 0, 0, a);
}


x86 assembly (clang, -O0):
<sidh_get_random_mpz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sidh_get_random_str@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    $0x1,%ecx
xor    %r9d,%r9d
mov    %ecx,%edx
mov    %r9d,%r8d
mov    %rax,(%rsp)
call   1040 <mpz_import@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sidh_get_random_mpz>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    $0x14,%edi
call   1030 <sidh_get_random_str@plt>
mov    %rax,(%rsp)
mov    %ebx,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <mpz_import@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @sidh_get_random_mpz(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
store i32 20, i32* %3
%5 = load i32, i32* %3
%6 = call i8* @sidh_get_random_str(i32 %5)
store i8* %6, i8** %4
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = call i32 @mpz_import(i32 %7, i32 %8, i32 1, i32 1, i32 0, i32 0, i8* %9)
ret void
}

LLVM IR (-O2):
define void @sidh_get_random_mpz(i32 %0) {
%2 = tail call i8* @sidh_get_random_str(i32 20)
%3 = tail call i32 @mpz_import(i32 %0, i32 20, i32 1, i32 1, i32 0, i32 0, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ printw(char *, char *);
int /*<<< orphan*/ refresh();
void prompt(int n, char *f, char *s) {
  (void)move(21 + n, 0);
  (void)clrtoeol();
  (void)printw(f, s);
  (void)refresh();
}


x86 assembly (clang, -O0):
<prompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
add    $0x15,%edi
xor    %esi,%esi
call   1060 <move@plt>
mov    $0x0,%al
call   1050 <clrtoeol@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
add    $0x15,%edi
xor    %esi,%esi
call   1060 <move@plt>
xor    %eax,%eax
call   1050 <clrtoeol@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printw@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <refresh@plt>

LLVM IR (-O0):
define void @prompt(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = add nsw i32 21, %7
%9 = call i32 @move(i32 %8, i32 0)
%10 = call i32 (...) @clrtoeol()
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @printw(i8* %11, i8* %12)
%14 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @prompt(i32 %0, i8* %1, i8* %2) {
%4 = add nsw i32 %0, 21
%5 = tail call i32 @move(i32 %4, i32 0)
%6 = tail call i32 (...) @clrtoeol()
%7 = tail call i32 @printw(i8* %1, i8* %2)
%8 = tail call i32 (...) @refresh()
ret void
}
int config_WITH_CARDREADER(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @config_WITH_CARDREADER() {
ret i32 0
}

LLVM IR (-O2):
define i32 @config_WITH_CARDREADER() {
ret i32 0
}
int execlp(name, argv)
char *name, *argv;
{ return (execvp(name, &argv)); }


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

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

LLVM IR (-O0):
define i32 @execlp(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 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execvp to i32 (i8*, i8**, ...)*)(i8* %5, i8** %4)
ret i32 %6
}

LLVM IR (-O2):
define i32 @execlp(i8* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execvp to i32 (i8*, i8**, ...)*)(i8* %0, i8** %3)
ret i32 %4
}
short test_68_2(short *mem) { return __atomic_xor_fetch(mem + 4, -1, 4); }


x86 assembly (clang, -O0):
<test_68_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movw   $0xffff,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    0x8(%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x24(%rbp)
xor    %esi,%edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    1165 <test_68_2+0x65>
jmp    112d <test_68_2+0x2d>
mov    -0x10(%rbp),%cx
mov    -0x1a(%rbp),%ax
xor    %cx,%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_68_2>:
movzwl 0x8(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%ecx
not    %ecx
lock cmpxchg %cx,0x8(%rdi)
jne    1110 <test_68_2+0x10>
not    %eax
ret

LLVM IR (-O0):
define signext i16 @test_68_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 4
store i16 -1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw xor i16* %6, i16 %7 acq_rel
%9 = xor i16 %8, %7
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @test_68_2(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 4
%3 = atomicrmw xor i16* %2, i16 -1 acq_rel
%4 = xor i16 %3, -1
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void foo(unsigned short x) {
  signed char y = -1;
  if (x == y)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movb   $0xff,-0x3(%rbp)
movzwl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
jne    113a <foo+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
store i8 -1, i8* %3
%4 = load i16, i16* %2
%5 = zext i16 %4 to i32
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %5, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @foo(i16 zeroext %0) {
ret void
}
/* Variables and functions */
int symlink(char const *, char const *);
int octave_symlink_wrapper(const char *nm1, const char *nm2) {
  return symlink(nm1, nm2);
}


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

x86 assembly (clang, -O2):
<octave_symlink_wrapper>:
jmp    1030 <symlink@plt>

LLVM IR (-O0):
define i32 @octave_symlink_wrapper(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 i32 @symlink(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @octave_symlink_wrapper(i8* %0, i8* %1) {
%3 = tail call i32 @symlink(i8* %0, i8* %1)
ret i32 %3
}
int hex_to_int(char c) {
  int first = c / 16 - 3;
  int second = c % 16;
  int result = first * 10 + second;
  if (result > 9)
    result--;
  return result;
}


x86 assembly (clang, -O0):
<hex_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
imul   $0xa,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jle    1148 <hex_to_int+0x48>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_to_int>:
mov    %edi,%eax
sar    $0x7,%al
shr    $0x4,%al
add    %dil,%al
mov    %eax,%ecx
and    $0xf0,%cl
sub    %cl,%dil
sar    $0x4,%al
movzbl %al,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
movsbl %al,%ecx
add    $0xe2,%dil
movsbl %dil,%eax
add    %ecx,%eax
xor    %ecx,%ecx
cmp    $0xa,%eax
setge  %cl
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hex_to_int(i8 signext %0) {
%2 = sdiv i8 %0, 16
%3 = srem i8 %0, 16
%4 = mul nsw i8 %2, 10
%5 = sext i8 %4 to i32
%6 = add nsw i8 %3, -30
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, %5
%9 = icmp sgt i32 %8, 9
%10 = sext i1 %9 to i32
%11 = add nsw i32 %8, %10
ret i32 %11
}
int is_shortopt(const char *arg) {
  return arg != 0 && arg[0] == '-' && arg[1] != '-' && arg[1] != '\0';
}


x86 assembly (clang, -O0):
<is_shortopt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1154 <is_shortopt+0x54>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <is_shortopt+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
je     1154 <is_shortopt+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_shortopt>:
xor    %eax,%eax
test   %rdi,%rdi
je     111b <is_shortopt+0x1b>
cmpb   $0x2d,(%rdi)
jne    111b <is_shortopt+0x1b>
mov    0x1(%rdi),%cl
cmp    $0x2d,%cl
je     111b <is_shortopt+0x1b>
xor    %eax,%eax
test   %cl,%cl
setne  %al
ret

LLVM IR (-O0):
define i32 @is_shortopt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %23
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %23
11: ; preds = %5
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 45
br i1 %16, label %17, label %23
17: ; preds = %11
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br label %23
23: ; preds = %17, %11, %5, %1
%24 = phi i1 [ false, %11 ], [ false, %5 ], [ false, %1 ], [ %22, %17 ]
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @is_shortopt(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 45
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = icmp ne i8 %8, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %6, %3, %1
%14 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 0, %1 ], [ %12, %10 ]
ret i32 %14
}
/* Variables and functions */
double quantize_255(double);
double quantize_easy(double x, double a, double b) {
  return quantize_255(255.0 * (x - a) / (b - a));
}


x86 assembly (clang, -O0):
<quantize_easy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  0xec7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <quantize_255@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quantize_easy>:
subsd  %xmm1,%xmm0
mulsd  0xee4(%rip),%xmm0
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
jmp    1030 <quantize_255@plt>

LLVM IR (-O0):
define double @quantize_easy(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
%10 = fmul double 2.550000e+02, %9
%11 = load double, double* %6
%12 = load double, double* %5
%13 = fsub double %11, %12
%14 = fdiv double %10, %13
%15 = call double @quantize_255(double %14)
ret double %15
}

LLVM IR (-O2):
define double @quantize_easy(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fmul double %4, 2.550000e+02
%6 = fsub double %2, %1
%7 = fdiv double %5, %6
%8 = tail call double @quantize_255(double %7)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ __aeabi_memset4(void *, size_t, int /*<<< orphan*/);
void __aeabi_memclr4(void *dest, size_t n) { __aeabi_memset4(dest, n, 0); }


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

x86 assembly (clang, -O2):
<__aeabi_memclr4>:
xor    %edx,%edx
jmp    1030 <__aeabi_memset4@plt>

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

LLVM IR (-O2):
define void @__aeabi_memclr4(i8* %0, i64 %1) {
%3 = tail call i32 @__aeabi_memset4(i8* %0, i64 %1, i32 0)
ret void
}
/* Type definitions */
struct list {
  int dummy;
};
struct boper {
  int dummy;
};

/* Variables and functions */
struct list *bins_ror_(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ object_copy(struct boper const *);
struct list *bins_ror(const struct boper *dst, const struct boper *operand,
                      const struct boper *bits) {
  return bins_ror_(object_copy(dst), object_copy(operand), object_copy(bits));
}


x86 assembly (clang, -O0):
<bins_ror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <object_copy@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <object_copy@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <object_copy@plt>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
call   1030 <bins_ror_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bins_ror>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
call   1040 <object_copy@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <object_copy@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1040 <object_copy@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <bins_ror_@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
%struct.boper = type { i32 }
define %struct.list* @bins_ror(%struct.boper* %0, %struct.boper* %1, %struct.boper* %2) {
%4 = alloca %struct.boper*
%5 = alloca %struct.boper*
%6 = alloca %struct.boper*
store %struct.boper* %0, %struct.boper** %4
store %struct.boper* %1, %struct.boper** %5
store %struct.boper* %2, %struct.boper** %6
%7 = load %struct.boper*, %struct.boper** %4
%8 = call i32 @object_copy(%struct.boper* %7)
%9 = load %struct.boper*, %struct.boper** %5
%10 = call i32 @object_copy(%struct.boper* %9)
%11 = load %struct.boper*, %struct.boper** %6
%12 = call i32 @object_copy(%struct.boper* %11)
%13 = call %struct.list* @bins_ror_(i32 %8, i32 %10, i32 %12)
ret %struct.list* %13
}

LLVM IR (-O2):
%struct.list = type { i32 }
%struct.boper = type { i32 }
define %struct.list* @bins_ror(%struct.boper* %0, %struct.boper* %1, %struct.boper* %2) {
%4 = tail call i32 @object_copy(%struct.boper* %0)
%5 = tail call i32 @object_copy(%struct.boper* %1)
%6 = tail call i32 @object_copy(%struct.boper* %2)
%7 = tail call %struct.list* @bins_ror_(i32 %4, i32 %5, i32 %6)
ret %struct.list* %7
}
int Operand_simm7_encode(unsigned int *valp) {
  unsigned imm7_0, simm7_0;
  simm7_0 = *valp;
  imm7_0 = (simm7_0 & 0x7f);
  *valp = imm7_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_simm7_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x7f,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_simm7_encode>:
andl   $0x7f,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_simm7_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 127
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32*, i32** %2
store i32 %9, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_simm7_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 127
store i32 %3, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ weekdays_1();
int main() {
  weekdays_1();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @weekdays_1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @weekdays_1()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR63_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR63_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR63_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
void Close_Input() {}


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

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

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

LLVM IR (-O2):
define void @Close_Input() {
ret void
}
void msleep(unsigned long time) {
  int mtime = time * 10000;
  for (int i = 0; i < mtime; i++)
    ;
}


x86 assembly (clang, -O0):
<msleep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
imul   $0x2710,-0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1139 <msleep+0x39>
jmp    112b <msleep+0x2b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <msleep+0x1a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @msleep(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = mul i64 %5, 10000
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
store i32 0, i32* %4
br label %8
8: ; preds = %13, %1
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %8
br label %13
13: ; preds = %12
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %8
16: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @msleep(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ find_file(char *);
void test_find_file(void) {
  char *filename1 = "Makefile";
  char *filename2 = "settings/__init__.py";
  assert(0 <= find_file(filename1));
  assert(0 <= find_file(filename2));
}


x86 assembly (clang, -O0):
<test_find_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecf(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <find_file@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1040 <find_file@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_find_file>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <find_file@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
mov    %eax,%edi
call   1030 <assert@plt>
lea    0xec7(%rip),%rdi
call   1040 <find_file@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
mov    %eax,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Makefile\00"
@.str.1 = [21 x i8] c"settings/__init__.py\00"
define void @test_find_file() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = call i64 @find_file(i8* %3)
%5 = icmp sle i64 0, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8*, i8** %2
%9 = call i64 @find_file(i8* %8)
%10 = icmp sle i64 0, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"Makefile\00"
@.str.1 = [21 x i8] c"settings/__init__.py\00"
define void @test_find_file() {
%1 = tail call i64 @find_file(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = xor i32 %3, 1
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i64 @find_file(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = lshr i64 %6, 63
%8 = trunc i64 %7 to i32
%9 = xor i32 %8, 1
%10 = tail call i32 @assert(i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void stuck(int unused_sig) {
  printf("Non-blocking, write-only open of FIFO blocked\n");
  cleanup();
  exit(1);
}


x86 assembly (clang, -O0):
<stuck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <cleanup@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<stuck>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <cleanup@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Non-blocking, write-only open of FIFO blocked\0A\00"
define void @stuck(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @cleanup()
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [46 x i8] c"Non-blocking, write-only open of FIFO blocked\00"
define void @stuck(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @cleanup()
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct bytering_head {
  int dummy;
};

/* Variables and functions */
scalar_t__ bytering_full(struct bytering_head *);
int /*<<< orphan*/ bytering_push_nocheck(struct bytering_head *, unsigned char);
int bytering_push(struct bytering_head *r, unsigned char c) {
  if (bytering_full(r))
    return -1;
  bytering_push_nocheck(r, c);
  return 0;
}


x86 assembly (clang, -O0):
<bytering_push>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <bytering_full@plt>
cmp    $0x0,%rax
je     1151 <bytering_push+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <bytering_push+0x45>
mov    -0x10(%rbp),%rdi
movzbl -0x11(%rbp),%esi
call   1030 <bytering_push_nocheck@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytering_push>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <bytering_full@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1148 <bytering_push+0x28>
movzbl %bpl,%esi
mov    %rbx,%rdi
call   1030 <bytering_push_nocheck@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.bytering_head = type { i32 }
define i32 @bytering_push(%struct.bytering_head* %0, i8 zeroext %1) {
%3 = tail call i64 @bytering_full(%struct.bytering_head* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @bytering_push_nocheck(%struct.bytering_head* %0, i8 zeroext %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int __attribute__((no, noclone)) foo(long int addr) {
  int i;
  int **q = (int **)addr;
  *q = &i;
  i = 0;
  bar();
  return i;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lea    -0xc(%rbp),%rcx
mov    %rcx,(%rax)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0x4(%rsp),%rax
mov    %rax,(%rdi)
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
call   1030 <bar@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @foo(i64 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = inttoptr i64 %0 to i32**
store i32* %2, i32** %4
store i32 0, i32* %2
%5 = call i32 (...) @bar()
%6 = load i32, i32* %2
ret i32 %6
}
int SCE_Plane_SameSign(float a, float b) {
  return ((a < 0.0f && b < 0.0f) || (a > 0.0f && b > 0.0f));
}


x86 assembly (clang, -O0):
<SCE_Plane_SameSign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112d <SCE_Plane_SameSign+0x2d>
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
mov    %al,-0x9(%rbp)
ja     115a <SCE_Plane_SameSign+0x5a>
movss  -0x4(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0xa(%rbp)
jbe    1154 <SCE_Plane_SameSign+0x54>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
seta   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCE_Plane_SameSign>:
xorps  %xmm2,%xmm2
ucomiss %xmm0,%xmm2
seta   %al
ucomiss %xmm1,%xmm2
seta   %cl
and    %al,%cl
ucomiss %xmm2,%xmm0
seta   %al
ucomiss %xmm2,%xmm1
seta   %dl
and    %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @SCE_Plane_SameSign(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fcmp olt float %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load float, float* %4
%9 = fcmp olt float %8, 0.000000e+00
br i1 %9, label %18, label %10
10: ; preds = %7, %2
%11 = load float, float* %3
%12 = fcmp ogt float %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load float, float* %4
%15 = fcmp ogt float %14, 0.000000e+00
br label %16
16: ; preds = %13, %10
%17 = phi i1 [ false, %10 ], [ %15, %13 ]
br label %18
18: ; preds = %16, %7
%19 = phi i1 [ true, %7 ], [ %17, %16 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @SCE_Plane_SameSign(float %0, float %1) {
%3 = fcmp olt float %0, 0.000000e+00
%4 = fcmp olt float %1, 0.000000e+00
%5 = and i1 %3, %4
%6 = fcmp ogt float %0, 0.000000e+00
%7 = fcmp ogt float %1, 0.000000e+00
%8 = and i1 %6, %7
%9 = or i1 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
int extract_addr(char *addr_string, struct sockaddr **addr, int port) {}


x86 assembly (clang, -O0):
<extract_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr = type opaque
define i32 @extract_addr(i8* %0, %struct.sockaddr** %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.sockaddr**
%7 = alloca i32
store i8* %0, i8** %5
store %struct.sockaddr** %1, %struct.sockaddr*** %6
store i32 %2, i32* %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
%struct.sockaddr = type opaque
define i32 @extract_addr(i8* nocapture readnone %0, %struct.sockaddr** nocapture readnone %1, i32 %2) {
ret i32 undef
}
/* Variables and functions */
int brackets2(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("%d\n", brackets2("({[}])})"));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <brackets2@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [9 x i8] c"({[}])})\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @brackets2(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void __attribute__((destructor)) trace_end(void) {}


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

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

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @trace_end, i8* null }]
define void @trace_end() {
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @trace_end, i8* null }]
define void @trace_end() {
ret void
}
void __mmdrop(struct mm_struct *mm) { return; }


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @__mmdrop(%struct.mm_struct* nocapture %0) {
ret void
}
int f10(v) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f10(i32 %0) {
ret i32 0
}
long call_with_2_arg(int (*func)(), int argc, char **argv) {
  long ret;
  __asm__ __volatile__("movq %3,%%rsi\n\t"
                       "movq %2,%%rdi\n\t"
                       "xor %%rax,%%rax\n\t"
                       "call *%1\n\t"
                       "movq %%rax, %0"
                       : "=r"(ret)
                       : "r"(func), "m"(argv[3]), "m"(argv[4])
                       : "rax", "rcx", "rsi", "rdi");
  return ret;
}


x86 assembly (clang, -O0):
<call_with_2_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%r8
add    $0x18,%r8
mov    -0x18(%rbp),%r9
add    $0x20,%r9
mov    (%r9),%rsi
mov    (%r8),%rdi
xor    %rax,%rax
call   *%rdx
mov    %rax,%rdx
mov    %rdx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_with_2_arg>:
mov    %rdi,%r8
mov    0x20(%rdx),%rsi
mov    0x18(%rdx),%rdi
xor    %rax,%rax
call   *%r8
mov    %rax,%rdx
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @call_with_2_arg(i32 (...)* %0, i32 %1, i8** %2) {
%4 = alloca i32 (...)*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i64
store i32 (...)* %0, i32 (...)** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%8 = load i32 (...)*, i32 (...)** %4
%9 = load i8**, i8*** %6
%10 = getelementptr inbounds i8*, i8** %9, i64 3
%11 = load i8**, i8*** %6
%12 = getelementptr inbounds i8*, i8** %11, i64 4
%13 = call i64 asm sideeffect "movq $3,%rsi\0A\09movq $2,%rdi\0A\09xor %rax,%rax\0A\09call *$1\0A\09movq %rax, $0", "=r,r,*m,*m,~{rax},~{rcx},~{rsi},~{rdi},~{dirflag},~{fpsr},~{flags}"(i32 (...)* %8, i8** elementtype(i8*) %10, i8** elementtype(i8*) %12)
store i64 %13, i64* %7
%14 = load i64, i64* %7
ret i64 %14
}

LLVM IR (-O2):
define i64 @call_with_2_arg(i32 (...)* %0, i32 %1, i8** %2) {
%4 = getelementptr inbounds i8*, i8** %2, i64 3
%5 = getelementptr inbounds i8*, i8** %2, i64 4
%6 = tail call i64 asm sideeffect "movq $3,%rsi\0A\09movq $2,%rdi\0A\09xor %rax,%rax\0A\09call *$1\0A\09movq %rax, $0", "=r,r,*m,*m,~{rax},~{rcx},~{rsi},~{rdi},~{dirflag},~{fpsr},~{flags}"(i32 (...)* %0, i8** elementtype(i8*) %4, i8** elementtype(i8*) %5)
ret i64 %6
}
void equeue_event_delay(void *event, int ms) {}


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

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

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

LLVM IR (-O2):
define void @equeue_event_delay(i8* nocapture %0, i32 %1) {
ret void
}
void set_b(int x) {
  int abc[3];
  abc[1] = x;
}


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

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

LLVM IR (-O0):
define void @set_b(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
store i32 %4, i32* %5
ret void
}

LLVM IR (-O2):
define void @set_b(i32 %0) {
ret void
}
void target2(int *p) {}


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

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

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

LLVM IR (-O2):
define void @target2(i32* nocapture %0) {
ret void
}
void gtk_action_get_sensitive() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_get_sensitive() {
ret void
}
/* Variables and functions */
int getuid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", getuid());
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print(char *input, char *output) { printf(" %s\n %s\n", input, output); }


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

x86 assembly (clang, -O2):
<print>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" %s\0A %s\0A\00"
define void @print(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 i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c" %s\0A %s\0A\00"
define void @print(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *const, char *, int);
int strlen(char *);
void unserial_string(uint8_t **const ptr, char *const str) {
  int len = strlen((char *)*ptr) + 1;
  memcpy(str, (char *)*ptr, len);
  *ptr += len;
}


x86 assembly (clang, -O0):
<unserial_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unserial_string>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <strlen@plt>
mov    %eax,%r15d
lea    0x1(%r15),%edx
mov    (%rbx),%rsi
mov    %r14,%rdi
call   1040 <memcpy@plt>
mov    (%rbx),%rax
movslq %r15d,%rcx
lea    (%rax,%rcx,4),%rax
add    $0x4,%rax
mov    %rax,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @unserial_string(i32** %0, i8* %1) {
%3 = alloca i32**
%4 = alloca i8*
%5 = alloca i32
store i32** %0, i32*** %3
store i8* %1, i8** %4
%6 = load i32**, i32*** %3
%7 = load i32*, i32** %6
%8 = bitcast i32* %7 to i8*
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %9, 1
store i32 %10, i32* %5
%11 = load i8*, i8** %4
%12 = load i32**, i32*** %3
%13 = load i32*, i32** %12
%14 = bitcast i32* %13 to i8*
%15 = load i32, i32* %5
%16 = call i32 @memcpy(i8* %11, i8* %14, i32 %15)
%17 = load i32, i32* %5
%18 = load i32**, i32*** %3
%19 = load i32*, i32** %18
%20 = sext i32 %17 to i64
%21 = getelementptr inbounds i32, i32* %19, i64 %20
store i32* %21, i32** %18
ret void
}

LLVM IR (-O2):
define void @unserial_string(i32** nocapture %0, i8* %1) {
%3 = bitcast i32** %0 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = load i8*, i8** %3
%8 = tail call i32 @memcpy(i8* %1, i8* %7, i32 %6)
%9 = load i32*, i32** %0
%10 = sext i32 %6 to i64
%11 = getelementptr inbounds i32, i32* %9, i64 %10
store i32* %11, i32** %0
ret void
}