#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 Gcd(int, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ putchar(char);
int main(void) {
  int table[(16)][(16)] = {0};
  for (int i = 0; i < (16); ++i) {
    for (int j = 0; j < (16); ++j) {
      table[i][j] = (Gcd(i, j) == 1);
    }
  }
  for (int i = 0; i < (16); ++i) {
    for (int j = 0; j < (16); ++j) {
      (void)printf("%*d", (3), table[i][j]);
    }
    (void)putchar('\n');
  }
  (void)getchar();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
movl   $0x0,-0x414(%rbp)
cmpl   $0x10,-0x414(%rbp)
jge    120b <main+0xbb>
movl   $0x0,-0x418(%rbp)
cmpl   $0x10,-0x418(%rbp)
jge    11f2 <main+0xa2>
mov    -0x414(%rbp),%edi
mov    -0x418(%rbp),%esi
call   1070 <Gcd@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edx
movslq -0x414(%rbp),%rcx
lea    -0x410(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movslq -0x418(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x418(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x418(%rbp)
jmp    1196 <main+0x46>
jmp    11f7 <main+0xa7>
mov    -0x414(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x414(%rbp)
jmp    117f <main+0x2f>
movl   $0x0,-0x41c(%rbp)
cmpl   $0x10,-0x41c(%rbp)
jge    129b <main+0x14b>
movl   $0x0,-0x420(%rbp)
cmpl   $0x10,-0x420(%rbp)
jge    127d <main+0x12d>
movslq -0x41c(%rbp),%rcx
lea    -0x410(%rbp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movslq -0x420(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xda1(%rip),%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    -0x420(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x420(%rbp)
jmp    122c <main+0xdc>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x41c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x41c(%rbp)
jmp    1215 <main+0xc5>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    0x2d37(%rip),%rax
mov    (%rax),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rdi
xor    %ebx,%ebx
mov    $0x400,%edx
xor    %esi,%esi
call   1050 <memset@plt>
lea    0x30(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
xor    %esi,%esi
call   1070 <Gcd@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0x1,%esi
call   1070 <Gcd@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    $0x2,%esi
call   1070 <Gcd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x3,%esi
call   1070 <Gcd@plt>
movd   %r14d,%xmm0
movd   %r15d,%xmm1
punpckldq %xmm1,%xmm0
movd   %ebp,%xmm1
movd   %eax,%xmm2
punpckldq %xmm2,%xmm1
punpcklqdq %xmm1,%xmm0
movdqa 0xe25(%rip),%xmm1
pcmpeqd %xmm1,%xmm0
psrld  $0x1f,%xmm0
movdqa %xmm0,-0x30(%r12)
mov    %ebx,%edi
mov    $0x4,%esi
call   1070 <Gcd@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0x5,%esi
call   1070 <Gcd@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    $0x6,%esi
call   1070 <Gcd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x7,%esi
call   1070 <Gcd@plt>
movd   %r14d,%xmm0
movd   %r15d,%xmm1
punpckldq %xmm1,%xmm0
movd   %ebp,%xmm1
movd   %eax,%xmm2
punpckldq %xmm2,%xmm1
punpcklqdq %xmm1,%xmm0
pcmpeqd 0xdb7(%rip),%xmm0
psrld  $0x1f,%xmm0
movdqa %xmm0,-0x20(%r12)
mov    %ebx,%edi
mov    $0x8,%esi
call   1070 <Gcd@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0x9,%esi
call   1070 <Gcd@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    $0xa,%esi
call   1070 <Gcd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0xb,%esi
call   1070 <Gcd@plt>
movd   %r14d,%xmm0
movd   %r15d,%xmm1
punpckldq %xmm1,%xmm0
movd   %ebp,%xmm1
movd   %eax,%xmm2
punpckldq %xmm2,%xmm1
punpcklqdq %xmm1,%xmm0
pcmpeqd 0xd4d(%rip),%xmm0
psrld  $0x1f,%xmm0
movdqa %xmm0,-0x10(%r12)
mov    %ebx,%edi
mov    $0xc,%esi
call   1070 <Gcd@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0xd,%esi
call   1070 <Gcd@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    $0xe,%esi
call   1070 <Gcd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0xf,%esi
call   1070 <Gcd@plt>
movd   %r14d,%xmm0
movd   %r15d,%xmm1
punpckldq %xmm1,%xmm0
movd   %ebp,%xmm1
movd   %eax,%xmm2
punpckldq %xmm2,%xmm1
punpcklqdq %xmm1,%xmm0
pcmpeqd 0xce3(%rip),%xmm0
psrld  $0x1f,%xmm0
movdqa %xmm0,(%r12)
add    $0x1,%rbx
add    $0x40,%r12
cmp    $0x10,%rbx
jne    1180 <main+0x30>
xor    %ebp,%ebp
lea    0xccd(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x4(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x8(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0xc(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x10(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x14(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x18(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x1c(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x20(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x24(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x28(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x2c(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x30(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x34(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x38(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0x3c(%rsp,%rbp,1),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x40,%rbp
cmp    $0x400,%rbp
jne    1350 <main+0x200>
xor    %eax,%eax
call   1060 <getchar@plt>
mov    0x2b58(%rip),%rax
mov    (%rax),%eax
add    $0x400,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%*d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x [16 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [16 x [16 x i32]]* %2 to i8*
store i32 0, i32* %3
br label %8
8: ; preds = %31, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 16
br i1 %10, label %11, label %34
11: ; preds = %8
store i32 0, i32* %4
br label %12
12: ; preds = %27, %11
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 16
br i1 %14, label %15, label %30
15: ; preds = %12
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = call i32 @Gcd(i32 %16, i32 %17)
%19 = icmp eq i32 %18, 1
%20 = zext i1 %19 to i32
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %2, i64 0, i64 %22
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [16 x i32], [16 x i32]* %23, i64 0, i64 %25
store i32 %20, i32* %26
br label %27
27: ; preds = %15
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %12
30: ; preds = %12
br label %31
31: ; preds = %30
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %8
34: ; preds = %8
store i32 0, i32* %5
br label %35
35: ; preds = %56, %34
%36 = load i32, i32* %5
%37 = icmp slt i32 %36, 16
br i1 %37, label %38, label %59
38: ; preds = %35
store i32 0, i32* %6
br label %39
39: ; preds = %51, %38
%40 = load i32, i32* %6
%41 = icmp slt i32 %40, 16
br i1 %41, label %42, label %54
42: ; preds = %39
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %2, i64 0, i64 %44
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [16 x i32], [16 x i32]* %45, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %49)
br label %51
51: ; preds = %42
%52 = load i32, i32* %6
%53 = add nsw i32 %52, 1
store i32 %53, i32* %6
br label %39
54: ; preds = %39
%55 = call i32 @putchar(i8 signext 10)
br label %56
56: ; preds = %54
%57 = load i32, i32* %5
%58 = add nsw i32 %57, 1
store i32 %58, i32* %5
br label %35
59: ; preds = %35
%60 = call i32 (...) @getchar()
%61 = load i32, i32* @EXIT_SUCCESS
ret i32 %61
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [16 x [16 x i32]]
%2 = bitcast [16 x [16 x i32]]* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %54, %3 ]
%5 = trunc i64 %4 to i32
%6 = tail call i32 @Gcd(i32 %5, i32 0)
%7 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %4, i64 0
%8 = tail call i32 @Gcd(i32 %5, i32 1)
%9 = tail call i32 @Gcd(i32 %5, i32 2)
%10 = tail call i32 @Gcd(i32 %5, i32 3)
%11 = insertelement <4 x i32> poison, i32 %6, i64 0
%12 = insertelement <4 x i32> %11, i32 %8, i64 1
%13 = insertelement <4 x i32> %12, i32 %9, i64 2
%14 = insertelement <4 x i32> %13, i32 %10, i64 3
%15 = icmp eq <4 x i32> %14, <i32 1, i32 1, i32 1, i32 1>
%16 = zext <4 x i1> %15 to <4 x i32>
%17 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %16, <4 x i32>* %17
%18 = tail call i32 @Gcd(i32 %5, i32 4)
%19 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %4, i64 4
%20 = tail call i32 @Gcd(i32 %5, i32 5)
%21 = tail call i32 @Gcd(i32 %5, i32 6)
%22 = tail call i32 @Gcd(i32 %5, i32 7)
%23 = insertelement <4 x i32> poison, i32 %18, i64 0
%24 = insertelement <4 x i32> %23, i32 %20, i64 1
%25 = insertelement <4 x i32> %24, i32 %21, i64 2
%26 = insertelement <4 x i32> %25, i32 %22, i64 3
%27 = icmp eq <4 x i32> %26, <i32 1, i32 1, i32 1, i32 1>
%28 = zext <4 x i1> %27 to <4 x i32>
%29 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> %28, <4 x i32>* %29
%30 = tail call i32 @Gcd(i32 %5, i32 8)
%31 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %4, i64 8
%32 = tail call i32 @Gcd(i32 %5, i32 9)
%33 = tail call i32 @Gcd(i32 %5, i32 10)
%34 = tail call i32 @Gcd(i32 %5, i32 11)
%35 = insertelement <4 x i32> poison, i32 %30, i64 0
%36 = insertelement <4 x i32> %35, i32 %32, i64 1
%37 = insertelement <4 x i32> %36, i32 %33, i64 2
%38 = insertelement <4 x i32> %37, i32 %34, i64 3
%39 = icmp eq <4 x i32> %38, <i32 1, i32 1, i32 1, i32 1>
%40 = zext <4 x i1> %39 to <4 x i32>
%41 = bitcast i32* %31 to <4 x i32>*
store <4 x i32> %40, <4 x i32>* %41
%42 = tail call i32 @Gcd(i32 %5, i32 12)
%43 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %4, i64 12
%44 = tail call i32 @Gcd(i32 %5, i32 13)
%45 = tail call i32 @Gcd(i32 %5, i32 14)
%46 = tail call i32 @Gcd(i32 %5, i32 15)
%47 = insertelement <4 x i32> poison, i32 %42, i64 0
%48 = insertelement <4 x i32> %47, i32 %44, i64 1
%49 = insertelement <4 x i32> %48, i32 %45, i64 2
%50 = insertelement <4 x i32> %49, i32 %46, i64 3
%51 = icmp eq <4 x i32> %50, <i32 1, i32 1, i32 1, i32 1>
%52 = zext <4 x i1> %51 to <4 x i32>
%53 = bitcast i32* %43 to <4 x i32>*
store <4 x i32> %52, <4 x i32>* %53
%54 = add nuw nsw i64 %4, 1
%55 = icmp eq i64 %54, 16
br i1 %55, label %56, label %3
56: ; preds = %3, %56
%57 = phi i64 [ %107, %56 ], [ 0, %3 ]
%58 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 0
%59 = load i32, i32* %58
%60 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %59)
%61 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 1
%62 = load i32, i32* %61
%63 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %62)
%64 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 2
%65 = load i32, i32* %64
%66 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %65)
%67 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 3
%68 = load i32, i32* %67
%69 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %68)
%70 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 4
%71 = load i32, i32* %70
%72 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %71)
%73 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 5
%74 = load i32, i32* %73
%75 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %74)
%76 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 6
%77 = load i32, i32* %76
%78 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %77)
%79 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 7
%80 = load i32, i32* %79
%81 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %80)
%82 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 8
%83 = load i32, i32* %82
%84 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %83)
%85 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 9
%86 = load i32, i32* %85
%87 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %86)
%88 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 10
%89 = load i32, i32* %88
%90 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %89)
%91 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 11
%92 = load i32, i32* %91
%93 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %92)
%94 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 12
%95 = load i32, i32* %94
%96 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %95)
%97 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 13
%98 = load i32, i32* %97
%99 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %98)
%100 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 14
%101 = load i32, i32* %100
%102 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %101)
%103 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %1, i64 0, i64 %57, i64 15
%104 = load i32, i32* %103
%105 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3, i32 %104)
%106 = tail call i32 @putchar(i8 signext 10)
%107 = add nuw nsw i64 %57, 1
%108 = icmp eq i64 %107, 16
br i1 %108, label %109, label %56
109: ; preds = %56
%110 = tail call i32 (...) @getchar()
%111 = load i32, i32* @EXIT_SUCCESS
ret i32 %111
}