// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: run_go
void run_go(int argc, char **argv)
{
    //boards_go();
    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 clear = find_arg(argc, argv, "-clear");

    char *cfg = argv[3];
    char *weights = (argc > 4) ? argv[4] : 0;
    char *c2 = (argc > 5) ? argv[5] : 0;
    char *w2 = (argc > 6) ? argv[6] : 0;
    int multi = find_arg(argc, argv, "-multi");
    int anon = find_arg(argc, argv, "-anon");
    int iters = find_int_arg(argc, argv, "-iters", 500);
    int resign = find_int_arg(argc, argv, "-resign", 175);
    float cpuct = find_float_arg(argc, argv, "-cpuct", 5);
    float temp = find_float_arg(argc, argv, "-temp", .1);
    float time = find_float_arg(argc, argv, "-time", 0);
    if(0==strcmp(argv[2], "train")) train_go(cfg, weights, c2, gpus, ngpus, clear);
    else if(0==strcmp(argv[2], "valid")) valid_go(cfg, weights, multi, c2);
    else if(0==strcmp(argv[2], "self")) self_go(cfg, weights, c2, w2, multi);
    else if(0==strcmp(argv[2], "test")) test_go(cfg, weights, multi);
    else if(0==strcmp(argv[2], "engine")) engine_go(cfg, weights, iters, time, temp, cpuct, anon, resign);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x5d954
movq 0x256c9(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x17f48(%rip), %rsi     # 0x75890
movb $0x0, %al
callq 0x3240
jmp 0x5dcdf
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x18804(%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 0x5da45
movq -0x18(%rbp), %rsi
leaq 0x16a02(%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 0x5d9eb
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x5d9de
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x5d9e0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x5d9bc
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 0x5da43
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 0x5da04
jmp 0x5da60
leaq 0x263f4(%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 0x17e97(%rip), %rdx     # 0x75905
callq 0x45a0
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
cmpl $0x4, -0x4(%rbp)
jle 0x5da96
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x80(%rbp)
jmp 0x5da9e
xorl %eax, %eax
movq %rax, -0x80(%rbp)
jmp 0x5da9e
movq -0x80(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x5, -0x4(%rbp)
jle 0x5dabd
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x5dac8
xorl %eax, %eax
movq %rax, -0x88(%rbp)
jmp 0x5dac8
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x6, -0x4(%rbp)
jle 0x5daea
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x5daf5
xorl %eax, %eax
movq %rax, -0x90(%rbp)
jmp 0x5daf5
movq -0x90(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1865e(%rip), %rdx     # 0x7616c
callq 0x45a0
movl %eax, -0x5c(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1864f(%rip), %rdx     # 0x76173
callq 0x45a0
movl %eax, -0x60(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1863f(%rip), %rdx     # 0x76179
movl $0x1f4, %ecx            # imm = 0x1F4
callq 0x4630
movl %eax, -0x64(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1862b(%rip), %rdx     # 0x76180
movl $0xaf, %ecx
callq 0x4630
movl %eax, -0x68(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x18618(%rip), %rdx     # 0x76188
movss 0x13694(%rip), %xmm0    # 0x7120c
callq 0x46e0
movss %xmm0, -0x6c(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x185ff(%rip), %rdx     # 0x7618f
movss 0x1369c(%rip), %xmm0    # 0x71234
callq 0x46e0
movss %xmm0, -0x70(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x185e5(%rip), %rdx     # 0x76195
xorps %xmm0, %xmm0
callq 0x46e0
movss %xmm0, -0x74(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x17ff0(%rip), %rsi     # 0x75bbc
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5dbfb
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x28(%rbp), %r8d
movl -0x34(%rbp), %r9d
callq 0x58dd0
jmp 0x5dcdf
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x15d69(%rip), %rsi     # 0x73973
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5dc30
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x5c(%rbp), %edx
movq -0x50(%rbp), %rcx
callq 0x5b310
jmp 0x5dcdd
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x1855c(%rip), %rsi     # 0x7619b
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5dc67
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl -0x5c(%rbp), %r8d
callq 0x5d330
jmp 0x5dcdb
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x18d23(%rip), %rsi     # 0x76999
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5dc95
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x5c(%rbp), %edx
callq 0x5cc10
jmp 0x5dcd9
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x184fc(%rip), %rsi     # 0x761a0
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5dcd7
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x64(%rbp), %edx
movss -0x74(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
movss -0x6c(%rbp), %xmm2
movl -0x60(%rbp), %ecx
movl -0x68(%rbp), %r8d
callq 0x5b7f0
jmp 0x5dcd9
jmp 0x5dcdb
jmp 0x5dcdd
jmp 0x5dcdf
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)