// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90b0, %rsp           # imm = 0x90B0
movq %rdi, -0x9078(%rbp)
movq %rdi, -0x9080(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1020(%rbp), %rcx
leaq 0x3fea6(%rip), %rsi     # 0x7433f
leaq 0x3fec3(%rip), %rdx     # 0x74363
callq 0x4a50
leaq -0x1020(%rbp), %rdi
leaq -0x1020(%rbp), %rcx
leaq 0x3fe93(%rip), %rsi     # 0x7434d
leaq 0x3fea2(%rip), %rdx     # 0x74363
callq 0x4a50
leaq -0x1020(%rbp), %rdi
leaq -0x1020(%rbp), %rcx
leaq 0x3ec5e(%rip), %rsi     # 0x73139
leaq 0x41b84(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1020(%rbp), %rdi
leaq -0x1020(%rbp), %rcx
leaq 0x3fe5c(%rip), %rsi     # 0x74358
leaq 0x41b63(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1020(%rbp), %rdi
leaq -0x1020(%rbp), %rcx
leaq 0x3fe40(%rip), %rsi     # 0x7435d
leaq 0x41b42(%rip), %rdx     # 0x76066
callq 0x4a50
movq -0x9078(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xe3e0
leaq -0x1020(%rbp), %rdi
leaq 0x42021(%rip), %rsi     # 0x7656d
callq 0x3360
movq %rax, -0x1028(%rbp)
cmpq $0x0, -0x1028(%rbp)
jne 0x3456e
leaq -0x1020(%rbp), %rdi
callq 0x4110
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
leaq -0x9060(%rbp), %rdi
movl $0x1, %ecx
callq 0xe3e0
movq -0x1028(%rbp), %rdi
leaq -0x9040(%rbp), %rcx
leaq 0x3fdce(%rip), %rsi     # 0x74368
leaq -0x9044(%rbp), %rdx
movb $0x0, %al
callq 0x3080
cmpl $0x2, %eax
jne 0x34666
movl $0x0, -0x9064(%rbp)
leaq -0x9040(%rbp), %rdi
leaq -0x9064(%rbp), %rsi
xorl %edx, %edx
callq 0x3f60
movq %rax, -0x9070(%rbp)
movq -0x9070(%rbp), %rdi
movl -0x9064(%rbp), %esi
leaq -0x9060(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x328f0
movq -0x9078(%rbp), %rax
movl -0x9044(%rbp), %edi
leaq -0x9060(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x329c0
movq -0x9070(%rbp), %rdi
callq 0x3030
jmp 0x34585
movq -0x1028(%rbp), %rdi
callq 0x3100
leaq -0x9060(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xedb0
movq -0x9080(%rbp), %rax
addq $0x90b0, %rsp           # imm = 0x90B0
popq %rbp
retq
nopw (%rax,%rax)