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

/* Variables and functions */
bool CANErrCntrGet(uint32_t ui32Base, uint32_t *pui32RxCount,
                   uint32_t *pui32TxCount) {
  uint32_t ui32CANError;
  ;
  ui32CANError = (*((volatile unsigned long *)(ui32Base + 0x00000008)));
  *pui32RxCount = (ui32CANError & 0x00007F00) >> 8;
  *pui32TxCount = (ui32CANError & 0x000000FF) >> 0;
  if (ui32CANError & 0x00008000) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<CANErrCntrGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
and    $0x7f00,%ecx
sar    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
and    $0xff,%ecx
sar    $0x0,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     115e <CANErrCntrGet+0x5e>
movl   $0x1,-0x4(%rbp)
jmp    1165 <CANErrCntrGet+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANErrCntrGet>:
movslq %edi,%rax
mov    0x8(%rax),%rax
mov    %eax,%ecx
shr    $0x8,%ecx
and    $0x7f,%ecx
mov    %ecx,(%rsi)
movzbl %al,%ecx
mov    %ecx,(%rdx)
shr    $0xf,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @CANErrCntrGet(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 8
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = trunc i64 %13 to i32
store i32 %14, i32* %8
%15 = load i32, i32* %8
%16 = and i32 %15, 32512
%17 = ashr i32 %16, 8
%18 = load i32*, i32** %6
store i32 %17, i32* %18
%19 = load i32, i32* %8
%20 = and i32 %19, 255
%21 = ashr i32 %20, 0
%22 = load i32*, i32** %7
store i32 %21, i32* %22
%23 = load i32, i32* %8
%24 = and i32 %23, 32768
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %3
store i32 1, i32* %4
br label %28
27: ; preds = %3
store i32 0, i32* %4
br label %28
28: ; preds = %27, %26
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
define i32 @CANErrCntrGet(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = add nsw i32 %0, 8
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = lshr i32 %8, 8
%10 = and i32 %9, 127
store i32 %10, i32* %1
%11 = and i32 %8, 255
store i32 %11, i32* %2
%12 = lshr i32 %8, 15
%13 = and i32 %12, 1
ret i32 %13
}
/* Variables and functions */
int mpc55xx_is_cache_aligned(const void *s, size_t n) {
  return !(((uintptr_t)s & ((uintptr_t)0x1f)) || (n & ((uintptr_t)0x1f)));
}


x86 assembly (clang, -O0):
<mpc55xx_is_cache_aligned>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
and    $0x1f,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    1135 <mpc55xx_is_cache_aligned+0x35>
mov    -0x10(%rbp),%rax
and    $0x1f,%rax
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpc55xx_is_cache_aligned>:
or     %esi,%edi
xor    %eax,%eax
test   $0x1f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @mpc55xx_is_cache_aligned(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 = ptrtoint i8* %5 to i64
%7 = and i64 %6, 31
%8 = icmp ne i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i64, i64* %4
%11 = and i64 %10, 31
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %9, %2
%14 = phi i1 [ true, %2 ], [ %12, %9 ]
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @mpc55xx_is_cache_aligned(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = or i64 %3, %1
%5 = and i64 %4, 31
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ _munmap(void *, size_t);
void free(void *p) {
  if (p != 0) {
    p -= sizeof(size_t);
    size_t size = *(size_t *)p;
    _munmap(p, size);
  }
}


x86 assembly (clang, -O0):
<free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <free+0x3b>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_munmap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free>:
test   %rdi,%rdi
je     1122 <free+0x12>
mov    -0x8(%rdi),%rsi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <_munmap@plt>
ret

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
%7 = tail call i32 @_munmap(i8* %4, i64 %6)
br label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
double pow(double, int);
scalar_t__ rand();
double get_rand_rand(long *inpl) { return (((double)rand()) / pow(2.0, 15)); }


x86 assembly (clang, -O0):
<get_rand_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xebb(%rip),%xmm0
mov    $0xf,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rand_rand>:
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
movsd  0xec6(%rip),%xmm0
mov    $0xf,%edi
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_rand_rand(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = call double @pow(double 2.000000e+00, i32 15)
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @get_rand_rand(i64* nocapture readnone %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to double
%4 = tail call double @pow(double 2.000000e+00, i32 15)
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
char *b64decode(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
char *base64decode(char *bufCoded) { return b64decode(bufCoded, NULL, 0); }


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

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

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

LLVM IR (-O2):
define i8* @base64decode(i8* %0) {
%2 = tail call i8* @b64decode(i8* %0, i32* null, i32 0)
ret i8* %2
}
/* Variables and functions */
void *default_mpgdecoder_new(void *ctx, int sample_rate, int stereo, int rvol,
                             int lvol) {
  return NULL;
}


x86 assembly (clang, -O0):
<default_mpgdecoder_new>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @default_mpgdecoder_new(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @default_mpgdecoder_new(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i8* null
}
unsigned int ps_getb(int c) { return c & 0xff; }


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

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

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

LLVM IR (-O2):
define i32 @ps_getb(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ system_log(char *, char *, int, char *);
void sig_segv(int signo) {
  system_log("<F>",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/"
             "init_afd/init_afd_worker.c",
             899, ("Aaarrrggh! Received SIGSEGV."));
  abort();
}


x86 assembly (clang, -O0):
<sig_segv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    0xecb(%rip),%rsi
mov    $0x383,%edx
lea    0xf57(%rip),%rcx
call   1040 <system_log@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sig_segv>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x383,%edx
call   1040 <system_log@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"<F>\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/init_afd/init_afd_worker.c\00"
@.str.2 = [29 x i8] c"Aaarrrggh! Received SIGSEGV.\00"
define void @sig_segv(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 899, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"<F>\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/init_afd/init_afd_worker.c\00"
@.str.2 = [29 x i8] c"Aaarrrggh! Received SIGSEGV.\00"
define void @sig_segv(i32 %0) {
%2 = tail call i32 @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 899, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
char *suppr_color(char *data, int *pc) {
  data[(*pc)++] = '\033';
  data[(*pc)++] = '[';
  data[(*pc)++] = '0';
  data[(*pc)++] = 'm';
  return data;
}


x86 assembly (clang, -O0):
<suppr_color>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
movb   $0x1b,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
movb   $0x5b,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
movb   $0x30,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
movb   $0x6d,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<suppr_color>:
mov    %rdi,%rax
movslq (%rsi),%rcx
lea    0x1(%rcx),%edx
mov    %edx,(%rsi)
movb   $0x1b,(%rdi,%rcx,1)
movslq (%rsi),%rcx
lea    0x1(%rcx),%edx
mov    %edx,(%rsi)
movb   $0x5b,(%rdi,%rcx,1)
movslq (%rsi),%rcx
lea    0x1(%rcx),%edx
mov    %edx,(%rsi)
movb   $0x30,(%rdi,%rcx,1)
movslq (%rsi),%rcx
lea    0x1(%rcx),%edx
mov    %edx,(%rsi)
movb   $0x6d,(%rdi,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @suppr_color(i8* returned writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 27, i8* %6
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 91, i8* %10
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
%13 = sext i32 %11 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 48, i8* %14
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
%17 = sext i32 %15 to i64
%18 = getelementptr inbounds i8, i8* %0, i64 %17
store i8 109, i8* %18
ret i8* %0
}
void INT_Excep_TPU7_TCI7V(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU7_TCI7V() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DMA2_Channel1_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @DMA2_Channel1_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @DMA2_Channel1_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void explain_class(void) {
  fprintf(stderr, "Usage: ... dsmark [ mask MASK ] [ value VALUE ]\n");
}


x86 assembly (clang, -O0):
<explain_class>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<explain_class>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: ... dsmark [ mask MASK ] [ value VALUE ]\0A\00"
define void @explain_class() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: ... dsmark [ mask MASK ] [ value VALUE ]\0A\00"
define void @explain_class() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f360(int *);
int f361(int *p) { return f360(p); }


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

x86 assembly (clang, -O2):
<f361>:
jmp    1030 <f360@plt>

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

LLVM IR (-O2):
define i32 @f361(i32* %0) {
%2 = tail call i32 @f360(i32* %0)
ret i32 %2
}
void gtk_entry_completion_set_text_column() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_completion_set_text_column() {
ret void
}
/* Variables and functions */
double atan(double);
double libm_atan(double x) { return atan(x); }


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

x86 assembly (clang, -O2):
<libm_atan>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define double @libm_atan(double %0) {
%2 = tail call double @atan(double %0)
ret double %2
}
unsigned short NO_FLIP_USHORT(unsigned short pVar) { return pVar; }


x86 assembly (clang, -O0):
<NO_FLIP_USHORT>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @NO_FLIP_USHORT(i16 returned zeroext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void notice(char *notice) { printf("%s", notice); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @notice(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, int);
void main() {
  typedef union {
    struct {
      char c1, c2;
    } s;
    long j;
    float x;
  } U;
  U example;
  example.s.c1 = 'a';
  example.s.c2 = 'b';
  example.j = 5;
  printf("%c %c %d", example.s.c1, example.s.c2, example.j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x61,-0x8(%rbp)
movb   $0x62,-0x7(%rbp)
movq   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%dl
mov    -0x7(%rbp),%al
mov    -0x8(%rbp),%rcx
lea    0xec7(%rip),%rdi
movsbl %dl,%esi
movsbl %al,%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x5,%esi
xor    %edx,%edx
mov    $0x5,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%union.U = type { i64 }
%struct.anon = type { i8, i8 }
@.str = [9 x i8] c"%c %c %d\00"
define void @main() {
%1 = alloca %union.U
%2 = bitcast %union.U* %1 to %struct.anon*
%3 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
store i8 97, i8* %3
%4 = bitcast %union.U* %1 to %struct.anon*
%5 = getelementptr inbounds %struct.anon, %struct.anon* %4, i32 0, i32 1
store i8 98, i8* %5
%6 = bitcast %union.U* %1 to i64*
store i64 5, i64* %6
%7 = bitcast %union.U* %1 to %struct.anon*
%8 = getelementptr inbounds %struct.anon, %struct.anon* %7, i32 0, i32 0
%9 = load i8, i8* %8
%10 = bitcast %union.U* %1 to %struct.anon*
%11 = getelementptr inbounds %struct.anon, %struct.anon* %10, i32 0, i32 1
%12 = load i8, i8* %11
%13 = bitcast %union.U* %1 to i64*
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %9, i8 signext %12, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%c %c %d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext 5, i8 signext 0, i32 5)
ret void
}
/* Type definitions */
struct t_relay_client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ relay_weechat_protocol_recv(struct t_relay_client *,
                                               char const *);
void relay_weechat_recv(struct t_relay_client *client, const char *data) {
  relay_weechat_protocol_recv(client, data);
}


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

x86 assembly (clang, -O2):
<relay_weechat_recv>:
jmp    1030 <relay_weechat_protocol_recv@plt>

LLVM IR (-O0):
%struct.t_relay_client = type { i32 }
define void @relay_weechat_recv(%struct.t_relay_client* %0, i8* %1) {
%3 = alloca %struct.t_relay_client*
%4 = alloca i8*
store %struct.t_relay_client* %0, %struct.t_relay_client** %3
store i8* %1, i8** %4
%5 = load %struct.t_relay_client*, %struct.t_relay_client** %3
%6 = load i8*, i8** %4
%7 = call i32 @relay_weechat_protocol_recv(%struct.t_relay_client* %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.t_relay_client = type { i32 }
define void @relay_weechat_recv(%struct.t_relay_client* %0, i8* %1) {
%3 = tail call i32 @relay_weechat_protocol_recv(%struct.t_relay_client* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rolling_sign();
int /*<<< orphan*/ usleep(int);
int main(int argc, char **argv) {
  for (;;) {
    rolling_sign();
    usleep(1000 * 500);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rolling_sign@plt>
mov    $0x7a120,%edi
call   1040 <usleep@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rolling_sign@plt>
mov    $0x7a120,%edi
call   1040 <usleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %6, %2
%7 = call i32 (...) @rolling_sign()
%8 = call i32 @usleep(i32 500000)
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 (...) @rolling_sign()
%5 = tail call i32 @usleep(i32 500000)
br label %3
}
/* Variables and functions */
double log(double);
double Log2(double n) { return log(n) / log(2.0); }


x86 assembly (clang, -O0):
<Log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Log2>:
push   %rax
call   1030 <log@plt>
divsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Log2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
%5 = call double @log(double 2.000000e+00)
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @Log2(double %0) {
%2 = tail call double @log(double %0)
%3 = fdiv double %2, 0x3FE62E42FEFA39EF
ret double %3
}
float dummy() {
  float f = 0.5;
  return f;
}


x86 assembly (clang, -O0):
<dummy>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @dummy() {
%1 = alloca float
store float 5.000000e-01, float* %1
%2 = load float, float* %1
ret float %2
}

LLVM IR (-O2):
define float @dummy() {
ret float 5.000000e-01
}
int isEqual(int a, int b) {}


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

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

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

LLVM IR (-O2):
define i32 @isEqual(i32 %0, i32 %1) {
ret i32 undef
}
void mca_close(void) {}


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

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

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

LLVM IR (-O2):
define void @mca_close() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void dispsynt(char **argv) {
  fprintf(stderr,
          "Syntax : %s i_sac_list(input) o_sac_list(output) o_dir(output) "
          "[-icmtf] [-h]\n",
          argv[0]);
}


x86 assembly (clang, -O0):
<dispsynt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispsynt>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xedd(%rip),%rsi
mov    %eax,%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [78 x i8] c"Syntax : %s i_sac_list(input) o_sac_list(output) o_dir(output) [-icmtf] [-h]\0A\00"
define void @dispsynt(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [78 x i8] c"Syntax : %s i_sac_list(input) o_sac_list(output) o_dir(output) [-icmtf] [-h]\0A\00"
define void @dispsynt(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int cfsetispeed(struct termios *, unsigned int);
int termios_cfsetispeed(struct termios *t, unsigned int b) {
  return cfsetispeed(t, b);
}


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

x86 assembly (clang, -O2):
<termios_cfsetispeed>:
jmp    1030 <cfsetispeed@plt>

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

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @termios_cfsetispeed(%struct.termios* %0, i32 %1) {
%3 = tail call i32 @cfsetispeed(%struct.termios* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
#define SCHED_FIFO 129
#define SCHED_RR 128
const char *sched_policy_name(int policy) {
  switch (policy) {
  case SCHED_FIFO:
    return "SCHED_FIFO";
  case SCHED_RR:
    return "SCHED_RR";
  default:
    return "UNKNOWN";
  }
}


x86 assembly (clang, -O0):
<sched_policy_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x80,%eax
je     1140 <sched_policy_name+0x40>
jmp    111d <sched_policy_name+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x81,%eax
jne    1150 <sched_policy_name+0x50>
jmp    1130 <sched_policy_name+0x30>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <sched_policy_name+0x5b>
lea    0xec4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <sched_policy_name+0x5b>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sched_policy_name>:
cmp    $0x80,%edi
lea    0xefe(%rip),%rax
lea    0xf00(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x81,%edi
lea    0xedb(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"SCHED_FIFO\00"
@.str.1 = [9 x i8] c"SCHED_RR\00"
@.str.2 = [8 x i8] c"UNKNOWN\00"
define i8* @sched_policy_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 129, label %5
i32 128, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [11 x i8] c"SCHED_FIFO\00"
@.str.1 = [9 x i8] c"SCHED_RR\00"
@.str.2 = [8 x i8] c"UNKNOWN\00"
define i8* @sched_policy_name(i32 %0) {
%2 = icmp eq i32 %0, 128
%3 = select i1 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 129
%5 = select i1 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int cache_name_compare(char const *, int, char const *, int);
int strlen(char const *);
int cmp_name(const void *p1, const void *p2) {
  const char *n1 = *(const char **)p1;
  const char *n2 = *(const char **)p2;
  int l1 = strlen(n1), l2 = strlen(n2);
  return cache_name_compare(n1, l1, n2, l2);
}


x86 assembly (clang, -O0):
<cmp_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%ecx
call   1040 <cache_name_compare@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_name>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%rbx
mov    (%rsi),%r14
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <cache_name_compare@plt>

LLVM IR (-O0):
define i32 @cmp_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i8**
%11 = load i8*, i8** %10
store i8* %11, i8** %5
%12 = load i8*, i8** %4
%13 = bitcast i8* %12 to i8**
%14 = load i8*, i8** %13
store i8* %14, i8** %6
%15 = load i8*, i8** %5
%16 = call i32 @strlen(i8* %15)
store i32 %16, i32* %7
%17 = load i8*, i8** %6
%18 = call i32 @strlen(i8* %17)
store i32 %18, i32* %8
%19 = load i8*, i8** %5
%20 = load i32, i32* %7
%21 = load i8*, i8** %6
%22 = load i32, i32* %8
%23 = call i32 @cache_name_compare(i8* %19, i32 %20, i8* %21, i32 %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @cmp_name(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strlen(i8* %4)
%8 = tail call i32 @strlen(i8* %6)
%9 = tail call i32 @cache_name_compare(i8* %4, i32 %7, i8* %6, i32 %8)
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
scalar_t__ sem_post(int /*<<< orphan*/ *);
int unlock(sem_t *sem_id) {
  if (sem_id) {
    if (sem_post(sem_id) < 0) {
      perror("sem_wait");
      return -1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1167 <unlock+0x47>
mov    -0x10(%rbp),%rdi
call   1030 <sem_post@plt>
cmp    $0x0,%rax
jge    1162 <unlock+0x42>
lea    0xeaf(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <unlock+0x4e>
jmp    1167 <unlock+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlock>:
push   %rbx
xor    %ebx,%ebx
test   %rdi,%rdi
je     1132 <unlock+0x12>
call   1030 <sem_post@plt>
test   %rax,%rax
js     1136 <unlock+0x16>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec3(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%ebx
jmp    1132 <unlock+0x12>

LLVM IR (-O0):
@.str = [9 x i8] c"sem_wait\00"
define i32 @unlock(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32*, i32** %3
%8 = call i64 @sem_post(i32* %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %14
12: ; preds = %6
br label %13
13: ; preds = %12, %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [9 x i8] c"sem_wait\00"
define i32 @unlock(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @sem_post(i32* %0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %1, %3, %6
%9 = phi i32 [ -1, %6 ], [ 0, %3 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ shutdown(int, int);
int ksock_shutdown(int fd, int how) {
  if (0 != shutdown(fd, how)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ksock_shutdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <shutdown@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1143 <ksock_shutdown+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <ksock_shutdown+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ksock_shutdown>:
push   %rax
call   1030 <shutdown@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ksock_shutdown(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i64 @shutdown(i32 %6, i32 %7)
%9 = icmp ne i64 0, %8
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @ksock_shutdown(i32 %0, i32 %1) {
%3 = tail call i64 @shutdown(i32 %0, i32 %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void show(int i) { printf("%d I AM LIB2\n", i); }


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

x86 assembly (clang, -O2):
<show>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"%d I AM LIB2\0A\00"
define void @show(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void *tool_thread_fini(pthread_t args) {
  printf("finalizing thread %#lx\n", args);
}


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

x86 assembly (clang, -O2):
<tool_thread_fini>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"finalizing thread %#lx\0A\00"
define i8* @tool_thread_fini(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
@.str = [24 x i8] c"finalizing thread %#lx\0A\00"
define noalias i8* @tool_thread_fini(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* undef
}
float ReturnFloatFromDouble(double d) { return d; }


x86 assembly (clang, -O0):
<ReturnFloatFromDouble>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnFloatFromDouble>:
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @ReturnFloatFromDouble(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptrunc double %3 to float
ret float %4
}

LLVM IR (-O2):
define float @ReturnFloatFromDouble(double %0) {
%2 = fptrunc double %0 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int const);
int /*<<< orphan*/ stdout;
int func_int_param(const int d) {
  printf("c: got int (%d)\n", d);
  fflush(stdout);
  return 107;
}


x86 assembly (clang, -O0):
<func_int_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x6b,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_int_param>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x6b,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"c: got int (%d)\0A\00"
@stdout = global i32 0
define i32 @func_int_param(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret i32 107
}

LLVM IR (-O2):
@.str = [17 x i8] c"c: got int (%d)\0A\00"
@stdout = global i32 0
define i32 @func_int_param(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret i32 107
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void fprint_movx_to_atDPTR(FILE *stream) {
  fprintf(stream, "MOVX  @DPTR, A                  ");
}


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

x86 assembly (clang, -O2):
<fprint_movx_to_atDPTR>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [33 x i8] c"MOVX @DPTR, A \00"
define void @fprint_movx_to_atDPTR(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 32, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int standard_scale_system(int mode, double *cff) {
  int fail, *b;
  fail = _ada_use_c2phc4c(590, &mode, b, cff, 0);
  return fail;
}


x86 assembly (clang, -O0):
<standard_scale_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x24e,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_scale_system>:
push   %rax
mov    %rsi,%rcx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x24e,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @standard_scale_system(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %3
store double* %1, double** %4
%7 = load i32*, i32** %6
%8 = load double*, double** %4
%9 = call i32 @_ada_use_c2phc4c(i32 590, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @standard_scale_system(i32 %0, double* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 590, i32* %3, i32* undef, double* %1, i32 0)
ret i32 %4
}
/* Type definitions */
typedef size_t ssize_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int atoi(char *);
size_t file_read(char const *, char *, int);
int file_read_int(const char *path, int *val) {
  char buf[50];
  ssize_t ret = file_read(path, buf, sizeof(buf) - 1);
  if (ret > 0) {
    buf[ret] = '\0';
    *val = atoi(buf);
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<file_read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x31,%edx
call   1030 <file_read@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jbe    1177 <file_read_int+0x57>
mov    -0x58(%rbp),%rax
movb   $0x0,-0x50(%rbp,%rax,1)
lea    -0x50(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    117e <file_read_int+0x5e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_read_int>:
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
mov    %rsp,%rsi
mov    $0x31,%edx
call   1030 <file_read@plt>
test   %rax,%rax
je     114c <file_read_int+0x2c>
movb   $0x0,(%rsp,%rax,1)
mov    %rsp,%rdi
call   1040 <atoi@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
jmp    1151 <file_read_int+0x31>
mov    $0xffffffff,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @file_read_int(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca [50 x i8]
%7 = alloca i64
store i8* %0, i8** %4
store i32* %1, i32** %5
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%10 = call i64 @file_read(i8* %8, i8* %9, i32 49)
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = icmp ugt i64 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i64, i64* %7
%15 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 %14
store i8 0, i8* %15
%16 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%17 = call i32 @atoi(i8* %16)
%18 = load i32*, i32** %5
store i32 %17, i32* %18
store i32 0, i32* %3
br label %20
19: ; preds = %2
store i32 -1, i32* %3
br label %20
20: ; preds = %19, %13
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @file_read_int(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i64 @file_read(i8* %0, i8* %4, i32 49)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 %5
store i8 0, i8* %8
%9 = call i32 @atoi(i8* %4)
store i32 %9, i32* %1
br label %10
10: ; preds = %2, %7
%11 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int x;
  int y;
  assume(x == 1 && y == 0);
  while (1) {
    x = x + y;
    y++;
    assert(x >= y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    1148 <main+0x28>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setge  %al
and    $0x1,%al
mov    %al,-0xe(%rbp)
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1155 <main+0x35>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
call   1040 <assume@plt>
nopw   0x0(%rax,%rax,1)
lea    (%rbx,%rax,1),%ebp
add    $0x1,%ebx
xor    %edi,%edi
test   %eax,%eax
setg   %dil
call   1030 <assert@plt>
mov    %ebp,%eax
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 0
br label %9
9: ; preds = %6, %0
%10 = phi i1 [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assume(i32 %11)
br label %13
13: ; preds = %9, %13
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = add nsw i32 %14, %15
store i32 %16, i32* %2
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = icmp sge i32 %19, %20
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
br label %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ undef, %0 ], [ %5, %2 ]
%4 = phi i32 [ undef, %0 ], [ %6, %2 ]
%5 = add nsw i32 %4, %3
%6 = add nsw i32 %4, 1
%7 = icmp sgt i32 %3, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
br label %2
}