#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 argc, char *argv[]) {
  int n = 10;
  scanf("%d", &n);
  int row = 0;
  while (row < n * 2) {
    int col = 0;
    while (col < n) {
      if (col == 2 || col == 3) {
        printf(" ");
      } else {
        printf("*");
      }
      col++;
    }
    printf("\n");
    row++;
  }
  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   $0xa,-0x14(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    11d1 <main+0xb1>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11b7 <main+0x97>
cmpl   $0x2,-0x1c(%rbp)
je     118c <main+0x6c>
cmpl   $0x3,-0x1c(%rbp)
jne    119d <main+0x7d>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    11a9 <main+0x89>
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116c <main+0x4c>
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1154 <main+0x34>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0xa,0xc(%rsp)
lea    0xec9(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11a2 <main+0x82>
xor    %r14d,%r14d
mov    $0x20,%ebp
jmp    117a <main+0x5a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
mov    0xc(%rsp),%eax
lea    (%rax,%rax,1),%ecx
cmp    %ecx,%r14d
jge    11a2 <main+0x82>
test   %eax,%eax
jle    1160 <main+0x40>
xor    %ebx,%ebx
mov    %ebx,%eax
and    $0x7ffffffe,%eax
cmp    $0x2,%eax
mov    $0x2a,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1180 <main+0x60>
jmp    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"*\00"
@.str.3 = [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 i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 0, i32* %7
br label %10
10: ; preds = %33, %2
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = mul nsw i32 %12, 2
%14 = icmp slt i32 %11, %13
br i1 %14, label %15, label %37
15: ; preds = %10
store i32 0, i32* %8
br label %16
16: ; preds = %30, %15
%17 = load i32, i32* %8
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %33
20: ; preds = %16
%21 = load i32, i32* %8
%22 = icmp eq i32 %21, 2
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %8
%25 = icmp eq i32 %24, 3
br i1 %25, label %26, label %28
26: ; preds = %23, %20
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %30
28: ; preds = %23
%29 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
br label %16
33: ; preds = %16
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%35 = load i32, i32* %7
%36 = add nsw i32 %35, 1
store i32 %36, i32* %7
br label %10
37: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 10, i32* %3
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %2, %21
%9 = phi i32 [ %24, %21 ], [ %6, %2 ]
%10 = phi i32 [ %23, %21 ], [ 0, %2 ]
%11 = icmp sgt i32 %9, 0
br i1 %11, label %12, label %21
12: ; preds = %8, %12
%13 = phi i32 [ %18, %12 ], [ 0, %8 ]
%14 = and i32 %13, 2147483646
%15 = icmp eq i32 %14, 2
%16 = select i1 %15, i32 32, i32 42
%17 = call i32 @putchar(i32 %16)
%18 = add nuw nsw i32 %13, 1
%19 = load i32, i32* %3
%20 = icmp slt i32 %18, %19
br i1 %20, label %12, label %21
21: ; preds = %12, %8
%22 = call i32 @putchar(i32 10)
%23 = add nuw nsw i32 %10, 1
%24 = load i32, i32* %3
%25 = shl nsw i32 %24, 1
%26 = icmp slt i32 %23, %25
br i1 %26, label %8, label %27
27: ; preds = %21, %2
ret i32 0
}