#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
main() {
  int i, j, found;
  int a[] = {1, 3, 5, 7, 9, 10};
  int b[] = {2, 4, 6, 8, 10};
  for (i = 0; i < 10; i++)
    for (j = 0; j < 10; j++) {
      printf("%d ", j);
      if (j > 5)
        goto Error;
    }
  printf("\nThis is the end of loop.\n");
Error:
  printf("\nThis is the Error label.\n\n");
  for (i = 0; i < 6; i++)
    for (j = 0; j < 5; j++)
      if (a[i] == b[j])
        goto Found;
  printf("This is the end of loop.\n");
Found:
  printf("Found(%d,%d)\n", i, j);
  found = 0;
  for (i = 0; i < 6 && !found; i++)
    for (j = 0; j < 5 && !found; j++)
      if (a[i] == b[j])
        found = 1;
  printf("\nThis is the end of loop.\n");
  if (found)
    printf("found(%d,%d)\n", i, j);
  else
    printf("Does not found(%d,%d)\n", i, j);
  printf("\nPress any key to end...");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11d7 <main+0xb7>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11c4 <main+0xa4>
mov    -0xc(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x5,-0xc(%rbp)
jle    11b1 <main+0x91>
jmp    11e5 <main+0xc5>
jmp    11b6 <main+0x96>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1187 <main+0x67>
jmp    11c9 <main+0xa9>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1176 <main+0x56>
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    1256 <main+0x136>
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1243 <main+0x123>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x50(%rbp,%rcx,4),%eax
jne    1230 <main+0x110>
jmp    1264 <main+0x144>
jmp    1235 <main+0x115>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    120b <main+0xeb>
jmp    1248 <main+0x128>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11fa <main+0xda>
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x6,-0x8(%rbp)
mov    %al,-0x51(%rbp)
jge    12a1 <main+0x181>
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    12b1 <main+0x191>
jmp    1326 <main+0x206>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x5,-0xc(%rbp)
mov    %al,-0x52(%rbp)
jge    12d3 <main+0x1b3>
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x52(%rbp)
mov    -0x52(%rbp),%al
test   $0x1,%al
jne    12e3 <main+0x1c3>
jmp    1313 <main+0x1f3>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x50(%rbp,%rcx,4),%eax
jne    1300 <main+0x1e0>
movl   $0x1,-0x10(%rbp)
jmp    1305 <main+0x1e5>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12b8 <main+0x198>
jmp    1318 <main+0x1f8>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1286 <main+0x166>
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x10(%rbp)
je     1357 <main+0x237>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    136b <main+0x24b>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xd19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
lea    0xe53(%rip),%rdi
mov    $0x5,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
lea    0xe46(%rip),%rdi
mov    $0x6,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe3c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [6 x i32] [i32 1, i32 3, i32 5, i32 7, i32 9, i32 10]
@__const.main.b = [5 x i32] [i32 2, i32 4, i32 6, i32 8, i32 10]
@.str = [4 x i8] c"%d \00"
@.str.1 = [27 x i8] c"\0AThis is the end of loop.\0A\00"
@.str.2 = [28 x i8] c"\0AThis is the Error label.\0A\0A\00"
@.str.3 = [26 x i8] c"This is the end of loop.\0A\00"
@.str.4 = [14 x i8] c"Found(%d,%d)\0A\00"
@.str.5 = [14 x i8] c"found(%d,%d)\0A\00"
@.str.6 = [23 x i8] c"Does not found(%d,%d)\0A\00"
@.str.7 = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [6 x i32]
%6 = alloca [5 x i32]
store i32 0, i32* %1
%7 = bitcast [6 x i32]* %5 to i8*
%8 = bitcast [5 x i32]* %6 to i8*
store i32 0, i32* %2
br label %9
9: ; preds = %27, %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %30
12: ; preds = %9
store i32 0, i32* %3
br label %13
13: ; preds = %23, %12
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 10
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = load i32, i32* %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %3
%20 = icmp sgt i32 %19, 5
br i1 %20, label %21, label %22
21: ; preds = %16
br label %32
22: ; preds = %16
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %13
26: ; preds = %13
br label %27
27: ; preds = %26
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
br label %9
30: ; preds = %9
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %21
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %34
34: ; preds = %57, %32
%35 = load i32, i32* %2
%36 = icmp slt i32 %35, 6
br i1 %36, label %37, label %60
37: ; preds = %34
store i32 0, i32* %3
br label %38
38: ; preds = %53, %37
%39 = load i32, i32* %3
%40 = icmp slt i32 %39, 5
br i1 %40, label %41, label %56
41: ; preds = %38
%42 = load i32, i32* %2
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = load i32, i32* %3
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = icmp eq i32 %45, %49
br i1 %50, label %51, label %52
51: ; preds = %41
br label %62
52: ; preds = %41
br label %53
53: ; preds = %52
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
br label %38
56: ; preds = %38
br label %57
57: ; preds = %56
%58 = load i32, i32* %2
%59 = add nsw i32 %58, 1
store i32 %59, i32* %2
br label %34
60: ; preds = %34
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %62
62: ; preds = %60, %51
%63 = load i32, i32* %2
%64 = load i32, i32* %3
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %63, i32 %64)
store i32 0, i32* %4
store i32 0, i32* %2
br label %66
66: ; preds = %101, %62
%67 = load i32, i32* %2
%68 = icmp slt i32 %67, 6
br i1 %68, label %69, label %73
69: ; preds = %66
%70 = load i32, i32* %4
%71 = icmp ne i32 %70, 0
%72 = xor i1 %71, true
br label %73
73: ; preds = %69, %66
%74 = phi i1 [ false, %66 ], [ %72, %69 ]
br i1 %74, label %75, label %104
75: ; preds = %73
store i32 0, i32* %3
br label %76
76: ; preds = %97, %75
%77 = load i32, i32* %3
%78 = icmp slt i32 %77, 5
br i1 %78, label %79, label %83
79: ; preds = %76
%80 = load i32, i32* %4
%81 = icmp ne i32 %80, 0
%82 = xor i1 %81, true
br label %83
83: ; preds = %79, %76
%84 = phi i1 [ false, %76 ], [ %82, %79 ]
br i1 %84, label %85, label %100
85: ; preds = %83
%86 = load i32, i32* %2
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %87
%89 = load i32, i32* %88
%90 = load i32, i32* %3
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 %91
%93 = load i32, i32* %92
%94 = icmp eq i32 %89, %93
br i1 %94, label %95, label %96
95: ; preds = %85
store i32 1, i32* %4
br label %96
96: ; preds = %95, %85
br label %97
97: ; preds = %96
%98 = load i32, i32* %3
%99 = add nsw i32 %98, 1
store i32 %99, i32* %3
br label %76
100: ; preds = %83
br label %101
101: ; preds = %100
%102 = load i32, i32* %2
%103 = add nsw i32 %102, 1
store i32 %103, i32* %2
br label %66
104: ; preds = %73
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%106 = load i32, i32* %4
%107 = icmp ne i32 %106, 0
br i1 %107, label %108, label %112
108: ; preds = %104
%109 = load i32, i32* %2
%110 = load i32, i32* %3
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %109, i32 %110)
br label %116
112: ; preds = %104
%113 = load i32, i32* %2
%114 = load i32, i32* %3
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %113, i32 %114)
br label %116
116: ; preds = %112, %108
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%118 = call i32 (...) @getchar()
%119 = load i32, i32* %1
ret i32 %119
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
@.str.4 = [14 x i8] c"Found(%d,%d)\0A\00"
@.str.5 = [14 x i8] c"found(%d,%d)\0A\00"
@.str.6 = [23 x i8] c"Does not found(%d,%d)\0A\00"
@.str.7 = [25 x i8] c"\0APress any key to end...\00"
@str.8 = [27 x i8] c"\0AThis is the Error label.\0A\00"
@str.10 = [26 x i8] c"\0AThis is the end of loop.\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.8, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 5, i32 4)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.10, i64 0, i64 0))
%11 = select i1 false, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %11, i32 6, i32 5)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%14 = tail call i32 (...) @getchar()
ret i32 0
}