#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 */
scalar_t__ isNicePlate(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  char plate[10 + 1];
  int T;
  scanf("%d", &T);
  while (T) {
    scanf("%s", plate);
    if (isNicePlate(plate))
      printf("nice\n");
    else
      printf("not nice\n");
    T--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
je     11ab <main+0x7b>
lea    -0xf(%rbp),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0xf(%rbp),%rdi
call   1040 <isNicePlate@plt>
cmp    $0x0,%rax
je     1191 <main+0x61>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    119d <main+0x6d>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <main+0x21>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebe(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
je     119b <main+0x6b>
lea    0xea7(%rip),%r14
lea    0xd(%rsp),%rbx
lea    0xe9e(%rip),%r15
lea    0xe9b(%rip),%r12
nop
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <isNicePlate@plt>
test   %rax,%rax
mov    %r12,%rdi
cmove  %r15,%rdi
call   1030 <puts@plt>
addl   $0xffffffff,0x8(%rsp)
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [6 x i8] c"nice\0A\00"
@.str.3 = [10 x i8] c"not nice\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %5
5: ; preds = %18, %0
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%12 = call i64 @isNicePlate(i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %18
16: ; preds = %8
%17 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
%19 = load i32, i32* %3
%20 = add nsw i32 %19, -1
store i32 %20, i32* %3
br label %5
21: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@str = [9 x i8] c"not nice\00"
@str.4 = [5 x i8] c"nice\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %0, %8
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%10 = call i64 @isNicePlate(i8* %3)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0)
%13 = call i32 @puts(i8* dereferenceable(1) %12)
%14 = load i32, i32* %2
%15 = add nsw i32 %14, -1
store i32 %15, i32* %2
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %8
17: ; preds = %8, %0
ret i32 0
}