xunge/DecIR huggingface dataset:
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
double _timespec_to_double(const struct timespec *__restrict ts) {
  return (double)ts->tv_sec + ts->tv_nsec / 1e9;
}


x86 assembly (clang, -O0):
<_timespec_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2sdq 0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0xede(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_timespec_to_double>:
cvtsi2sdq 0x8(%rdi),%xmm1
cvtsi2sdl (%rdi),%xmm0
divsd  0xeee(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define double @_timespec_to_double(%struct.timespec* noalias %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 1.000000e+09
%12 = fadd double %6, %11
ret double %12
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define double @_timespec_to_double(%struct.timespec* noalias nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to double
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 1.000000e+09
%9 = fadd double %8, %4
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glGetTexGenfv_size(int /*<<< orphan*/);
GLint __glGetTexGeniv_size(GLenum pname) { return __glGetTexGenfv_size(pname); }


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

x86 assembly (clang, -O2):
<__glGetTexGeniv_size>:
jmp    1030 <__glGetTexGenfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glGetTexGeniv_size(i32 %0) {
%2 = tail call i32 @__glGetTexGenfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void socket_close(int sockfd) {
  if (sockfd >= 0)
    close(sockfd);
}


x86 assembly (clang, -O0):
<socket_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     112d <socket_close+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_close>:
test   %edi,%edi
js     1119 <socket_close+0x9>
jmp    1030 <close@plt>
ret

LLVM IR (-O0):
define void @socket_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @socket_close(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t DE1_SOC_WM8731_REG_ADDRESS(uint8_t addr, uint16_t data) {
  return (addr << 1) | ((data >> 8) & 0x1);
}


x86 assembly (clang, -O0):
<DE1_SOC_WM8731_REG_ADDRESS>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
and    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DE1_SOC_WM8731_REG_ADDRESS>:
shr    $0x8,%esi
and    $0x1,%esi
lea    (%rsi,%rdi,2),%eax
ret

LLVM IR (-O0):
define i32 @DE1_SOC_WM8731_REG_ADDRESS(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 = shl i32 %5, 1
%7 = load i32, i32* %4
%8 = ashr i32 %7, 8
%9 = and i32 %8, 1
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @DE1_SOC_WM8731_REG_ADDRESS(i32 %0, i32 %1) {
%3 = shl i32 %0, 1
%4 = lshr i32 %1, 8
%5 = and i32 %4, 1
%6 = or i32 %5, %3
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ GENERAL_NAME;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ GENERAL_NAME_it;
GENERAL_NAME *d2i_GENERAL_NAME(GENERAL_NAME **a, const unsigned char **in,
                               long len) {
  return (GENERAL_NAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                       &GENERAL_NAME_it);
}


x86 assembly (clang, -O0):
<d2i_GENERAL_NAME>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2ea9(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_GENERAL_NAME>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@GENERAL_NAME_it = global i32 0
define i32* @d2i_GENERAL_NAME(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @GENERAL_NAME_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@GENERAL_NAME_it = global i32 0
define i32* @d2i_GENERAL_NAME(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @GENERAL_NAME_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
char *trim_extra(char *, size_t *const, char *);
char *trim(char *buffer, size_t *const length) {
  return trim_extra(buffer, length, "");
}


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @trim(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
%5 = load i8*, i8** %3
%6 = load i64*, i64** %4
%7 = call i8* @trim_extra(i8* %5, i64* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @trim(i8* %0, i64* %1) {
%3 = tail call i8* @trim_extra(i8* %0, i64* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
void uninitvar_gets(void) {
  char *buffer;
  (void)gets(buffer);
}


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

x86 assembly (clang, -O2):
<uninitvar_gets>:
jmp    1030 <gets@plt>

LLVM IR (-O0):
define void @uninitvar_gets() {
%1 = alloca i8*
%2 = load i8*, i8** %1
%3 = call i32 @gets(i8* %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_gets() {
%1 = tail call i32 @gets(i8* undef)
ret void
}
char *xrealloc(ptr, size)
char *ptr;
unsigned size;
{
  char *result = (char *)realloc(ptr, size);
  if (!result)
    fatal("virtual memory exhausted", 0);
  return result;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115c <xrealloc+0x3c>
lea    0xead(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <fatal@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %esi,%esi
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <xrealloc+0x20>
lea    0xec9(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = call i8* @realloc(i8* %6, i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xrealloc(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = tail call i8* @realloc(i8* %0, i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
scalar_t__ hash_1d(int /*<<< orphan*/);
float float_hash_1d(ptrdiff_t x) { return ((float)hash_1d(x)) / ((float)0xff); }


x86 assembly (clang, -O0):
<float_hash_1d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <hash_1d@plt>
cvtsi2ss %rax,%xmm0
movss  0xed0(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_hash_1d>:
push   %rax
call   1030 <hash_1d@plt>
cvtsi2ss %rax,%xmm0
divss  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @float_hash_1d(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @hash_1d(i32 %3)
%5 = sitofp i64 %4 to float
%6 = fdiv float %5, 2.550000e+02
ret float %6
}

LLVM IR (-O2):
define float @float_hash_1d(i32 %0) {
%2 = tail call i64 @hash_1d(i32 %0)
%3 = sitofp i64 %2 to float
%4 = fdiv float %3, 2.550000e+02
ret float %4
}
int fs_dummy(void) { return -5; }


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

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

LLVM IR (-O0):
define i32 @fs_dummy() {
ret i32 -5
}

LLVM IR (-O2):
define i32 @fs_dummy() {
ret i32 -5
}
/* Variables and functions */
int /*<<< orphan*/ readlink(char *, char *, size_t);
char *strrchr(char *, char);
void getWorkingDirectory(char *buffer, size_t size) {
  readlink("/proc/self/exe", buffer, size);
  char *last_path;
  last_path = strrchr(buffer, '/');
  ++last_path;
  *last_path = '\0';
}


x86 assembly (clang, -O0):
<getWorkingDirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <readlink@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWorkingDirectory>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xed2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <readlink@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
movb   $0x0,0x1(%rax)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/proc/self/exe\00"
define void @getWorkingDirectory(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 i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6, i64 %7)
%9 = load i8*, i8** %3
%10 = call i8* @strrchr(i8* %9, i8 signext 47)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %5
%13 = load i8*, i8** %5
store i8 0, i8* %13
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"/proc/self/exe\00"
define void @getWorkingDirectory(i8* %0, i64 %1) {
%3 = tail call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %5
ret void
}
void halt_non_edge_triggered_signals(void) {}


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

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

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

LLVM IR (-O2):
define void @halt_non_edge_triggered_signals() {
ret void
}
/* Variables and functions */
int rc_gpio_set_value_mmap(int, int);
int rc_enable_servo_power_rail() { return rc_gpio_set_value_mmap(80, 1); }


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

x86 assembly (clang, -O2):
<rc_enable_servo_power_rail>:
mov    $0x50,%edi
mov    $0x1,%esi
jmp    1030 <rc_gpio_set_value_mmap@plt>

LLVM IR (-O0):
define i32 @rc_enable_servo_power_rail() {
%1 = call i32 @rc_gpio_set_value_mmap(i32 80, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @rc_enable_servo_power_rail() {
%1 = tail call i32 @rc_gpio_set_value_mmap(i32 80, i32 1)
ret i32 %1
}
/* Variables and functions */
unsigned int REG_SPI_BASE(unsigned int);
__attribute__((always_)) __attribute__((flatten)) unsigned int
SPI_ADDR(unsigned int i) {
  return (REG_SPI_BASE(i) + 0x04);
}


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

x86 assembly (clang, -O2):
<SPI_ADDR>:
push   %rax
call   1030 <REG_SPI_BASE@plt>
add    $0x4,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @SPI_ADDR(i32 %0) {
%2 = tail call i32 @REG_SPI_BASE(i32 %0)
%3 = add i32 %2, 4
ret i32 %3
}
long kernel__Char__hash(char self) {
  long var;
  long var1;
  long var3;
  {
    var3 = (unsigned char)self;
    var1 = var3;
    goto RET_LABEL2;
  RET_LABEL2:
    (void)0;
  }
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Char__hash>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Char__hash>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i64 @kernel__Char__hash(i8 signext %0) {
%2 = alloca i8
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i8 %0, i8* %2
%6 = load i8, i8* %2
%7 = zext i8 %6 to i64
store i64 %7, i64* %5
%8 = load i64, i64* %5
store i64 %8, i64* %4
br label %9
9: ; preds = %1
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %11
11: ; preds = %9
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @kernel__Char__hash(i8 signext %0) {
%2 = zext i8 %0 to i64
ret i64 %2
}
/* Type definitions */
struct buf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bufput(struct buf *, char *, int);
void man_epilog(struct buf *ob, void *opaque) {
  bufput(ob, "\n", sizeof "\n" - 1);
}


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

x86 assembly (clang, -O2):
<man_epilog>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <bufput@plt>

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

LLVM IR (-O2):
%struct.buf = type { i32 }
@.str = [2 x i8] c"\0A\00"
define void @man_epilog(%struct.buf* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @bufput(%struct.buf* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int vasprintf(char **, char const *, int /*<<< orphan*/);
int vasprintf_l(char **strp, locale_t l, const char *fmt, va_list args) {
  return vasprintf(strp, fmt, args);
}


x86 assembly (clang, -O0):
<vasprintf_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <vasprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vasprintf_l>:
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <vasprintf@plt>

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

LLVM IR (-O2):
define i32 @vasprintf_l(i8** %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @vasprintf(i8** %0, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
int /*<<< orphan*/ mpu_device_init();
int /*<<< orphan*/ mpu_power_off();
int /*<<< orphan*/ mpu_power_on();
void mpu_initialize(void) {
  ;
  mpu_device_init();
  mpu_power_on();
  delay_ms(10);
  mpu_power_off();
}


x86 assembly (clang, -O0):
<mpu_initialize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mpu_device_init@plt>
mov    $0x0,%al
call   1040 <mpu_power_on@plt>
mov    $0xa,%edi
call   1060 <delay_ms@plt>
mov    $0x0,%al
call   1050 <mpu_power_off@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpu_initialize>:
push   %rax
xor    %eax,%eax
call   1030 <mpu_device_init@plt>
xor    %eax,%eax
call   1040 <mpu_power_on@plt>
mov    $0xa,%edi
call   1060 <delay_ms@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <mpu_power_off@plt>

LLVM IR (-O0):
define void @mpu_initialize() {
%1 = call i32 (...) @mpu_device_init()
%2 = call i32 (...) @mpu_power_on()
%3 = call i32 @delay_ms(i32 10)
%4 = call i32 (...) @mpu_power_off()
ret void
}

LLVM IR (-O2):
define void @mpu_initialize() {
%1 = tail call i32 (...) @mpu_device_init()
%2 = tail call i32 (...) @mpu_power_on()
%3 = tail call i32 @delay_ms(i32 10)
%4 = tail call i32 (...) @mpu_power_off()
ret void
}
void foo_1_1_1_2_1_2_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_1_2_1_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void omp_set_num_threads(int nthreads) {
  if (nthreads > 1)
    fprintf(stderr,
            "You are using a dummy OpenMP runtime and cannot set anything! \n");
  return;
}


x86 assembly (clang, -O0):
<omp_set_num_threads>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    113a <omp_set_num_threads+0x2a>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<omp_set_num_threads>:
cmp    $0x2,%edi
jl     112a <omp_set_num_threads+0x1a>
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [64 x i8] c"You are using a dummy OpenMP runtime and cannot set anything! \0A\00"
define void @omp_set_num_threads(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [64 x i8] c"You are using a dummy OpenMP runtime and cannot set anything! \0A\00"
define void @omp_set_num_threads(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
char *rindex(char *, char);
void usage(char *prog, char *string) {
  char *ptr;
  ptr = rindex(prog, '/');
  if (!ptr)
    ptr = prog;
  else
    ptr++;
  printf("usage: %s %s\n\n", ptr, string);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <rindex@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115a <usage+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1166 <usage+0x46>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1040 <rindex@plt>
lea    0x1(%rax),%rsi
test   %rax,%rax
cmove  %rbx,%rsi
lea    0xeba(%rip),%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"usage: %s %s\0A\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @rindex(i8* %6, i8 signext 47)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = load i8*, i8** %3
store i8* %11, i8** %5
br label %15
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %5
br label %15
15: ; preds = %12, %10
%16 = load i8*, i8** %5
%17 = load i8*, i8** %4
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"usage: %s %s\0A\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = tail call i8* @rindex(i8* %0, i8 signext 47)
%4 = icmp eq i8* %3, null
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = select i1 %4, i8* %0, i8* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %1)
ret void
}
int test_imm_B5int64_lowword_reg(long long val) {
  return ((val) & (0xB5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B5int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xb5,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B5int64_lowword_reg>:
test   $0xb5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B5int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 181
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int getPT();
int /*<<< orphan*/ putCMD(int);
int /*<<< orphan*/ putPT(int);
int _dos_getcdrv(void) {
  putCMD(0x83);
  putPT(0x15);
  return getPT();
}


x86 assembly (clang, -O0):
<_dos_getcdrv>:
push   %rbp
mov    %rsp,%rbp
mov    $0x83,%edi
call   1050 <putCMD@plt>
mov    $0x15,%edi
call   1030 <putPT@plt>
mov    $0x0,%al
call   1040 <getPT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dos_getcdrv>:
push   %rax
mov    $0x83,%edi
call   1050 <putCMD@plt>
mov    $0x15,%edi
call   1030 <putPT@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getPT@plt>

LLVM IR (-O0):
define i32 @_dos_getcdrv() {
%1 = call i32 @putCMD(i32 131)
%2 = call i32 @putPT(i32 21)
%3 = call i32 (...) @getPT()
ret i32 %3
}

LLVM IR (-O2):
define i32 @_dos_getcdrv() {
%1 = tail call i32 @putCMD(i32 131)
%2 = tail call i32 @putPT(i32 21)
%3 = tail call i32 (...) @getPT()
ret i32 %3
}
void foo_1_2_2_2_1_2_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_1_2_1_2_1() {
ret void
}
int delete_host_comment(unsigned long comment_id) {}


x86 assembly (clang, -O0):
<delete_host_comment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @delete_host_comment(i64 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print_profit(int profit) {
  int cents, dollars;
  cents = profit % 100;
  dollars = profit / 100;
  printf("Profit:\t$ %d.%02d\n", dollars, cents);
}


x86 assembly (clang, -O0):
<print_profit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_profit>:
movslq %edi,%rdx
imul   $0x51eb851f,%rdx,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x25,%rsi
add    %eax,%esi
imul   $0x64,%esi,%eax
sub    %eax,%edx
lea    0xecd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Profit:\09$ %d.%02d\0A\00"
define void @print_profit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = srem i32 %5, 100
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 100
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Profit:\09$ %d.%02d\0A\00"
define void @print_profit(i32 %0) {
%2 = srem i32 %0, 100
%3 = sdiv i32 %0, 100
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void SeqUtil_printConvTable(int *convTable) {
  int i;
  for (i = 0; i < 256; i++) {
    printf("%d %c %d\n", i, i, convTable[i]);
  }
}


x86 assembly (clang, -O0):
<SeqUtil_printConvTable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    115b <SeqUtil_printConvTable+0x4b>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <SeqUtil_printConvTable+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SeqUtil_printConvTable>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xedf(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%ecx
mov    %r15,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x100,%rbx
jne    1130 <SeqUtil_printConvTable+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %c %d\0A\00"
define void @SeqUtil_printConvTable(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %8, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = trunc i64 %3 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %6, i32 %5)
%8 = add nuw nsw i64 %3, 1
%9 = icmp eq i64 %8, 256
br i1 %9, label %10, label %2
10: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ primitive_verify();
int /*<<< orphan*/ speed_test();
int /*<<< orphan*/ umac_verify();
int main(void) {
  umac_verify();
  primitive_verify();
  speed_test();
  return (1);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <umac_verify@plt>
xor    %eax,%eax
call   1040 <primitive_verify@plt>
xor    %eax,%eax
call   1030 <speed_test@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @umac_verify()
%2 = tail call i32 (...) @primitive_verify()
%3 = tail call i32 (...) @speed_test()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: flip [-S] [-c] [-f] [-l length | -L length] [-m]");
  fprintf(stderr, " [-d deviation]\n         [-s start_codons] [-g gen_code]");
  fprintf(stderr, " [-n] [-D] [-F] file\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeef(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xf13(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef9(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf24(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: flip [-S] [-c] [-f] [-l length | -L length] [-m]\00"
@.str.1 = [57 x i8] c" [-d deviation]\0A [-s start_codons] [-g gen_code]\00"
@.str.2 = [22 x i8] c" [-n] [-D] [-F] file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: flip [-S] [-c] [-f] [-l length | -L length] [-m]\00"
@.str.1 = [57 x i8] c" [-d deviation]\0A [-s start_codons] [-g gen_code]\00"
@.str.2 = [22 x i8] c" [-n] [-D] [-F] file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ portctl(char, int, char *);
int unmute() {
  int pin = 1;
  char mask = 0x08;
  portctl(mask, pin, "unmute");
  return 0;
}


x86 assembly (clang, -O0):
<unmute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movb   $0x8,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdx
movsbl %al,%edi
call   1030 <portctl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmute>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x8,%edi
mov    $0x1,%esi
call   1030 <portctl@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"unmute\00"
define i32 @unmute() {
%1 = tail call i32 @portctl(i8 signext 8, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void serial_purge_rx() {}


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

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

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

LLVM IR (-O2):
define void @serial_purge_rx() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ parent;
};
typedef TYPE_1__ XReparentEvent;

/* Variables and functions */
unsigned long get_XReparentEvent_parent(void *_p) {
  return (unsigned long)((XReparentEvent *)_p)->parent;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XReparentEvent_parent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XReparentEvent_parent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ gdt_set_entry(int, int /*<<< orphan*/, int, int, int);
void gdt_initialize() {
  gdt_set_entry(0, 0, 0, 0, 0);
  gdt_set_entry(1, 0, 0xFFFFFFFF, 0x80 | 0x00 | 0x10 | 0x08 | 0x02,
                0x08 | 0x02);
  gdt_set_entry(2, 0, 0xFFFFFFFF, 0x80 | 0x00 | 0x10 | 0x02 | 0x00,
                0x08 | 0x04);
  gdt_set_entry(3, 0, 0xFFFFFFFF, 0x80 | 0x60 | 0x10 | 0x08 | 0x02,
                0x08 | 0x02);
  gdt_set_entry(4, 0, 0xFFFFFFFF, 0x80 | 0x60 | 0x10 | 0x02 | 0x00,
                0x08 | 0x04);
}


x86 assembly (clang, -O0):
<gdt_initialize>:
push   %rbp
mov    %rsp,%rbp
xor    %r8d,%r8d
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <gdt_set_entry@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0x9a,%ecx
mov    $0xa,%r8d
call   1030 <gdt_set_entry@plt>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0x92,%ecx
mov    $0xc,%r8d
call   1030 <gdt_set_entry@plt>
mov    $0x3,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0xfa,%ecx
mov    $0xa,%r8d
call   1030 <gdt_set_entry@plt>
mov    $0x4,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0xf2,%ecx
mov    $0xc,%r8d
call   1030 <gdt_set_entry@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdt_initialize>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <gdt_set_entry@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0x9a,%ecx
mov    $0xa,%r8d
call   1030 <gdt_set_entry@plt>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0x92,%ecx
mov    $0xc,%r8d
call   1030 <gdt_set_entry@plt>
mov    $0x3,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0xfa,%ecx
mov    $0xa,%r8d
call   1030 <gdt_set_entry@plt>
mov    $0x4,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    $0xf2,%ecx
mov    $0xc,%r8d
pop    %rax
jmp    1030 <gdt_set_entry@plt>

LLVM IR (-O0):
define void @gdt_initialize() {
%1 = call i32 @gdt_set_entry(i32 0, i32 0, i32 0, i32 0, i32 0)
%2 = call i32 @gdt_set_entry(i32 1, i32 0, i32 -1, i32 154, i32 10)
%3 = call i32 @gdt_set_entry(i32 2, i32 0, i32 -1, i32 146, i32 12)
%4 = call i32 @gdt_set_entry(i32 3, i32 0, i32 -1, i32 250, i32 10)
%5 = call i32 @gdt_set_entry(i32 4, i32 0, i32 -1, i32 242, i32 12)
ret void
}

LLVM IR (-O2):
define void @gdt_initialize() {
%1 = tail call i32 @gdt_set_entry(i32 0, i32 0, i32 0, i32 0, i32 0)
%2 = tail call i32 @gdt_set_entry(i32 1, i32 0, i32 -1, i32 154, i32 10)
%3 = tail call i32 @gdt_set_entry(i32 2, i32 0, i32 -1, i32 146, i32 12)
%4 = tail call i32 @gdt_set_entry(i32 3, i32 0, i32 -1, i32 250, i32 10)
%5 = tail call i32 @gdt_set_entry(i32 4, i32 0, i32 -1, i32 242, i32 12)
ret void
}
void chomp(char *str) {
  while (*str != '\n')
    str++;
  *str = '\0';
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1129 <chomp+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <chomp+0x8>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
cmpb   $0xa,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <chomp>
movb   $0x0,-0x1(%rdi)
ret

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

LLVM IR (-O2):
define void @chomp(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 10
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
store i8 0, i8* %3
ret void
}
void gcscan_(record, return_code) float *record;
int *return_code;
{}


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

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

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

LLVM IR (-O2):
define void @gcscan_(float* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _insb(void *, void *, unsigned long);
void ioread8_rep(void *addr, void *dst, unsigned long count) {
  _insb(addr, dst, count);
}


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

x86 assembly (clang, -O2):
<ioread8_rep>:
jmp    1030 <_insb@plt>

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

LLVM IR (-O2):
define void @ioread8_rep(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @_insb(i8* %0, i8* %1, i64 %2)
ret void
}
int pthread_setconcurrency(int new_level) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_setconcurrency(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void not_nested() { printf("Parenthese/braces are not nested properly.\n"); }


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"Parenthese/braces are not nested properly.\0A\00"
define void @not_nested() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [43 x i8] c"Parenthese/braces are not nested properly.\00"
define void @not_nested() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cord_write_packet(int, char *, float, float);
void cord_event_bumper(float angle, float uncertainty) {
  cord_write_packet(60, "{\"e\":\"bump\",\"angle\":%f,\"+-\":%f}", angle,
                    uncertainty);
}


x86 assembly (clang, -O0):
<cord_event_bumper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mov    $0x3c,%edi
lea    0xec8(%rip),%rsi
call   1030 <cord_write_packet@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"{\22e\22:\22bump\22,\22angle\22:%f,\22+-\22:%f}\00"
define void @cord_event_bumper(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i32 @cord_write_packet(i32 60, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), float %5, float %6)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"{\22e\22:\22bump\22,\22angle\22:%f,\22+-\22:%f}\00"
define void @cord_event_bumper(float %0, float %1) {
%3 = tail call i32 @cord_write_packet(i32 60, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), float %0, float %1)
ret void
}
long long load1(int data) { return (long long)data << 12; }


x86 assembly (clang, -O0):
<load1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0xc,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load1>:
movslq %edi,%rax
shl    $0xc,%rax
ret

LLVM IR (-O0):
define i64 @load1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = shl i64 %4, 12
ret i64 %5
}

LLVM IR (-O2):
define i64 @load1(i32 %0) {
%2 = sext i32 %0 to i64
%3 = shl nsw i64 %2, 12
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Playgame();
int /*<<< orphan*/ gameOver();
int /*<<< orphan*/ init();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  init();
  Playgame();
  gameOver();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1050 <init@plt>
mov    $0x0,%al
call   1070 <Playgame@plt>
mov    $0x0,%al
call   1030 <gameOver@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1050 <init@plt>
xor    %eax,%eax
call   1070 <Playgame@plt>
xor    %eax,%eax
call   1030 <gameOver@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @init()
%5 = call i32 (...) @Playgame()
%6 = call i32 (...) @gameOver()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @init()
%4 = tail call i32 (...) @Playgame()
%5 = tail call i32 (...) @gameOver()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ test_assert(int, char const *);
void test_assert_equal_int64(int64_t val1, int64_t val2, const char *msg) {
  test_assert(val1 == val2, msg);
}


x86 assembly (clang, -O0):
<test_assert_equal_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x18(%rbp),%rsi
call   1030 <test_assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_assert_equal_int64>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
mov    %eax,%edi
mov    %rdx,%rsi
jmp    1030 <test_assert@plt>

LLVM IR (-O0):
define void @test_assert_equal_int64(i64 %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp eq i64 %7, %8
%10 = zext i1 %9 to i32
%11 = load i8*, i8** %6
%12 = call i32 @test_assert(i32 %10, i8* %11)
ret void
}

LLVM IR (-O2):
define void @test_assert_equal_int64(i64 %0, i64 %1, i8* %2) {
%4 = icmp eq i64 %0, %1
%5 = zext i1 %4 to i32
%6 = tail call i32 @test_assert(i32 %5, i8* %2)
ret void
}