// File: millanek[P]Dsuite/./Dsuite_utils.h
// Function: TrioDinfo::assignTreeArrangement(std::vector<int, std::allocator<int>> const&, int, int, int)
int assignTreeArrangement(const std::vector<int>& treeLevels, const int loc1, const int loc2, const int loc3) {
        int midLoc = std::max(std::min(loc1,loc2), std::min(std::max(loc1,loc2),loc3));
        int arrangement = 0;
        if (midLoc == loc1) {
            if (loc2 < loc1) {
                int m1 = *std::min_element(treeLevels.begin()+loc2, treeLevels.begin()+loc1);
                int m2 = *std::min_element(treeLevels.begin()+loc1, treeLevels.begin()+loc3);
                if (m1 < m2) { if (D2 >= 0) { arrangement = P3isTrios1_Dpositive; } else { arrangement = P3isTrios1_Dnegative;}}
                else { if (D1 >= 0) { arrangement = P3isTrios2_Dpositive; } else { arrangement = P3isTrios2_Dnegative; } }
            } else {
                int m1 = *std::min_element(treeLevels.begin()+loc3, treeLevels.begin()+loc1);
                int m2 = *std::min_element(treeLevels.begin()+loc1, treeLevels.begin()+loc2);
                if (m1 < m2) { if (D1 >= 0) { arrangement = P3isTrios2_Dpositive; } else { arrangement = P3isTrios2_Dnegative; }}
                else { if (D2 >= 0) arrangement = P3isTrios1_Dpositive; else arrangement = P3isTrios1_Dnegative;}
            }
        } else if (midLoc == loc2) {
            if (loc1 < loc2) {
                int m1 = *std::min_element(treeLevels.begin()+loc1, treeLevels.begin()+loc2);
                int m2 = *std::min_element(treeLevels.begin()+loc2, treeLevels.begin()+loc3);
                if (m1 < m2) { if (D3 >= 0) arrangement = P3isTrios0_Dpositive; else arrangement = P3isTrios0_Dnegative; }
                else { if (D1 >= 0) { arrangement = P3isTrios2_Dpositive; } else { arrangement = P3isTrios2_Dnegative; }}
            } else {
                int m1 = *std::min_element(treeLevels.begin()+loc3, treeLevels.begin()+loc2);
                int m2 = *std::min_element(treeLevels.begin()+loc2, treeLevels.begin()+loc1);
                if (m1 < m2) { if (D1 >= 0) { arrangement = P3isTrios2_Dpositive;} else {arrangement = P3isTrios2_Dnegative;} }
                else { if (D3 >= 0) arrangement = P3isTrios0_Dpositive; else arrangement = P3isTrios0_Dnegative; }
            }
        } else if (midLoc == loc3) {
            if (loc1 < loc3) {
                int m1 = *std::min_element(treeLevels.begin()+loc1, treeLevels.begin()+loc3);
                int m2 = *std::min_element(treeLevels.begin()+loc3, treeLevels.begin()+loc2);
                if (m1 < m2) { if (D3 >= 0) arrangement = P3isTrios0_Dpositive; else arrangement = P3isTrios0_Dnegative; }
                else { if (D2 >= 0) arrangement = P3isTrios1_Dpositive; else arrangement = P3isTrios1_Dnegative;}
                
            } else {
                int m1 = *std::min_element(treeLevels.begin()+loc2, treeLevels.begin()+loc3);
                int m2 = *std::min_element(treeLevels.begin()+loc3, treeLevels.begin()+loc1);
                if (m1 < m2) { if (D2 >= 0) arrangement = P3isTrios1_Dpositive; else arrangement = P3isTrios1_Dnegative;}
                else { if (D3 >= 0) arrangement = P3isTrios0_Dpositive; else arrangement = P3isTrios0_Dnegative; }
            }
        }
        return arrangement;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3f000
movq %rax, -0x268(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3efc0
movq %rax, %rdi
leaq -0x1c(%rbp), %rsi
callq 0x3f000
movq -0x268(%rbp), %rdi
movq %rax, %rsi
callq 0x3efc0
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x398d4
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x39779
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x40(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3f080
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x50(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x3f080
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x3f040
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x70(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3f080
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x80(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x3f080
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3f040
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x3974d
movq -0x270(%rbp), %rax
movsd 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39744
movl $0x3, -0x24(%rbp)
jmp 0x3974b
movl $0x4, -0x24(%rbp)
jmp 0x39774
movq -0x270(%rbp), %rax
movsd 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x3976b
movl $0x1, -0x24(%rbp)
jmp 0x39772
movl $0x2, -0x24(%rbp)
jmp 0x39774
jmp 0x398cf
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0xa0(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x3f080
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0xb0(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x3f080
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x3f040
movq %rax, -0x90(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x84(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0xd0(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x3f080
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0xe0(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x3f080
movq %rax, -0xd8(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x3f040
movq %rax, -0xc0(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
movl -0x84(%rbp), %eax
cmpl -0xb4(%rbp), %eax
jge 0x398a6
movq -0x270(%rbp), %rax
movsd 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x3989d
movl $0x1, -0x24(%rbp)
jmp 0x398a4
movl $0x2, -0x24(%rbp)
jmp 0x398cd
movq -0x270(%rbp), %rax
movsd 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x398c4
movl $0x3, -0x24(%rbp)
jmp 0x398cb
movl $0x4, -0x24(%rbp)
jmp 0x398cd
jmp 0x398cf
jmp 0x39e6d
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x39ba0
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x39a45
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x100(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x3f080
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x110(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x3f080
movq %rax, -0x108(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x3f040
movq %rax, -0xf0(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0xe4(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x130(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x130(%rbp), %rdi
callq 0x3f080
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x140(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0x3f080
movq %rax, -0x138(%rbp)
movq -0x128(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x3f040
movq %rax, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x114(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x114(%rbp), %eax
jge 0x39a19
movq -0x270(%rbp), %rax
movsd 0x28(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39a10
movl $0x5, -0x24(%rbp)
jmp 0x39a17
movl $0x6, -0x24(%rbp)
jmp 0x39a40
movq -0x270(%rbp), %rax
movsd 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39a37
movl $0x1, -0x24(%rbp)
jmp 0x39a3e
movl $0x2, -0x24(%rbp)
jmp 0x39a40
jmp 0x39b9b
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x160(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x160(%rbp), %rdi
callq 0x3f080
movq %rax, -0x158(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x170(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x3f080
movq %rax, -0x168(%rbp)
movq -0x158(%rbp), %rdi
movq -0x168(%rbp), %rsi
callq 0x3f040
movq %rax, -0x150(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x144(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x190(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x3f080
movq %rax, -0x188(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x1a0(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
callq 0x3f080
movq %rax, -0x198(%rbp)
movq -0x188(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x3f040
movq %rax, -0x180(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x174(%rbp)
movl -0x144(%rbp), %eax
cmpl -0x174(%rbp), %eax
jge 0x39b72
movq -0x270(%rbp), %rax
movsd 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39b69
movl $0x1, -0x24(%rbp)
jmp 0x39b70
movl $0x2, -0x24(%rbp)
jmp 0x39b99
movq -0x270(%rbp), %rax
movsd 0x28(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39b90
movl $0x5, -0x24(%rbp)
jmp 0x39b97
movl $0x6, -0x24(%rbp)
jmp 0x39b99
jmp 0x39b9b
jmp 0x39e6b
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x39e69
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x39d11
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x1c0(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x3f080
movq %rax, -0x1b8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x1d0(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x3f080
movq %rax, -0x1c8(%rbp)
movq -0x1b8(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x3f040
movq %rax, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x1a4(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x1f0(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x3f080
movq %rax, -0x1e8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x200(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x200(%rbp), %rdi
callq 0x3f080
movq %rax, -0x1f8(%rbp)
movq -0x1e8(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
callq 0x3f040
movq %rax, -0x1e0(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x1d4(%rbp)
movl -0x1a4(%rbp), %eax
cmpl -0x1d4(%rbp), %eax
jge 0x39ce5
movq -0x270(%rbp), %rax
movsd 0x28(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39cdc
movl $0x5, -0x24(%rbp)
jmp 0x39ce3
movl $0x6, -0x24(%rbp)
jmp 0x39d0c
movq -0x270(%rbp), %rax
movsd 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39d03
movl $0x3, -0x24(%rbp)
jmp 0x39d0a
movl $0x4, -0x24(%rbp)
jmp 0x39d0c
jmp 0x39e67
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x220(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x3f080
movq %rax, -0x218(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x230(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x230(%rbp), %rdi
callq 0x3f080
movq %rax, -0x228(%rbp)
movq -0x218(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0x3f040
movq %rax, -0x210(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x204(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x250(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0x250(%rbp), %rdi
callq 0x3f080
movq %rax, -0x248(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4f0
movq %rax, -0x260(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x260(%rbp), %rdi
callq 0x3f080
movq %rax, -0x258(%rbp)
movq -0x248(%rbp), %rdi
movq -0x258(%rbp), %rsi
callq 0x3f040
movq %rax, -0x240(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x3f0c0
movl (%rax), %eax
movl %eax, -0x234(%rbp)
movl -0x204(%rbp), %eax
cmpl -0x234(%rbp), %eax
jge 0x39e3e
movq -0x270(%rbp), %rax
movsd 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39e35
movl $0x3, -0x24(%rbp)
jmp 0x39e3c
movl $0x4, -0x24(%rbp)
jmp 0x39e65
movq -0x270(%rbp), %rax
movsd 0x28(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x39e5c
movl $0x5, -0x24(%rbp)
jmp 0x39e63
movl $0x6, -0x24(%rbp)
jmp 0x39e65
jmp 0x39e67
jmp 0x39e69
jmp 0x39e6b
jmp 0x39e6d
movl -0x24(%rbp), %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
nopl (%rax)