#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;
  printf("Enter a number: ");
  scanf("%d", &n);
  int row = 0;
  int col = 0;
  while (row < n) {
    col = 0;
    while (col < n) {
      if (col != 4 && col != 5) {
        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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11d8 <main+0xb8>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11be <main+0x9e>
cmpl   $0x4,-0x1c(%rbp)
je     11a4 <main+0x84>
cmpl   $0x5,-0x1c(%rbp)
je     11a4 <main+0x84>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    11b0 <main+0x90>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1173 <main+0x53>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1160 <main+0x40>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11b2 <main+0x82>
xor    %r14d,%r14d
mov    $0x20,%ebp
jmp    1187 <main+0x57>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
mov    0xc(%rsp),%eax
cmp    %eax,%r14d
jge    11b2 <main+0x82>
test   %eax,%eax
jle    1170 <main+0x40>
xor    %ebx,%ebx
nopl   (%rax)
mov    %ebx,%eax
and    $0x7ffffffe,%eax
cmp    $0x4,%eax
mov    $0x2a,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1190 <main+0x60>
jmp    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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