// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/segmenter.c
// Function: run_segmenter
void run_segmenter(int argc, char **argv)
{
    if(argc < 4){
        fprintf(stderr, "usage: %s %s [train/test/valid] [cfg] [weights (optional)]\n", argv[0], argv[1]);
        return;
    }

    char *gpu_list = find_char_arg(argc, argv, "-gpus", 0);
    int *gpus = 0;
    int gpu = 0;
    int ngpus = 0;
    if(gpu_list){
        printf("%s\n", gpu_list);
        int len = strlen(gpu_list);
        ngpus = 1;
        int i;
        for(i = 0; i < len; ++i){
            if (gpu_list[i] == ',') ++ngpus;
        }
        gpus = calloc(ngpus, sizeof(int));
        for(i = 0; i < ngpus; ++i){
            gpus[i] = atoi(gpu_list);
            gpu_list = strchr(gpu_list, ',')+1;
        }
    } else {
        gpu = gpu_index;
        gpus = &gpu;
        ngpus = 1;
    }

    int cam_index = find_int_arg(argc, argv, "-c", 0);
    int clear = find_arg(argc, argv, "-clear");
    int display = find_arg(argc, argv, "-display");
    char *data = argv[3];
    char *cfg = argv[4];
    char *weights = (argc > 5) ? argv[5] : 0;
    char *filename = (argc > 6) ? argv[6]: 0;
    if(0==strcmp(argv[2], "test")) predict_segmenter(data, cfg, weights, filename);
    else if(0==strcmp(argv[2], "train")) train_segmenter(data, cfg, weights, gpus, ngpus, clear, display);
    else if(0==strcmp(argv[2], "demo")) demo_segmenter(data, cfg, weights, cam_index, filename);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x609f4
movq 0x22629(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x14ea8(%rip), %rsi     # 0x75890
movb $0x0, %al
callq 0x3240
jmp 0x60c50
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x15764(%rip), %rdx     # 0x76166
xorl %eax, %eax
movl %eax, %ecx
callq 0x47a0
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x60ae5
movq -0x18(%rbp), %rsi
leaq 0x13962(%rip), %rdi     # 0x7439d
movb $0x0, %al
callq 0x3130
movq -0x18(%rbp), %rdi
callq 0x3110
movl %eax, -0x2c(%rbp)
movl $0x1, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x60a8b
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x60a7e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x60a80
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x60a5c
movslq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x20(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x60ae3
movq -0x18(%rbp), %rdi
callq 0x33d0
movl %eax, %edx
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x18(%rbp), %rdi
movl $0x2c, %esi
callq 0x3120
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x60aa4
jmp 0x60b00
leaq 0x23354(%rip), %rax     # 0x83e40
movl (%rax), %eax
movl %eax, -0x24(%rbp)
leaq -0x24(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x1, -0x28(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x14ee1(%rip), %rdx     # 0x759ef
xorl %ecx, %ecx
callq 0x4630
movl %eax, -0x34(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x14ddf(%rip), %rdx     # 0x75905
callq 0x45a0
movl %eax, -0x38(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x14dd0(%rip), %rdx     # 0x7590c
callq 0x45a0
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
cmpl $0x5, -0x4(%rbp)
jle 0x60b70
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x60b78
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x60b78
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpl $0x6, -0x4(%rbp)
jle 0x60b94
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x60b9c
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0x60b9c
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x15de6(%rip), %rsi     # 0x76999
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x60bd7
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x606c0
jmp 0x60c50
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x14fd6(%rip), %rsi     # 0x75bbc
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x60c18
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x28(%rbp), %r8d
movl -0x38(%rbp), %r9d
movl -0x3c(%rbp), %eax
movl %eax, (%rsp)
callq 0x5fd50
jmp 0x60c4e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x157c0(%rip), %rsi     # 0x763e7
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x60c4c
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq -0x60(%rbp), %r8
callq 0x60990
jmp 0x60c4e
jmp 0x60c50
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)