#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 i, j, si, sj, uguali;
  int m[10][10];
  int s[3][3];
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 10; j++) {
      m[i][j] = i * j;
      printf("%2d ", m[i][j]);
    }
    printf("\n");
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      scanf("%d", &s[i][j]);
      printf("%2d ", s[i][j]);
    }
    printf("\n");
  }
  si = sj = 0;
  uguali = 0;
  for (i = 0; i < 10 - 3 && !uguali; i++) {
    for (j = 0; j < 10 - 3 && !uguali; j++) {
      uguali = 1;
      for (si = 0; si < 3 && uguali; si++)
        for (sj = 0; sj < 3 && uguali; sj++) {
          uguali = (m[i + si][j + sj] == s[si][sj]);
          printf("%d %d %d %d\n", i, j, si, sj);
        }
    }
  }
  if (!uguali)
    printf("NON ");
  printf("trovata");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11c5 <main+0xa5>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11a9 <main+0x89>
mov    -0x8(%rbp),%edx
imul   -0xc(%rbp),%edx
movslq -0x8(%rbp),%rcx
lea    -0x1b0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movslq -0x8(%rbp),%rcx
lea    -0x1b0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <main+0x2a>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <main+0x19>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1261 <main+0x141>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1245 <main+0x125>
movslq -0x8(%rbp),%rax
lea    -0x1e0(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xdfa(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rcx
lea    -0x1e0(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11dd <main+0xbd>
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11cc <main+0xac>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x7,-0x8(%rbp)
mov    %al,-0x1e1(%rbp)
jge    129e <main+0x17e>
cmpl   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x1e1(%rbp)
mov    -0x1e1(%rbp),%al
test   $0x1,%al
jne    12b1 <main+0x191>
jmp    140e <main+0x2ee>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x7,-0xc(%rbp)
mov    %al,-0x1e2(%rbp)
jge    12d9 <main+0x1b9>
cmpl   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x1e2(%rbp)
mov    -0x1e2(%rbp),%al
test   $0x1,%al
jne    12ec <main+0x1cc>
jmp    13fb <main+0x2db>
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0x10(%rbp)
mov    %al,-0x1e3(%rbp)
jge    1319 <main+0x1f9>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x1e3(%rbp)
mov    -0x1e3(%rbp),%al
test   $0x1,%al
jne    132c <main+0x20c>
jmp    13e8 <main+0x2c8>
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0x14(%rbp)
mov    %al,-0x1e4(%rbp)
jge    1352 <main+0x232>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x1e4(%rbp)
mov    -0x1e4(%rbp),%al
test   $0x1,%al
jne    1365 <main+0x245>
jmp    13d5 <main+0x2b5>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
movslq %eax,%rcx
lea    -0x1b0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
mov    -0xc(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
movslq -0x10(%rbp),%rdx
lea    -0x1e0(%rbp),%rcx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xc48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1333 <main+0x213>
jmp    13da <main+0x2ba>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12fa <main+0x1da>
jmp    13ed <main+0x2cd>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12b8 <main+0x198>
jmp    1400 <main+0x2e0>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    127d <main+0x15d>
cmpl   $0x0,-0x18(%rbp)
jne    1426 <main+0x306>
lea    0xbf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1e8,%rsp
xor    %r14d,%r14d
movl   $0x0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r12d,%r12d
xor    %ebp,%ebp
xor    %r13d,%r13d
movl   $0x0,0x18(%rsp)
xor    %r15d,%r15d
movl   $0x0,0x10(%rsp)
xchg   %ax,%ax
movl   $0x0,0x50(%rsp,%rbp,8)
lea    0xe81(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14d,0x4c(%rsp)
mov    %r14d,0x54(%rsp,%rbp,8)
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
mov    %esi,0x58(%rsp,%rbp,8)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%esi
mov    %esi,0x5c(%rsp,%rbp,8)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12d,0x60(%rsp,%rbp,8)
mov    %rbx,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,0x64(%rsp,%rbp,8)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13d,0x68(%rsp,%rbp,8)
mov    %rbx,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%r14d
mov    %r14d,0x6c(%rsp,%rbp,8)
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,0x70(%rsp,%rbp,8)
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%ebx
mov    %ebx,0x74(%rsp,%rbp,8)
lea    0xdcf(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x9,%ebx
mov    %ebx,0x10(%rsp)
add    $0x8,%r15d
add    $0x7,%r14d
mov    %r14d,0x18(%rsp)
add    $0x6,%r13d
add    $0x5,%rbp
add    $0x4,%r12d
addl   $0x3,(%rsp)
addl   $0x2,0x8(%rsp)
mov    0x4c(%rsp),%r14d
add    $0x1,%r14d
cmp    $0x32,%rbp
jne    1170 <main+0x40>
lea    0xd7e(%rip),%r14
lea    0x20(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x20(%rsp),%esi
lea    0xd61(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x24(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x28(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x2c(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x2c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x30(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x30(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x34(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x34(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x38(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x38(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x3c(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x3c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x40(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x40(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x50(%rsp),%r13
xor    %eax,%eax
mov    %rax,(%rsp)
jmp    13d4 <main+0x2a4>
nopl   0x0(%rax)
mov    (%rsp),%rcx
cmp    $0x6,%rcx
lea    0x1(%rcx),%rcx
setb   %dl
mov    0x10(%rsp),%r13
add    $0x28,%r13
mov    %rcx,(%rsp)
test   %al,%dl
je     1490 <main+0x360>
mov    %r13,0x10(%rsp)
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
lea    0x20(%rsp),%r12
mov    %r12,0x8(%rsp)
mov    %r13,0x18(%rsp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x0(%r13,%rbp,4),%r15d
mov    0x8(%rsp),%rax
mov    (%rax,%rbp,4),%r14d
lea    0xbe3(%rip),%rdi
mov    (%rsp),%rsi
mov    %rcx,%r12
mov    %r12d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rcx
cmp    $0x1,%rbp
ja     144d <main+0x31d>
add    $0x1,%rbp
cmp    %r14d,%r15d
je     1410 <main+0x2e0>
cmp    $0x1,%rbx
ja     1466 <main+0x336>
add    $0x1,%rbx
add    $0x28,%r13
addq   $0xc,0x8(%rsp)
cmp    %r14d,%r15d
je     1400 <main+0x2d0>
cmp    %r14d,%r15d
setne  %al
cmp    $0x5,%rcx
mov    0x18(%rsp),%r13
ja     13b0 <main+0x280>
add    $0x1,%rcx
add    $0x4,%r13
test   %al,%al
jne    13e0 <main+0x2b0>
jmp    13b0 <main+0x280>
cmp    %r14d,%r15d
je     14a3 <main+0x373>
lea    0xb79(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xb70(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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