#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*/ draw(int, int, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main(int argc, char const *argv[]) {
  int t;
  scanf("%d", &t);
  int input_array[t][4];
  for (int i = 0; i < t; ++i) {
    scanf("%d %d %d %d", &input_array[i][0], &input_array[i][1],
          &input_array[i][2], &input_array[i][3]);
  }
  for (int i = 0; i < t; ++i) {
    draw(input_array[i][0], input_array[i][1], input_array[i][2],
         input_array[i][3]);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xebc(%rip),%rdi
xor    %eax,%eax
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rdx
shl    $0x4,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ee <main+0xbe>
mov    -0x38(%rbp),%r8
movslq -0x2c(%rbp),%rax
shl    $0x4,%rax
mov    %r8,%rsi
add    %rax,%rsi
movslq -0x2c(%rbp),%rax
shl    $0x4,%rax
mov    %r8,%rdx
add    %rax,%rdx
add    $0x4,%rdx
movslq -0x2c(%rbp),%rax
shl    $0x4,%rax
mov    %r8,%rcx
add    %rax,%rcx
add    $0x8,%rcx
movslq -0x2c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r8
add    $0xc,%r8
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1181 <main+0x51>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1264 <main+0x134>
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rdx
shl    $0x4,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    (%rcx),%edi
movslq -0x30(%rbp),%rdx
shl    $0x4,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    0x4(%rcx),%esi
movslq -0x30(%rbp),%rdx
shl    $0x4,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    0x8(%rcx),%edx
movslq -0x30(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mov    0xc(%rax),%ecx
call   1030 <draw@plt>
lea    0xdbb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11f5 <main+0xc5>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xec4(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rsp,%r15
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
shl    $0x4,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    11f3 <main+0xc3>
lea    0xe8c(%rip),%r14
mov    %r12,%rbx
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
lea    0x4(%rbx),%rdx
lea    0x8(%rbx),%rcx
lea    0xc(%rbx),%r8
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
add    $0x1,%r13
movslq -0x2c(%rbp),%rax
add    $0x10,%rbx
cmp    %rax,%r13
jl     1180 <main+0x50>
test   %eax,%eax
jle    11f3 <main+0xc3>
add    $0xc,%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0xc(%r12),%edi
mov    -0x8(%r12),%esi
mov    -0x4(%r12),%edx
mov    (%r12),%ecx
call   1040 <draw@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
add    $0x10,%r12
cmp    %rax,%rbx
jl     11c0 <main+0x90>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%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 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%12 = load i32, i32* %6
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %7
%15 = alloca [4 x i32], i64 %13
store i64 %13, i64* %8
store i32 0, i32* %9
br label %16
16: ; preds = %38, %2
%17 = load i32, i32* %9
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %41
20: ; preds = %16
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %22
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %23, i64 0, i64 0
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %26
%28 = getelementptr inbounds [4 x i32], [4 x i32]* %27, i64 0, i64 1
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %30
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %31, i64 0, i64 2
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %34
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %35, i64 0, i64 3
%37 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %24, i32* %28, i32* %32, i32* %36)
br label %38
38: ; preds = %20
%39 = load i32, i32* %9
%40 = add nsw i32 %39, 1
store i32 %40, i32* %9
br label %16
41: ; preds = %16
store i32 0, i32* %10
br label %42
42: ; preds = %69, %41
%43 = load i32, i32* %10
%44 = load i32, i32* %6
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %72
46: ; preds = %42
%47 = load i32, i32* %10
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %48
%50 = getelementptr inbounds [4 x i32], [4 x i32]* %49, i64 0, i64 0
%51 = load i32, i32* %50
%52 = load i32, i32* %10
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %53
%55 = getelementptr inbounds [4 x i32], [4 x i32]* %54, i64 0, i64 1
%56 = load i32, i32* %55
%57 = load i32, i32* %10
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %58
%60 = getelementptr inbounds [4 x i32], [4 x i32]* %59, i64 0, i64 2
%61 = load i32, i32* %60
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %63
%65 = getelementptr inbounds [4 x i32], [4 x i32]* %64, i64 0, i64 3
%66 = load i32, i32* %65
%67 = call i32 @draw(i32 %51, i32 %56, i32 %61, i32 %66)
%68 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %69
69: ; preds = %46
%70 = load i32, i32* %10
%71 = add nsw i32 %70, 1
store i32 %71, i32* %10
br label %42
72: ; preds = %42
store i32 0, i32* %3
%73 = load i8*, i8** %7
%74 = load i32, i32* %3
ret i32 %74
}

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