// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: fill_hierarchy
void fill_hierarchy(float *truth, int k, tree *hierarchy)
{
    int j;
    for(j = 0; j < k; ++j){
        if(truth[j]){
            int parent = hierarchy->parent[j];
            while(parent >= 0){
                truth[parent] = 1;
                parent = hierarchy->parent[parent];
            }
        }
    }
    int i;
    int count = 0;
    for(j = 0; j < hierarchy->groups; ++j){
        //printf("%d\n", count);
        int mask = 1;
        for(i = 0; i < hierarchy->group_size[j]; ++i){
            if(truth[count + i]){
                mask = 0;
                break;
            }
        }
        if (mask) {
            for(i = 0; i < hierarchy->group_size[j]; ++i){
                truth[count + i] = SECRET_NUM;
            }
        }
        count += hierarchy->group_size[j];
    }
}

// Assembly:
pushq %rbp
pushq %rbx
testl %esi, %esi
jle 0x2cd5d
movl %esi, %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movss (%rdi,%rcx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x2cd37
jnp 0x2cd55
movq 0x10(%rdx), %rsi
movl (%rsi,%rcx,4), %r8d
testl %r8d, %r8d
js 0x2cd55
movl %r8d, %r8d
movl $0x3f800000, (%rdi,%r8,4) # imm = 0x3F800000
movl (%rsi,%r8,4), %r8d
jmp 0x2cd3f
incq %rcx
cmpq %rax, %rcx
jne 0x2cd2b
movslq 0x30(%rdx), %rax
testq %rax, %rax
jle 0x2ceeb
movq 0x38(%rdx), %rcx
leaq 0xc(%rdi), %rdx
xorl %esi, %esi
xorps %xmm0, %xmm0
movdqa 0x283f1(%rip), %xmm1    # 0x55170
movdqa 0x282f9(%rip), %xmm2    # 0x55080
movdqa 0x28301(%rip), %xmm3    # 0x55090
pcmpeqd %xmm4, %xmm4
movdqa 0x283e5(%rip), %xmm5    # 0x55180
xorl %r8d, %r8d
movslq (%rcx,%rsi,4), %r9
testq %r9, %r9
jle 0x2ced9
movslq %r8d, %r11
leaq (%rdi,%r11,4), %r10
xorl %ebx, %ebx
movss (%r10,%rbx,4), %xmm6
ucomiss %xmm0, %xmm6
jne 0x2ced9
jp 0x2ced9
incq %rbx
cmpq %rbx, %r9
jne 0x2cdb4
testl %r9d, %r9d
jle 0x2ced9
leal 0x3(%r9), %r10d
leaq -0x1(%r9), %rbx
movq %rbx, %xmm6
pshufd $0x44, %xmm6, %xmm6     # xmm6 = xmm6[0,1,0,1]
leaq (%rdx,%r11,4), %r11
shrl $0x2, %r10d
shlq $0x4, %r10
pxor %xmm3, %xmm6
xorl %ebx, %ebx
movdqa %xmm2, %xmm7
movdqa %xmm1, %xmm8
movdqa %xmm7, %xmm9
pxor %xmm3, %xmm9
movdqa %xmm9, %xmm10
pcmpgtd %xmm6, %xmm10
pcmpeqd %xmm6, %xmm9
pshufd $0xf5, %xmm9, %xmm11    # xmm11 = xmm9[1,1,3,3]
pand %xmm10, %xmm11
pshufd $0xf5, %xmm10, %xmm9    # xmm9 = xmm10[1,1,3,3]
por %xmm11, %xmm9
movd %xmm9, %ebp
notl %ebp
testb $0x1, %bpl
je 0x2ce4c
movl $0xc49a4000, -0xc(%r11,%rbx) # imm = 0xC49A4000
pxor %xmm4, %xmm9
pextrw $0x4, %xmm9, %ebp
testb $0x1, %bpl
je 0x2ce66
movl $0xc49a4000, -0x8(%r11,%rbx) # imm = 0xC49A4000
movdqa %xmm8, %xmm9
pxor %xmm3, %xmm9
movdqa %xmm9, %xmm10
pcmpgtd %xmm6, %xmm10
pcmpeqd %xmm6, %xmm9
pshufd $0xf5, %xmm9, %xmm11    # xmm11 = xmm9[1,1,3,3]
pand %xmm10, %xmm11
pshufd $0xf5, %xmm10, %xmm9    # xmm9 = xmm10[1,1,3,3]
por %xmm11, %xmm9
pxor %xmm4, %xmm9
pextrw $0x0, %xmm9, %ebp
testb $0x1, %bpl
je 0x2ceaf
movl $0xc49a4000, -0x4(%r11,%rbx) # imm = 0xC49A4000
pextrw $0x4, %xmm9, %ebp
testb $0x1, %bpl
je 0x2cec3
movl $0xc49a4000, (%r11,%rbx) # imm = 0xC49A4000
paddq %xmm5, %xmm7
paddq %xmm5, %xmm8
addq $0x10, %rbx
cmpq %rbx, %r10
jne 0x2ce07
addl %r8d, %r9d
incq %rsi
movl %r9d, %r8d
cmpq %rax, %rsi
jne 0x2cd9e
popq %rbx
popq %rbp
retq