// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x14e62(%rip), %rax     # 0x83e40
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
callq 0x400e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movl 0x84(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movl 0x74(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %edi
imull -0x28(%rbp), %edi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq 0x250(%rax), %rsi
movss 0x21c4(%rip), %xmm0     # 0x71234
movl $0x1, %edx
callq 0x2f6f0
movl -0x24(%rbp), %edi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq 0x230(%rax), %rsi
xorps %xmm0, %xmm0
movl $0x1, %edx
callq 0x2f6f0
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movl $0x2e91, 0x84(%rax)     # imm = 0x2E91
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq 0x230(%rax), %rcx
addq $0x14, %rcx
movq %rcx, 0x230(%rax)
imull $0x5, -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq 0x250(%rax), %rcx
movslq %edx, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movq %rcx, 0x250(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x6f155
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x42680
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq 0x230(%rax), %rcx
addq $-0x14, %rcx
movq %rcx, 0x230(%rax)
imull $0x5, -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq 0x250(%rax), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movq %rcx, 0x250(%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rdx
movl (%rdx), %edx
subl $0x2, %edx
movslq %edx, %rdx
imulq $0x4a0, %rdx, %rdx      # imm = 0x4A0
addq %rdx, %rax
movl %ecx, 0x84(%rax)
movl -0x24(%rbp), %esi
leaq 0x3f81(%rip), %rdi      # 0x73176
movb $0x0, %al
callq 0x3130
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rax
movl (%rax), %eax
subl $0x2, %eax
cltq
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
addq %rax, %rsi
leaq -0x4c8(%rbp), %rdi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movl -0x444(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edi
movq -0x298(%rbp), %rsi
movq -0x298(%rbp), %rcx
movl -0x444(%rbp), %eax
movl $0x3, %r8d
cltd
idivl %r8d
cltq
shlq $0x2, %rax
addq %rax, %rcx
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f960
movl -0x444(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edi
movq -0x298(%rbp), %rsi
movq -0x298(%rbp), %rcx
movl -0x444(%rbp), %eax
shll %eax
movl $0x3, %r8d
cltd
idivl %r8d
cltq
shlq $0x2, %rax
addq %rax, %rcx
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f960
movl -0x444(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edi
imull -0x454(%rbp), %edi
movq -0x278(%rbp), %rsi
movq -0x278(%rbp), %rcx
movl -0x444(%rbp), %eax
movl $0x3, %r8d
cltd
idivl %r8d
imull -0x454(%rbp), %eax
cltq
shlq $0x2, %rax
addq %rax, %rcx
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f960
movl -0x444(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edi
imull -0x454(%rbp), %edi
movq -0x278(%rbp), %rsi
movq -0x278(%rbp), %rcx
movl -0x444(%rbp), %eax
shll %eax
movl $0x3, %r8d
cltd
idivl %r8d
imull -0x454(%rbp), %eax
cltq
shlq $0x2, %rax
addq %rax, %rcx
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f960
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x41980
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbp
retq
nopw %cs:(%rax,%rax)