xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
void outtab() { outbyte('\t'); }


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

x86 assembly (clang, -O2):
<outtab>:
mov    $0x9,%edi
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define void @outtab() {
%1 = call i32 @outbyte(i8 signext 9)
ret void
}

LLVM IR (-O2):
define void @outtab() {
%1 = tail call i32 @outbyte(i8 signext 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(int);
int main() {
  print(1000);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print(i32 1000)
ret i32 0
}
sum(one, two, three) { print(one + two + three); }


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
add    -0xc(%rbp),%edi
add    -0x10(%rbp),%edi
mov    $0x0,%al
call   1030 <print@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
add    %esi,%edi
add    %edx,%edi
xor    %eax,%eax
jmp    1030 <print@plt>

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %7
%12 = add nsw i32 %10, %11
%13 = call i32 (i32, ...) bitcast (i32 (...)* @print to i32 (i32, ...)*)(i32 %12)
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @print to i32 (i32, ...)*)(i32 %5)
ret i32 undef
}
int lpss_get_controller_info(int dma_type, int index,
                             struct lpss_dma_info *dma_info) {
  return 0;
}


x86 assembly (clang, -O0):
<lpss_get_controller_info>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.lpss_dma_info = type opaque
define i32 @lpss_get_controller_info(i32 %0, i32 %1, %struct.lpss_dma_info* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.lpss_dma_info*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.lpss_dma_info* %2, %struct.lpss_dma_info** %6
ret i32 0
}

LLVM IR (-O2):
%struct.lpss_dma_info = type opaque
define i32 @lpss_get_controller_info(i32 %0, i32 %1, %struct.lpss_dma_info* nocapture readnone %2) {
ret i32 0
}
int bitOr(int x, int y) { return x | y; }


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

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

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

