#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, int, int, int);
int main(void) {
  int max = 10;
  int a[max], aa[max], e, ee;
  a[0] = 0;
  aa[0] = 0;
  for (e = 1; e < max; ++e) {
    a[e] = 31 * e;
    aa[e] = 13 * e;
  }
  for (e = 1; e < max; ++e) {
    for (ee = 1; ee < max; ++ee) {
      if (a[e] == aa[ee]) {
        goto match;
      }
    unmatch:;
    }
  }
  goto end;
match:
  printf("a[%d] = [%d]\naa[%d] = [%d]\n", e, a[e], ee, aa[ee]);
  goto unmatch;
end:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%edx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rax
sub    %rsi,%rax
mov    %rax,-0x30(%rbp)
mov    %rax,%rsp
mov    %rdx,-0x20(%rbp)
movl   $0x0,(%rcx)
movl   $0x0,(%rax)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ba <main+0xaa>
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
imul   $0x1f,-0x24(%rbp),%esi
movslq -0x24(%rbp),%rdx
mov    %esi,(%rcx,%rdx,4)
imul   $0xd,-0x24(%rbp),%edx
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1182 <main+0x72>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    122c <main+0x11c>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1219 <main+0x109>
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rdx
mov    (%rax,%rdx,4),%eax
movslq -0x28(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1201 <main+0xf1>
jmp    1231 <main+0x121>
jmp    1206 <main+0xf6>
jmp    120b <main+0xfb>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11d4 <main+0xc4>
jmp    121e <main+0x10e>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11c1 <main+0xb1>
jmp    125f <main+0x14f>
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x24(%rbp),%esi
movslq -0x24(%rbp),%rdx
mov    (%rcx,%rdx,4),%edx
mov    -0x28(%rbp),%ecx
movslq -0x28(%rbp),%rdi
mov    (%rax,%rdi,4),%r8d
lea    0xdab(%rip),%rdi
call   1030 <printf@plt>
jmp    1206 <main+0xf6>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
movaps 0xede(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x117000000f8,%rax
mov    %rax,0x20(%rsp)
mov    $0x1f,%eax
xor    %ebx,%ebx
lea    0x1011(%rip),%r14
lea    0xf6a(%rip),%r15
lea    0xec3(%rip),%r12
nopl   (%rax)
lea    -0x1a(%rax),%ecx
cmp    $0x27,%ecx
jbe    11a0 <main+0x90>
lea    -0x4e(%rax),%ecx
cmp    $0x27,%ecx
ja     11c4 <main+0xb4>
movslq (%r15,%rcx,4),%rax
add    %r15,%rax
jmp    *%rax
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x4e,%edx
mov    $0x6,%ecx
mov    $0x4e,%r8d
jmp    1280 <main+0x170>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq (%r12,%rcx,4),%rax
add    %r12,%rax
jmp    *%rax
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x1a,%edx
mov    $0x2,%ecx
mov    $0x1a,%r8d
jmp    1280 <main+0x170>
cmp    $0xd,%eax
jne    1285 <main+0x175>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0xd,%edx
mov    $0x1,%ecx
mov    $0xd,%r8d
jmp    1280 <main+0x170>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x27,%edx
mov    $0x3,%ecx
mov    $0x27,%r8d
jmp    1280 <main+0x170>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x34,%edx
mov    $0x4,%ecx
mov    $0x34,%r8d
jmp    1280 <main+0x170>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x41,%edx
mov    $0x5,%ecx
mov    $0x41,%r8d
jmp    1280 <main+0x170>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x5b,%edx
mov    $0x7,%ecx
mov    $0x5b,%r8d
jmp    1280 <main+0x170>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x68,%edx
mov    $0x8,%ecx
mov    $0x68,%r8d
jmp    1280 <main+0x170>
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x75,%edx
mov    $0x9,%ecx
mov    $0x75,%r8d
nopl   0x0(%rax)
call   1030 <printf@plt>
cmp    $0x8,%rbx
je     1298 <main+0x188>
mov    0x8(%rsp,%rbx,4),%eax
add    $0x1,%rbx
jmp    1160 <main+0x50>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"a[%d] = [%d]\0Aaa[%d] = [%d]\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 31, i32 62, i32 93>, <4 x i32>* %2
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 124, i32 155, i32 186, i32 217>, <4 x i32>* %4
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
store i32 248, i32* %5
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
store i32 279, i32* %6
br label %7
7: ; preds = %37, %0
%8 = phi i32 [ 31, %0 ], [ %39, %37 ]
%9 = phi i64 [ 1, %0 ], [ %35, %37 ]
switch i32 %8, label %34 [
i32 13, label %40
i32 26, label %10
i32 39, label %13
i32 52, label %16
i32 65, label %19
i32 78, label %22
i32 91, label %25
i32 104, label %28
i32 117, label %31
]
10: ; preds = %7
%11 = trunc i64 %9 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %11, i32 26, i32 2, i32 26)
br label %34
13: ; preds = %7
%14 = trunc i64 %9 to i32
%15 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %14, i32 39, i32 3, i32 39)
br label %34
16: ; preds = %7
%17 = trunc i64 %9 to i32
%18 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %17, i32 52, i32 4, i32 52)
br label %34
19: ; preds = %7
%20 = trunc i64 %9 to i32
%21 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %20, i32 65, i32 5, i32 65)
br label %34
22: ; preds = %7
%23 = trunc i64 %9 to i32
%24 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %23, i32 78, i32 6, i32 78)
br label %34
25: ; preds = %7
%26 = trunc i64 %9 to i32
%27 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %26, i32 91, i32 7, i32 91)
br label %34
28: ; preds = %7
%29 = trunc i64 %9 to i32
%30 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %29, i32 104, i32 8, i32 104)
br label %34
31: ; preds = %7
%32 = trunc i64 %9 to i32
%33 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %32, i32 117, i32 9, i32 117)
br label %34
34: ; preds = %7, %10, %40, %13, %16, %19, %22, %25, %28, %31
%35 = add nuw nsw i64 %9, 1
%36 = icmp eq i64 %35, 10
br i1 %36, label %43, label %37
37: ; preds = %34
%38 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %35
%39 = load i32, i32* %38
br label %7
40: ; preds = %7
%41 = trunc i64 %9 to i32
%42 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %41, i32 13, i32 1, i32 13)
br label %34
43: ; preds = %34
ret i32 0
}