// File: /workspace/github_c_makefile_star2_O3/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 0x43d30
movl %edi, %ebp
leaq 0x16546(%rip), %rdx     # 0x5a155
movq %r12, %rsi
callq 0xeca2
leaq 0x1653e(%rip), %rdx     # 0x5a15c
movl %ebp, %edi
movq %r12, %rsi
callq 0xeca2
leaq 0x16536(%rip), %rdx     # 0x5a165
xorl %ebx, %ebx
movl %ebp, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xed18
leaq 0x16524(%rip), %rdx     # 0x5a168
leaq 0x16523(%rip), %rcx     # 0x5a16e
movl %ebp, %edi
movq %r12, %rsi
callq 0xee68
cmpl $0x4, %ebp
jne 0x43c5f
xorl %r14d, %r14d
jmp 0x43c72
movq 0x20(%r12), %r14
cmpl $0x6, %ebp
jb 0x43c70
movq 0x28(%r12), %rbx
jmp 0x43c72
xorl %ebx, %ebx
movq 0x18(%r12), %r15
movq 0x10(%r12), %r12
leaq 0x1651e(%rip), %rsi     # 0x5a1a1
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x43d38
leaq 0x16510(%rip), %rsi     # 0x5a1aa
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x43d38
leaq 0x16503(%rip), %rsi     # 0x5a1b4
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x43d38
leaq 0x164e2(%rip), %rsi     # 0x5a1a6
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x43d59
leaq 0x164e4(%rip), %rsi     # 0x5a1bf
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x43d1d
leaq 0x17567(%rip), %rsi     # 0x5b255
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
je 0x43d41
leaq 0x164b8(%rip), %rsi     # 0x5a1b9
movq %r12, %rdi
callq 0x3260
testl %eax, %eax
jne 0x43d38
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
jmp 0x43d4c
movq %r15, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x434c3
movq %r12, %rdi
callq 0x9227
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4393d
movq %r15, %rdi
movq %r14, %rsi
callq 0x437a1