xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ chr2init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ chr8init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ prg32init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void m77init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
             uint32_t prgRAMsizeIn, uint8_t *chrROMin, uint32_t chrROMsizeIn) {
  (void)prgRAMin;
  (void)prgRAMsizeIn;
  prg32init(prgROMin, prgROMsizeIn);
  chr2init(chrROMin, chrROMsizeIn);
  chr8init(NULL, 0);
  printf("Mapper 77 inited\n");
}


x86 assembly (clang, -O0):
<m77init>:
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
call   1060 <prg32init@plt>
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1040 <chr2init@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1050 <chr8init@plt>
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m77init>:
push   %rbp
push   %rbx
push   %rax
mov    %r9d,%ebp
mov    %r8,%rbx
call   1060 <prg32init@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <chr2init@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <chr8init@plt>
lea    0xe98(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Mapper 77 inited\0A\00"
define void @m77init(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** %9
%14 = load i32, i32* %10
%15 = load i32*, i32** %7
%16 = load i32, i32* %8
%17 = call i32 @prg32init(i32* %15, i32 %16)
%18 = load i32*, i32** %11
%19 = load i32, i32* %12
%20 = call i32 @chr2init(i32* %18, i32 %19)
%21 = call i32 @chr8init(i32* null, i32 0)
%22 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Mapper 77 inited\00"
define void @m77init(i32* %0, i32 %1, i32* nocapture readnone %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @prg32init(i32* %0, i32 %1)
%8 = tail call i32 @chr2init(i32* %4, i32 %5)
%9 = tail call i32 @chr8init(i32* null, i32 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
char base64_encode_value(char value) {
  static const char encoding[] =
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  unsigned codepos = (unsigned)value;
  if (codepos > sizeof(encoding) - 1)
    return '=';
  return encoding[codepos];
}


x86 assembly (clang, -O0):
<base64_encode_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x40,%rax
jbe    1127 <base64_encode_value+0x27>
movb   $0x3d,-0x1(%rbp)
jmp    1139 <base64_encode_value+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
lea    0xecd(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_encode_value>:
mov    $0x3d,%al
cmp    $0x40,%edi
ja     1113 <base64_encode_value+0x13>
mov    %edi,%eax
lea    0xef0(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
@base64_encode_value.encoding = internal constant [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @base64_encode_value(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = icmp ugt i64 %8, 64
br i1 %9, label %10, label %11
10: ; preds = %1
store i8 61, i8* %2
br label %16
11: ; preds = %1
%12 = load i32, i32* %4
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds [65 x i8], [65 x i8]* @base64_encode_value.encoding, i64 0, i64 %13
%15 = load i8, i8* %14
store i8 %15, i8* %2
br label %16
16: ; preds = %11, %10
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
@base64_encode_value.encoding = internal unnamed_addr constant [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @base64_encode_value(i8 signext %0) {
%2 = sext i8 %0 to i64
%3 = and i64 %2, 4294967295
%4 = icmp ugt i64 %3, 64
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = getelementptr inbounds [65 x i8], [65 x i8]* @base64_encode_value.encoding, i64 0, i64 %3
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %5
%9 = phi i8 [ %7, %5 ], [ 61, %1 ]
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void convertCEGametypeToPC(void *gametype) {
  memcpy(gametype + 0x7C, gametype + 0x9C, 0x18);
  memset(gametype + 0x9C, 0, 0x18);
  memcpy(gametype + 0x94, gametype + 0xD4, 0x08);
  memset(gametype + 0xD4, 0, 0x08);
}


x86 assembly (clang, -O0):
<convertCEGametypeToPC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x7c,%rdi
mov    -0x8(%rbp),%rsi
add    $0x9c,%rsi
mov    $0x18,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
add    $0x9c,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
add    $0x94,%rdi
mov    -0x8(%rbp),%rsi
add    $0xd4,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
add    $0xd4,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertCEGametypeToPC>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x7c,%rdi
lea    0x9c(%rbx),%r14
mov    %r14,%rsi
mov    $0x18,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    0x94(%rbx),%rdi
add    $0xd4,%rbx
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x8,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @convertCEGametypeToPC(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 124
%5 = load i8*, i8** %2
%6 = getelementptr i8, i8* %5, i64 156
%7 = call i32 @memcpy(i8* %4, i8* %6, i32 24)
%8 = load i8*, i8** %2
%9 = getelementptr i8, i8* %8, i64 156
%10 = call i32 @memset(i8* %9, i32 0, i32 24)
%11 = load i8*, i8** %2
%12 = getelementptr i8, i8* %11, i64 148
%13 = load i8*, i8** %2
%14 = getelementptr i8, i8* %13, i64 212
%15 = call i32 @memcpy(i8* %12, i8* %14, i32 8)
%16 = load i8*, i8** %2
%17 = getelementptr i8, i8* %16, i64 212
%18 = call i32 @memset(i8* %17, i32 0, i32 8)
ret void
}

LLVM IR (-O2):
define void @convertCEGametypeToPC(i8* %0) {
%2 = getelementptr i8, i8* %0, i64 124
%3 = getelementptr i8, i8* %0, i64 156
%4 = tail call i32 @memcpy(i8* %2, i8* %3, i32 24)
%5 = tail call i32 @memset(i8* %3, i32 0, i32 24)
%6 = getelementptr i8, i8* %0, i64 148
%7 = getelementptr i8, i8* %0, i64 212
%8 = tail call i32 @memcpy(i8* %6, i8* %7, i32 8)
%9 = tail call i32 @memset(i8* %7, i32 0, i32 8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int getc(FILE *stream __attribute__((unused))) {
  printf("getc\n");
  errno = EBADF;
  return -1;
}


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

x86 assembly (clang, -O2):
<getc>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EBADF = global i32 0
@errno = global i32 0
@str = [5 x i8] c"getc\00"
define i32 @getc(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @EBADF
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
__attribute__((always_)) const float intBitsToFloat(int32_t i) {
  union {
    float f;
    int32_t i;
  } tmp;
  tmp.i = i;
  return tmp.f;
}


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

x86 assembly (clang, -O2):
<intBitsToFloat>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @intBitsToFloat(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @intBitsToFloat(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
/* Variables and functions */
int decagonalnumber(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  printf("%d decagonal number : %d", num, decagonalnumber(num));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeda(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <decagonalnumber@plt>
lea    0xea8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c"%d decagonal number : %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @decagonalnumber(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void test() {
  char x[4];
  char *y = "abcd";
  strcpy(x, y);
}


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

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdi
call   1030 <strcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"abcd\00"
define void @test() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __kmpc_get_target_offload();
int get_target_offload_icv() {
#pragma omp parallel
  {}
  return __kmpc_get_target_offload();
}


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

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

LLVM IR (-O0):
define i32 @get_target_offload_icv() {
%1 = call i32 (...) @__kmpc_get_target_offload()
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_target_offload_icv() {
%1 = tail call i32 (...) @__kmpc_get_target_offload()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ platform_delay_or_gpio_change(int const);
int platform_gpio_read();
int _read_increased_bit(const int delay) {
  int bit = 0;
  bit += (platform_gpio_read() << 1);
  platform_delay_or_gpio_change(delay);
  bit += platform_gpio_read();
  return bit - 1;
}


x86 assembly (clang, -O0):
<_read_increased_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <platform_gpio_read@plt>
shl    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <platform_delay_or_gpio_change@plt>
mov    $0x0,%al
call   1030 <platform_gpio_read@plt>
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read_increased_bit>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <platform_gpio_read@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1040 <platform_delay_or_gpio_change@plt>
xor    %eax,%eax
call   1030 <platform_gpio_read@plt>
lea    (%rax,%r14,2),%eax
add    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @_read_increased_bit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = call i32 (...) @platform_gpio_read()
%5 = shl i32 %4, 1
%6 = load i32, i32* %3
%7 = add nsw i32 %6, %5
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = call i32 @platform_delay_or_gpio_change(i32 %8)
%10 = call i32 (...) @platform_gpio_read()
%11 = load i32, i32* %3
%12 = add nsw i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
ret i32 %14
}

LLVM IR (-O2):
define i32 @_read_increased_bit(i32 %0) {
%2 = tail call i32 (...) @platform_gpio_read()
%3 = shl i32 %2, 1
%4 = tail call i32 @platform_delay_or_gpio_change(i32 %0)
%5 = tail call i32 (...) @platform_gpio_read()
%6 = add i32 %3, -1
%7 = add i32 %6, %5
ret i32 %7
}
int main() {
  int u = 5;
  int v;
  int *pu;
  int *pv;
  pu = &u;
  v = *pu;
  pv = &v;
  printf("\nu = %d  &u = %X  pu = %X  *pu = %d", u, &u, pu, *pu);
  printf("\nv = %d  &v = %X  pv = %X  *pv = %d\n", v, &v, pv, *pv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    (%rax),%r8d
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    (%rax),%r8d
lea    0xeb0(%rip),%rdi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5,0x4(%rsp)
movl   $0x5,(%rsp)
lea    0xed9(%rip),%rdi
lea    0x4(%rsp),%rcx
mov    $0x5,%esi
mov    %rcx,%rdx
mov    $0x5,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    %rsp,%rcx
mov    $0x5,%esi
mov    %rcx,%rdx
mov    $0x5,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"\0Au = %d &u = %X pu = %X *pu = %d\00"
@.str.1 = [37 x i8] c"\0Av = %d &v = %X pv = %X *pv = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32 0, i32* %1
store i32 5, i32* %2
store i32* %2, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
store i32 %7, i32* %3
store i32* %3, i32** %5
%8 = load i32, i32* %2
%9 = load i32*, i32** %4
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %8, i32* %2, i32* %9, i32 %11)
%13 = load i32, i32* %3
%14 = load i32*, i32** %5
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32* %3, i32* %14, i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"\0Au = %d &u = %X pu = %X *pu = %d\00"
@.str.1 = [37 x i8] c"\0Av = %d &v = %X pv = %X *pv = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 5, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 5, i32* %1, i32* %1, i32 5)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 5, i32* %2, i32* %2, i32 5)
ret i32 0
}
/* Variables and functions */
double tan(int /*<<< orphan*/);
int /*<<< orphan*/ toRadians(double);
double tanDegrees(double angle) { return tan(toRadians(angle)); }


x86 assembly (clang, -O0):
<tanDegrees>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <toRadians@plt>
mov    %eax,%edi
call   1030 <tan@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanDegrees>:
push   %rax
call   1040 <toRadians@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <tan@plt>

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

LLVM IR (-O2):
define double @tanDegrees(double %0) {
%2 = tail call i32 @toRadians(double %0)
%3 = tail call double @tan(i32 %2)
ret double %3
}
/* Type definitions */
typedef int uint8_t;
struct pcg_state_8 {
  int dummy;
};

/* Variables and functions */
int pcg_oneseq_8_rxs_m_xs_8_random_r(struct pcg_state_8 *);
uint8_t pcg_oneseq_8_rxs_m_xs_8_boundedrand_r(struct pcg_state_8 *rng,
                                              uint8_t bound) {
  uint8_t threshold = ((uint8_t)(-bound)) % bound;
  for (;;) {
    uint8_t r = pcg_oneseq_8_rxs_m_xs_8_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_oneseq_8_rxs_m_xs_8_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_oneseq_8_rxs_m_xs_8_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_oneseq_8_rxs_m_xs_8_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_oneseq_8_rxs_m_xs_8_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_oneseq_8_rxs_m_xs_8_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_oneseq_8_rxs_m_xs_8_random_r@plt>
test   %eax,%eax
js     1120 <pcg_oneseq_8_rxs_m_xs_8_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_8 = type { i32 }
define i32 @pcg_oneseq_8_rxs_m_xs_8_boundedrand_r(%struct.pcg_state_8* %0, i32 %1) {
%3 = alloca %struct.pcg_state_8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_8* %0, %struct.pcg_state_8** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_8*, %struct.pcg_state_8** %3
%13 = call i32 @pcg_oneseq_8_rxs_m_xs_8_random_r(%struct.pcg_state_8* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_8 = type { i32 }
define i32 @pcg_oneseq_8_rxs_m_xs_8_boundedrand_r(%struct.pcg_state_8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_oneseq_8_rxs_m_xs_8_random_r(%struct.pcg_state_8* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ alias2_OK();
int loop3_bad(int k) {
  for (int i = k; i < k + 15; i++) {
    alias2_OK();
  }
  return 0;
}


x86 assembly (clang, -O0):
<loop3_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0xf,%ecx
cmp    %ecx,%eax
jge    1147 <loop3_bad+0x37>
mov    $0x0,%al
call   1030 <alias2_OK@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1121 <loop3_bad+0x11>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop3_bad>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xe(%rbx),%ebp
add    $0xffffffff,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <alias2_OK@plt>
add    $0x1,%ebx
cmp    %ebp,%ebx
jl     1120 <loop3_bad+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @loop3_bad(i32 %0) {
%2 = add nsw i32 %0, 14
br label %4
3: ; preds = %4
ret i32 0
4: ; preds = %1, %4
%5 = phi i32 [ %0, %1 ], [ %7, %4 ]
%6 = tail call i32 (...) @alias2_OK()
%7 = add nsw i32 %5, 1
%8 = icmp slt i32 %5, %2
br i1 %8, label %4, label %3
}
/* Variables and functions */
int ope_close();
int bcm_close(void) { return ope_close(); }


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

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

LLVM IR (-O0):
define i32 @bcm_close() {
%1 = call i32 (...) @ope_close()
ret i32 %1
}

LLVM IR (-O2):
define i32 @bcm_close() {
%1 = tail call i32 (...) @ope_close()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ IO_get_le16();
int /*<<< orphan*/ put_argument4(char *, int /*<<< orphan*/, char *);
int am_absolute16(void) {
  put_argument4(" L", IO_get_le16(), "");
  return 3;
}


x86 assembly (clang, -O0):
<am_absolute16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <IO_get_le16@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
lea    0xec7(%rip),%rdx
call   1040 <put_argument4@plt>
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<am_absolute16>:
push   %rax
xor    %eax,%eax
call   1030 <IO_get_le16@plt>
lea    0xed1(%rip),%rdi
lea    0xecc(%rip),%rdx
mov    %eax,%esi
call   1040 <put_argument4@plt>
mov    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c" L\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @am_absolute16() {
%1 = call i32 (...) @IO_get_le16()
%2 = call i32 @put_argument4(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}

LLVM IR (-O2):
@.str = [3 x i8] c" L\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @am_absolute16() {
%1 = tail call i32 (...) @IO_get_le16()
%2 = tail call i32 @put_argument4(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}
long double log2l(long double x) {}


x86 assembly (clang, -O0):
<log2l>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define x86_fp80 @log2l(x86_fp80 %0) {
ret x86_fp80 undef
}
/* Variables and functions */
void *MALLOC(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(void *);
void *malloc(int);
int main() {
  void *v = MALLOC(15);
  free(v);
  v = malloc(18);
  free(v);
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf,%edi
call   1050 <MALLOC@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    $0x12,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xf,%edi
call   1050 <MALLOC@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    $0x12,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @MALLOC(i32 15)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @free(i8* %4)
%6 = call i8* @malloc(i32 18)
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8* @MALLOC(i32 15)
%2 = tail call i32 @free(i8* %1)
%3 = tail call dereferenceable_or_null(18) i8* @malloc(i32 18)
%4 = tail call i32 @free(i8* %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x >= 0 || y >= 0) {
    if (x >= 0) {
      x = x - 1;
    } else {
      y = y - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jge    114c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
setge  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    1182 <main+0x72>
cmpl   $0x0,-0x8(%rbp)
jl     1174 <main+0x64>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117d <main+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
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
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 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %23, %0
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 0
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ true, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %24
14: ; preds = %12
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = sub nsw i32 %18, 1
store i32 %19, i32* %2
br label %23
20: ; preds = %14
%21 = load i32, i32* %3
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %3
br label %23
23: ; preds = %20, %17
br label %6
24: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
unsigned int syscall(int, void *);
unsigned int shutdown(void) { return syscall(99, (void *)0); }


x86 assembly (clang, -O0):
<shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x63,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shutdown>:
mov    $0x63,%edi
xor    %esi,%esi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @shutdown() {
%1 = call i32 @syscall(i32 99, i8* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @shutdown() {
%1 = tail call i32 @syscall(i32 99, i8* null)
ret i32 %1
}
/* Variables and functions */
int play(int, int);
int cd_play_range(int start, int end) { return play(start, end); }


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

x86 assembly (clang, -O2):
<cd_play_range>:
jmp    1030 <play@plt>

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

LLVM IR (-O2):
define i32 @cd_play_range(i32 %0, i32 %1) {
%3 = tail call i32 @play(i32 %0, i32 %1)
ret i32 %3
}
void stm32f4_ts_check_boundary(int *var, int boundary) {
  if (*var < 0)
    *var = 0;
  else if (*var > boundary)
    *var = boundary;
  else
    ;
}


x86 assembly (clang, -O0):
<stm32f4_ts_check_boundary>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jge    1127 <stm32f4_ts_check_boundary+0x27>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
jmp    114e <stm32f4_ts_check_boundary+0x4e>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jle    1144 <stm32f4_ts_check_boundary+0x44>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
jmp    1149 <stm32f4_ts_check_boundary+0x49>
jmp    1149 <stm32f4_ts_check_boundary+0x49>
jmp    114e <stm32f4_ts_check_boundary+0x4e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stm32f4_ts_check_boundary>:
mov    (%rdi),%eax
test   %eax,%eax
js     110b <stm32f4_ts_check_boundary+0xb>
cmp    %esi,%eax
jg     110d <stm32f4_ts_check_boundary+0xd>
ret
xor    %esi,%esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @stm32f4_ts_check_boundary(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp slt i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = icmp sgt i32 %3, %1
br i1 %6, label %7, label %9
7: ; preds = %5, %2
%8 = phi i32 [ 0, %2 ], [ %1, %5 ]
store i32 %8, i32* %0
br label %9
9: ; preds = %7, %5
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ address;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bind(int, struct sockaddr *, int);
int errno;
int /*<<< orphan*/ printf(char *, int);
void bind_socket_to_address(int socket, struct sockaddr_in address) {
  if (bind(socket, (struct sockaddr *)&address, sizeof(address)) < 0) {
    printf("BIND FAILURE %i\n", errno);
    abort();
  }
  return;
}


x86 assembly (clang, -O0):
<bind_socket_to_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %esi,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1050 <bind@plt>
cmp    $0x0,%rax
jge    1175 <bind_socket_to_address+0x45>
mov    0x2e80(%rip),%rax
mov    (%rax),%esi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_socket_to_address>:
push   %rax
mov    %esi,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edx
call   1050 <bind@plt>
test   %rax,%rax
js     1148 <bind_socket_to_address+0x18>
pop    %rax
ret
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [17 x i8] c"BIND FAILURE %i\0A\00"
@errno = global i32 0
define void @bind_socket_to_address(i32 %0, i32 %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
store i32 %1, i32* %5
store i32 %0, i32* %4
%6 = load i32, i32* %4
%7 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%8 = call i64 @bind(i32 %6, %struct.sockaddr* %7, i32 4)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @errno
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [17 x i8] c"BIND FAILURE %i\0A\00"
@errno = global i32 0
define void @bind_socket_to_address(i32 %0, i32 %1) {
%3 = alloca %struct.sockaddr_in
%4 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 %1, i32* %4
%5 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%6 = call i64 @bind(i32 %0, %struct.sockaddr* %5, i32 4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @errno
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
                   void *(*start_routine)(void *), void *arg) {
  return 1;
}


x86 assembly (clang, -O0):
<pthread_create>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pthread_create(i32* %0, i32* %1, i8* (i8*)* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8* (i8*)*
%8 = alloca i8*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i8* (i8*)* %2, i8* (i8*)** %7
store i8* %3, i8** %8
ret i32 1
}

LLVM IR (-O2):
define i32 @pthread_create(i32* nocapture readnone %0, i32* nocapture readnone %1, i8* (i8*)* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 1
}
void alien_fixture_test_case_teardown() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ mem_copy_vect2word_little(int /*<<< orphan*/ *,
                                             unsigned char const *);
uint16_t arch_mem_copy_vect2word_little(uint16_t *word,
                                        const unsigned char *v) {
  return mem_copy_vect2word_little(word, v);
}


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

x86 assembly (clang, -O2):
<arch_mem_copy_vect2word_little>:
jmp    1030 <mem_copy_vect2word_little@plt>

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

LLVM IR (-O2):
define i32 @arch_mem_copy_vect2word_little(i32* %0, i8* %1) {
%3 = tail call i32 @mem_copy_vect2word_little(i32* %0, i8* %1)
ret i32 %3
}
int get_short_le(unsigned char **data) {
  int result;
  result = *(*data) | (*((char *)*data + 1) << 8);
  *data += 2;
  return result;
}


x86 assembly (clang, -O0):
<get_short_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_short_le>:
mov    (%rdi),%rcx
movzbl (%rcx),%edx
movsbl 0x1(%rcx),%eax
shl    $0x8,%eax
or     %edx,%eax
add    $0x2,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @get_short_le(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %7, %13
store i32 %14, i32* %3
%15 = load i8**, i8*** %2
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8* %17, i8** %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @get_short_le(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = shl nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %2, i64 2
store i8* %10, i8** %0
ret i32 %9
}
void SSP0_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @SSP0_IRQHandler() {
ret void
}
/* Variables and functions */
char const *weak_s3();
const char *__attribute__((section(".test.c"))) call_weak_s3(void) {
  return weak_s3() + 1;
}


x86 assembly (clang, -O0):
<call_weak_s3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <weak_s3@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_weak_s3>:
push   %rax
xor    %eax,%eax
call   1030 <weak_s3@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_weak_s3() section ".test.c" {
%1 = call i8* (...) @weak_s3()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_weak_s3() section ".test.c" {
%1 = tail call i8* (...) @weak_s3()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
void gtk_about_dialog_get_version() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_get_version() {
ret void
}
const char *fapip_version() { return "0.17"; }


x86 assembly (clang, -O0):
<fapip_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fapip_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"0.17\00"
define i8* @fapip_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"0.17\00"
define i8* @fapip_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int f, num, i;
  printf("Enter a Number : ");
  scanf("%d", &num);
  f = fact(num);
  printf("\nFactorial      : %d\n\n", f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <fact@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <fact@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter a Number : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"\0AFactorial : %d\0A\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @fact(i32 %6)
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter a Number : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"\0AFactorial : %d\0A\0A\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fact(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int PAPI_create_eventset(int *);
void papif_create_eventset__(int *EventSet, int *check) {
  *check = PAPI_create_eventset(EventSet);
}


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

x86 assembly (clang, -O2):
<papif_create_eventset__>:
push   %rbx
mov    %rsi,%rbx
call   1030 <PAPI_create_eventset@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_create_eventset__(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 = call i32 @PAPI_create_eventset(i32* %5)
%7 = load i32*, i32** %4
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @papif_create_eventset__(i32* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @PAPI_create_eventset(i32* %0)
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void instructions(void) {
  printf("Enter your choice:\n"
         "    1 to push a value on the stack.\n"
         "    2 to pop a value off the stack.\n"
         "    3 to end.\n");
}


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

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

LLVM IR (-O0):
@.str = [106 x i8] c"Enter your choice:\0A 1 to push a value on the stack.\0A 2 to pop a value off the stack.\0A 3 to end.\0A\00"
define void @instructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [105 x i8] c"Enter your choice:\0A 1 to push a value on the stack.\0A 2 to pop a value off the stack.\0A 3 to end.\00"
define void @instructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @str, i64 0, i64 0))
ret void
}
void swr_close() {}


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

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

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

LLVM IR (-O2):
define void @swr_close() {
ret void
}
void fb_GfxViewUpdate(void) {}


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

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

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

LLVM IR (-O2):
define void @fb_GfxViewUpdate() {
ret void
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
int add_int_data(struct buffer *, int, unsigned int);
int add_frame_avp(struct buffer *buf, unsigned int frame) {
  return add_int_data(buf, 19, frame);
}


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

x86 assembly (clang, -O2):
<add_frame_avp>:
mov    %esi,%edx
mov    $0x13,%esi
jmp    1030 <add_int_data@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @add_frame_avp(%struct.buffer* %0, i32 %1) {
%3 = alloca %struct.buffer*
%4 = alloca i32
store %struct.buffer* %0, %struct.buffer** %3
store i32 %1, i32* %4
%5 = load %struct.buffer*, %struct.buffer** %3
%6 = load i32, i32* %4
%7 = call i32 @add_int_data(%struct.buffer* %5, i32 19, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @add_frame_avp(%struct.buffer* %0, i32 %1) {
%3 = tail call i32 @add_int_data(%struct.buffer* %0, i32 19, i32 %1)
ret i32 %3
}