#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 EXIT_SUCCESS;
int /*<<< orphan*/ check_intInput(int *);
int /*<<< orphan*/ fill_array_spiral(int, int **);
int /*<<< orphan*/ print_array(int, int **);
int main(int argc, char **argv) {
  int n;
  check_intInput(&n);
  int spiral[n][n];
  fill_array_spiral(n, spiral);
  print_array(n, spiral);
  return (EXIT_SUCCESS);
}


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    -0x14(%rbp),%rdi
call   1030 <check_intInput@plt>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,%rax
mov    %rsp,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,%rdx
imul   %rdx,%rdx
lea    0xf(,%rdx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rsi
sub    %rdx,%rsi
mov    %rsi,-0x38(%rbp)
mov    %rsi,%rsp
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <fill_array_spiral@plt>
mov    -0x38(%rbp),%rsi
mov    -0x14(%rbp),%edi
call   1050 <print_array@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-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   %r14
push   %rbx
sub    $0x10,%rsp
lea    -0x14(%rbp),%rdi
call   1030 <check_intInput@plt>
mov    %rsp,%r14
mov    -0x14(%rbp),%eax
imul   %rax,%rax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    -0x14(%rbp),%edi
mov    %rbx,%rsi
call   1040 <fill_array_spiral@plt>
mov    -0x14(%rbp),%edi
mov    %rbx,%rsi
call   1050 <print_array@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%eax
mov    %r14,%rsp
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 @check_intInput(i32* %6)
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
%13 = load i32, i32* %6
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
store i8* %15, i8** %7
%16 = mul nuw i64 %12, %14
%17 = alloca i32, i64 %16
store i64 %12, i64* %8
store i64 %14, i64* %9
%18 = load i32, i32* %6
%19 = bitcast i32* %17 to i32**
%20 = call i32 @fill_array_spiral(i32 %18, i32** %19)
%21 = load i32, i32* %6
%22 = bitcast i32* %17 to i32**
%23 = call i32 @print_array(i32 %21, i32** %22)
%24 = load i32, i32* @EXIT_SUCCESS
store i32 %24, i32* %3
%25 = load i8*, i8** %7
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @check_intInput(i32* %3)
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
%9 = mul nuw i64 %7, %7
%10 = alloca i32, i64 %9
%11 = load i32, i32* %3
%12 = bitcast i32* %10 to i32**
%13 = call i32 @fill_array_spiral(i32 %11, i32** %12)
%14 = load i32, i32* %3
%15 = call i32 @print_array(i32 %14, i32** %12)
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
}