// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
cmpl $0x3, %edi
jle 0x49217
movl %edi, %ebp
leaq 0x11a63(%rip), %rdx     # 0x5aa14
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xee68
testq %rax, %rax
je 0x4900e
movq %rax, %r15
movq %rax, %rdi
callq 0x30b0
movq %r15, %rdi
callq 0x3140
movl $0x1, %ecx
movl $0x1, %r14d
testl %eax, %eax
jle 0x48fff
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
xorl %esi, %esi
cmpb $0x2c, (%r15,%rdx)
sete %sil
addl %esi, %r14d
incq %rdx
cmpq %rdx, %rax
jne 0x48fe9
cmpl $0x2, %r14d
cmovgel %r14d, %ecx
decq %rcx
jne 0x49007
jmp 0x49014
movl $0x1, %r14d
leaq 0x1113a(%rip), %rdx     # 0x5a155
movl %ebp, %edi
movq %rbx, %rsi
callq 0xeca2
movl %eax, %r15d
cmpl $0x4, %ebp
jne 0x4903b
xorl %r12d, %r12d
movq $0x0, 0x8(%rsp)
jmp 0x4905d
movq 0x20(%rbx), %rax
cmpl $0x6, %ebp
movq %rax, 0x8(%rsp)
jl 0x4905a
movq 0x28(%rbx), %r12
je 0x4905d
movq 0x30(%rbx), %rax
movq %rax, 0x18(%rsp)
jmp 0x49066
xorl %r12d, %r12d
movq $0x0, 0x18(%rsp)
movq 0x18(%rbx), %r13
leaq 0x119a9(%rip), %rdx     # 0x5aa1a
movl %ebp, %edi
movq %rbx, %rsi
callq 0xeca2
movl %eax, 0x14(%rsp)
leaq 0x1199b(%rip), %rdx     # 0x5aa21
movl %ebp, %edi
movq %rbx, %rsi
callq 0xeca2
movl %eax, 0x34(%rsp)
leaq 0x1198c(%rip), %rdx     # 0x5aa27
movl %ebp, %edi
movq %rbx, %rsi
movl $0x1f4, %ecx            # imm = 0x1F4
callq 0xed18
movl %eax, 0x30(%rsp)
leaq 0x11979(%rip), %rdx     # 0x5aa2e
movl %ebp, %edi
movq %rbx, %rsi
movl $0xaf, %ecx
callq 0xed18
movl %eax, 0x2c(%rsp)
leaq 0x11967(%rip), %rdx     # 0x5aa36
movss 0xc199(%rip), %xmm0     # 0x55270
movl %ebp, %edi
movq %rbx, %rsi
callq 0xedb7
movss %xmm0, 0x28(%rsp)
leaq 0x1194f(%rip), %rdx     # 0x5aa3d
movss 0xc1a2(%rip), %xmm0     # 0x55298
movl %ebp, %edi
movq %rbx, %rsi
callq 0xedb7
movss %xmm0, 0x24(%rsp)
leaq 0x11936(%rip), %rdx     # 0x5aa43
xorps %xmm0, %xmm0
movl %ebp, %edi
movq %rbx, %rsi
callq 0xedb7
movss %xmm0, 0x20(%rsp)
movq 0x10(%rbx), %rbx
leaq 0x112e9(%rip), %rsi     # 0x5a414
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x491d1
leaq 0xef22(%rip), %rsi      # 0x58064
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x491f5
leaq 0x118f0(%rip), %rsi     # 0x5aa49
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x4922e
leaq 0x120e5(%rip), %rsi     # 0x5b255
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x49243
leaq 0x118c7(%rip), %rsi     # 0x5aa4e
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x4921f
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movl 0x30(%rsp), %edx
movss 0x20(%rsp), %xmm0
movss 0x24(%rsp), %xmm1
movss 0x28(%rsp), %xmm2
movl 0x34(%rsp), %ecx
movl 0x2c(%rsp), %r8d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x47534
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
movl %r14d, %r8d
movl %r15d, %r9d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45859
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movl 0x14(%rsp), %edx
movq %r12, %rcx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x47131
movq %rbx, %rdi
callq 0xa44c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
callq 0x48b1d
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movl 0x14(%rsp), %edx
callq 0x48567