#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 atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int counter = 1;
  while (counter < argc) {
    int y = atoi(argv[counter++]);
    if ((y % 100 != 0 && y % 4 == 0) || y % 400 == 0) {
      printf("%d yes\n", y);
      continue;
    }
    printf("%d no\n", y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11cb <main+0xab>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     118f <main+0x6f>
mov    -0x18(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11a3 <main+0x83>
mov    -0x18(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b7 <main+0x97>
mov    -0x18(%rbp),%esi
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
jmp    113d <main+0x1d>
mov    -0x18(%rbp),%esi
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
cmp    $0x2,%edi
jl     11a0 <main+0x80>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
lea    0xec0(%rip),%r12
lea    0xec1(%rip),%r13
jmp    116f <main+0x4f>
nopl   0x0(%rax)
test   $0x3,%al
mov    %rdx,%rdi
cmove  %r12,%rdi
cmp    $0x28f5c29,%ecx
cmovb  %rdx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
cmp    %rbx,%r15
je     11a0 <main+0x80>
mov    (%r14,%rbx,8),%rdi
add    $0x1,%rbx
call   1040 <atoi@plt>
imul   $0xc28f5c29,%eax,%esi
add    $0x51eb850,%esi
mov    %esi,%ecx
ror    $0x2,%ecx
ror    $0x4,%esi
mov    %r12,%rdx
cmp    $0xa3d70b,%esi
jb     1150 <main+0x30>
mov    %r13,%rdx
jmp    1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d yes\0A\00"
@.str.1 = [7 x i8] c"%d no\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %23
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %8, %6 ]
%8 = add nuw nsw i64 %7, 1
%9 = getelementptr inbounds i8*, i8** %1, i64 %7
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = srem i32 %11, 100
%13 = icmp ne i32 %12, 0
%14 = and i32 %11, 3
%15 = icmp eq i32 %14, 0
%16 = and i1 %13, %15
%17 = srem i32 %11, 400
%18 = icmp eq i32 %17, 0
%19 = or i1 %16, %18
%20 = select i1 %19, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%21 = tail call i32 @printf(i8* %20, i32 %11)
%22 = icmp eq i64 %8, %5
br i1 %22, label %23, label %6
23: ; preds = %6, %2
ret i32 0
}