// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/instance-segmenter.c
// Function: run_isegmenter
void run_isegmenter(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_isegmenter(data, cfg, weights, filename);
    else if(0==strcmp(argv[2], "train")) train_isegmenter(data, cfg, weights, gpus, ngpus, clear, display);
    else if(0==strcmp(argv[2], "demo")) demo_isegmenter(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 0x6e384
movq 0x14c99(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x7518(%rip), %rsi      # 0x75890
movb $0x0, %al
callq 0x3240
jmp 0x6e5e0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x7dd4(%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 0x6e475
movq -0x18(%rbp), %rsi
leaq 0x5fd2(%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 0x6e41b
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x6e40e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6e410
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6e3ec
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 0x6e473
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 0x6e434
jmp 0x6e490
leaq 0x159c4(%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 0x7551(%rip), %rdx      # 0x759ef
xorl %ecx, %ecx
callq 0x4630
movl %eax, -0x34(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x744f(%rip), %rdx      # 0x75905
callq 0x45a0
movl %eax, -0x38(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x7440(%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 0x6e500
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x6e508
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x6e508
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpl $0x6, -0x4(%rbp)
jle 0x6e524
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x6e52c
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0x6e52c
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x8456(%rip), %rsi      # 0x76999
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x6e567
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x6e050
jmp 0x6e5e0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x7646(%rip), %rsi      # 0x75bbc
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x6e5a8
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 0x6d5c0
jmp 0x6e5de
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x7e30(%rip), %rsi      # 0x763e7
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x6e5dc
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq -0x60(%rbp), %r8
callq 0x6e320
jmp 0x6e5de
jmp 0x6e5e0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)