// File: millanek[P]Dsuite/./Dsuite_utils.h
// Function: QuartetDinfo::assignQuartetTreeArrangement(std::vector<int, std::allocator<int>> const&, int, int, int, int)
int assignQuartetTreeArrangement(const std::vector<int>& treeLevels, const int loc1, const int loc2, const int loc3, const int loc4) {
        int firstThreeArranged = assignTreeArrangement(treeLevels, loc1, loc2, loc3);
        int withFourthArranged = 0; int overallTreeArrangment = 0;
        switch (firstThreeArranged) {
            case P3isTrios2_Dpositive:
            case P3isTrios2_Dnegative:
                withFourthArranged = assignTreeArrangement(treeLevels, loc1, loc2, loc4);
                switch (withFourthArranged) {
                    case P3isTrios2_Dpositive:
                    case P3isTrios2_Dnegative:
                        overallTreeArrangment = P3isTrios2; break;
                    case P3isTrios1_Dpositive:
                    case P3isTrios1_Dnegative:
                        overallTreeArrangment = P3isTrios0; break;
                    case P3isTrios0_Dpositive:
                    case P3isTrios0_Dnegative:
                        overallTreeArrangment = P3isTrios1; break;
                } break;
            case P3isTrios1_Dpositive:
            case P3isTrios1_Dnegative:
                withFourthArranged = assignTreeArrangement(treeLevels, loc1, loc3, loc4);
                switch (withFourthArranged) {
                    case P3isTrios2_Dpositive:
                    case P3isTrios2_Dnegative:
                        overallTreeArrangment = P3isTrios1; break;
                    case P3isTrios1_Dpositive:
                    case P3isTrios1_Dnegative:
                        overallTreeArrangment = P3isTrios0; break;
                    case P3isTrios0_Dpositive:
                    case P3isTrios0_Dnegative:
                        overallTreeArrangment = P3isTrios2; break;
                } break;
            case P3isTrios0_Dpositive:
            case P3isTrios0_Dnegative:
            withFourthArranged = assignTreeArrangement(treeLevels, loc2, loc3, loc4);
            switch (withFourthArranged) {
                case P3isTrios2_Dpositive:
                case P3isTrios2_Dnegative:
                    overallTreeArrangment = P3isTrios0; break;
                case P3isTrios1_Dpositive:
                case P3isTrios1_Dnegative:
                    overallTreeArrangment = P3isTrios1; break;
                case P3isTrios0_Dpositive:
                case P3isTrios0_Dnegative:
                    overallTreeArrangment = P3isTrios2; break;
            } break;
        }
        return overallTreeArrangment;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
callq 0x395e0
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x30(%rbp)
decl %eax
subl $0x2, %eax
jb 0x7d2fa
jmp 0x7d2d9
movl -0x30(%rbp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x7d35b
jmp 0x7d2e6
movl -0x30(%rbp), %eax
addl $-0x5, %eax
subl $0x2, %eax
jb 0x7d3b9
jmp 0x7d417
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x20(%rbp), %r8d
callq 0x395e0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x3c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x7d33d
jmp 0x7d323
movl -0x3c(%rbp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x7d346
jmp 0x7d330
movl -0x3c(%rbp), %eax
addl $-0x5, %eax
subl $0x2, %eax
jb 0x7d34f
jmp 0x7d356
movl $0x7, -0x2c(%rbp)
jmp 0x7d356
movl $0x9, -0x2c(%rbp)
jmp 0x7d356
movl $0x8, -0x2c(%rbp)
jmp 0x7d417
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
callq 0x395e0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x40(%rbp)
decl %eax
subl $0x2, %eax
jb 0x7d39e
jmp 0x7d384
movl -0x40(%rbp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x7d3a7
jmp 0x7d391
movl -0x40(%rbp), %eax
addl $-0x5, %eax
subl $0x2, %eax
jb 0x7d3b0
jmp 0x7d3b7
movl $0x8, -0x2c(%rbp)
jmp 0x7d3b7
movl $0x9, -0x2c(%rbp)
jmp 0x7d3b7
movl $0x7, -0x2c(%rbp)
jmp 0x7d417
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
callq 0x395e0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x44(%rbp)
decl %eax
subl $0x2, %eax
jb 0x7d3fc
jmp 0x7d3e2
movl -0x44(%rbp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x7d405
jmp 0x7d3ef
movl -0x44(%rbp), %eax
addl $-0x5, %eax
subl $0x2, %eax
jb 0x7d40e
jmp 0x7d415
movl $0x9, -0x2c(%rbp)
jmp 0x7d415
movl $0x8, -0x2c(%rbp)
jmp 0x7d415
movl $0x7, -0x2c(%rbp)
jmp 0x7d417
movl -0x2c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq