// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
leaq 0x1a445(%rip), %rax     # 0x647c0
orl $-0x1, (%rax)
callq 0x27071
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), %rbx
movl %ebx, %edi
imull %ebp, %edi
movq -0x6f0(%rax,%rcx), %rsi
movss 0x1eb0(%rip), %xmm0     # 0x4c268
pushq $0x1
popq %r12
movl %r12d, %edx
callq 0x1b423
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 %r12d, %edx
callq 0x1b423
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 (%rbx,%rbx,4), %rbx
shlq $0x2, %rbx
movq -0x6f0(%rax,%rdi), %rsi
addq %rbx, %rsi
movq %rsi, -0x6f0(%rax,%rdi)
testq %r15, %r15
je 0x4a45d
movq %r14, %rdi
movq %r15, %rsi
callq 0x2958f
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 %rbx, %rsi
movq %rsi, -0x6f0(%rax,%rcx)
movl %ebp, -0x8bc(%rax,%rcx)
leaq 0x6fc8(%rip), %rdi      # 0x51451
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), %edx
movl %edx, 0xc(%rsp)
movl -0x8bc(%rax,%rcx), %ebx
movq -0x710(%rax,%rcx), %r12
movq -0x6f0(%rax,%rcx), %r15
pushq $0x3
popq %rbp
movl %ebx, %eax
cltd
idivl %ebp
movslq %eax, %r13
leaq (%r12,%r13,4), %rcx
pushq $0x1
popq %rdx
movl %r13d, %edi
movq %r12, %rsi
movl %edx, %r8d
callq 0x1b5a3
addl %ebx, %ebx
movl %ebx, %eax
cltd
idivl %ebp
movslq %eax, %rbp
leaq (%r12,%rbp,4), %rcx
movl %r13d, %edi
movq %r12, %rsi
pushq $0x1
popq %rdx
movl %edx, %r8d
callq 0x1b5a3
movl 0xc(%rsp), %r12d
imull %r12d, %r13d
movslq %r13d, %rbx
leaq (%r15,%rbx,4), %rcx
movl %ebx, %edi
movq %r15, %rsi
pushq $0x1
popq %rdx
movl %edx, %r8d
movl %edx, %r13d
callq 0x1b5a3
imull %r12d, %ebp
movslq %ebp, %rax
leaq (%r15,%rax,4), %rcx
movl %ebx, %edi
movq %r15, %rsi
movl %r13d, %edx
movl %r13d, %r8d
callq 0x1b5a3
movq 0x8(%r14), %rax
andq $0x0, (%rax)
movq %r14, %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28aed