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

    int clear = find_arg(argc, argv, "-clear");
    int display = find_arg(argc, argv, "-display");
    int batches = find_int_arg(argc, argv, "-b", 0);
    char *file = find_char_arg(argc, argv, "-file", "/home/pjreddie/data/imagenet/imagenet1k.train.list");

    char *cfg = argv[3];
    char *weights = (argc > 4) ? argv[4] : 0;
    char *filename = (argc > 5) ? argv[5] : 0;
    char *acfg = argv[5];
    char *aweights = (argc > 6) ? argv[6] : 0;
    //if(0==strcmp(argv[2], "train")) train_lsd(cfg, weights, clear);
    //else if(0==strcmp(argv[2], "train2")) train_lsd2(cfg, weights, acfg, aweights, clear);
    //else if(0==strcmp(argv[2], "traincolor")) train_colorizer(cfg, weights, acfg, aweights, clear);
    //else if(0==strcmp(argv[2], "train3")) train_lsd3(argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], clear);
    if(0==strcmp(argv[2], "traingan")) train_dcgan(cfg, weights, acfg, aweights, clear, display, file, batches);
    else if(0==strcmp(argv[2], "trainprog")) train_prog(cfg, weights, acfg, aweights, clear, display, file, batches);
    else if(0==strcmp(argv[2], "traincolor")) train_colorizer(cfg, weights, acfg, aweights, clear, display);
    else if(0==strcmp(argv[2], "gan")) test_dcgan(cfg, weights);
    else if(0==strcmp(argv[2], "inter")) inter_dcgan(cfg, weights);
    else if(0==strcmp(argv[2], "test")) test_lsd(cfg, weights, filename, 0);
    else if(0==strcmp(argv[2], "color")) test_lsd(cfg, weights, filename, 1);
    /*
       else if(0==strcmp(argv[2], "valid")) validate_lsd(cfg, weights);
     */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
cmpl $0x3, %edi
jle 0x37926
movl %edi, %ebp
leaq 0x19841(%rip), %rdx     # 0x51055
movq %r12, %rsi
callq 0x3fdd
leaq 0x19839(%rip), %rdx     # 0x5105c
movl %ebp, %edi
movq %r12, %rsi
callq 0x3fdd
leaq 0x19831(%rip), %rdx     # 0x51065
xorl %ebx, %ebx
movl %ebp, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x4041
leaq 0x1981f(%rip), %rdx     # 0x51068
leaq 0x1981e(%rip), %rcx     # 0x5106e
movl %ebp, %edi
movq %r12, %rsi
callq 0x4151
cmpl $0x4, %ebp
jne 0x37864
xorl %r14d, %r14d
jmp 0x37877
movq 0x20(%r12), %r14
cmpl $0x6, %ebp
jb 0x37875
movq 0x28(%r12), %rbx
jmp 0x37877
xorl %ebx, %ebx
movq 0x18(%r12), %r15
movq 0x10(%r12), %r12
leaq 0x19819(%rip), %rsi     # 0x510a1
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x3790a
leaq 0x1980f(%rip), %rsi     # 0x510aa
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x3790a
leaq 0x19806(%rip), %rsi     # 0x510b4
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x3790a
leaq 0x197e5(%rip), %rsi     # 0x510a6
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x37975
leaq 0x197e7(%rip), %rsi     # 0x510bf
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x37913
leaq 0x1a82a(%rip), %rsi     # 0x52115
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x3794f
leaq 0x197bb(%rip), %rsi     # 0x510b9
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x3795c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x370ea
movq 0x2c6cb(%rip), %rax     # 0x63ff8
movq (%rax), %rdi
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x1969a(%rip), %rsi     # 0x50fda
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3270
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
jmp 0x37968
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x37535
movq %r15, %rdi
movq %r14, %rsi
callq 0x373b2