#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*/ remove_edge(int *, int, int *, int *, int);
int sim(int *, int *, int);
int compute_similarity(int t1[], int t2[], int len) {
  bool g11[len], g12[len], g21[len], g22[len];
  int MAX = 0;
  int sum = 0;
  for (int i = 0; i < len; i++) {
    int sq = 0;
    for (int j = 0; j < len; j++) {
      g11[j] = g12[j] = g21[j] = g22[j] = false;
    }
    remove_edge(t1, i, g11, g12, len);
    remove_edge(t2, i, g21, g22, len);
    sq = sim(g11, g21, len) > sim(g11, g22, len) ? sim(g11, g21, len)
         : sim(g11, g22, len) > sim(g12, g21, len) > sim(g12, g22, len)
             ? sim(g12, g21, len)
         : sim(g12, g22, len) ? sim(g11, g21, len) > sim(g11, g22, len)
                                    ? sim(g11, g21, len)
                                    : sim(g11, g22, len)
         : sim(g12, g21, len) > sim(g12, g22, len) ? sim(g12, g21, len)
                                                   : sim(g12, g22, len);
    sum = sum + (sq * sq);
  }
  return sum;
}


x86 assembly (clang, -O0):
<compute_similarity>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    146f <compute_similarity+0x34f>
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1242 <compute_similarity+0x122>
mov    -0x78(%rbp),%rax
mov    -0x70(%rbp),%rcx
mov    -0x68(%rbp),%rdx
mov    -0x60(%rbp),%rsi
movslq -0x54(%rbp),%rdi
movl   $0x0,(%rsi,%rdi,4)
movslq -0x54(%rbp),%rsi
movl   $0x0,(%rdx,%rsi,4)
movslq -0x54(%rbp),%rdx
movl   $0x0,(%rcx,%rdx,4)
movslq -0x54(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11ec <compute_similarity+0xcc>
mov    -0x78(%rbp),%rdx
mov    -0x70(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    -0x4c(%rbp),%esi
mov    -0x14(%rbp),%r8d
call   1030 <remove_edge@plt>
mov    -0x68(%rbp),%rdx
mov    -0x60(%rbp),%rcx
mov    -0x10(%rbp),%rdi
mov    -0x4c(%rbp),%esi
mov    -0x14(%rbp),%r8d
call   1030 <remove_edge@plt>
mov    -0x68(%rbp),%rsi
mov    -0x78(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    -0x78(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    %eax,-0x7c(%rbp)
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
cmp    %ecx,%eax
jle    12ba <compute_similarity+0x19a>
mov    -0x68(%rbp),%rsi
mov    -0x78(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,-0x80(%rbp)
jmp    144c <compute_similarity+0x32c>
mov    -0x60(%rbp),%rsi
mov    -0x78(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    -0x68(%rbp),%rsi
mov    -0x70(%rbp),%rdi
mov    %eax,-0x88(%rbp)
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    -0x70(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    %eax,%ecx
mov    -0x88(%rbp),%eax
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x84(%rbp)
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
cmp    %ecx,%eax
jle    1333 <compute_similarity+0x213>
mov    -0x68(%rbp),%rsi
mov    -0x70(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,-0x8c(%rbp)
jmp    1443 <compute_similarity+0x323>
mov    -0x60(%rbp),%rsi
mov    -0x70(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
cmp    $0x0,%eax
je     13c4 <compute_similarity+0x2a4>
mov    -0x78(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    -0x78(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    %eax,-0x90(%rbp)
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
cmp    %ecx,%eax
jle    139d <compute_similarity+0x27d>
mov    -0x68(%rbp),%rsi
mov    -0x78(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,-0x94(%rbp)
jmp    13b3 <compute_similarity+0x293>
mov    -0x60(%rbp),%rsi
mov    -0x78(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,-0x94(%rbp)
mov    -0x94(%rbp),%eax
mov    %eax,-0x98(%rbp)
jmp    1437 <compute_similarity+0x317>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    -0x70(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    %eax,-0x9c(%rbp)
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
cmp    %ecx,%eax
jle    1415 <compute_similarity+0x2f5>
mov    -0x68(%rbp),%rsi
mov    -0x70(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,-0xa0(%rbp)
jmp    142b <compute_similarity+0x30b>
mov    -0x60(%rbp),%rsi
mov    -0x70(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <sim@plt>
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0x98(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x48(%rbp),%eax
mov    -0x50(%rbp),%ecx
imul   -0x50(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x48(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11d2 <compute_similarity+0xb2>
mov    -0x48(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_similarity>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdi,-0x70(%rbp)
mov    %edx,%ebx
mov    %rsp,%rcx
lea    0xf(,%rbx,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
test   %edx,%edx
jle    133f <compute_similarity+0x20f>
mov    %edx,%r8d
mov    %rsi,-0x60(%rbp)
shl    $0x2,%rbx
xor    %r12d,%r12d
xor    %ecx,%ecx
mov    %rbx,-0x38(%rbp)
mov    %r15,-0x48(%rbp)
jmp    11e2 <compute_similarity+0xb2>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
mov    -0x48(%rbp),%r15
mov    %r15,%rsi
mov    %r13d,%edx
call   1050 <sim@plt>
mov    -0x38(%rbp),%rbx
mov    %r13d,%r8d
mov    -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%r12d
imul   %eax,%eax
add    %eax,%ecx
add    $0x1,%r12d
cmp    %r12d,%r8d
je     1341 <compute_similarity+0x211>
mov    %ecx,-0x30(%rbp)
mov    -0x40(%rbp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %r8d,%r13d
call   1030 <memset@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    -0x50(%rbp),%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %rdi,%rbx
call   1030 <memset@plt>
mov    -0x70(%rbp),%rdi
mov    %r12d,%esi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r13d,%r8d
call   1040 <remove_edge@plt>
mov    -0x60(%rbp),%rdi
mov    %r12d,-0x2c(%rbp)
mov    %r12d,%esi
mov    %rbx,%r12
mov    -0x48(%rbp),%rbx
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %r13d,%r8d
call   1040 <remove_edge@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
call   1050 <sim@plt>
mov    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1050 <sim@plt>
cmp    %eax,%ebx
jg     11b0 <compute_similarity+0x80>
mov    %r12,%rdi
mov    -0x40(%rbp),%r14
mov    %r14,%rsi
mov    %r13d,%edx
call   1050 <sim@plt>
mov    %eax,-0x54(%rbp)
mov    %r15,%rdi
mov    -0x48(%rbp),%rsi
mov    %r13d,%edx
call   1050 <sim@plt>
mov    %r12,%rbx
xor    %r12d,%r12d
cmp    %eax,-0x54(%rbp)
setg   %r12b
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1050 <sim@plt>
cmp    %r12d,%eax
jge    12d0 <compute_similarity+0x1a0>
mov    -0x50(%rbp),%rdi
jmp    11b3 <compute_similarity+0x83>
mov    %rbx,%r15
mov    -0x48(%rbp),%rbx
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    %r13d,%edx
call   1050 <sim@plt>
test   %eax,%eax
mov    %r13d,%r14d
jne    12f2 <compute_similarity+0x1c2>
mov    -0x50(%rbp),%r15
mov    %r15,%rdi
mov    %rbx,%r13
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <sim@plt>
mov    %eax,%r12d
mov    %r15,%rdi
mov    -0x40(%rbp),%rbx
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <sim@plt>
mov    %r15,%rdi
cmp    %eax,%r12d
jle    1325 <compute_similarity+0x1f5>
mov    %r13,%rsi
jmp    1328 <compute_similarity+0x1f8>
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <sim@plt>
mov    -0x38(%rbp),%rbx
mov    %r14d,%r8d
mov    %r13,%r15
jmp    11c9 <compute_similarity+0x99>
xor    %ecx,%ecx
mov    %ecx,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @compute_similarity(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%17 = load i32, i32* %6
%18 = zext i32 %17 to i64
%19 = call i8* @llvm.stacksave()
store i8* %19, i8** %7
%20 = alloca i32, i64 %18
store i64 %18, i64* %8
%21 = load i32, i32* %6
%22 = zext i32 %21 to i64
%23 = alloca i32, i64 %22
store i64 %22, i64* %9
%24 = load i32, i32* %6
%25 = zext i32 %24 to i64
%26 = alloca i32, i64 %25
store i64 %25, i64* %10
%27 = load i32, i32* %6
%28 = zext i32 %27 to i64
%29 = alloca i32, i64 %28
store i64 %28, i64* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
br label %30
30: ; preds = %128, %3
%31 = load i32, i32* %14
%32 = load i32, i32* %6
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %131
34: ; preds = %30
store i32 0, i32* %15
store i32 0, i32* %16
br label %35
35: ; preds = %52, %34
%36 = load i32, i32* %16
%37 = load i32, i32* %6
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %55
39: ; preds = %35
%40 = load i32, i32* %16
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %29, i64 %41
store i32 0, i32* %42
%43 = load i32, i32* %16
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i32, i32* %26, i64 %44
store i32 0, i32* %45
%46 = load i32, i32* %16
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i32, i32* %23, i64 %47
store i32 0, i32* %48
%49 = load i32, i32* %16
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %20, i64 %50
store i32 0, i32* %51
br label %52
52: ; preds = %39
%53 = load i32, i32* %16
%54 = add nsw i32 %53, 1
store i32 %54, i32* %16
br label %35
55: ; preds = %35
%56 = load i32*, i32** %4
%57 = load i32, i32* %14
%58 = load i32, i32* %6
%59 = call i32 @remove_edge(i32* %56, i32 %57, i32* %20, i32* %23, i32 %58)
%60 = load i32*, i32** %5
%61 = load i32, i32* %14
%62 = load i32, i32* %6
%63 = call i32 @remove_edge(i32* %60, i32 %61, i32* %26, i32* %29, i32 %62)
%64 = load i32, i32* %6
%65 = call i32 @sim(i32* %20, i32* %26, i32 %64)
%66 = load i32, i32* %6
%67 = call i32 @sim(i32* %20, i32* %29, i32 %66)
%68 = icmp sgt i32 %65, %67
br i1 %68, label %69, label %72
69: ; preds = %55
%70 = load i32, i32* %6
%71 = call i32 @sim(i32* %20, i32* %26, i32 %70)
br label %121
72: ; preds = %55
%73 = load i32, i32* %6
%74 = call i32 @sim(i32* %20, i32* %29, i32 %73)
%75 = load i32, i32* %6
%76 = call i32 @sim(i32* %23, i32* %26, i32 %75)
%77 = icmp sgt i32 %74, %76
%78 = zext i1 %77 to i32
%79 = load i32, i32* %6
%80 = call i32 @sim(i32* %23, i32* %29, i32 %79)
%81 = icmp sgt i32 %78, %80
br i1 %81, label %82, label %85
82: ; preds = %72
%83 = load i32, i32* %6
%84 = call i32 @sim(i32* %23, i32* %26, i32 %83)
br label %119
85: ; preds = %72
%86 = load i32, i32* %6
%87 = call i32 @sim(i32* %23, i32* %29, i32 %86)
%88 = icmp ne i32 %87, 0
br i1 %88, label %89, label %103
89: ; preds = %85
%90 = load i32, i32* %6
%91 = call i32 @sim(i32* %20, i32* %26, i32 %90)
%92 = load i32, i32* %6
%93 = call i32 @sim(i32* %20, i32* %29, i32 %92)
%94 = icmp sgt i32 %91, %93
br i1 %94, label %95, label %98
95: ; preds = %89
%96 = load i32, i32* %6
%97 = call i32 @sim(i32* %20, i32* %26, i32 %96)
br label %101
98: ; preds = %89
%99 = load i32, i32* %6
%100 = call i32 @sim(i32* %20, i32* %29, i32 %99)
br label %101
101: ; preds = %98, %95
%102 = phi i32 [ %97, %95 ], [ %100, %98 ]
br label %117
103: ; preds = %85
%104 = load i32, i32* %6
%105 = call i32 @sim(i32* %23, i32* %26, i32 %104)
%106 = load i32, i32* %6
%107 = call i32 @sim(i32* %23, i32* %29, i32 %106)
%108 = icmp sgt i32 %105, %107
br i1 %108, label %109, label %112
109: ; preds = %103
%110 = load i32, i32* %6
%111 = call i32 @sim(i32* %23, i32* %26, i32 %110)
br label %115
112: ; preds = %103
%113 = load i32, i32* %6
%114 = call i32 @sim(i32* %23, i32* %29, i32 %113)
br label %115
115: ; preds = %112, %109
%116 = phi i32 [ %111, %109 ], [ %114, %112 ]
br label %117
117: ; preds = %115, %101
%118 = phi i32 [ %102, %101 ], [ %116, %115 ]
br label %119
119: ; preds = %117, %82
%120 = phi i32 [ %84, %82 ], [ %118, %117 ]
br label %121
121: ; preds = %119, %69
%122 = phi i32 [ %71, %69 ], [ %120, %119 ]
store i32 %122, i32* %15
%123 = load i32, i32* %13
%124 = load i32, i32* %15
%125 = load i32, i32* %15
%126 = mul nsw i32 %124, %125
%127 = add nsw i32 %123, %126
store i32 %127, i32* %13
br label %128
128: ; preds = %121
%129 = load i32, i32* %14
%130 = add nsw i32 %129, 1
store i32 %130, i32* %14
br label %30
131: ; preds = %30
%132 = load i32, i32* %13
%133 = load i8*, i8** %7
ret i32 %132
}

LLVM IR (-O2):
define i32 @compute_similarity(i32* %0, i32* %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = alloca i32, i64 %4
%6 = bitcast i32* %5 to i8*
%7 = alloca i32, i64 %4
%8 = bitcast i32* %7 to i8*
%9 = alloca i32, i64 %4
%10 = bitcast i32* %9 to i8*
%11 = alloca i32, i64 %4
%12 = bitcast i32* %11 to i8*
%13 = icmp sgt i32 %2, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = shl nuw nsw i64 %4, 2
br label %18
16: ; preds = %56, %3
%17 = phi i32 [ 0, %3 ], [ %59, %56 ]
ret i32 %17
18: ; preds = %14, %56
%19 = phi i32 [ 0, %14 ], [ %60, %56 ]
%20 = phi i32 [ 0, %14 ], [ %59, %56 ]
%21 = call i32 @remove_edge(i32* %0, i32 %19, i32* %5, i32* %7, i32 %2)
%22 = call i32 @remove_edge(i32* %1, i32 %19, i32* %9, i32* %11, i32 %2)
%23 = call i32 @sim(i32* %5, i32* %9, i32 %2)
%24 = call i32 @sim(i32* %5, i32* %11, i32 %2)
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %18
%27 = call i32 @sim(i32* %5, i32* %9, i32 %2)
br label %56
28: ; preds = %18
%29 = call i32 @sim(i32* %5, i32* %11, i32 %2)
%30 = call i32 @sim(i32* %7, i32* %9, i32 %2)
%31 = icmp sgt i32 %29, %30
%32 = zext i1 %31 to i32
%33 = call i32 @sim(i32* %7, i32* %11, i32 %2)
%34 = icmp slt i32 %33, %32
br i1 %34, label %35, label %37
35: ; preds = %28
%36 = call i32 @sim(i32* %7, i32* %9, i32 %2)
br label %56
37: ; preds = %28
%38 = call i32 @sim(i32* %7, i32* %11, i32 %2)
%39 = icmp eq i32 %38, 0
br i1 %39, label %48, label %40
40: ; preds = %37
%41 = call i32 @sim(i32* %5, i32* %9, i32 %2)
%42 = call i32 @sim(i32* %5, i32* %11, i32 %2)
%43 = icmp sgt i32 %41, %42
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 @sim(i32* %5, i32* %9, i32 %2)
br label %56
46: ; preds = %40
%47 = call i32 @sim(i32* %5, i32* %11, i32 %2)
br label %56
48: ; preds = %37
%49 = call i32 @sim(i32* %7, i32* %9, i32 %2)
%50 = call i32 @sim(i32* %7, i32* %11, i32 %2)
%51 = icmp sgt i32 %49, %50
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 @sim(i32* %7, i32* %9, i32 %2)
br label %56
54: ; preds = %48
%55 = call i32 @sim(i32* %7, i32* %11, i32 %2)
br label %56
56: ; preds = %35, %52, %54, %44, %46, %26
%57 = phi i32 [ %27, %26 ], [ %36, %35 ], [ %45, %44 ], [ %47, %46 ], [ %53, %52 ], [ %55, %54 ]
%58 = mul nsw i32 %57, %57
%59 = add nuw nsw i32 %58, %20
%60 = add nuw nsw i32 %19, 1
%61 = icmp eq i32 %60, %2
br i1 %61, label %16, label %18
}