// File: /workspace/github_c_makefile_star2_O1/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 0x199d6(%rip), %rax     # 0x6a7c0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
callq 0x4ebd
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 0x2441(%rip), %xmm0     # 0x5326c
movl $0x1, %edx
callq 0x28619
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 0x28619
movq 0x20(%r14), %rax
movslq (%r14), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
movl $0x2e91, -0x8bc(%rax,%rcx) # imm = 0x2E91
addq $0x14, -0x710(%rax,%rcx)
leaq (%r12,%r12,4), %r12
shlq $0x2, %r12
addq %r12, -0x6f0(%rax,%rcx)
testq %r15, %r15
je 0x50e9c
movq %r14, %rdi
movq %r15, %rsi
callq 0x6c4b
movq 0x20(%r14), %rax
movslq (%r14), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq $-0x14, -0x710(%rax,%rcx)
subq %r12, -0x6f0(%rax,%rcx)
movl %ebp, -0x8bc(%rax,%rcx)
leaq 0x7578(%rip), %rdi      # 0x58441
movl %ebp, %esi
xorl %eax, %eax
callq 0x3170
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 0x2879c
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 0x2879c
imull %ebp, %r13d
movslq %r13d, %r12
leaq (%r15,%r12,4), %rcx
movl %r12d, %edi
movq %r15, %rsi
movl $0x1, %edx
movl $0x1, %r8d
callq 0x2879c
imull %ebp, %ebx
movslq %ebx, %rax
leaq (%r15,%rax,4), %rcx
movl %r12d, %edi
movq %r15, %rsi
movl $0x1, %edx
movl $0x1, %r8d
callq 0x2879c
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 0x66cd