LLVM IR (-O2):
define i32 @bitOr(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int write(int, char *, int);
int writeSerial(int portHandle, char *data, int byteCount) {
  int bytesWritten = write(portHandle, data, byteCount);
  return bytesWritten;
}


x86 assembly (clang, -O0):
<writeSerial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeSerial>:
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @writeSerial(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @write(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @writeSerial(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
void *_sbrk(int);
void *mmap(void *start, int length, int prot, int flags, int fd, int offset) {
  return _sbrk(length);
}


x86 assembly (clang, -O0):
<mmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <_sbrk@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmap>:
mov    %esi,%edi
jmp    1030 <_sbrk@plt>

LLVM IR (-O0):
define i8* @mmap(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %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* %8
%14 = call i8* @_sbrk(i32 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @mmap(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i8* @_sbrk(i32 %1)
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *BN_new();
int /*<<< orphan*/ BN_set_word(int /*<<< orphan*/ *, unsigned int);
BIGNUM *BN_value(unsigned int value) {
  BIGNUM *ret = BN_new();
  BN_set_word(ret, value);
  return ret;
}


x86 assembly (clang, -O0):
<BN_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <BN_set_word@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BN_value>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <BN_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1030 <BN_set_word@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32* @BN_value(i32 %0) {
%2 = tail call i32* (...) @BN_new()
%3 = tail call i32 @BN_set_word(i32* %2, i32 %0)
ret i32* %2
}
float reverse_float(float x) {
  float y;
  char *src = (char *)&x;
  char *targ = (char *)&y;
  targ[0] = src[3];
  targ[1] = src[2];
  targ[2] = src[1];
  targ[3] = src[0];
  return y;
}


x86 assembly (clang, -O0):
<reverse_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_float>:
movd   %xmm0,%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @reverse_float(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i8*
%5 = alloca i8*
store float %0, float* %2
%6 = bitcast float* %2 to i8*
store i8* %6, i8** %4
%7 = bitcast float* %3 to i8*
store i8* %7, i8** %5
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 3
%10 = load i8, i8* %9
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 0
%25 = load i8, i8* %24
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
%28 = load float, float* %3
ret float %28
}

LLVM IR (-O2):
define float @reverse_float(float %0) {
%2 = bitcast float %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = bitcast i32 %3 to float
ret float %4
}
void vmk_AssertNoSPLocksHeldIRQ(void) {}


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

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

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

LLVM IR (-O2):
define void @vmk_AssertNoSPLocksHeldIRQ() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ killprot_sigalrm(int /*<<< orphan*/);
void killprot_alarm(int sec) {
  if (sec <= 0)
    killprot_sigalrm(SIGALRM);
  else
    alarm(sec);
}


x86 assembly (clang, -O0):
<killprot_alarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1148 <killprot_alarm+0x28>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <killprot_sigalrm@plt>
jmp    1150 <killprot_alarm+0x30>
mov    -0x4(%rbp),%edi
call   1030 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killprot_alarm>:
test   %edi,%edi
jle    1129 <killprot_alarm+0x9>
jmp    1030 <alarm@plt>
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
jmp    1040 <killprot_sigalrm@plt>

LLVM IR (-O0):
@SIGALRM = global i32 0
define void @killprot_alarm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @SIGALRM
%7 = call i32 @killprot_sigalrm(i32 %6)
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @alarm(i32 %9)
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
define void @killprot_alarm(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @SIGALRM
%5 = tail call i32 @killprot_sigalrm(i32 %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @alarm(i32 %0)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
size_t strlen(char const *);
size_t htx_strlen(const char *string) { return strlen(string); }


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

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

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

LLVM IR (-O2):
define i64 @htx_strlen(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %2
}
int this_function_never_returns() {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<this_function_never_returns>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <this_function_never_returns+0x9>
jmp    1109 <this_function_never_returns+0x9>

x86 assembly (clang, -O2):
<this_function_never_returns>:
jmp    1100 <this_function_never_returns>

LLVM IR (-O0):
define i32 @this_function_never_returns() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define i32 @this_function_never_returns() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzSlice_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_REQUP(int);
int /*<<< orphan*/ TRACE_FOLLOW_THREAD(int, int /*<<< orphan*/);
void BrzSlice_requp(struct comp *comp, int port) {
  struct BrzSlice_ *c = (struct BrzSlice_ *)comp;
  TRACE_FOLLOW_THREAD(1, 0);
  SEND_REQUP(1);
}


x86 assembly (clang, -O0):
<BrzSlice_requp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <TRACE_FOLLOW_THREAD@plt>
mov    $0x1,%edi
call   1040 <SEND_REQUP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzSlice_requp>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <TRACE_FOLLOW_THREAD@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <SEND_REQUP@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzSlice_ = type { i32 }
define void @BrzSlice_requp(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzSlice_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzSlice_*
store %struct.BrzSlice_* %7, %struct.BrzSlice_** %5
%8 = call i32 @TRACE_FOLLOW_THREAD(i32 1, i32 0)
%9 = call i32 @SEND_REQUP(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzSlice_requp(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @TRACE_FOLLOW_THREAD(i32 1, i32 0)
%4 = tail call i32 @SEND_REQUP(i32 1)
ret void
}
/* Type definitions */
typedef unsigned long uint64_t;

/* Variables and functions */
long double long_double_min(void) {
  union {
    uint64_t bits[2];
    long double d;
  } long_double_repr;
  long_double_repr.bits[0] = ~0;
  long_double_repr.bits[1] = ~1UL;
  return long_double_repr.d;
}


x86 assembly (clang, -O0):
<long_double_min>:
push   %rbp
mov    %rsp,%rbp
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
movq   $0xfffffffffffffffe,-0x8(%rbp)
ff
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_double_min>:
fldt   0xefa(%rip)
ret

LLVM IR (-O0):
%union.anon = type { x86_fp80 }
define x86_fp80 @long_double_min() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to [2 x i64]*
%3 = getelementptr inbounds [2 x i64], [2 x i64]* %2, i64 0, i64 0
store i64 -1, i64* %3
%4 = bitcast %union.anon* %1 to [2 x i64]*
%5 = getelementptr inbounds [2 x i64], [2 x i64]* %4, i64 0, i64 1
store i64 -2, i64* %5
%6 = bitcast %union.anon* %1 to x86_fp80*
%7 = load x86_fp80, x86_fp80* %6
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @long_double_min() {
ret x86_fp80 0xKFFFEFFFFFFFFFFFFFFFF
}
/* Variables and functions */
int /*<<< orphan*/ i430vx_write(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/ *);
void i430vx_pci_reset(void) { i430vx_write(0, 0x59, 0xf, NULL); }


x86 assembly (clang, -O0):
<i430vx_pci_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <i430vx_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i430vx_pci_reset>:
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %ecx,%ecx
jmp    1030 <i430vx_write@plt>

LLVM IR (-O0):
define void @i430vx_pci_reset() {
%1 = call i32 @i430vx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}

LLVM IR (-O2):
define void @i430vx_pci_reset() {
%1 = tail call i32 @i430vx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}
/* Variables and functions */
size_t integer_log(size_t n) {
  size_t ret = 0;
  --n;
  while (n > 0) {
    n >>= 1;
    ++ret;
  }
  return ret;
}


x86 assembly (clang, -O0):
<integer_log>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jbe    1144 <integer_log+0x44>
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <integer_log+0x1c>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_log>:
xor    %eax,%eax
add    $0xffffffffffffffff,%rdi
je     1120 <integer_log+0x20>
mov    %rdi,%rcx
nopl   0x0(%rax,%rax,1)
shr    %rcx
add    $0x1,%rax
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <integer_log+0x10>
ret

LLVM IR (-O0):
define i64 @integer_log(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
%4 = load i64, i64* %2
%5 = add i64 %4, -1
store i64 %5, i64* %2
br label %6
6: ; preds = %9, %1
%7 = load i64, i64* %2
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i64, i64* %2
%11 = lshr i64 %10, 1
store i64 %11, i64* %2
%12 = load i64, i64* %3
%13 = add i64 %12, 1
store i64 %13, i64* %3
br label %6
14: ; preds = %6
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
define i64 @integer_log(i64 %0) {
%2 = add i64 %0, -1
%3 = icmp eq i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i64 [ %7, %4 ], [ %2, %1 ]
%7 = lshr i64 %6, 1
%8 = add nuw nsw i64 %5, 1
%9 = icmp ult i64 %6, 2
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ text_out(char *);
void style_bold() { text_out("\x1b[1m"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[1m\00"
define void @style_bold() {
%1 = call i32 @text_out(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[1m\00"
define void @style_bold() {
%1 = tail call i32 @text_out(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ stamp2dos(unsigned char *, unsigned char *);
void label_to_dos(unsigned char *cpm_dirent, unsigned char *dos_dirent) {
  memcpy(dos_dirent, cpm_dirent + 1, 11);
  dos_dirent[11] = 8;
  stamp2dos(cpm_dirent + 24, dos_dirent + 22);
}


x86 assembly (clang, -O0):
<label_to_dos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    $0xb,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
movb   $0x8,0xb(%rax)
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
mov    -0x10(%rbp),%rsi
add    $0x16,%rsi
call   1040 <stamp2dos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<label_to_dos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x1(%rdi),%rsi
mov    %rbx,%rdi
mov    $0xb,%edx
call   1030 <memcpy@plt>
movb   $0x8,0xb(%rbx)
add    $0x18,%r14
add    $0x16,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <stamp2dos@plt>

LLVM IR (-O0):
define void @label_to_dos(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = call i32 @memcpy(i8* %5, i8* %7, i32 11)
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 11
store i8 8, i8* %10
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 24
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 22
%15 = call i32 @stamp2dos(i8* %12, i8* %14)
ret void
}

LLVM IR (-O2):
define void @label_to_dos(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = tail call i32 @memcpy(i8* %1, i8* %3, i32 11)
%5 = getelementptr inbounds i8, i8* %1, i64 11
store i8 8, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 24
%7 = getelementptr inbounds i8, i8* %1, i64 22
%8 = tail call i32 @stamp2dos(i8* %6, i8* %7)
ret void
}
unsigned int GetPredictionPeriodOfG723(const void *pIvrPlay) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @GetPredictionPeriodOfG723(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
off_t lseek(int fd, off_t offset, int whence) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<lseek>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _dbg(char *, ...);
int /*<<< orphan*/ sysGetPsiSize();
int /*<<< orphan*/ sysPersistentSet(char *, int, int /*<<< orphan*/);
int write_flash(char *buf) {
  if (0)
    _dbg("RW_PARTITION_SIZE: %x\n", (1024 * 16));
  if (0)
    _dbg("sysGetPsiSize(): %d\n", sysGetPsiSize());
  if (0)
    _dbg("flashing...\n");
  sysPersistentSet(buf, (1024 * 16), 0);
  return 1;
}


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

x86 assembly (clang, -O2):
<write_flash>:
push   %rax
mov    $0x4000,%esi
xor    %edx,%edx
call   1030 <sysPersistentSet@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @write_flash(i8* %0) {
%2 = tail call i32 @sysPersistentSet(i8* %0, i32 16384, i32 0)
ret i32 1
}
void RTLatin1ToUtf8Tag(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
short fgetword(FILE *file) {
  unsigned char b[2];
  fread(b, 1, 2, file);
  return ((unsigned long)b[1] << 8) | b[0];
}


x86 assembly (clang, -O0):
<fgetword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
movzbl -0x9(%rbp),%eax
shl    $0x8,%rax
movzbl -0xa(%rbp),%ecx
or     %rcx,%rax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetword>:
push   %rax
mov    %rdi,%rcx
lea    0x6(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
movzwl 0x6(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @fgetword(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 1, i32 2, i32* %5)
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = shl i64 %9, 8
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = or i64 %10, %13
%15 = trunc i64 %14 to i16
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @fgetword(i32* nocapture %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 1, i32 2, i32* %0)
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = shl nuw i16 %7, 8
%9 = load i8, i8* %3
%10 = zext i8 %9 to i16
%11 = or i16 %8, %10
ret i16 %11
}
/* Variables and functions */
double *double_alloc(int);
double **double_alloc2p(int);
double **double_alloc2(int n, int m) {
  double **v;
  int i;
  v = double_alloc2p(n);
  for (i = 0; i < n; i++)
    v[i] = double_alloc(m);
  return v;
}


x86 assembly (clang, -O0):
<double_alloc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <double_alloc2p@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1172 <double_alloc2+0x52>
mov    -0x8(%rbp),%edi
call   1030 <double_alloc@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <double_alloc2+0x21>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_alloc2>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r15d
mov    %edi,%r14d
call   1040 <double_alloc2p@plt>
mov    %rax,%r12
test   %r14d,%r14d
jle    1155 <double_alloc2+0x35>
mov    %r14d,%ebp
xor    %ebx,%ebx
mov    %r15d,%edi
call   1030 <double_alloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <double_alloc2+0x20>
mov    %r12,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define double** @double_alloc2(i32 %0, i32 %1) {
%3 = tail call double** @double_alloc2p(i32 %0)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %11, %7 ]
%9 = tail call double* @double_alloc(i32 %1)
%10 = getelementptr inbounds double*, double** %3, i64 %8
store double* %9, double** %10
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %6
br i1 %12, label %13, label %7
13: ; preds = %7, %2
ret double** %3
}
void PrefetchData(void *Addr) {}


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

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

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

LLVM IR (-O2):
define void @PrefetchData(i8* nocapture %0) {
ret void
}
int bcd(int value) { return ((((value / 10) % 10) << 4) + (value % 10)); }


x86 assembly (clang, -O0):
<bcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
shl    $0x4,%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
add    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
shr    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
shl    $0x4,%esi
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @bcd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = srem i32 %4, 10
%6 = shl i32 %5, 4
%7 = load i32, i32* %2
%8 = srem i32 %7, 10
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @bcd(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = srem i32 %2, 10
%4 = shl nsw i32 %3, 4
%5 = srem i32 %0, 10
%6 = add nsw i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fatal(char *, int /*<<< orphan*/, int);
void *realloc(void *, size_t);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *erealloc(void *p, size_t n) {
  void *rv;
  if ((rv = realloc(p, n)) == NULL)
    fatal("realloc() failed: ", strerror(errno), 1);
  return rv;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    117c <erealloc+0x4c>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
mov    $0x1,%edx
call   1050 <fatal@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115f <erealloc+0x2f>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%edx
call   1050 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"realloc() failed: \00"
@errno = global i32 0
define i8* @erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @errno
%12 = call i32 @strerror(i32 %11)
%13 = call i32 @fatal(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %12, i32 1)
br label %14
14: ; preds = %10, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [19 x i8] c"realloc() failed: \00"
@errno = global i32 0
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = tail call i32 @strerror(i32 %6)
%8 = tail call i32 @fatal(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7, i32 1)
br label %9
9: ; preds = %5, %2
ret i8* %3
}
void dd_pbl_ios_localytics_session_end() {}


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

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

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

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

/* Variables and functions */
void writeb(uint8_t val, const void *addr) {
  *((volatile uint8_t *)addr) = val;
}


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

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

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

LLVM IR (-O2):
define void @writeb(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
store volatile i32 %0, i32* %3
ret void
}
void XGetErrorDatabaseText() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  u_int32_t l;
  l = 1;
  printf("%u:%d\n", l, sizeof(l));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%u:%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *argv1) { printf("Usage: %s [ file ... ]\n", argv1); }


x86 assembly (clang, -O0):
<usage>:
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):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [24 x i8] c"Usage: %s [ file ... ]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] & 914778474UL) << (unsigned short)7;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      state[0UL] &= state[local1];
      local1++;
    }
    output[0UL] = state[0UL] ^ 912013688UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
and    $0x3686696a,%rax
shl    $0x7,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzwl 0x2(%rcx),%ecx
cmp    %ecx,%eax
jge    115f <RandomFunc+0x5f>
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%ecx
movzwl -0x12(%rbp),%eax
and    %ecx,%eax
mov    %ax,-0x12(%rbp)
mov    -0x14(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x14(%rbp)
jmp    1127 <RandomFunc+0x27>
movzwl -0x12(%rbp),%eax
xor    $0x365c3978,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
shl    $0x7,%eax
and    $0xffffb500,%eax
xor    $0x3978,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = and i64 %10, 914778474
%12 = shl i64 %11, 7
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %23, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i32
%18 = load i16*, i16** %3
%19 = getelementptr inbounds i16, i16* %18, i64 1
%20 = load i16, i16* %19
%21 = zext i16 %20 to i32
%22 = icmp slt i32 %17, %21
br i1 %22, label %23, label %36
23: ; preds = %15
%24 = load i16, i16* %6
%25 = zext i16 %24 to i64
%26 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %25
%27 = load i16, i16* %26
%28 = zext i16 %27 to i32
%29 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%30 = load i16, i16* %29
%31 = zext i16 %30 to i32
%32 = and i32 %31, %28
%33 = trunc i32 %32 to i16
store i16 %33, i16* %29
%34 = load i16, i16* %6
%35 = add i16 %34, 1
store i16 %35, i16* %6
br label %15
36: ; preds = %15
%37 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%38 = load i16, i16* %37
%39 = zext i16 %38 to i64
%40 = xor i64 %39, 912013688
%41 = trunc i64 %40 to i16
%42 = load i16*, i16** %4
%43 = getelementptr inbounds i16, i16* %42, i64 0
store i16 %41, i16* %43
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 7
%5 = and i16 %4, -19200
%6 = xor i16 %5, 14712
store i16 %6, i16* %1
ret void
}
/* Variables and functions */
int M_PI;
double circlePerimeter(double radius) { return 2 * M_PI * radius; }


x86 assembly (clang, -O0):
<circlePerimeter>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed8(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<circlePerimeter>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @circlePerimeter(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i32, i32* @M_PI
%4 = mul nsw i32 2, %3
%5 = sitofp i32 %4 to double
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @circlePerimeter(double %0) {
%2 = load i32, i32* @M_PI
%3 = shl nsw i32 %2, 1
%4 = sitofp i32 %3 to double
%5 = fmul double %4, %0
ret double %5
}
int test_imm_09uint8_mem(unsigned char *val) {
  return ((*val) & (-0x09 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_09uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xfffffff7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_09uint8_mem>:
testb  $0xf7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_09uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -9
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int ck_e(float e) {
  if ((e > 1) || (e < 0)) {
    printf("exponential index %f not between [0,1]\n", e);
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<ck_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
ja     1140 <ck_e+0x30>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    115d <ck_e+0x4d>
movss  -0x8(%rbp),%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1164 <ck_e+0x54>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ck_e>:
push   %rax
ucomiss 0xee8(%rip),%xmm0
ja     1129 <ck_e+0x19>
mov    $0x1,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
ja     1129 <ck_e+0x19>
pop    %rcx
ret
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"exponential index %f not between [0,1]\0A\00"
define i32 @ck_e(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 1.000000e+00
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load float, float* %3
%8 = fcmp olt float %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %6, %1
%10 = load float, float* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), float %10)
store i32 0, i32* %2
br label %13
12: ; preds = %6
store i32 1, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [40 x i8] c"exponential index %f not between [0,1]\0A\00"
define i32 @ck_e(float %0) {
%2 = fcmp ogt float %0, 1.000000e+00
%3 = fcmp olt float %0, 0.000000e+00
%4 = or i1 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), float %0)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int num = __VERIFIER_nondet_int();
  if (num > 5) {
    int *i = NULL;
    *i = 4;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jle    1145 <main+0x35>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 6
tail call void @llvm.assume(i1 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ go_south_east(int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int latitude = 32;
  int longitude = -64;
  go_south_east(&latitude, &longitude);
  printf("Now at [%i,%i]\n", latitude, longitude);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Now at [%i,%i]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 32, i32* %2
store i32 -64, i32* %3
%4 = call i32 @go_south_east(i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Now at [%i,%i]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 32, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 -64, i32* %2
%5 = call i32 @go_south_east(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
int arith_divide_by_zero() {
  int x = 0;
  int y = 5;
  return y / x;
}


x86 assembly (clang, -O0):
<arith_divide_by_zero>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @arith_divide_by_zero() {
ret i32 poison
}
char GetEncoding15() { return 0x7d; }


x86 assembly (clang, -O0):
<GetEncoding15>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7d,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetEncoding15>:
mov    $0x7d,%al
ret

LLVM IR (-O0):
define signext i8 @GetEncoding15() {
ret i8 125
}

LLVM IR (-O2):
define signext i8 @GetEncoding15() {
ret i8 125
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  printf("%s\n", "Hello World!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [13 x i8] c"Hello World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}