xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
void testswap() {
  int a = 1, b = 2;
  printf("%d %d\n", a, b);
  swap(&a, &b);
  printf("%d %d\n", a, b);
}


x86 assembly (clang, -O0):
<testswap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testswap>:
push   %rbx
sub    $0x10,%rsp
movl   $0x1,0xc(%rsp)
movl   $0x2,0x8(%rsp)
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <swap@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define void @testswap() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 2, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%6 = call i32 @swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret void
}
/* Variables and functions */
double exp(double);
double fm_exp2(double);
double fm_exp_(double *x) {
  return fm_exp2(1.4426950408889634074 * (*x));
  return exp(*x);
}


x86 assembly (clang, -O0):
<fm_exp_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xed8(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1030 <fm_exp2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fm_exp_>:
movsd  (%rdi),%xmm0
mulsd  0xee4(%rip),%xmm0
jmp    1030 <fm_exp2@plt>

LLVM IR (-O0):
define double @fm_exp_(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = fmul double 0x3FF71547652B82FE, %4
%6 = call double @fm_exp2(double %5)
ret double %6
}

LLVM IR (-O2):
define double @fm_exp_(double* nocapture %0) {
%2 = load double, double* %0
%3 = fmul double %2, 0x3FF71547652B82FE
%4 = tail call double @fm_exp2(double %3)
ret double %4
}
unsigned long b_ethernet_rx(void *mem, unsigned long iid) {
  unsigned long tlong;
  asm volatile("call *0x00100028" : "=c"(tlong) : "D"(mem), "d"(iid));
  return tlong;
}


x86 assembly (clang, -O0):
<b_ethernet_rx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
call   *0x100028
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_ethernet_rx>:
mov    %rsi,%rdx
call   *0x100028
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @b_ethernet_rx(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 asm sideeffect "call *0x00100028", "={cx},{di},{dx},~{dirflag},~{fpsr},~{flags}"(i8* %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @b_ethernet_rx(i8* %0, i64 %1) {
%3 = tail call i64 asm sideeffect "call *0x00100028", "={cx},{di},{dx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t const);
size_t strlen(char const *);
char *strcpy(char *restrict dst, const char *restrict src) {
  const size_t length = strlen(src);
  memcpy(dst, src, length + 1);
  return dst;
}


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

x86 assembly (clang, -O2):
<strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <memcpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strcpy(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = add i64 %10, 1
%12 = call i32 @memcpy(i8* %8, i8* %9, i64 %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @strcpy(i8* noalias returned %0, i8* noalias %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add i64 %3, 1
%5 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %4)
ret i8* %0
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct fc_sockaddr_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_unique(struct genlist *);
void fc_sockaddr_list_unique(struct fc_sockaddr_list *tthis) {
  genlist_unique((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<fc_sockaddr_list_unique>:
jmp    1030 <genlist_unique@plt>

LLVM IR (-O0):
%struct.fc_sockaddr_list = type { i32 }
%struct.genlist = type { i32 }
define void @fc_sockaddr_list_unique(%struct.fc_sockaddr_list* %0) {
%2 = alloca %struct.fc_sockaddr_list*
store %struct.fc_sockaddr_list* %0, %struct.fc_sockaddr_list** %2
%3 = load %struct.fc_sockaddr_list*, %struct.fc_sockaddr_list** %2
%4 = bitcast %struct.fc_sockaddr_list* %3 to %struct.genlist*
%5 = call i32 @genlist_unique(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.fc_sockaddr_list = type { i32 }
%struct.genlist = type { i32 }
define void @fc_sockaddr_list_unique(%struct.fc_sockaddr_list* %0) {
%2 = bitcast %struct.fc_sockaddr_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_unique(%struct.genlist* %2)
ret void
}
void port_enable(void) { __asm volatile("nop"); }


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

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

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

LLVM IR (-O2):
define void @port_enable() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
char *itohex(int);
int /*<<< orphan*/ write_on_console(int /*<<< orphan*/);
int /*<<< orphan*/ write_str_on_console(char *);
void print_hex(int a) {
  if (a == 0) {
    write_on_console('0');
    return;
  }
  if (a > 0) {
    char *num_str = itohex(a);
    write_str_on_console(num_str);
  }
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1154 <print_hex+0x24>
mov    $0x30,%edi
call   1050 <write_on_console@plt>
jmp    1173 <print_hex+0x43>
cmpl   $0x0,-0x4(%rbp)
jle    1173 <print_hex+0x43>
mov    -0x4(%rbp),%edi
call   1040 <itohex@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <write_str_on_console@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
test   %edi,%edi
je     1145 <print_hex+0x15>
jle    114f <print_hex+0x1f>
push   %rax
call   1040 <itohex@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <write_str_on_console@plt>
mov    $0x30,%edi
jmp    1050 <write_on_console@plt>
ret

LLVM IR (-O0):
define void @print_hex(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @write_on_console(i32 48)
br label %16
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %2
%13 = call i8* @itohex(i32 %12)
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = call i32 @write_str_on_console(i8* %14)
br label %16
16: ; preds = %6, %11, %8
ret void
}

LLVM IR (-O2):
define void @print_hex(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @write_on_console(i32 48)
br label %10
5: ; preds = %1
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = tail call i8* @itohex(i32 %0)
%9 = tail call i32 @write_str_on_console(i8* %8)
br label %10
10: ; preds = %3, %7, %5
ret void
}
/* Variables and functions */
unsigned short _LittleUnsignedShort(unsigned short);
unsigned short LittleUnsignedShort(unsigned short l) {
  return _LittleUnsignedShort(l);
}


x86 assembly (clang, -O0):
<LittleUnsignedShort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <_LittleUnsignedShort@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LittleUnsignedShort>:
jmp    1030 <_LittleUnsignedShort@plt>

LLVM IR (-O0):
define zeroext i16 @LittleUnsignedShort(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call zeroext i16 @_LittleUnsignedShort(i16 zeroext %3)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @LittleUnsignedShort(i16 zeroext %0) {
%2 = tail call zeroext i16 @_LittleUnsignedShort(i16 zeroext %0)
ret i16 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
void zero_cpu_affinity_mask(cpu_set_t *mask) { CPU_ZERO(mask); }


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

x86 assembly (clang, -O2):
<zero_cpu_affinity_mask>:
jmp    1030 <CPU_ZERO@plt>

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

LLVM IR (-O2):
define void @zero_cpu_affinity_mask(i32* %0) {
%2 = tail call i32 @CPU_ZERO(i32* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr4setBank1(int);
void m34setParams7FFF(uint16_t addr, uint8_t val) {
  (void)addr;
  chr4setBank1((val & 0xF) << 12);
}


x86 assembly (clang, -O0):
<m34setParams7FFF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0xf,%edi
shl    $0xc,%edi
call   1030 <chr4setBank1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m34setParams7FFF>:
shl    $0xc,%esi
movzwl %si,%edi
jmp    1030 <chr4setBank1@plt>

LLVM IR (-O0):
define void @m34setParams7FFF(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 = and i32 %6, 15
%8 = shl i32 %7, 12
%9 = call i32 @chr4setBank1(i32 %8)
ret void
}

LLVM IR (-O2):
define void @m34setParams7FFF(i32 %0, i32 %1) {
%3 = shl i32 %1, 12
%4 = and i32 %3, 61440
%5 = tail call i32 @chr4setBank1(i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ CAMELLIA_KEY;

/* Variables and functions */
int private_Camellia_set_key(unsigned char const *, int const,
                             int /*<<< orphan*/ *);
int Camellia_set_key(const unsigned char *userKey, const int bits,
                     CAMELLIA_KEY *key) {
  return private_Camellia_set_key(userKey, bits, key);
}


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

x86 assembly (clang, -O2):
<Camellia_set_key>:
jmp    1030 <private_Camellia_set_key@plt>

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

LLVM IR (-O2):
define i32 @Camellia_set_key(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @private_Camellia_set_key(i8* %0, i32 %1, i32* %2)
ret i32 %4
}
int iter(int N) {
  int sum = 0;
  for (int i = 0; i < N; i++)
    sum += 1 + 2 * (i);
  return sum;
}


x86 assembly (clang, -O0):
<iter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    113e <iter+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <iter+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iter>:
test   %edi,%edi
jle    1119 <iter+0x19>
lea    (%rdi,%rdi,2),%eax
lea    -0x1(%rdi),%ecx
add    $0xfffffffe,%edi
imul   %ecx,%edi
and    $0xfffffffe,%edi
add    %edi,%eax
add    $0xfffffffe,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @iter(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = mul i32 %0, 3
%5 = add nsw i32 %0, -1
%6 = add nsw i32 %0, -2
%7 = mul i32 %5, %6
%8 = and i32 %7, -2
%9 = add i32 %4, %8
%10 = add i32 %9, -2
br label %11
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %10, %3 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t cmx_shm_unpack_id(const int value_handle) {
  return (uint16_t)(0x7fff & (value_handle >> 16));
}


x86 assembly (clang, -O0):
<cmx_shm_unpack_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0x7fff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmx_shm_unpack_id>:
mov    %edi,%eax
shr    $0x10,%eax
and    $0x7fff,%eax
ret

LLVM IR (-O0):
define i32 @cmx_shm_unpack_id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 16
%5 = and i32 32767, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @cmx_shm_unpack_id(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 32767
ret i32 %3
}
double kelvinToFahrenheit(double kelvin) {
  return (kelvin - 273.15) * 1.8000 + 32.00;
}


x86 assembly (clang, -O0):
<kelvinToFahrenheit>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kelvinToFahrenheit>:
addsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @kelvinToFahrenheit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 2.731500e+02
%5 = call double @llvm.fmuladd.f64(double %4, double 1.800000e+00, double 3.200000e+01)
ret double %5
}

LLVM IR (-O2):
define double @kelvinToFahrenheit(double %0) {
%2 = fadd double %0, -2.731500e+02
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.800000e+00, double 3.200000e+01)
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ timer_t;

/* Variables and functions */
int /*<<< orphan*/ timer_delete(int /*<<< orphan*/);
void arch_removeTimer(timer_t *timerid) { timer_delete(*timerid); }


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

x86 assembly (clang, -O2):
<arch_removeTimer>:
mov    (%rdi),%edi
jmp    1030 <timer_delete@plt>

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

LLVM IR (-O2):
define void @arch_removeTimer(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @timer_delete(i32 %2)
ret void
}
void null_readtoc_session(unsigned char *b, int msf, int maxlen) {}


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

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

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

LLVM IR (-O2):
define void @null_readtoc_session(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
char *plugin_info(void) { return "Icom R10 Receiver V0.9"; }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Icom R10 Receiver V0.9\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [23 x i8] c"Icom R10 Receiver V0.9\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int scanline_pad;
};
typedef TYPE_1__ ScreenFormat;

/* Variables and functions */
void set_ScreenFormat_scanline_pad(void *_p, int _v) {
  ((ScreenFormat *)_p)->scanline_pad = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_ScreenFormat_scanline_pad>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_ScreenFormat_scanline_pad(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char ch;
  int i;
  printf("Random chars :\n");
  for (i = 1; i < 5; i++) {
    ch = 70 + i;
    printf("%c, ", ch);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1167 <main+0x57>
mov    -0xc(%rbp),%eax
add    $0x46,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x47,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x49,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%c, \00"
@str = [15 x i8] c"Random chars :\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 71)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 72)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 73)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 74)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ rand;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ read(int, int *, int);
int urandom() {
  int rand = -1;
  int fd;
  if ((fd = open("/dev/urandom", O_RDONLY)) >= 0) {
    read(fd, &rand, sizeof(rand));
    close(fd);
  } else {
  }
  return rand;
}


x86 assembly (clang, -O0):
<urandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jl     117e <urandom+0x4e>
mov    -0x8(%rbp),%edi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1040 <read@plt>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
jmp    1183 <urandom+0x53>
jmp    1183 <urandom+0x53>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<urandom>:
push   %rbx
sub    $0x10,%rsp
movl   $0xffffffff,0xc(%rsp)
ff
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdi
call   1050 <open@plt>
test   %eax,%eax
js     1176 <urandom+0x46>
mov    %eax,%ebx
lea    0xc(%rsp),%rsi
mov    %eax,%edi
mov    $0x4,%edx
call   1040 <read@plt>
mov    %ebx,%edi
call   1030 <close@plt>
mov    0xc(%rsp),%eax
jmp    117b <urandom+0x4b>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
define i32 @urandom() {
%1 = alloca i32
%2 = alloca i32
store i32 -1, i32* %1
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @read(i32 %7, i32* %1, i32 4)
%9 = load i32, i32* %2
%10 = call i32 @close(i32 %9)
br label %12
11: ; preds = %0
br label %12
12: ; preds = %11, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
define i32 @urandom() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i32 @read(i32 %4, i32* %1, i32 4)
%8 = tail call i32 @close(i32 %4)
%9 = load i32, i32* %1
br label %10
10: ; preds = %0, %6
%11 = phi i32 [ -1, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ register_write(int, int);
void register_write_rs690(unsigned int key, unsigned int val) {
  register_write(0x78, (key & 0x1ff) | (1 << 9));
  register_write(0x7c, val);
  register_write(0x78, 0x7f);
}


x86 assembly (clang, -O0):
<register_write_rs690>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
and    $0x1ff,%esi
or     $0x200,%esi
mov    $0x78,%edi
call   1030 <register_write@plt>
mov    -0x8(%rbp),%esi
mov    $0x7c,%edi
call   1030 <register_write@plt>
mov    $0x78,%edi
mov    $0x7f,%esi
call   1030 <register_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_write_rs690>:
push   %rbx
mov    %esi,%ebx
and    $0x1ff,%edi
lea    0x200(%rdi),%esi
mov    $0x78,%edi
call   1030 <register_write@plt>
mov    $0x7c,%edi
mov    %ebx,%esi
call   1030 <register_write@plt>
mov    $0x78,%edi
mov    $0x7f,%esi
pop    %rbx
jmp    1030 <register_write@plt>

LLVM IR (-O0):
define void @register_write_rs690(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 = and i32 %5, 511
%7 = or i32 %6, 512
%8 = call i32 @register_write(i32 120, i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @register_write(i32 124, i32 %9)
%11 = call i32 @register_write(i32 120, i32 127)
ret void
}

LLVM IR (-O2):
define void @register_write_rs690(i32 %0, i32 %1) {
%3 = and i32 %0, 511
%4 = or i32 %3, 512
%5 = tail call i32 @register_write(i32 120, i32 %4)
%6 = tail call i32 @register_write(i32 124, i32 %1)
%7 = tail call i32 @register_write(i32 120, i32 127)
ret void
}
/* Variables and functions */
int CheckInventory(char *);
int GetWeaponPosFromTable() { return CheckInventory("DnD_WeaponID"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"DnD_WeaponID\00"
define i32 @GetWeaponPosFromTable() {
%1 = call i32 @CheckInventory(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [13 x i8] c"DnD_WeaponID\00"
define i32 @GetWeaponPosFromTable() {
%1 = tail call i32 @CheckInventory(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ e_and();
int /*<<< orphan*/ e_izpx();
void e_and_izpx() {
  e_izpx();
  e_and();
}


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

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

LLVM IR (-O0):
define void @e_and_izpx() {
%1 = call i32 (...) @e_izpx()
%2 = call i32 (...) @e_and()
ret void
}

LLVM IR (-O2):
define void @e_and_izpx() {
%1 = tail call i32 (...) @e_izpx()
%2 = tail call i32 (...) @e_and()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ avcodec_get_frame_defaults(void *);
void wrapped_frame_unref(void *param) { avcodec_get_frame_defaults(param); }


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

x86 assembly (clang, -O2):
<wrapped_frame_unref>:
jmp    1030 <avcodec_get_frame_defaults@plt>

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

LLVM IR (-O2):
define void @wrapped_frame_unref(i8* %0) {
%2 = tail call i32 @avcodec_get_frame_defaults(i8* %0)
ret void
}
char *ft_strchr(const char *s, int c) {
  if (!s)
    return (((void *)0));
  while (*s != c) {
    if (!*s)
      return (((void *)0));
    s++;
  }
  return ((char *)s);
}


x86 assembly (clang, -O0):
<ft_strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <ft_strchr+0x23>
movq   $0x0,-0x8(%rbp)
jmp    116b <ft_strchr+0x6b>
jmp    1128 <ft_strchr+0x28>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
je     1163 <ft_strchr+0x63>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1152 <ft_strchr+0x52>
movq   $0x0,-0x8(%rbp)
jmp    116b <ft_strchr+0x6b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1128 <ft_strchr+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strchr>:
test   %rdi,%rdi
je     1121 <ft_strchr+0x21>
mov    %rdi,%rax
movsbl (%rdi),%ecx
cmp    %esi,%ecx
je     1120 <ft_strchr+0x20>
nop
test   %cl,%cl
je     1121 <ft_strchr+0x21>
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    %esi,%ecx
jne    1110 <ft_strchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @ft_strchr(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, %1
br i1 %7, label %17, label %8
8: ; preds = %4, %12
%9 = phi i8 [ %14, %12 ], [ %5, %4 ]
%10 = phi i8* [ %13, %12 ], [ %0, %4 ]
%11 = icmp eq i8 %9, 0
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, %1
br i1 %16, label %17, label %8
17: ; preds = %8, %12, %4, %2
%18 = phi i8* [ null, %2 ], [ %0, %4 ], [ null, %8 ], [ %13, %12 ]
ret i8* %18
}
/* Variables and functions */
char *sdup(char *);
char *convert_path(char *path) { return sdup(path); }


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

x86 assembly (clang, -O2):
<convert_path>:
jmp    1030 <sdup@plt>

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

LLVM IR (-O2):
define i8* @convert_path(i8* %0) {
%2 = tail call i8* @sdup(i8* %0)
ret i8* %2
}
const char *C_Int_Description(void) {
  return "The `C_Int` class should be overridden by types which are "
         "representable "
         "as a C style Integer of the type `int64_t`.";
}


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

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

LLVM IR (-O0):
@.str = [116 x i8] c"The `C_Int` class should be overridden by types which are representable as a C style Integer of the type `int64_t`.\00"
define i8* @C_Int_Description() {
ret i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [116 x i8] c"The `C_Int` class should be overridden by types which are representable as a C style Integer of the type `int64_t`.\00"
define i8* @C_Int_Description() {
ret i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0)
}
SIGNAL(PCINT0_vect) { PCint(0); }


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

x86 assembly (clang, -O2):
<SIGNAL>:
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <PCint@plt>

LLVM IR (-O0):
define i32 @SIGNAL(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @PCint to i32 (i32, ...)*)(i32 0)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @SIGNAL(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @PCint to i32 (i32, ...)*)(i32 0)
ret i32 undef
}
/* Variables and functions */
int stack_size_impl();
int stack_size() { return stack_size_impl(); }


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

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

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

LLVM IR (-O2):
define i32 @stack_size() {
%1 = tail call i32 (...) @stack_size_impl()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ test();
int main() {
  int t;
  scanf("%d", &t);
  while (t) {
    test();
    t--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     115e <main+0x3e>
mov    $0x0,%al
call   1040 <test@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
je     114e <main+0x2e>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <test@plt>
addl   $0xffffffff,0x4(%rsp)
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%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)
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 (...) @test()
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%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 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %0, %6
%7 = call i32 (...) @test()
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -1
store i32 %9, i32* %1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %0
ret i32 0
}
int test(int a, int b) {
  int ab = a + b;
  return ab;
}


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

x86 assembly (clang, -O2):
<test>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef long rlim_t;

/* Variables and functions */
int /*<<< orphan*/ _SC_OPEN_MAX;
int /*<<< orphan*/ perror(char *);
long sysconf(int /*<<< orphan*/);
rlim_t max_open_files() {
  long value = sysconf(_SC_OPEN_MAX);
  if (value != -1) {
    return value;
  } else {
    perror("sysconf(_SC_OPEN_MAX)");
    return 1024;
  }
}


x86 assembly (clang, -O0):
<max_open_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
je     1152 <max_open_files+0x32>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <max_open_files+0x46>
lea    0xea7(%rip),%rdi
call   1030 <perror@plt>
movq   $0x400,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_open_files>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
cmp    $0xffffffffffffffff,%rax
je     1137 <max_open_files+0x17>
pop    %rcx
ret
lea    0xec2(%rip),%rdi
call   1030 <perror@plt>
mov    $0x400,%eax
pop    %rcx
ret

LLVM IR (-O0):
@_SC_OPEN_MAX = global i32 0
@.str = [22 x i8] c"sysconf(_SC_OPEN_MAX)\00"
define i64 @max_open_files() {
%1 = alloca i64
%2 = alloca i64
%3 = load i32, i32* @_SC_OPEN_MAX
%4 = call i64 @sysconf(i32 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i64, i64* %2
store i64 %8, i64* %1
br label %11
9: ; preds = %0
%10 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i64 1024, i64* %1
br label %11
11: ; preds = %9, %7
%12 = load i64, i64* %1
ret i64 %12
}

LLVM IR (-O2):
@_SC_OPEN_MAX = global i32 0
@.str = [22 x i8] c"sysconf(_SC_OPEN_MAX)\00"
define i64 @max_open_files() {
%1 = load i32, i32* @_SC_OPEN_MAX
%2 = tail call i64 @sysconf(i32 %1)
%3 = icmp eq i64 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %0, %4
%7 = phi i64 [ 1024, %4 ], [ %2, %0 ]
ret i64 %7
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int getticks() {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
}


x86 assembly (clang, -O0):
<getticks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getticks>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @getticks() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000000
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @getticks() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000000
%11 = add nsw i32 %10, %7
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
uint64_t load64(const void *ptr) {
  uint64_t v;
  memcpy(&v, ptr, sizeof v);
  return v;
}


x86 assembly (clang, -O0):
<load64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load64>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @load64(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i32* %3, i8* %4, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @load64(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int StartServerUDP();
void *fn_StartServerUDP(void *threadData) { int error = StartServerUDP(); }


x86 assembly (clang, -O0):
<fn_StartServerUDP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <StartServerUDP@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @fn_StartServerUDP(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = call i32 (...) @StartServerUDP()
store i32 %5, i32* %4
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @fn_StartServerUDP(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @StartServerUDP()
ret i8* undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _UARTBaseValid(int);
bool UARTCharsAvail(uint32_t ui32Base) {
  ASSERT(_UARTBaseValid(ui32Base));
  return (((*((volatile uint32_t *)(ui32Base + 0x00000018))) & 0x00000010)
              ? false
              : true);
}


x86 assembly (clang, -O0):
<UARTCharsAvail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x18,%eax
cltq
mov    (%rax),%edx
and    $0x10,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTCharsAvail>:
push   %rbx
mov    %edi,%ebx
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
movslq %ebx,%rcx
xor    %eax,%eax
testl  $0x10,0x18(%rcx)
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @UARTCharsAvail(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_UARTBaseValid(i32 %3)
%5 = call i32 @ASSERT(i32 %4)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 24
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, 16
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 1
ret i32 %14
}

LLVM IR (-O2):
define i32 @UARTCharsAvail(i32 %0) {
%2 = tail call i32 @_UARTBaseValid(i32 %0)
%3 = tail call i32 @ASSERT(i32 %2)
%4 = add nsw i32 %0, 24
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = lshr i32 %7, 4
%9 = and i32 %8, 1
%10 = xor i32 %9, 1
ret i32 %10
}
/* Variables and functions */
scalar_t__ GetItemIndex(int);
int /*<<< orphan*/ SendDropItem(int, int);
void DropItems() {
  for (int i = 0; i < 90; i++) {
    if (GetItemIndex(i))
      SendDropItem(i, 200);
  }
}


x86 assembly (clang, -O0):
<DropItems>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5a,-0x4(%rbp)
jge    116b <DropItems+0x4b>
mov    -0x4(%rbp),%edi
call   1030 <GetItemIndex@plt>
cmp    $0x0,%rax
je     1158 <DropItems+0x38>
mov    -0x4(%rbp),%edi
mov    $0xc8,%esi
call   1040 <SendDropItem@plt>
jmp    115d <DropItems+0x3d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <DropItems+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DropItems>:
push   %rbx
xor    %ebx,%ebx
jmp    1138 <DropItems+0x18>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
cmp    $0x5a,%ebx
je     1152 <DropItems+0x32>
mov    %ebx,%edi
call   1030 <GetItemIndex@plt>
test   %rax,%rax
je     1130 <DropItems+0x10>
mov    %ebx,%edi
mov    $0xc8,%esi
call   1040 <SendDropItem@plt>
jmp    1130 <DropItems+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @DropItems() {
br label %2
1: ; preds = %8
ret void
2: ; preds = %0, %8
%3 = phi i32 [ 0, %0 ], [ %9, %8 ]
%4 = tail call i64 @GetItemIndex(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @SendDropItem(i32 %3, i32 200)
br label %8
8: ; preds = %2, %6
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 90
br i1 %10, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void bar(double i) {
  if (i)
    abort();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    113a <bar+0x2a>
jp     113a <bar+0x2a>
jmp    1141 <bar+0x31>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    111d <bar+0xd>
jp     111d <bar+0xd>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @bar(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp une double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @bar(double %0) {
%2 = fcmp une double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}