#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 *);
int /*<<< orphan*/ scanf(char *, int *, ...);
void main() {
  int i, n, x[5], y[5];
  scanf("%d", &n);
  for (i = 0; i < n; i++)
    scanf("%d%d", x + i, y + i);
  for (i = 0; i < n; i++)
    if (x[i] >= y[i])
      printf("MMM BRAINS\n");
    else
      printf("NO BRAINS\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1187 <main+0x67>
lea    -0x20(%rbp),%rsi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    -0x40(%rbp),%rdx
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <main+0x21>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e0 <main+0xc0>
movslq -0x4(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
movslq -0x4(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jl     11c1 <main+0xa1>
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
jmp    11cd <main+0xad>
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
jmp    11d2 <main+0xb2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    118e <main+0x6e>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11c5 <main+0xa5>
lea    0x30(%rsp),%r14
lea    0x10(%rsp),%r12
lea    0xea6(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
add    $0x4,%r14
add    $0x4,%r12
cmp    %rax,%rbx
jl     1160 <main+0x40>
test   %eax,%eax
jle    11c5 <main+0xa5>
xor    %ebx,%ebx
lea    0xe72(%rip),%r14
lea    0xe75(%rip),%r15
jmp    11b3 <main+0x93>
nopl   0x0(%rax)
call   1030 <puts@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jge    11c5 <main+0xa5>
mov    0x30(%rsp,%rbx,4),%eax
mov    %r14,%rdi
cmp    0x10(%rsp,%rbx,4),%eax
jl     11a0 <main+0x80>
mov    %r15,%rdi
jmp    11a0 <main+0x80>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%d%d\00"
@str = [10 x i8] c"NO BRAINS\00"
@str.4 = [11 x i8] c"MMM BRAINS\00"
define void @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast [5 x i32]* %2 to i8*
%6 = bitcast [5 x i32]* %3 to i8*
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %12, label %34
10: ; preds = %12
%11 = icmp sgt i32 %18, 0
br i1 %11, label %21, label %34
12: ; preds = %0, %12
%13 = phi i64 [ %17, %12 ], [ 0, %0 ]
%14 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %13
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %13
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %14, i32* %15)
%17 = add nuw nsw i64 %13, 1
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = icmp slt i64 %17, %19
br i1 %20, label %12, label %10
21: ; preds = %10, %21
%22 = phi i64 [ %30, %21 ], [ 0, %10 ]
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %22
%26 = load i32, i32* %25
%27 = icmp slt i32 %24, %26
%28 = select i1 %27, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0)
%29 = call i32 @puts(i8* dereferenceable(1) %28)
%30 = add nuw nsw i64 %22, 1
%31 = load i32, i32* %1
%32 = sext i32 %31 to i64
%33 = icmp slt i64 %30, %32
br i1 %33, label %21, label %34
34: ; preds = %21, %0, %10
ret void
}