// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/regressor.c
// Function: run_regressor
void run_regressor(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");
    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_regressor(data, cfg, weights);
    else if(0==strcmp(argv[2], "train")) train_regressor(data, cfg, weights, gpus, ngpus, clear);
    else if(0==strcmp(argv[2], "demo")) demo_regressor(data, cfg, weights, cam_index, filename);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x61601
movq 0x21a1c(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x1429b(%rip), %rsi     # 0x75890
movb $0x0, %al
callq 0x3240
jmp 0x6183d
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x14b57(%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 0x616f2
movq -0x18(%rbp), %rsi
leaq 0x12d55(%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 0x61698
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x6168b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6168d
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x61669
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 0x616f0
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 0x616b1
jmp 0x6170d
leaq 0x22747(%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 0x142d4(%rip), %rdx     # 0x759ef
xorl %ecx, %ecx
callq 0x4630
movl %eax, -0x34(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x141d2(%rip), %rdx     # 0x75905
callq 0x45a0
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
cmpl $0x5, -0x4(%rbp)
jle 0x61767
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x6176f
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0x6176f
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x6, -0x4(%rbp)
jle 0x6178b
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x61793
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x61793
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x151ef(%rip), %rsi     # 0x76999
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x617ca
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x61390
jmp 0x6183d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x143e3(%rip), %rsi     # 0x75bbc
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x61805
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x28(%rbp), %r8d
movl -0x38(%rbp), %r9d
callq 0x60c60
jmp 0x6183b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x14bd3(%rip), %rsi     # 0x763e7
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x61839
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq -0x58(%rbp), %r8
callq 0x615a0
jmp 0x6183b
jmp 0x6183d
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)