#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 *, ...);
int main() {
  int n = 0, i = 0, x = 0, y = 0, u = 0, v = 0, mx = 0, my = 0, mu = 0, mv = 0,
      teste = 0;
  while (1) {
    n = 0;
    i = 0;
    x = 0;
    y = 0;
    u = 0;
    v = 0;
    mx = 0;
    my = 0;
    mu = 0;
    mv = 0;
    teste++;
    scanf("%d", &n);
    if (n == 0)
      break;
    for (i; i < n; i++) {
      scanf("%d %d %d %d", &x, &y, &u, &v);
      if (i == 0) {
        mx = x;
        my = y;
        mu = u;
        mv = v;
      } else {
        if (mx < x)
          mx = x;
        if (my > y)
          my = y;
        if (mu > u)
          mu = u;
        if (mv < v)
          mv = v;
      }
    }
    printf("Teste %d\n", teste);
    if (mx >= mu || my <= mv)
      printf("nenhum\n\n");
    else
      printf("%d %d %d %d\n\n", mx, my, mu, mv);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
lea    0xe37(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    11ec <main+0xcc>
jmp    12f9 <main+0x1d9>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    129d <main+0x17d>
lea    0xe01(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    123d <main+0x11d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    128a <main+0x16a>
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    124f <main+0x12f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1261 <main+0x141>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1273 <main+0x153>
mov    -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1285 <main+0x165>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    128a <main+0x16a>
jmp    128f <main+0x16f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ec <main+0xcc>
mov    -0x30(%rbp),%esi
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    12c6 <main+0x1a6>
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     12d9 <main+0x1b9>
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12f4 <main+0x1d4>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
lea    0xd32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117c <main+0x5c>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x4(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xe9c(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     1308 <main+0x1d8>
mov    $0x1,%ebx
lea    0xe6f(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
jmp    1221 <main+0xf1>
nopw   0x0(%rax,%rax,1)
lea    0xe6d(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0x4(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
add    $0x1,%ebx
lea    0xe1b(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
lea    0xdf9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
je     1308 <main+0x1d8>
mov    $0x0,%r14d
mov    $0x0,%r15d
mov    $0x0,%r12d
mov    $0x0,%r13d
test   %eax,%eax
jle    12c7 <main+0x197>
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x14(%rsp),%r14d
mov    0x10(%rsp),%r15d
mov    0xc(%rsp),%r12d
mov    0x8(%rsp),%r13d
cmpl   $0x2,0x4(%rsp)
jl     12c7 <main+0x197>
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
lea    0xd89(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    %eax,%r14d
cmovl  %eax,%r14d
mov    0x10(%rsp),%eax
cmp    %eax,%r15d
cmovg  %eax,%r15d
mov    0xc(%rsp),%eax
cmp    %eax,%r12d
cmovg  %eax,%r12d
mov    0x8(%rsp),%eax
cmp    %eax,%r13d
cmovl  %eax,%r13d
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1270 <main+0x140>
lea    0xd3e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %r12d,%r14d
jge    11b0 <main+0x80>
cmp    %r13d,%r15d
jle    11b0 <main+0x80>
lea    0xd26(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %r13d,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11bc <main+0x8c>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d %d %d %d\00"
@.str.2 = [10 x i8] c"Teste %d\0A\00"
@.str.3 = [9 x i8] c"nenhum\0A\0A\00"
@.str.4 = [14 x i8] c"%d %d %d %d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
br label %13
13: ; preds = %0, %82
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%14 = load i32, i32* %12
%15 = add nsw i32 %14, 1
store i32 %15, i32* %12
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %13
br label %83
20: ; preds = %13
%21 = load i32, i32* %3
br label %22
22: ; preds = %61, %20
%23 = load i32, i32* %3
%24 = load i32, i32* %2
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %64
26: ; preds = %22
%27 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5, i32* %6, i32* %7)
%28 = load i32, i32* %3
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = load i32, i32* %4
store i32 %31, i32* %8
%32 = load i32, i32* %5
store i32 %32, i32* %9
%33 = load i32, i32* %6
store i32 %33, i32* %10
%34 = load i32, i32* %7
store i32 %34, i32* %11
br label %60
35: ; preds = %26
%36 = load i32, i32* %8
%37 = load i32, i32* %4
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = load i32, i32* %4
store i32 %40, i32* %8
br label %41
41: ; preds = %39, %35
%42 = load i32, i32* %9
%43 = load i32, i32* %5
%44 = icmp sgt i32 %42, %43
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = load i32, i32* %5
store i32 %46, i32* %9
br label %47
47: ; preds = %45, %41
%48 = load i32, i32* %10
%49 = load i32, i32* %6
%50 = icmp sgt i32 %48, %49
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = load i32, i32* %6
store i32 %52, i32* %10
br label %53
53: ; preds = %51, %47
%54 = load i32, i32* %11
%55 = load i32, i32* %7
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = load i32, i32* %7
store i32 %58, i32* %11
br label %59
59: ; preds = %57, %53
br label %60
60: ; preds = %59, %30
br label %61
61: ; preds = %60
%62 = load i32, i32* %3
%63 = add nsw i32 %62, 1
store i32 %63, i32* %3
br label %22
64: ; preds = %22
%65 = load i32, i32* %12
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %65)
%67 = load i32, i32* %8
%68 = load i32, i32* %10
%69 = icmp sge i32 %67, %68
br i1 %69, label %74, label %70
70: ; preds = %64
%71 = load i32, i32* %9
%72 = load i32, i32* %11
%73 = icmp sle i32 %71, %72
br i1 %73, label %74, label %76
74: ; preds = %70, %64
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %82
76: ; preds = %70
%77 = load i32, i32* %8
%78 = load i32, i32* %9
%79 = load i32, i32* %10
%80 = load i32, i32* %11
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %77, i32 %78, i32 %79, i32 %80)
br label %82
82: ; preds = %76, %74
br label %13
83: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d %d %d %d\00"
@.str.2 = [10 x i8] c"Teste %d\0A\00"
@.str.4 = [14 x i8] c"%d %d %d %d\0A\0A\00"
@str = [8 x i8] c"nenhum\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
%13 = icmp eq i32 %12, 0
br i1 %13, label %66, label %14
14: ; preds = %0, %61
%15 = phi i32 [ %64, %61 ], [ %12, %0 ]
%16 = phi i32 [ %62, %61 ], [ 1, %0 ]
%17 = icmp sgt i32 %15, 0
br i1 %17, label %18, label %48
18: ; preds = %14
%19 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = load i32, i32* %1
%25 = icmp sgt i32 %24, 1
br i1 %25, label %26, label %48
26: ; preds = %18, %26
%27 = phi i32 [ %44, %26 ], [ %23, %18 ]
%28 = phi i32 [ %41, %26 ], [ %22, %18 ]
%29 = phi i32 [ %38, %26 ], [ %21, %18 ]
%30 = phi i32 [ %35, %26 ], [ %20, %18 ]
%31 = phi i32 [ %45, %26 ], [ 1, %18 ]
%32 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%33 = load i32, i32* %2
%34 = icmp slt i32 %30, %33
%35 = select i1 %34, i32 %33, i32 %30
%36 = load i32, i32* %3
%37 = icmp sgt i32 %29, %36
%38 = select i1 %37, i32 %36, i32 %29
%39 = load i32, i32* %4
%40 = icmp sgt i32 %28, %39
%41 = select i1 %40, i32 %39, i32 %28
%42 = load i32, i32* %5
%43 = icmp slt i32 %27, %42
%44 = select i1 %43, i32 %42, i32 %27
%45 = add nuw nsw i32 %31, 1
%46 = load i32, i32* %1
%47 = icmp slt i32 %45, %46
br i1 %47, label %26, label %48
48: ; preds = %26, %18, %14
%49 = phi i32 [ 0, %14 ], [ %20, %18 ], [ %35, %26 ]
%50 = phi i32 [ 0, %14 ], [ %21, %18 ], [ %38, %26 ]
%51 = phi i32 [ 0, %14 ], [ %22, %18 ], [ %41, %26 ]
%52 = phi i32 [ 0, %14 ], [ %23, %18 ], [ %44, %26 ]
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%54 = icmp slt i32 %49, %51
%55 = icmp sgt i32 %50, %52
%56 = select i1 %54, i1 %55, i1 false
br i1 %56, label %59, label %57
57: ; preds = %48
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %61
59: ; preds = %48
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %49, i32 %50, i32 %51, i32 %52)
br label %61
61: ; preds = %59, %57
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
%62 = add nuw nsw i32 %16, 1
%63 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%64 = load i32, i32* %1
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %14
66: ; preds = %61, %0
ret i32 0
}