xunge/DecIR huggingface dataset:
/* Variables and functions */
long syscall(int, int, int);
long dcac_mask_ops(int optype, int mask) { return syscall(322, optype, mask); }


x86 assembly (clang, -O0):
<dcac_mask_ops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x142,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_mask_ops>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x142,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i64 @dcac_mask_ops(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 = call i64 @syscall(i32 322, i32 %5, i32 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @dcac_mask_ops(i32 %0, i32 %1) {
%3 = tail call i64 @syscall(i32 322, i32 %0, i32 %1)
ret i64 %3
}
int bitParity(int x) {
  int parityTable = (0x69 << 8) | 0x96;
  x ^= x >> 16;
  x ^= x >> 8;
  x ^= x >> 4;
  x &= 0x0F;
  return (parityTable >> x) & 1;
}


x86 assembly (clang, -O0):
<bitParity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x6996,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitParity>:
mov    %edi,%eax
sar    $0x10,%eax
xor    %edi,%eax
mov    %eax,%edx
sar    $0x8,%edx
xor    %eax,%edx
mov    %edx,%ecx
shr    $0x4,%ecx
xor    %edx,%ecx
and    $0xf,%cl
mov    $0x6996,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bitParity(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 27030, i32* %3
%4 = load i32, i32* %2
%5 = ashr i32 %4, 16
%6 = load i32, i32* %2
%7 = xor i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = ashr i32 %8, 8
%10 = load i32, i32* %2
%11 = xor i32 %10, %9
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = ashr i32 %12, 4
%14 = load i32, i32* %2
%15 = xor i32 %14, %13
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = and i32 %16, 15
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %2
%20 = ashr i32 %18, %19
%21 = and i32 %20, 1
ret i32 %21
}

LLVM IR (-O2):
define i32 @bitParity(i32 %0) {
%2 = ashr i32 %0, 16
%3 = xor i32 %2, %0
%4 = ashr i32 %3, 8
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 4
%7 = xor i32 %6, %5
%8 = and i32 %7, 15
%9 = lshr i32 27030, %8
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ japi_seteditable(int, int);
void j_seteditable(int arg0, int arg1) { japi_seteditable(arg0, arg1); }


x86 assembly (clang, -O0):
<j_seteditable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <japi_seteditable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_seteditable>:
jmp    1030 <japi_seteditable@plt>

LLVM IR (-O0):
define void @j_seteditable(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 = call i32 @japi_seteditable(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @j_seteditable(i32 %0, i32 %1) {
%3 = tail call i32 @japi_seteditable(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Expander_Write_Byte(char, int, char);
void Expander_Set_DirectionPort(char ModuleAddress, char Data_) {
  Expander_Write_Byte(ModuleAddress, 0x03, Data_);
}


x86 assembly (clang, -O0):
<Expander_Set_DirectionPort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    $0x3,%esi
movsbl %al,%edi
movsbl -0x2(%rbp),%edx
call   1030 <Expander_Write_Byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Expander_Set_DirectionPort>:
mov    %esi,%edx
mov    $0x3,%esi
jmp    1030 <Expander_Write_Byte@plt>

LLVM IR (-O0):
define void @Expander_Set_DirectionPort(i8 signext %0, i8 signext %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 @Expander_Write_Byte(i8 signext %5, i32 3, i8 signext %6)
ret void
}

LLVM IR (-O2):
define void @Expander_Set_DirectionPort(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @Expander_Write_Byte(i8 signext %0, i32 3, i8 signext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
__attribute__((no)) void mywrite(char *buf, int len) { write(-1, buf, len); }


x86 assembly (clang, -O0):
<mywrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0xffffffff,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mywrite>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
jmp    1030 <write@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ m226_reset();
int /*<<< orphan*/ p16c8init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/);
void m226_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
               uint32_t prgRAMsizeIn, uint8_t *chrROMin,
               uint32_t chrROMsizeIn) {
  p16c8init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
            chrROMsizeIn);
  m226_reset();
}


x86 assembly (clang, -O0):
<m226_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1040 <p16c8init@plt>
mov    $0x0,%al
call   1030 <m226_reset@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @m226_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @p16c8init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 (...) @m226_reset()
ret void
}

LLVM IR (-O2):
define void @m226_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @p16c8init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 (...) @m226_reset()
ret void
}
/* Variables and functions */
char *CRYPTO_malloc(scalar_t__, char const *, int);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *CRYPTO_strdup(const char *str, const char *file, int line) {
  char *ret = CRYPTO_malloc(strlen(str) + 1, file, line);
  strcpy(ret, str);
  return ret;
}


x86 assembly (clang, -O0):
<CRYPTO_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <CRYPTO_malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <CRYPTO_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @CRYPTO_strdup(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i8* @CRYPTO_malloc(i64 %10, i8* %11, i32 %12)
store i8* %13, i8** %7
%14 = load i8*, i8** %7
%15 = load i8*, i8** %4
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %7
ret i8* %17
}

LLVM IR (-O2):
define i8* @CRYPTO_strdup(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @CRYPTO_malloc(i64 %5, i8* %1, i32 %2)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
ret i8* %6
}
__attribute__((no, noclone)) unsigned __int128 t104_2mul(signed char y) {
  signed char x = (-1);
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t104_2mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movb   $0xff,-0x12(%rbp)
movsbq -0x12(%rbp),%r8
mov    %r8,%rax
sar    $0x3f,%rax
mov    %rax,-0x40(%rbp)
movsbq -0x11(%rbp),%rdi
mov    %rdi,%rsi
sar    $0x3f,%rsi
mul    %rdi
mov    %rax,%r11
mov    %edx,%r10d
mov    %r8,%rax
mul    %rdi
mov    %rax,-0x38(%rbp)
add    %rdx,%r11
adc    $0x0,%r10d
mov    %r8,%rax
mul    %rsi
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
mov    %rdx,%r9
mov    -0x38(%rbp),%rdx
add    %r11,%rcx
adc    %r9d,%r10d
mov    %eax,%r9d
mov    %r9d,%eax
imul   %esi,%eax
add    %r10d,%eax
imul   %r9d,%edi
imul   %r8d,%esi
add    %edi,%esi
add    %esi,%eax
and    $0x1,%al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    11a1 <t104_2mul+0x91>
jmp    11a8 <t104_2mul+0x98>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t104_2mul>:
push   %r14
push   %rbx
push   %rax
movslq %edi,%rbx
mov    %rbx,%rax
sar    $0x3f,%rax
xor    %r14d,%r14d
neg    %rbx
sbb    %rax,%r14
test   %dil,%dil
jle    1133 <t104_2mul+0x23>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t104_2mul(i8 signext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i8
%5 = alloca i128
store i8 %0, i8* %3
store i8 -1, i8* %4
%6 = load i8, i8* %4
%7 = load i8, i8* %3
%8 = sext i8 %6 to i129
%9 = sext i8 %7 to i129
%10 = call { i129, i1 } @llvm.smul.with.overflow.i129(i129 %8, i129 %9)
%11 = extractvalue { i129, i1 } %10, 1
%12 = extractvalue { i129, i1 } %10, 0
%13 = trunc i129 %12 to i128
%14 = zext i128 %13 to i129
%15 = icmp ne i129 %12, %14
%16 = or i1 %11, %15
store i128 %13, i128* %5
br i1 %16, label %17, label %19
17: ; preds = %1
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %1
%20 = load i128, i128* %5
store i128 %20, i128* %2
%21 = bitcast i128* %2 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t104_2mul(i8 signext %0) {
%2 = sext i8 %0 to i129
%3 = sub nsw i129 0, %2
%4 = icmp sgt i8 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @bar()
br label %7
7: ; preds = %5, %1
%8 = trunc i129 %3 to i64
%9 = lshr i129 %3, 64
%10 = trunc i129 %9 to i64
%11 = insertvalue { i64, i64 } poison, i64 %8, 0
%12 = insertvalue { i64, i64 } %11, i64 %10, 1
ret { i64, i64 } %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void null_exit(uint8_t id) {}


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

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

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

LLVM IR (-O2):
define void @null_exit(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ zperr1(char *);
garbitch() { zperr1("Garbled data subpacket"); }


x86 assembly (clang, -O0):
<garbitch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <zperr1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"Garbled data subpacket\00"
define i32 @garbitch() {
%1 = alloca i32
%2 = call i32 @zperr1(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [23 x i8] c"Garbled data subpacket\00"
define i32 @garbitch() {
%1 = tail call i32 @zperr1(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
char *hexconv(n, s)
register char *s;
register unsigned n;
{
  *s = 0;
  do {
    *--s = "0123456789abcdef"[n & 15];
  } while ((n >>= 4) != 0);
  return s;
}


x86 assembly (clang, -O0):
<hexconv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0xedd(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jne    1112 <hexconv+0x12>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexconv>:
mov    %rsi,%rax
movb   $0x0,(%rsi)
lea    0xef3(%rip),%rcx
nopl   (%rax)
mov    %edi,%edx
and    $0xf,%edx
movzbl (%rdx,%rcx,1),%edx
mov    %dl,-0x1(%rax)
add    $0xffffffffffffffff,%rax
mov    %edi,%edx
shr    $0x4,%edx
cmp    $0xf,%edi
mov    %edx,%edi
ja     1110 <hexconv+0x10>
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
define i8* @hexconv(i32 %0, i8* writeonly %1) {
store i8 0, i8* %1
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %11, %3 ]
%5 = phi i8* [ %1, %2 ], [ %10, %3 ]
%6 = and i32 %4, 15
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %5, i64 -1
store i8 %9, i8* %10
%11 = lshr i32 %4, 4
%12 = icmp ult i32 %4, 16
br i1 %12, label %13, label %3
13: ; preds = %3
ret i8* %10
}
void *test_anti_range_55(long n) {
  extern void *alloc_anti_range_55(long) __attribute__((alloc_size(1)));
  if (0x7fffffffffffffffL - 1 <= n && n <= 0x7fffffffffffffffL - 1)
    n = 0x7fffffffffffffffL - 1 - 1;
  return alloc_anti_range_55(n);
}


x86 assembly (clang, -O0):
<test_anti_range_55>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
cmp    -0x8(%rbp),%rax
jg     1152 <test_anti_range_55+0x42>
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
cmp    %rax,-0x8(%rbp)
jg     1152 <test_anti_range_55+0x42>
movabs $0x7ffffffffffffffd,%rax
ff ff 7f
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_55@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_55>:
movabs $0x7ffffffffffffffd,%rax
ff ff 7f
lea    0x1(%rax),%rcx
cmp    %rcx,%rdi
cmove  %rax,%rdi
jmp    1030 <alloc_anti_range_55@plt>

LLVM IR (-O0):
define i8* @test_anti_range_55(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sle i64 9223372036854775806, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 9223372036854775806
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 9223372036854775805, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_55(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_55(i64 %0) {
%2 = icmp eq i64 %0, 9223372036854775806
%3 = select i1 %2, i64 9223372036854775805, i64 %0
%4 = tail call i8* @alloc_anti_range_55(i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ eprintf(char *);
void *strdup(void *);
void *estrdup(void *p) {
  void *r;
  r = strdup(p);
  if (!r)
    eprintf("out of memory\n");
  return r;
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <estrdup+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <eprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <estrdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <eprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @estrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @eprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void trancode_5002_(char *buf) { printf("my 5002\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"my 5002\0A\00"
define void @trancode_5002_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"my 5002\00"
define void @trancode_5002_(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
void dv2_mult(double *a, double *b) {
  a[0] += b[0];
  a[1] += b[1];
}


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

x86 assembly (clang, -O2):
<dv2_mult>:
movsd  (%rsi),%xmm0
addsd  (%rdi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
addsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @dv2_mult(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fadd double %10, %7
store double %11, double* %9
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double, double* %16
%18 = fadd double %17, %14
store double %18, double* %16
ret void
}

LLVM IR (-O2):
define void @dv2_mult(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = fadd double %3, %4
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fadd double %7, %9
store double %10, double* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void FreeInt1D(int *s) {
  if (s)
    free((void *)s);
  return;
}


x86 assembly (clang, -O0):
<FreeInt1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <FreeInt1D+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeInt1D>:
test   %rdi,%rdi
je     111a <FreeInt1D+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @FreeInt1D(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = bitcast i32* %0 to i8*
%5 = tail call i32 @free(i8* %4)
br label %6
6: ; preds = %3, %1
ret void
}
unsigned long long variable_shift(unsigned long long x, int i) {
  return x >> i;
}


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

x86 assembly (clang, -O2):
<variable_shift>:
mov    %esi,%ecx
mov    %rdi,%rax
shr    %cl,%rax
ret

LLVM IR (-O0):
define i64 @variable_shift(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = lshr i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @variable_shift(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = lshr i64 %0, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void Object_method(void *this) { printf("%p\n", this); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%p\0A\00"
define void @Object_method(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define void @Object_method(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void mmc5_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @mmc5_shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float const, float const, float const);
void glmPrintVector3f(const float v[3]) {
  printf("[%f,%f,%f]", v[0], v[1], v[2]);
}


x86 assembly (clang, -O0):
<glmPrintVector3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmPrintVector3f>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
movss  0x8(%rdi),%xmm2
lea    0xedb(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"[%f,%f,%f]\00"
define void @glmPrintVector3f(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = load float, float* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %2, float %4, float %6)
ret void
}
/* Variables and functions */
unsigned char setBit(unsigned char, int /*<<< orphan*/, int /*<<< orphan*/);
void xyz_to_gammaN(double x, double y, double z, double g1, double g2,
                   unsigned char T) {
  double temp = 1.0f / (1.0f + z);
  g1 = x * temp;
  g2 = y * temp;
  T = setBit(T, 0, 0);
}


x86 assembly (clang, -O0):
<xyz_to_gammaN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dil,%al
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %al,-0x29(%rbp)
movsd  0xec1(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
movsd  0xeb4(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
xor    %edx,%edx
movzbl -0x29(%rbp),%edi
mov    %edx,%esi
call   1030 <setBit@plt>
mov    %al,-0x29(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xyz_to_gammaN>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <setBit@plt>

LLVM IR (-O0):
define void @xyz_to_gammaN(double %0, double %1, double %2, double %3, double %4, i8 zeroext %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca i8
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store i8 %5, i8* %12
%14 = load double, double* %9
%15 = fadd double 1.000000e+00, %14
%16 = fdiv double 1.000000e+00, %15
store double %16, double* %13
%17 = load double, double* %7
%18 = load double, double* %13
%19 = fmul double %17, %18
store double %19, double* %10
%20 = load double, double* %8
%21 = load double, double* %13
%22 = fmul double %20, %21
store double %22, double* %11
%23 = load i8, i8* %12
%24 = call zeroext i8 @setBit(i8 zeroext %23, i32 0, i32 0)
store i8 %24, i8* %12
ret void
}

LLVM IR (-O2):
define void @xyz_to_gammaN(double %0, double %1, double %2, double %3, double %4, i8 zeroext %5) {
%7 = tail call zeroext i8 @setBit(i8 zeroext %5, i32 0, i32 0)
ret void
}
unsigned char convert_signed_int_to_unsigned_char(signed int x) { return x; }


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

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

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

LLVM IR (-O2):
define zeroext i8 @convert_signed_int_to_unsigned_char(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ term_addch(int /*<<< orphan*/);
void term_addnstr(const char *s, size_t len) {
  size_t i;
  for (i = 0; i < len; i++)
    term_addch(*s++);
}


x86 assembly (clang, -O0):
<term_addnstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115e <term_addnstr+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <term_addch@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <term_addnstr+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_addnstr>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1143 <term_addnstr+0x33>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <term_addch@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <term_addnstr+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @term_addnstr(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %11, %4 ], [ 0, %2 ]
%6 = phi i8* [ %7, %4 ], [ %0, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = tail call i32 @term_addch(i32 %9)
%11 = add nuw i64 %5, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void enomem(void) { errx(2, "Cannot allocate memory."); }


x86 assembly (clang, -O0):
<enomem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
call   1030 <errx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<enomem>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
jmp    1030 <errx@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Cannot allocate memory.\00"
define void @enomem() {
%1 = call i32 @errx(i32 2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Cannot allocate memory.\00"
define void @enomem() {
%1 = tail call i32 @errx(i32 2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ usleep(unsigned int);
void random_sleep(unsigned int max_usecs) {
  int r = rand();
  unsigned int usec;
  usec = r % max_usecs;
  ;
  usleep(usec);
}


x86 assembly (clang, -O0):
<random_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0x4(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_sleep>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
xor    %edx,%edx
div    %ebx
mov    %edx,%edi
pop    %rbx
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @random_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @rand()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = urem i32 %6, %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @usleep(i32 %9)
ret void
}

LLVM IR (-O2):
define void @random_sleep(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = urem i32 %2, %0
%4 = tail call i32 @usleep(i32 %3)
ret void
}
/* Variables and functions */
int isinf(float);
int chpl_macro_float_isinf(float x) { return isinf(x); }


x86 assembly (clang, -O0):
<chpl_macro_float_isinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isinf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_macro_float_isinf>:
jmp    1030 <isinf@plt>

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

LLVM IR (-O2):
define i32 @chpl_macro_float_isinf(float %0) {
%2 = tail call i32 @isinf(float %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO2(int, long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long *);
long int BNCFrontOnOff() {
  long int ii, stat = 99;
  printf("Front panel on/off=1/0 \n");
  scanf("%li", &ii);
  BNCIO2(32, ii);
  return (ii);
}


x86 assembly (clang, -O0):
<BNCFrontOnOff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x63,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rsi
mov    $0x20,%edi
call   1040 <BNCIO2@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCFrontOnOff>:
push   %rax
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rsi
mov    $0x20,%edi
call   1040 <BNCIO2@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Front panel on/off=1/0 \0A\00"
@.str.1 = [4 x i8] c"%li\00"
define i64 @BNCFrontOnOff() {
%1 = alloca i64
%2 = alloca i64
store i64 99, i64* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 @BNCIO2(i32 32, i64 %5)
%7 = load i64, i64* %1
ret i64 %7
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%li\00"
@str = [24 x i8] c"Front panel on/off=1/0 \00"
define i64 @BNCFrontOnOff() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 @BNCIO2(i32 32, i64 %5)
%7 = load i64, i64* %1
ret i64 %7
}
void dv3_division(double *a, double b) {
  a[0] /= b;
  a[1] /= b;
  a[2] /= b;
}


x86 assembly (clang, -O0):
<dv3_division>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv3_division>:
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
divpd  %xmm2,%xmm1
movupd %xmm1,(%rdi)
movsd  0x10(%rdi),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rdi)
ret

LLVM IR (-O0):
define void @dv3_division(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fdiv double %8, %5
store double %9, double* %7
%10 = load double, double* %4
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fdiv double %13, %10
store double %14, double* %12
%15 = load double, double* %4
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i64 2
%18 = load double, double* %17
%19 = fdiv double %18, %15
store double %19, double* %17
ret void
}

LLVM IR (-O2):
define void @dv3_division(double* nocapture %0, double %1) {
%3 = bitcast double* %0 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
%7 = fdiv <2 x double> %4, %6
%8 = bitcast double* %0 to <2 x double>*
store <2 x double> %7, <2 x double>* %8
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = fdiv double %10, %1
store double %11, double* %9
ret void
}
void *wcput(int c, void *cl) {
  unsigned int *s = cl;
  *s++ = c;
  return s;
}


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

x86 assembly (clang, -O2):
<wcput>:
mov    %edi,(%rsi)
lea    0x4(%rsi),%rax
ret

LLVM IR (-O0):
define i8* @wcput(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 i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %3
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i32 1
store i32* %10, i32** %5
store i32 %8, i32* %9
%11 = load i32*, i32** %5
%12 = bitcast i32* %11 to i8*
ret i8* %12
}

LLVM IR (-O2):
define i8* @wcput(i32 %0, i8* writeonly %1) {
%3 = bitcast i8* %1 to i32*
%4 = getelementptr inbounds i8, i8* %1, i64 4
store i32 %0, i32* %3
ret i8* %4
}
int parallel_noreturn(void) {
#pragma acc parallel
  __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<parallel_noreturn>:
push   %rbp
mov    %rsp,%rbp
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<parallel_noreturn>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @parallel_noreturn() {
unreachable
}

LLVM IR (-O2):
define i32 @parallel_noreturn() {
tail call void @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void array_swap(uint32_t a[2]) {
  uint32_t tmp = a[0];
  a[0] = a[1];
  a[1] = tmp;
}


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

x86 assembly (clang, -O2):
<array_swap>:
rolq   $0x20,(%rdi)
ret

LLVM IR (-O0):
define void @array_swap(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %3
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @array_swap(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
store i32 %4, i32* %0
store i32 %2, i32* %3
ret void
}
/* Variables and functions */
int atoi(char const *);
int /*<<< orphan*/ error(int, char *, char const *, int);
int positive_int(const char *str, const char *param_name) {
  int ret = atoi(str);
  if (ret < 0)
    error(1, "Bad param for %s: %d", param_name, ret);
  return ret;
}


x86 assembly (clang, -O0):
<positive_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115e <positive_int+0x3e>
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
lea    0xea7(%rip),%rsi
call   1030 <error@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<positive_int>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <atoi@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1147 <positive_int+0x27>
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1030 <error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Bad param for %s: %d\00"
define i32 @positive_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @atoi(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = call i32 @error(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
br label %14
14: ; preds = %10, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
@.str = [21 x i8] c"Bad param for %s: %d\00"
define i32 @positive_int(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @atoi(i8* %0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
double powf(float, double);
float gamma_709_f(float a) {
  return (a <= 0.018) ? 4.5 * a : 1.099 * powf(a, 0.45) - 0.099;
}


x86 assembly (clang, -O0):
<gamma_709_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1157 <gamma_709_f+0x47>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1186 <gamma_709_f+0x76>
movss  -0x4(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
call   1030 <powf@plt>
movsd  0xe97(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe93(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_709_f>:
push   %rax
movaps %xmm0,%xmm2
cvtss2sd %xmm0,%xmm0
movsd  0xee0(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1148 <gamma_709_f+0x38>
movsd  0xee2(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <powf@plt>
mulsd  0xeda(%rip),%xmm0
addsd  0xeda(%rip),%xmm0
jmp    1150 <gamma_709_f+0x40>
mulsd  0xeb8(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gamma_709_f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ole double %4, 1.800000e-02
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double 4.500000e+00, %8
br label %14
10: ; preds = %1
%11 = load float, float* %2
%12 = call double @powf(float %11, double 4.500000e-01)
%13 = call double @llvm.fmuladd.f64(double 1.099000e+00, double %12, double -9.900000e-02)
br label %14
14: ; preds = %10, %6
%15 = phi double [ %9, %6 ], [ %13, %10 ]
%16 = fptrunc double %15 to float
ret float %16
}

LLVM IR (-O2):
define float @gamma_709_f(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ugt double %2, 1.800000e-02
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = fmul double %2, 4.500000e+00
br label %9
6: ; preds = %1
%7 = tail call double @powf(float %0, double 4.500000e-01)
%8 = tail call double @llvm.fmuladd.f64(double %7, double 1.099000e+00, double -9.900000e-02)
br label %9
9: ; preds = %6, %4
%10 = phi double [ %5, %4 ], [ %8, %6 ]
%11 = fptrunc double %10 to float
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int /*<<< orphan*/, int, int);
void C67_MV(int r, int v) { C67_asm("MV.L", 0, r, v); }


x86 assembly (clang, -O0):
<C67_MV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xed5(%rip),%rdi
xor    %esi,%esi
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_MV>:
mov    %esi,%ecx
mov    %edi,%edx
lea    0xee5(%rip),%rdi
xor    %esi,%esi
jmp    1030 <C67_asm@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"MV.L\00"
define void @C67_MV(i32 %0, i32 %1) {
%3 = tail call i32 @C67_asm(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i32 %0, i32 %1)
ret void
}