#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 a[3][3], b[3][3], d[3][3], i, j, m, n, k;
  int c[3][3] = {100010001};
  printf("Enter the elements of the matrix");
  for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
      scanf("%d", &a);
  printf("The transposed matrix is");
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      b[j][i] = a[i][j];
      printf("%d\t", b[j][i]);
    }
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      d[i][j] = 0;
      for (k = 0; k < 3; k++)
        d[i][j] = d[i][j] + c[i][k] * b[k][i];
    }
  }
  if (d[i][j] == c[3][3])
    printf("The given matrix is ORTHOGONOL");
  else
    printf("NOT ORTHOGONOL");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1040 <memset@plt>
movl   $0x5f60811,-0xd0(%rbp)
08 f6 05
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x3,-0x94(%rbp)
jge    11d8 <main+0xa8>
movl   $0x0,-0x98(%rbp)
cmpl   $0x3,-0x98(%rbp)
jge    11bf <main+0x8f>
lea    -0x30(%rbp),%rsi
lea    0xe7b(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    118e <main+0x5e>
jmp    11c4 <main+0x94>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1177 <main+0x47>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x3,-0x94(%rbp)
jge    12a3 <main+0x173>
movl   $0x0,-0x98(%rbp)
cmpl   $0x3,-0x98(%rbp)
jge    128a <main+0x15a>
movslq -0x94(%rbp),%rcx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
movslq -0x98(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x94(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movslq -0x98(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1207 <main+0xd7>
jmp    128f <main+0x15f>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11f0 <main+0xc0>
movl   $0x0,-0x94(%rbp)
cmpl   $0x3,-0x94(%rbp)
jge    13cd <main+0x29d>
movl   $0x0,-0x98(%rbp)
cmpl   $0x3,-0x98(%rbp)
jge    13b4 <main+0x284>
movslq -0x94(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x98(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
movl   $0x0,-0xa4(%rbp)
cmpl   $0x3,-0xa4(%rbp)
jge    139b <main+0x26b>
movslq -0x94(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
movslq -0x94(%rbp),%rcx
lea    -0xd0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
movslq -0xa4(%rbp),%rsi
lea    -0x60(%rbp),%rcx
imul   $0xc,%rsi,%rsi
add    %rsi,%rcx
movslq -0x94(%rbp),%rsi
imul   (%rcx,%rsi,4),%eax
add    %eax,%edx
movslq -0x94(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x98(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    12fe <main+0x1ce>
jmp    13a0 <main+0x270>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    12c4 <main+0x194>
jmp    13b9 <main+0x289>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    12ad <main+0x17d>
movslq -0x94(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0xa0(%rbp),%eax
jne    140b <main+0x2db>
lea    0xc42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1419 <main+0x2e9>
lea    0xc4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%esi
lea    0xe83(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe06(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Enter the elements of the matrix\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"The transposed matrix is\00"
@.str.3 = [4 x i8] c"%d\09\00"
@.str.4 = [31 x i8] c"The given matrix is ORTHOGONOL\00"
@.str.5 = [15 x i8] c"NOT ORTHOGONOL\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [3 x i32]]
%3 = alloca [3 x [3 x i32]]
%4 = alloca [3 x [3 x i32]]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [3 x [3 x i32]]
store i32 0, i32* %1
%11 = bitcast [3 x [3 x i32]]* %10 to i8*
%12 = bitcast i8* %11 to [3 x [3 x i32]]*
%13 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %12, i32 0, i32 0
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %13, i32 0, i32 0
store i32 100010001, i32* %14
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %16
16: ; preds = %30, %0
%17 = load i32, i32* %5
%18 = icmp slt i32 %17, 3
br i1 %18, label %19, label %33
19: ; preds = %16
store i32 0, i32* %6
br label %20
20: ; preds = %26, %19
%21 = load i32, i32* %6
%22 = icmp slt i32 %21, 3
br i1 %22, label %23, label %29
23: ; preds = %20
%24 = bitcast [3 x [3 x i32]]* %2 to i32***
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %24)
br label %26
26: ; preds = %23
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %20
29: ; preds = %20
br label %30
30: ; preds = %29
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %16
33: ; preds = %16
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %35
35: ; preds = %68, %33
%36 = load i32, i32* %5
%37 = icmp slt i32 %36, 3
br i1 %37, label %38, label %71
38: ; preds = %35
store i32 0, i32* %6
br label %39
39: ; preds = %64, %38
%40 = load i32, i32* %6
%41 = icmp slt i32 %40, 3
br i1 %41, label %42, label %67
42: ; preds = %39
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 %44
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [3 x i32], [3 x i32]* %45, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = load i32, i32* %6
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 %51
%53 = load i32, i32* %5
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [3 x i32], [3 x i32]* %52, i64 0, i64 %54
store i32 %49, i32* %55
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 %57
%59 = load i32, i32* %5
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [3 x i32], [3 x i32]* %58, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %42
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
store i32 %66, i32* %6
br label %39
67: ; preds = %39
br label %68
68: ; preds = %67
%69 = load i32, i32* %5
%70 = add nsw i32 %69, 1
store i32 %70, i32* %5
br label %35
71: ; preds = %35
store i32 0, i32* %5
br label %72
72: ; preds = %127, %71
%73 = load i32, i32* %5
%74 = icmp slt i32 %73, 3
br i1 %74, label %75, label %130
75: ; preds = %72
store i32 0, i32* %6
br label %76
76: ; preds = %123, %75
%77 = load i32, i32* %6
%78 = icmp slt i32 %77, 3
br i1 %78, label %79, label %126
79: ; preds = %76
%80 = load i32, i32* %5
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 %81
%83 = load i32, i32* %6
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [3 x i32], [3 x i32]* %82, i64 0, i64 %84
store i32 0, i32* %85
store i32 0, i32* %9
br label %86
86: ; preds = %119, %79
%87 = load i32, i32* %9
%88 = icmp slt i32 %87, 3
br i1 %88, label %89, label %122
89: ; preds = %86
%90 = load i32, i32* %5
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 %91
%93 = load i32, i32* %6
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [3 x i32], [3 x i32]* %92, i64 0, i64 %94
%96 = load i32, i32* %95
%97 = load i32, i32* %5
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %10, i64 0, i64 %98
%100 = load i32, i32* %9
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [3 x i32], [3 x i32]* %99, i64 0, i64 %101
%103 = load i32, i32* %102
%104 = load i32, i32* %9
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 %105
%107 = load i32, i32* %5
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [3 x i32], [3 x i32]* %106, i64 0, i64 %108
%110 = load i32, i32* %109
%111 = mul nsw i32 %103, %110
%112 = add nsw i32 %96, %111
%113 = load i32, i32* %5
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 %114
%116 = load i32, i32* %6
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [3 x i32], [3 x i32]* %115, i64 0, i64 %117
store i32 %112, i32* %118
br label %119
119: ; preds = %89
%120 = load i32, i32* %9
%121 = add nsw i32 %120, 1
store i32 %121, i32* %9
br label %86
122: ; preds = %86
br label %123
123: ; preds = %122
%124 = load i32, i32* %6
%125 = add nsw i32 %124, 1
store i32 %125, i32* %6
br label %76
126: ; preds = %76
br label %127
127: ; preds = %126
%128 = load i32, i32* %5
%129 = add nsw i32 %128, 1
store i32 %129, i32* %5
br label %72
130: ; preds = %72
%131 = load i32, i32* %5
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 %132
%134 = load i32, i32* %6
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [3 x i32], [3 x i32]* %133, i64 0, i64 %135
%137 = load i32, i32* %136
%138 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %10, i64 0, i64 3
%139 = getelementptr inbounds [3 x i32], [3 x i32]* %138, i64 0, i64 3
%140 = load i32, i32* %139
%141 = icmp eq i32 %137, %140
br i1 %141, label %142, label %144
142: ; preds = %130
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %146
144: ; preds = %130
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %146
146: ; preds = %144, %142
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Enter the elements of the matrix\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"The transposed matrix is\00"
@.str.3 = [4 x i8] c"%d\09\00"
@.str.5 = [15 x i8] c"NOT ORTHOGONOL\00"
define i32 @main() {
%1 = alloca [3 x [3 x i32]]
%2 = bitcast [3 x [3 x i32]]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [3 x [3 x i32]]* %1 to i32***
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32*** %4)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%15 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%16 = load i32, i32* %15
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 1
%19 = load i32, i32* %18
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 2
%22 = load i32, i32* %21
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 0
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 1
%28 = load i32, i32* %27
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 2
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 0
%34 = load i32, i32* %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 1
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 2
%40 = load i32, i32* %39
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %40)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}