#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*/ get_cluster_sizes(int **, int, int, int, int *, int *);
int /*<<< orphan*/ mark_cluster_numbers(int **, int **, int **, int, int,
                                        int *);
int A_in_C(int **site_marks, int **vbonds, int **hbonds, int M, int N, double p,
           int A[2], int *cluster_sizes) {
  int num_clusters;
  int C_clno;
  int A_clno;
  mark_cluster_numbers(site_marks, vbonds, hbonds, M, N, &num_clusters);
  get_cluster_sizes(site_marks, M, N, num_clusters, cluster_sizes, &C_clno);
  A_clno = site_marks[A[0]][A[1]];
  if (A_clno == C_clno)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<A_in_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
lea    -0x3c(%rbp),%r9
call   1030 <mark_cluster_numbers@plt>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    0x10(%rbp),%r8
lea    -0x40(%rbp),%r9
call   1040 <get_cluster_sizes@plt>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%rcx
movslq 0x4(%rcx),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x40(%rbp),%eax
jne    11b3 <A_in_C+0x93>
movl   $0x1,-0x4(%rbp)
jmp    11ba <A_in_C+0x9a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A_in_C>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r9,%r14
mov    %r8d,%r15d
mov    %ecx,%ebx
mov    %rdi,%rbp
mov    0x40(%rsp),%r12
lea    0xc(%rsp),%r9
call   1030 <mark_cluster_numbers@plt>
mov    0xc(%rsp),%ecx
lea    0x8(%rsp),%r9
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r12,%r8
call   1040 <get_cluster_sizes@plt>
movslq (%r14),%rax
mov    0x0(%rbp,%rax,8),%rax
movslq 0x4(%r14),%rcx
mov    (%rax,%rcx,4),%ecx
xor    %eax,%eax
cmp    0x8(%rsp),%ecx
sete   %al
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @A_in_C(i32** %0, i32** %1, i32** %2, i32 %3, i32 %4, double %5, i32* %6, i32* %7) {
%9 = alloca i32
%10 = alloca i32**
%11 = alloca i32**
%12 = alloca i32**
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32** %0, i32*** %10
store i32** %1, i32*** %11
store i32** %2, i32*** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store double %5, double* %15
store i32* %6, i32** %16
store i32* %7, i32** %17
%21 = load i32**, i32*** %10
%22 = load i32**, i32*** %11
%23 = load i32**, i32*** %12
%24 = load i32, i32* %13
%25 = load i32, i32* %14
%26 = call i32 @mark_cluster_numbers(i32** %21, i32** %22, i32** %23, i32 %24, i32 %25, i32* %18)
%27 = load i32**, i32*** %10
%28 = load i32, i32* %13
%29 = load i32, i32* %14
%30 = load i32, i32* %18
%31 = load i32*, i32** %17
%32 = call i32 @get_cluster_sizes(i32** %27, i32 %28, i32 %29, i32 %30, i32* %31, i32* %19)
%33 = load i32**, i32*** %10
%34 = load i32*, i32** %16
%35 = getelementptr inbounds i32, i32* %34, i64 0
%36 = load i32, i32* %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32*, i32** %33, i64 %37
%39 = load i32*, i32** %38
%40 = load i32*, i32** %16
%41 = getelementptr inbounds i32, i32* %40, i64 1
%42 = load i32, i32* %41
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %39, i64 %43
%45 = load i32, i32* %44
store i32 %45, i32* %20
%46 = load i32, i32* %20
%47 = load i32, i32* %19
%48 = icmp eq i32 %46, %47
br i1 %48, label %49, label %50
49: ; preds = %8
store i32 1, i32* %9
br label %51
50: ; preds = %8
store i32 0, i32* %9
br label %51
51: ; preds = %50, %49
%52 = load i32, i32* %9
ret i32 %52
}

LLVM IR (-O2):
define i32 @A_in_C(i32** %0, i32** %1, i32** %2, i32 %3, i32 %4, double %5, i32* nocapture %6, i32* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = bitcast i32* %9 to i8*
%12 = bitcast i32* %10 to i8*
%13 = call i32 @mark_cluster_numbers(i32** %0, i32** %1, i32** %2, i32 %3, i32 %4, i32* %9)
%14 = load i32, i32* %9
%15 = call i32 @get_cluster_sizes(i32** %0, i32 %3, i32 %4, i32 %14, i32* %7, i32* %10)
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32*, i32** %0, i64 %17
%19 = load i32*, i32** %18
%20 = getelementptr inbounds i32, i32* %6, i64 1
%21 = load i32, i32* %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %19, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %10
%26 = icmp eq i32 %24, %25
%27 = zext i1 %26 to i32
ret i32 %27
}