#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void is_pali(int freq[]) {
  int even = 0;
  int odd = 0;
  int i;
  for (i = 0; i < 26; i++)
    if (freq[i] % 2 == 0)
      even++;
    else
      odd++;
  if (even >= 0 && odd <= 1)
    printf("YES\n");
  else
    printf("NO\n");
}


x86 assembly (clang, -O0):
<is_pali>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1a,-0x14(%rbp)
jge    1181 <is_pali+0x71>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1165 <is_pali+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116e <is_pali+0x5e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1173 <is_pali+0x63>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1131 <is_pali+0x21>
cmpl   $0x0,-0xc(%rbp)
jl     11a6 <is_pali+0x96>
cmpl   $0x1,-0x10(%rbp)
jg     11a6 <is_pali+0x96>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    11b2 <is_pali+0xa2>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pali>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
and    $0x1,%eax
and    $0x1,%ecx
movdqu 0x8(%rdi),%xmm0
movdqu 0x18(%rdi),%xmm1
movdqa 0xed3(%rip),%xmm2
pand   %xmm2,%xmm1
pand   %xmm2,%xmm0
paddd  %xmm1,%xmm0
movdqu 0x38(%rdi),%xmm1
movdqu 0x58(%rdi),%xmm3
movdqu 0x28(%rdi),%xmm4
movdqu 0x48(%rdi),%xmm5
pand   %xmm2,%xmm5
pand   %xmm2,%xmm4
paddd  %xmm5,%xmm4
pand   %xmm2,%xmm3
pand   %xmm2,%xmm1
paddd  %xmm3,%xmm1
paddd  %xmm4,%xmm1
pshufd $0xee,%xmm1,%xmm2
paddd  %xmm1,%xmm2
pshufd $0x55,%xmm2,%xmm1
paddd  %xmm2,%xmm1
movd   %xmm1,%edx
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%esi
add    %edx,%esi
add    %ecx,%esi
add    %eax,%esi
cmp    $0x2,%esi
lea    0xe6e(%rip),%rax
lea    0xe64(%rip),%rdi
cmovb  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"YES\0A\00"
@.str.1 = [4 x i8] c"NO\0A\00"
define void @is_pali(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %24, %1
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 26
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = load i32*, i32** %2
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = srem i32 %14, 2
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %9
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %23
20: ; preds = %9
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %23
23: ; preds = %20, %17
br label %24
24: ; preds = %23
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %6
27: ; preds = %6
%28 = load i32, i32* %3
%29 = icmp sge i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %27
%31 = load i32, i32* %4
%32 = icmp sle i32 %31, 1
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %37
35: ; preds = %30, %27
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
ret void
}

LLVM IR (-O2):
@str = [3 x i8] c"NO\00"
@str.2 = [4 x i8] c"YES\00"
define void @is_pali(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 1
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = bitcast i32* %7 to <8 x i32>*
%9 = load <8 x i32>, <8 x i32>* %8
%10 = and <8 x i32> %9, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
%11 = getelementptr inbounds i32, i32* %0, i64 10
%12 = bitcast i32* %11 to <16 x i32>*
%13 = load <16 x i32>, <16 x i32>* %12
%14 = and <16 x i32> %13, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
%15 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %14)
%16 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %10)
%17 = add nuw nsw i32 %15, %16
%18 = add nuw nsw i32 %17, %6
%19 = add nuw nsw i32 %18, %3
%20 = icmp ult i32 %19, 2
%21 = select i1 %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%22 = tail call i32 @puts(i8* dereferenceable(1) %21)
ret void
}