// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/darknet.c
// Function: oneoff
void oneoff(char *cfgfile, char *weightfile, char *outfile)
{
    gpu_index = -1;
    network *net = parse_network_cfg(cfgfile);
    int oldn = net->layers[net->n - 2].n;
    int c = net->layers[net->n - 2].c;
    scal_cpu(oldn*c, .1, net->layers[net->n - 2].weights, 1);
    scal_cpu(oldn, 0, net->layers[net->n - 2].biases, 1);
    net->layers[net->n - 2].n = 11921;
    net->layers[net->n - 2].biases += 5;
    net->layers[net->n - 2].weights += 5*c;
    if(weightfile){
        load_weights(net, weightfile);
    }
    net->layers[net->n - 2].biases -= 5;
    net->layers[net->n - 2].weights -= 5*c;
    net->layers[net->n - 2].n = oldn;
    printf("%d\n", oldn);
    layer l = net->layers[net->n - 2];
    copy_cpu(l.n/3, l.biases, 1, l.biases +   l.n/3, 1);
    copy_cpu(l.n/3, l.biases, 1, l.biases + 2*l.n/3, 1);
    copy_cpu(l.n/3*l.c, l.weights, 1, l.weights +   l.n/3*l.c, 1);
    copy_cpu(l.n/3*l.c, l.weights, 1, l.weights + 2*l.n/3*l.c, 1);
    *net->seen = 0;
    save_weights(net, outfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r15
leaq 0x19819(%rip), %rax     # 0x6c7b0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
callq 0x5145
movq %rax, %r14
movq 0x20(%rax), %rax
movslq (%r14), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
movl -0x8bc(%rax,%rcx), %ebp
movslq -0x8cc(%rax,%rcx), %r12
movl %r12d, %edi
imull %ebp, %edi
movq -0x6f0(%rax,%rcx), %rsi
movss 0x22c0(%rip), %xmm0     # 0x55298
movl $0x1, %edx
callq 0x29d61
movq 0x20(%r14), %rax
movslq (%r14), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
movq -0x710(%rax,%rcx), %rsi
xorps %xmm0, %xmm0
movl %ebp, %edi
movl $0x1, %edx
callq 0x29d61
movq 0x20(%r14), %rax
movslq (%r14), %rcx
imulq $0x4a0, %rcx, %rdi      # imm = 0x4A0
movl $0x2e91, -0x8bc(%rax,%rdi) # imm = 0x2E91
movq -0x710(%rax,%rdi), %rdx
addq $0x14, %rdx
movq %rdx, -0x710(%rax,%rdi)
leaq (%r12,%r12,4), %r12
shlq $0x2, %r12
movq -0x6f0(%rax,%rdi), %rsi
addq %r12, %rsi
movq %rsi, -0x6f0(%rax,%rdi)
testq %r15, %r15
je 0x5307d
movq %r14, %rdi
movq %r15, %rsi
callq 0x6eeb
movq 0x20(%r14), %rax
movslq (%r14), %rcx
imulq $0x4a0, %rcx, %rsi      # imm = 0x4A0
movq -0x710(%rax,%rsi), %rdx
movq -0x6f0(%rax,%rsi), %rsi
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq $-0x14, %rdx
movq %rdx, -0x710(%rax,%rcx)
subq %r12, %rsi
movq %rsi, -0x6f0(%rax,%rcx)
movl %ebp, -0x8bc(%rax,%rcx)
leaq 0x74f0(%rip), %rdi      # 0x5a599
movl %ebp, %esi
xorl %eax, %eax
callq 0x3160
movq 0x20(%r14), %rax
movslq (%r14), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
movl -0x8cc(%rax,%rcx), %ebp
movslq -0x8bc(%rax,%rcx), %rbx
movq -0x710(%rax,%rcx), %r12
movq -0x6f0(%rax,%rcx), %r15
imulq $0x55555556, %rbx, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movslq %eax, %r13
leaq (%r12,%r13,4), %rcx
movl %r13d, %edi
movq %r12, %rsi
movl $0x1, %edx
movl $0x1, %r8d
callq 0x29fe0
leal (%rbx,%rbx), %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movslq %eax, %rbx
leaq (%r12,%rbx,4), %rcx
movl %r13d, %edi
movq %r12, %rsi
movl $0x1, %edx
movl $0x1, %r8d
callq 0x29fe0
imull %ebp, %r13d
movslq %r13d, %r12
leaq (%r15,%r12,4), %rcx
movl %r12d, %edi
movq %r15, %rsi
movl $0x1, %edx
movl $0x1, %r8d
callq 0x29fe0
imull %ebp, %ebx
movslq %ebx, %rax
leaq (%r15,%rax,4), %rcx
movl %r12d, %edi
movq %r15, %rsi
movl $0x1, %edx
movl $0x1, %r8d
callq 0x29fe0
movq 0x8(%r14), %rax
movq $0x0, (%rax)
movq %r14, %rdi
movq (%rsp), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6879