// File: /workspace/github_c_makefile_star2_O1/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 0x41b40
movl %edi, %ebp
leaq 0x165fa(%rip), %rdx     # 0x5801d
movq %r12, %rsi
callq 0xe439
leaq 0x165f2(%rip), %rdx     # 0x58024
movl %ebp, %edi
movq %r12, %rsi
callq 0xe439
leaq 0x165ea(%rip), %rdx     # 0x5802d
xorl %ebx, %ebx
movl %ebp, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xe4b3
leaq 0x165d8(%rip), %rdx     # 0x58030
leaq 0x165d7(%rip), %rcx     # 0x58036
movl %ebp, %edi
movq %r12, %rsi
callq 0xe64d
cmpl $0x4, %ebp
je 0x41a73
movq 0x20(%r12), %rbx
cmpl $0x6, %ebp
jl 0x41a7f
movq 0x28(%r12), %r14
jmp 0x41a82
xorl %r14d, %r14d
movq 0x18(%r12), %r15
movq 0x10(%r12), %r12
leaq 0x165d6(%rip), %rsi     # 0x58069
movq %r12, %rdi
callq 0x3270
testl %eax, %eax
je 0x41b48
leaq 0x165c8(%rip), %rsi     # 0x58072
movq %r12, %rdi
callq 0x3270
testl %eax, %eax
je 0x41b48
leaq 0x165bb(%rip), %rsi     # 0x5807c
movq %r12, %rdi
callq 0x3270
testl %eax, %eax
je 0x41b48
leaq 0x1659a(%rip), %rsi     # 0x5806e
movq %r12, %rdi
callq 0x3270
testl %eax, %eax
je 0x41b69
leaq 0x1659c(%rip), %rsi     # 0x58087
movq %r12, %rdi
callq 0x3270
testl %eax, %eax
je 0x41b2d
leaq 0x175ff(%rip), %rsi     # 0x590fd
movq %r12, %rdi
callq 0x3270
testl %eax, %eax
je 0x41b51
leaq 0x16570(%rip), %rsi     # 0x58081
movq %r12, %rdi
callq 0x3270
testl %eax, %eax
jne 0x41b48
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
jmp 0x41b5c
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x412d9
movq %r12, %rdi
callq 0x8c45
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x41751
movq %r15, %rdi
movq %rbx, %rsi
callq 0x415b7