// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: get_segmentation_image
image get_segmentation_image(char *path, int w, int h, int classes)
{
    char labelpath[4096];
    find_replace(path, "images", "mask", labelpath);
    find_replace(labelpath, "JPEGImages", "mask", labelpath);
    find_replace(labelpath, ".jpg", ".txt", labelpath);
    find_replace(labelpath, ".JPG", ".txt", labelpath);
    find_replace(labelpath, ".JPEG", ".txt", labelpath);
    image mask = make_image(w, h, classes);
    FILE *file = fopen(labelpath, "r");
    if(!file) file_error(labelpath);
    char buff[32788];
    int id;
    image part = make_image(w, h, 1);
    while(fscanf(file, "%d %s", &id, buff) == 2){
        int n = 0;
        int *rle = read_intlist(buff, &n, 0);
        load_rle(part, rle, n);
        or_image(part, mask, id);
        free(rle);
    }
    //exclusive_image(mask);
    fclose(file);
    free_image(part);
    return mask;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x9058, %rsp           # imm = 0x9058
movl %r8d, %r14d
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x2b759(%rip), %rsi     # 0x58a4f
leaq 0x2b776(%rip), %r13     # 0x58a73
leaq 0x40(%rsp), %r12
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xf02d
leaq 0x2b746(%rip), %rsi     # 0x58a5d
movq %r12, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xf02d
leaq 0x2a500(%rip), %rsi     # 0x5782c
leaq 0x2d5de(%rip), %r13     # 0x5a911
movq %r12, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xf02d
leaq 0x2b720(%rip), %rsi     # 0x58a68
movq %r12, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xf02d
leaq 0x2b710(%rip), %rsi     # 0x58a6d
movq %r12, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xf02d
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
callq 0x15d43
leaq 0x2daa7(%rip), %rsi     # 0x5ae29
movq %r12, %rdi
callq 0x3390
movq %rax, %r14
testq %rax, %rax
jne 0x2d39c
leaq 0x40(%rsp), %rdi
callq 0xe925
leaq 0x28(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
movl $0x1, %ecx
callq 0x15d43
leaq 0x2b6c1(%rip), %rsi     # 0x58a78
leaq 0x24(%rsp), %rdx
leaq 0x1040(%rsp), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30a0
cmpl $0x2, %eax
jne 0x2d492
leaq 0x1040(%rsp), %r15
leaq 0x2b692(%rip), %r13     # 0x58a78
leaq 0x24(%rsp), %rbp
movl $0x0, 0x20(%rsp)
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0xe7d7
movq %rax, %r12
movl 0x20(%rsp), %esi
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
callq 0x2bb35
movl 0x2c(%rsp), %edx
imull 0x28(%rsp), %edx
testl %edx, %edx
xorps %xmm1, %xmm1
jle 0x2d46e
movq 0x38(%rsp), %rax
movl (%rbx), %ecx
imull 0x4(%rbx), %ecx
imull 0x24(%rsp), %ecx
movslq %ecx, %rcx
movl %edx, %edx
shlq $0x2, %rcx
addq 0x10(%rbx), %rcx
xorl %esi, %esi
movss (%rax,%rsi,4), %xmm0
ucomiss %xmm1, %xmm0
jne 0x2d45f
jnp 0x2d466
movl $0x3f800000, (%rcx,%rsi,4) # imm = 0x3F800000
incq %rsi
cmpq %rsi, %rdx
jne 0x2d453
movq %r12, %rdi
callq 0x3040
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x30a0
cmpl $0x2, %eax
je 0x2d3eb
movq %r14, %rdi
callq 0x3130
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x1657b
movq %rbx, %rax
addq $0x9058, %rsp           # imm = 0x9058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq