#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*/ printf(char *, ...);
int main(int argc, char **argv) {
  int i, j;
  int diagonal[15][15];
  for (i = 0; i < 15; i++) {
    for (j = 0; j < 15; j++) {
      if (i == j || i + j == 15 - 1)
        printf("%3d", diagonal[i][j] = 1);
      else
        printf("%3d", diagonal[i][j] = 0);
    }
    printf("\n");
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jge    11f7 <main+0xe7>
movl   $0x0,-0x18(%rbp)
cmpl   $0xf,-0x18(%rbp)
jge    11db <main+0xcb>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     1166 <main+0x56>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cmp    $0xe,%eax
jne    119b <main+0x8b>
movslq -0x14(%rbp),%rcx
lea    -0x3a0(%rbp),%rax
imul   $0x3c,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
lea    0xe76(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c8 <main+0xb8>
movslq -0x14(%rbp),%rcx
lea    -0x3a0(%rbp),%rax
imul   $0x3c,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
lea    0xe41(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cd <main+0xbd>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1141 <main+0x31>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <main+0x20>
mov    0x2de2(%rip),%rax
mov    (%rax),%eax
add    $0x3a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rbx
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
test   %r12d,%r12d
sete   %al
cmp    $0xe,%r12d
sete   %cl
or     %al,%cl
movzbl %cl,%esi
mov    %esi,0x14(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%r12d
sete   %al
cmp    $0xd,%r12d
sete   %cl
or     %al,%cl
movzbl %cl,%esi
mov    %esi,0x10(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x2,%r12d
sete   %al
cmp    $0xc,%r12d
sete   %cl
or     %al,%cl
movzbl %cl,%esi
mov    %esi,0xc(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12d,%eax
and    $0x7ffffff7,%eax
xor    %ebp,%ebp
cmp    $0x3,%eax
sete   %bpl
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x4,%r12d
sete   %al
cmp    $0xa,%r12d
sete   %cl
or     %al,%cl
movzbl %cl,%r13d
mov    %rbx,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    -0x5(%r12),%eax
xor    %r14d,%r14d
test   $0xfffffffb,%eax
sete   %r14b
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    -0x6(%r12),%eax
xor    %r15d,%r15d
test   $0xfffffffd,%eax
sete   %r15b
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %esi,%esi
cmp    $0x7,%r12d
sete   %sil
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    0x10(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    0x14(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12d
cmp    $0xf,%r12d
jne    1140 <main+0x20>
mov    0x2d34(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%3d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %77, %3 ]
%5 = icmp eq i32 %4, 0
%6 = icmp eq i32 %4, 14
%7 = or i1 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = icmp eq i32 %4, 1
%11 = icmp eq i32 %4, 13
%12 = or i1 %10, %11
%13 = zext i1 %12 to i32
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = icmp eq i32 %4, 2
%16 = icmp eq i32 %4, 12
%17 = or i1 %15, %16
%18 = zext i1 %17 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = and i32 %4, 2147483639
%21 = icmp eq i32 %20, 3
%22 = zext i1 %21 to i32
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = icmp eq i32 %4, 4
%25 = icmp eq i32 %4, 10
%26 = or i1 %24, %25
%27 = zext i1 %26 to i32
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = icmp eq i32 %4, 5
%30 = icmp eq i32 %4, 9
%31 = or i1 %29, %30
%32 = zext i1 %31 to i32
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = icmp eq i32 %4, 6
%35 = icmp eq i32 %4, 8
%36 = or i1 %34, %35
%37 = zext i1 %36 to i32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %37)
%39 = icmp eq i32 %4, 7
%40 = zext i1 %39 to i32
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = icmp eq i32 %4, 8
%43 = icmp eq i32 %4, 6
%44 = or i1 %42, %43
%45 = zext i1 %44 to i32
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = icmp eq i32 %4, 9
%48 = icmp eq i32 %4, 5
%49 = or i1 %47, %48
%50 = zext i1 %49 to i32
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %50)
%52 = icmp eq i32 %4, 10
%53 = icmp eq i32 %4, 4
%54 = or i1 %52, %53
%55 = zext i1 %54 to i32
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %55)
%57 = and i32 %4, 2147483639
%58 = icmp eq i32 %57, 3
%59 = zext i1 %58 to i32
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %59)
%61 = icmp eq i32 %4, 12
%62 = icmp eq i32 %4, 2
%63 = or i1 %61, %62
%64 = zext i1 %63 to i32
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %64)
%66 = icmp eq i32 %4, 13
%67 = icmp eq i32 %4, 1
%68 = or i1 %66, %67
%69 = zext i1 %68 to i32
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %69)
%71 = icmp eq i32 %4, 14
%72 = icmp eq i32 %4, 0
%73 = or i1 %71, %72
%74 = zext i1 %73 to i32
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %74)
%76 = tail call i32 @putchar(i32 10)
%77 = add nuw nsw i32 %4, 1
%78 = icmp eq i32 %77, 15
br i1 %78, label %79, label %3
79: ; preds = %3
%80 = load i32, i32* @EXIT_SUCCESS
ret i32 %80
}