#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 g, i, kappa, n, l = 1, z = 1, k;
  printf("wywedi  N:");
  scanf("%d", &g);
  printf("\n");
  i = 2 * g - 1;
  k = i / 2;
  n = k;
  for (kappa = 0; kappa < g; kappa++) {
    for (; n > 0; n--)
      printf(" ");
    while (l <= z) {
      printf("@");
      l++;
    }
    l = 1;
    z = z + 2;
    printf("\n");
    k--;
    n = k;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1225 <main+0x105>
jmp    119d <main+0x7d>
cmpl   $0x0,-0x14(%rbp)
jle    11c1 <main+0xa1>
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    119d <main+0x7d>
jmp    11c6 <main+0xa6>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11ec <main+0xcc>
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11c6 <main+0xa6>
movl   $0x1,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
lea    0xe0b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    118c <main+0x6c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11ef <main+0xbf>
lea    (%rax,%rax,1),%ecx
add    $0xffffffff,%ecx
shr    $0x1f,%ecx
lea    (%rcx,%rax,2),%r15d
add    $0xffffffff,%r15d
sar    %r15d
lea    0x1(%r15),%r14d
xor    %r12d,%r12d
mov    $0x1,%ebx
nop
test   %r15d,%r15d
jle    11b2 <main+0x82>
mov    %r14d,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     11a0 <main+0x70>
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x40,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11c0 <main+0x90>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r15d
add    $0x1,%r12d
add    $0xffffffff,%r14d
add    $0x2,%ebx
cmp    0xc(%rsp),%r12d
jl     1190 <main+0x60>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"wywedi N:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [2 x i8] c"@\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
store i32 0, i32* %1
store i32 1, i32* %6
store i32 1, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 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* %2)
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = mul nsw i32 2, %12
%14 = sub nsw i32 %13, 1
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = sdiv i32 %15, 2
store i32 %16, i32* %8
%17 = load i32, i32* %8
store i32 %17, i32* %5
store i32 0, i32* %4
br label %18
18: ; preds = %47, %0
%19 = load i32, i32* %4
%20 = load i32, i32* %2
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %50
22: ; preds = %18
br label %23
23: ; preds = %28, %22
%24 = load i32, i32* %5
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26
%29 = load i32, i32* %5
%30 = add nsw i32 %29, -1
store i32 %30, i32* %5
br label %23
31: ; preds = %23
br label %32
32: ; preds = %36, %31
%33 = load i32, i32* %6
%34 = load i32, i32* %7
%35 = icmp sle i32 %33, %34
br i1 %35, label %36, label %40
36: ; preds = %32
%37 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %32
40: ; preds = %32
store i32 1, i32* %6
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 2
store i32 %42, i32* %7
%43 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%44 = load i32, i32* %8
%45 = add nsw i32 %44, -1
store i32 %45, i32* %8
%46 = load i32, i32* %8
store i32 %46, i32* %5
br label %47
47: ; preds = %40
%48 = load i32, i32* %4
%49 = add nsw i32 %48, 1
store i32 %49, i32* %4
br label %18
50: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"wywedi N:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @putchar(i32 10)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %35
8: ; preds = %0
%9 = shl nuw nsw i32 %6, 1
%10 = add nsw i32 %9, -1
%11 = sdiv i32 %10, 2
br label %12
12: ; preds = %8, %28
%13 = phi i32 [ 2, %8 ], [ %34, %28 ]
%14 = phi i32 [ %11, %8 ], [ %30, %28 ]
%15 = phi i32 [ 0, %8 ], [ %31, %28 ]
%16 = icmp sgt i32 %14, 0
br i1 %16, label %17, label %22
17: ; preds = %12, %17
%18 = phi i32 [ %20, %17 ], [ %14, %12 ]
%19 = call i32 @putchar(i32 32)
%20 = add nsw i32 %18, -1
%21 = icmp ugt i32 %18, 1
br i1 %21, label %17, label %22
22: ; preds = %17, %12
br label %23
23: ; preds = %22, %23
%24 = phi i32 [ %26, %23 ], [ 1, %22 ]
%25 = call i32 @putchar(i32 64)
%26 = add nuw i32 %24, 1
%27 = icmp eq i32 %26, %13
br i1 %27, label %28, label %23
28: ; preds = %23
%29 = call i32 @putchar(i32 10)
%30 = add nsw i32 %14, -1
%31 = add nuw nsw i32 %15, 1
%32 = load i32, i32* %1
%33 = icmp slt i32 %31, %32
%34 = add i32 %13, 2
br i1 %33, label %12, label %35
35: ; preds = %28, %0
ret i32 0
}