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

/* Variables and functions */
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void sig_block(int signum) {
  sigset_t ss;
  sigemptyset(&ss);
  sigprocmask(SIG_SETMASK, 0, &ss);
  sigaddset(&ss, signum);
  sigprocmask(SIG_BLOCK, &ss, 0);
}


x86 assembly (clang, -O0):
<sig_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    -0x4(%rbp),%esi
lea    -0x8(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_block>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <sigprocmask@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <sigaddset@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
@SIG_BLOCK = global i32 0
define void @sig_block(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* @SIG_SETMASK
%6 = call i32 @sigprocmask(i32 %5, i32* null, i32* %3)
%7 = load i32, i32* %2
%8 = call i32 @sigaddset(i32* %3, i32 %7)
%9 = load i32, i32* @SIG_BLOCK
%10 = call i32 @sigprocmask(i32 %9, i32* %3, i32* null)
ret void
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
@SIG_BLOCK = global i32 0
define void @sig_block(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = load i32, i32* @SIG_SETMASK
%6 = call i32 @sigprocmask(i32 %5, i32* null, i32* %2)
%7 = call i32 @sigaddset(i32* %2, i32 %0)
%8 = load i32, i32* @SIG_BLOCK
%9 = call i32 @sigprocmask(i32 %8, i32* %2, i32* null)
ret void
}
void vector_scale_2d(double v[2], double s) {
  v[0] *= s;
  v[1] *= s;
}


x86 assembly (clang, -O0):
<vector_scale_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_scale_2d>:
movupd (%rdi),%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @vector_scale_2d(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fmul double %8, %5
store double %9, double* %7
%10 = load double, double* %4
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fmul double %13, %10
store double %14, double* %12
ret void
}

LLVM IR (-O2):
define void @vector_scale_2d(double* nocapture %0, double %1) {
%3 = bitcast double* %0 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
%7 = fmul <2 x double> %4, %6
%8 = bitcast double* %0 to <2 x double>*
store <2 x double> %7, <2 x double>* %8
ret void
}
void ew(unsigned short int c9, int stuff) {
  int e1;
  for (;;) {
    unsigned int *by = &e1;
    int *fd = &stuff;
    *fd = c9;
    fd = *fd;
    if (*fd != 0)
      for (*by = 0; *by < 2; ++*by)
        c9 *= e1;
  }
}


x86 assembly (clang, -O0):
<ew>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movzwl -0x2(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
je     117a <ew+0x7a>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x2,(%rax)
jae    1175 <ew+0x75>
mov    -0xc(%rbp),%ecx
movzwl -0x2(%rbp),%eax
imul   %ecx,%eax
mov    %ax,-0x2(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    114a <ew+0x4a>
jmp    117a <ew+0x7a>
jmp    110e <ew+0xe>

x86 assembly (clang, -O2):
<ew>:
movzwl %di,%eax
cmpl   $0x0,(%rax)
je     1100 <ew>
xor    %edi,%edi
jmp    1100 <ew>

LLVM IR (-O0):
define void @ew(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
store i16 %0, i16* %3
store i32 %1, i32* %4
br label %8
8: ; preds = %36, %2
store i32* %5, i32** %6
store i32* %4, i32** %7
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = load i32*, i32** %7
store i32 %10, i32* %11
%12 = load i32*, i32** %7
%13 = load i32, i32* %12
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store i32* %15, i32** %7
%16 = load i32*, i32** %7
%17 = load i32, i32* %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %36
19: ; preds = %8
%20 = load i32*, i32** %6
store i32 0, i32* %20
br label %21
21: ; preds = %31, %19
%22 = load i32*, i32** %6
%23 = load i32, i32* %22
%24 = icmp ult i32 %23, 2
br i1 %24, label %25, label %35
25: ; preds = %21
%26 = load i32, i32* %5
%27 = load i16, i16* %3
%28 = zext i16 %27 to i32
%29 = mul nsw i32 %28, %26
%30 = trunc i32 %29 to i16
store i16 %30, i16* %3
br label %31
31: ; preds = %25
%32 = load i32*, i32** %6
%33 = load i32, i32* %32
%34 = add i32 %33, 1
store i32 %34, i32* %32
br label %21
35: ; preds = %21
br label %36
36: ; preds = %35, %8
br label %8
}

LLVM IR (-O2):
define void @ew(i16 zeroext %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i16 [ %0, %2 ], [ %9, %3 ]
%5 = zext i16 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i16 %4, i16 0
br label %3
}
int bsr(unsigned v) { return __builtin_clz(v) ^ 31; }


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

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

LLVM IR (-O0):
define i32 @bsr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.ctlz.i32(i32 %3, i1 true)
%5 = xor i32 %4, 31
ret i32 %5
}

LLVM IR (-O2):
define i32 @bsr(i32 %0) {
%2 = tail call i32 @llvm.ctlz.i32(i32 %0, i1 true)
%3 = xor i32 %2, 31
ret i32 %3
}
void install_crash_handler() {}


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

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

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

LLVM IR (-O2):
define void @install_crash_handler() {
ret void
}
void *copy_live_var(void *v) { return (v); }


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

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

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

LLVM IR (-O2):
define i8* @copy_live_var(i8* readnone returned %0) {
ret i8* %0
}
int _utf8_is_continuation(unsigned char c) { return (c & 0xc0) == 0x80; }


x86 assembly (clang, -O0):
<_utf8_is_continuation>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_utf8_is_continuation>:
and    $0xc0,%dil
xor    %eax,%eax
cmp    $0x80,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @_utf8_is_continuation(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 192
%6 = icmp eq i32 %5, 128
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @_utf8_is_continuation(i8 zeroext %0) {
%2 = and i8 %0, -64
%3 = icmp eq i8 %2, -128
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ RPI_AuxMiniUartWrite(unsigned int);
void dump_digit(unsigned int c) {
  c &= 15;
  if (c < 10) {
    c = '0' + c;
  } else {
    c = 'A' + c - 10;
  }
  RPI_AuxMiniUartWrite(c);
}


x86 assembly (clang, -O0):
<dump_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jae    113c <dump_digit+0x2c>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <dump_digit+0x38>
mov    -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <RPI_AuxMiniUartWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_digit>:
and    $0xf,%edi
lea    0x30(%rdi),%ecx
lea    0x37(%rdi),%eax
cmp    $0xa,%edi
cmovb  %ecx,%eax
mov    %eax,%edi
jmp    1030 <RPI_AuxMiniUartWrite@plt>

LLVM IR (-O0):
define void @dump_digit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 10
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add i32 48, %8
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %2
%12 = add i32 65, %11
%13 = sub i32 %12, 10
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %7
%15 = load i32, i32* %2
%16 = call i32 @RPI_AuxMiniUartWrite(i32 %15)
ret void
}

LLVM IR (-O2):
define void @dump_digit(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ult i32 %2, 10
%4 = or i32 %2, 48
%5 = add nuw nsw i32 %2, 55
%6 = select i1 %3, i32 %4, i32 %5
%7 = tail call i32 @RPI_AuxMiniUartWrite(i32 %6)
ret void
}
int i386_iopl(const int level) { return -2; }


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

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

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

LLVM IR (-O2):
define i32 @i386_iopl(i32 %0) {
ret i32 -2
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
char tolower(char);
void buf_tolower(char *str, ssize_t size) {
  while (size--) {
    str[size] = tolower(str[size]);
  }
}


x86 assembly (clang, -O0):
<buf_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     115c <buf_tolower+0x4c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1120 <buf_tolower+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_tolower>:
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     1136 <buf_tolower+0x26>
mov    %rsi,%rbx
mov    %rdi,%r14
nop
movsbl -0x1(%r14,%rbx,1),%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%r14,%rbx,1)
add    $0xffffffffffffffff,%rbx
jne    1120 <buf_tolower+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @buf_tolower(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %9, %2
%6 = load i64, i64* %4
%7 = add i64 %6, -1
store i64 %7, i64* %4
%8 = icmp ne i64 %6, 0
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = getelementptr inbounds i8, i8* %10, i64 %11
%13 = load i8, i8* %12
%14 = call signext i8 @tolower(i8 signext %13)
%15 = load i8*, i8** %3
%16 = load i64, i64* %4
%17 = getelementptr inbounds i8, i8* %15, i64 %16
store i8 %14, i8* %17
br label %5
18: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @buf_tolower(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %1, %2 ]
%6 = add i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call signext i8 @tolower(i8 signext %8)
store i8 %9, i8* %7
%10 = icmp eq i64 %6, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
unsigned int *calloc(size_t, size_t);
int /*<<< orphan*/ printf_err(char *);
void *x_calloc(size_t nmemb, size_t size) {
  unsigned int *ptr;
  ptr = calloc(nmemb, size);
  if (ptr == NULL)
    printf_err("memory error - calloc returned zero\n");
  return (void *)ptr;
}


x86 assembly (clang, -O0):
<x_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <x_calloc+0x38>
lea    0xead(%rip),%rdi
call   1030 <printf_err@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_calloc>:
push   %rbx
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <x_calloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <printf_err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"memory error - calloc returned zero\0A\00"
define i8* @x_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i32* @calloc(i64 %6, i64 %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf_err(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i32*, i32** %5
%15 = bitcast i32* %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
@.str = [37 x i8] c"memory error - calloc returned zero\0A\00"
define noalias i8* @x_calloc(i64 %0, i64 %1) {
%3 = tail call i32* @calloc(i64 %0, i64 %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @printf_err(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
%8 = bitcast i32* %3 to i8*
ret i8* %8
}
/* Type definitions */
struct crc_config {
  int dummy;
};
struct bigint {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ crc_append_bits(struct crc_config const *, void const *,
                                   int /*<<< orphan*/, int, struct bigint *);
void crc_append(const struct crc_config *crc, const void *msg, size_t len,
                struct bigint *checksum) {
  crc_append_bits(crc, msg, 0, 8 * len, checksum);
}


x86 assembly (clang, -O0):
<crc_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%ecx
mov    -0x20(%rbp),%r8
xor    %edx,%edx
call   1030 <crc_append_bits@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc_append>:
mov    %rcx,%r8
lea    0x0(,%rdx,8),%ecx
xor    %edx,%edx
jmp    1030 <crc_append_bits@plt>

LLVM IR (-O0):
%struct.crc_config = type { i32 }
%struct.bigint = type { i32 }
define void @crc_append(%struct.crc_config* %0, i8* %1, i64 %2, %struct.bigint* %3) {
%5 = alloca %struct.crc_config*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca %struct.bigint*
store %struct.crc_config* %0, %struct.crc_config** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store %struct.bigint* %3, %struct.bigint** %8
%9 = load %struct.crc_config*, %struct.crc_config** %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = mul i64 8, %11
%13 = trunc i64 %12 to i32
%14 = load %struct.bigint*, %struct.bigint** %8
%15 = call i32 @crc_append_bits(%struct.crc_config* %9, i8* %10, i32 0, i32 %13, %struct.bigint* %14)
ret void
}

LLVM IR (-O2):
%struct.crc_config = type { i32 }
%struct.bigint = type { i32 }
define void @crc_append(%struct.crc_config* %0, i8* %1, i64 %2, %struct.bigint* %3) {
%5 = trunc i64 %2 to i32
%6 = shl i32 %5, 3
%7 = tail call i32 @crc_append_bits(%struct.crc_config* %0, i8* %1, i32 0, i32 %6, %struct.bigint* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *);
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void signalHandler_child(int p) {
  while (waitpid(-1, NULL, WNOHANG) > 0) {
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<signalHandler_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <waitpid@plt>
cmp    $0x0,%rax
jle    1151 <signalHandler_child+0x31>
jmp    112b <signalHandler_child+0xb>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signalHandler_child>:
push   %rbx
mov    0x2ec0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <waitpid@plt>
test   %rax,%rax
jg     1130 <signalHandler_child+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @signalHandler_child(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @signalHandler_child(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @putchar(i32 10)
ret void
}
int fun(int n, int m) {
  if (n < m)
    return n;
  return fun(n / m, m) * 10 + n % m;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1135 <fun+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <fun+0x4b>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <fun@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    -0x10(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
mov    %edi,%eax
cmp    %esi,%edi
jl     112a <fun+0x1a>
push   %rbx
cltd
idiv   %esi
mov    %edx,%ebx
mov    %eax,%edi
call   1030 <fun@plt>
lea    (%rax,%rax,4),%eax
lea    (%rbx,%rax,2),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fun(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 = icmp slt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %22
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sdiv i32 %12, %13
%15 = load i32, i32* %5
%16 = call i32 @fun(i32 %14, i32 %15)
%17 = mul nsw i32 %16, 10
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = srem i32 %18, %19
%21 = add nsw i32 %17, %20
store i32 %21, i32* %3
br label %22
22: ; preds = %11, %9
%23 = load i32, i32* %3
ret i32 %23
}

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

/* Variables and functions */
unsigned char *ripemd160_file(unsigned char *, int /*<<< orphan*/ *);
unsigned char *hash_file_ripemd160(unsigned char *out, FILE *fp) {
  return ripemd160_file(out, fp);
}


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

x86 assembly (clang, -O2):
<hash_file_ripemd160>:
jmp    1030 <ripemd160_file@plt>

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

LLVM IR (-O2):
define i8* @hash_file_ripemd160(i8* %0, i32* %1) {
%3 = tail call i8* @ripemd160_file(i8* %0, i32* %1)
ret i8* %3
}
/* Variables and functions */
scalar_t__ isspace(char);
scalar_t__ isspecial(char);
bool isdelim(char c) { return (isspecial(c) || isspace(c) || '\0' == c); }


x86 assembly (clang, -O0):
<isdelim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isspecial@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1172 <isdelim+0x52>
movsbl -0x1(%rbp),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1172 <isdelim+0x52>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdelim>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <isspecial@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    114a <isdelim+0x2a>
movsbl %bpl,%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    114a <isdelim+0x2a>
xor    %ebx,%ebx
test   %bpl,%bpl
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isdelim(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isspecial(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isspace(i8 signext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 0, %12
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isdelim(i8 signext %0) {
%2 = tail call i64 @isspecial(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @isspace(i8 signext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = icmp eq i8 %0, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %4, %1
%11 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %9, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M131_f(char *s) {
  debug("M131_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M131_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M131_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M131_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M131_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M131_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M131_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
__attribute__((no, noclone)) signed __int128 t113_5sub(signed __int128 x) {
  signed __int128 r;
  if (__builtin_sub_overflow(
          x,
          (signed __int128)((
              (signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1))),
          &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t113_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
add    $0x1,%rdx
movabs $0x8000000000000000,%rax
adc    %rax,%rcx
seto   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1161 <t113_5sub+0x51>
jmp    1168 <t113_5sub+0x58>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t113_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
add    $0x1,%r14
movabs $0x8000000000000000,%rbx
adc    %rsi,%rbx
jno    1131 <t113_5sub+0x21>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t113_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %11, i128 170141183460469231731687303715884105727)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t113_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %6, i128 -170141183460469231731687303715884105727)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
char const *bprintf(char *, int);
int pscanf(char const *, char *, int *);
const char *temp(const char *file) {
  int temp;
  return (pscanf(file, "%d", &temp) == 1) ? bprintf("%d", temp / 1000) : NULL;
}


x86 assembly (clang, -O0):
<temp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <pscanf@plt>
cmp    $0x1,%eax
jne    116b <temp+0x4b>
mov    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xea3(%rip),%rdi
call   1030 <bprintf@plt>
mov    %rax,-0x18(%rbp)
jmp    1176 <temp+0x56>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1176 <temp+0x56>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<temp>:
push   %rax
lea    0xed8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1040 <pscanf@plt>
cmp    $0x1,%eax
jne    115e <temp+0x3e>
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x26,%rsi
add    %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <bprintf@plt>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @temp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @pscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sdiv i32 %8, 1000
%10 = call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %7
%13 = phi i8* [ %10, %7 ], [ null, %11 ]
ret i8* %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @temp(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @pscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 1000
%9 = call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ null, %1 ]
ret i8* %11
}
void convert(void) {
  struct {
    typeof(0) f0;
  } v0;
}


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

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

LLVM IR (-O0):
%struct.anon = type { i32 }
define void @convert() {
%1 = alloca %struct.anon
ret void
}

LLVM IR (-O2):
define void @convert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int tcflow(int fd, int action) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<tcflow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ed7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebe(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcflow>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @tcflow(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
void d2i_EDIPARTYNAME(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_EDIPARTYNAME() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aic_mask_off(int);
void systick_suspend() { aic_mask_off(10); }


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

x86 assembly (clang, -O2):
<systick_suspend>:
mov    $0xa,%edi
jmp    1030 <aic_mask_off@plt>

LLVM IR (-O0):
define void @systick_suspend() {
%1 = call i32 @aic_mask_off(i32 10)
ret void
}

LLVM IR (-O2):
define void @systick_suspend() {
%1 = tail call i32 @aic_mask_off(i32 10)
ret void
}
int toupper(int c) {
  if (c >= 'a' && c <= 'z')
    return c - 32;
  else
    return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1129 <toupper+0x29>
cmpl   $0x7a,-0x8(%rbp)
jg     1129 <toupper+0x29>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <toupper+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ gamma_1(int /*<<< orphan*/ *);
int /*<<< orphan*/ pi1(int /*<<< orphan*/ *);
int /*<<< orphan*/ pi2(int /*<<< orphan*/ *);
int /*<<< orphan*/ theta(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void noekeon_round(uint32_t *key, uint32_t *state, uint8_t const1,
                   uint8_t const2) {
  ((uint8_t *)state)[0] ^= const1;
  theta(key, state);
  ((uint8_t *)state)[0] ^= const2;
  pi1(state);
  gamma_1(state);
  pi2(state);
}


x86 assembly (clang, -O0):
<noekeon_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <theta@plt>
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <pi1@plt>
mov    -0x10(%rbp),%rdi
call   1060 <gamma_1@plt>
mov    -0x10(%rbp),%rdi
call   1050 <pi2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noekeon_round>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rsi,%rbx
xor    %edx,(%rsi)
call   1040 <theta@plt>
xor    %ebp,(%rbx)
mov    %rbx,%rdi
call   1030 <pi1@plt>
mov    %rbx,%rdi
call   1060 <gamma_1@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <pi2@plt>

LLVM IR (-O0):
define void @noekeon_round(i32* %0, i32* %1, i32 %2, i32 %3) {
%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
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32*, i32** %6
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = xor i32 %12, %9
store i32 %13, i32* %11
%14 = load i32*, i32** %5
%15 = load i32*, i32** %6
%16 = call i32 @theta(i32* %14, i32* %15)
%17 = load i32, i32* %8
%18 = load i32*, i32** %6
%19 = getelementptr inbounds i32, i32* %18, i64 0
%20 = load i32, i32* %19
%21 = xor i32 %20, %17
store i32 %21, i32* %19
%22 = load i32*, i32** %6
%23 = call i32 @pi1(i32* %22)
%24 = load i32*, i32** %6
%25 = call i32 @gamma_1(i32* %24)
%26 = load i32*, i32** %6
%27 = call i32 @pi2(i32* %26)
ret void
}

LLVM IR (-O2):
define void @noekeon_round(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = load i32, i32* %1
%6 = xor i32 %5, %2
store i32 %6, i32* %1
%7 = tail call i32 @theta(i32* %0, i32* %1)
%8 = load i32, i32* %1
%9 = xor i32 %8, %3
store i32 %9, i32* %1
%10 = tail call i32 @pi1(i32* %1)
%11 = tail call i32 @gamma_1(i32* %1)
%12 = tail call i32 @pi2(i32* %1)
ret void
}
int Satnum(int maxi) {
  return (int)(maxi * __extension__({
                 double tmp = ((((double)ya_random()) * ((double)(1))) /
                               ((double)((unsigned int)~0)));
                 tmp < 0 ? (-tmp) : tmp;
               }));
}


x86 assembly (clang, -O0):
<Satnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x0,%al
call   1030 <ya_random@plt>
cvtsi2sd %eax,%xmm0
movsd  0xed0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1181 <Satnum+0x71>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    118b <Satnum+0x7b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  %xmm1,-0x18(%rbp)
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Satnum>:
push   %rax
cvtsi2sd %edi,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <ya_random@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xed0(%rip),%xmm0
movapd 0xed8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
mulsd  (%rsp),%xmm3
cvttsd2si %xmm3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Satnum(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to double
%7 = call i32 (...) @ya_random()
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 1.000000e+00
%10 = fdiv double %9, 0x41EFFFFFFFE00000
store double %10, double* %3
%11 = load double, double* %3
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load double, double* %3
%15 = fneg double %14
br label %18
16: ; preds = %1
%17 = load double, double* %3
br label %18
18: ; preds = %16, %13
%19 = phi double [ %15, %13 ], [ %17, %16 ]
store double %19, double* %4
%20 = load double, double* %4
%21 = fmul double %6, %20
%22 = fptosi double %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @Satnum(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call i32 (...) @ya_random()
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 0x41EFFFFFFFE00000
%6 = fcmp olt double %5, 0.000000e+00
%7 = fneg double %5
%8 = select i1 %6, double %7, double %5
%9 = fmul double %8, %2
%10 = fptosi double %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
void DatoCaracter(void) {
  char a = 'A';
  char b = 'B';
  char c = 'C';
  printf("Las primeras tres letras del abecedario son: %c, %c, %c\n", a, b, c);
}


x86 assembly (clang, -O0):
<DatoCaracter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x41,-0x1(%rbp)
movb   $0x42,-0x2(%rbp)
movb   $0x43,-0x3(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
lea    0xecf(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x3(%rbp),%ecx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DatoCaracter>:
lea    0xee9(%rip),%rdi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"Las primeras tres letras del abecedario son: %c, %c, %c\0A\00"
define void @DatoCaracter() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
store i8 65, i8* %1
store i8 66, i8* %2
store i8 67, i8* %3
%4 = load i8, i8* %1
%5 = load i8, i8* %2
%6 = load i8, i8* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8 signext %4, i8 signext %5, i8 signext %6)
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"Las primeras tres letras del abecedario son: %c, %c, %c\0A\00"
define void @DatoCaracter() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 66, i8 signext 67)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void _fatal(char *m) {
  fprintf(stderr, "%s", m);
  exit(1);
}


x86 assembly (clang, -O0):
<_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @_fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @_fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
size_t max_size(size_t a, size_t b) { return (a < b) ? b : a; }


x86 assembly (clang, -O0):
<max_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <max_size+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max_size+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_size>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovb  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @max_size(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void printspaces(int num) {
  int jj;
  for (jj = 0; jj < num; jj++)
    putchar(' ');
}


x86 assembly (clang, -O0):
<printspaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1146 <printspaces+0x36>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printspaces+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printspaces>:
push   %rbx
test   %edi,%edi
jle    112f <printspaces+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printspaces+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @printspaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i8 signext 32)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int http_lib_init();
int ha7net_lib_init(void) { return (http_lib_init()); }


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

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

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

LLVM IR (-O2):
define i32 @ha7net_lib_init() {
%1 = tail call i32 (...) @http_lib_init()
ret i32 %1
}
int is_ws(char c) {
  if (c == ' ' || c == '\n' || c == '\t')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<is_ws>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <is_ws+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1131 <is_ws+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    113d <is_ws+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <is_ws+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ws>:
cmp    $0x20,%dil
ja     1120 <is_ws+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_ws+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_ws(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 10
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
br i1 %14, label %15, label %16
15: ; preds = %11, %7, %1
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_ws(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
unsigned long long bswap_64(const unsigned long long x) {
  return (
      (((x)&0xff00000000000000ull) >> 56) |
      (((x)&0x00ff000000000000ull) >> 40) |
      (((x)&0x0000ff0000000000ull) >> 24) | (((x)&0x000000ff00000000ull) >> 8) |
      (((x)&0x00000000ff000000ull) << 8) | (((x)&0x0000000000ff0000ull) << 24) |
      (((x)&0x000000000000ff00ull) << 40) |
      (((x)&0x00000000000000ffull) << 56));
}


x86 assembly (clang, -O0):
<bswap_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xff00000000000000,%rax
and    -0x8(%rbp),%rax
shr    $0x38,%rax
movabs $0xff000000000000,%rcx
and    -0x8(%rbp),%rcx
shr    $0x28,%rcx
or     %rcx,%rax
movabs $0xff0000000000,%rcx
and    -0x8(%rbp),%rcx
shr    $0x18,%rcx
or     %rcx,%rax
movabs $0xff00000000,%rcx
and    -0x8(%rbp),%rcx
shr    $0x8,%rcx
or     %rcx,%rax
movabs $0xff000000,%rcx
and    -0x8(%rbp),%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff0000,%rcx
shl    $0x18,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x28,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff,%rcx
shl    $0x38,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @bswap_64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, -72057594037927936
%5 = lshr i64 %4, 56
%6 = load i64, i64* %2
%7 = and i64 %6, 71776119061217280
%8 = lshr i64 %7, 40
%9 = or i64 %5, %8
%10 = load i64, i64* %2
%11 = and i64 %10, 280375465082880
%12 = lshr i64 %11, 24
%13 = or i64 %9, %12
%14 = load i64, i64* %2
%15 = and i64 %14, 1095216660480
%16 = lshr i64 %15, 8
%17 = or i64 %13, %16
%18 = load i64, i64* %2
%19 = and i64 %18, 4278190080
%20 = shl i64 %19, 8
%21 = or i64 %17, %20
%22 = load i64, i64* %2
%23 = and i64 %22, 16711680
%24 = shl i64 %23, 24
%25 = or i64 %21, %24
%26 = load i64, i64* %2
%27 = and i64 %26, 65280
%28 = shl i64 %27, 40
%29 = or i64 %25, %28
%30 = load i64, i64* %2
%31 = and i64 %30, 255
%32 = shl i64 %31, 56
%33 = or i64 %29, %32
ret i64 %33
}

LLVM IR (-O2):
define i64 @bswap_64(i64 %0) {
%2 = tail call i64 @llvm.bswap.i64(i64 %0)
ret i64 %2
}