// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_threads
void *load_threads(void *ptr)
{
    int i;
    load_args args = *(load_args *)ptr;
    if (args.threads == 0) args.threads = 1;
    data *out = args.d;
    int total = args.n;
    free(ptr);
    data *buffers = calloc(args.threads, sizeof(data));
    pthread_t *threads = calloc(args.threads, sizeof(pthread_t));
    for(i = 0; i < args.threads; ++i){
        args.d = buffers + i;
        args.n = (i+1) * total/args.threads - i * total/args.threads;
        threads[i] = load_data_in_thread(args);
    }
    for(i = 0; i < args.threads; ++i){
        pthread_join(threads[i], 0);
    }
    *out = concat_datas(buffers, args.threads);
    out->shallow = 0;
    for(i = 0; i < args.threads; ++i){
        buffers[i].shallow = 1;
        free_data(buffers[i]);
    }
    free(buffers);
    free(threads);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
movl $0xa8, %edx
callq 0x3280
cmpl $0x0, -0xb8(%rbp)
jne 0x375a7
movl $0x1, -0xb8(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3030
movslq -0xb8(%rbp), %rdi
movl $0x40, %esi
callq 0x3220
movq %rax, -0xd0(%rbp)
movslq -0xb8(%rbp), %rdi
movl $0x8, %esi
callq 0x3220
movq %rax, -0xd8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jge 0x37695
movq -0xd0(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
imull -0xc4(%rbp), %eax
cltd
idivl -0xb8(%rbp)
movl %eax, -0x11c(%rbp)
movl -0xc(%rbp), %eax
imull -0xc4(%rbp), %eax
cltd
idivl -0xb8(%rbp)
movl %eax, %ecx
movl -0x11c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xa0(%rbp)
movq %rsp, %rdi
movl $0x15, %ecx
leaq -0xb8(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x37500
movq %rax, %rdx
movq -0xd8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x375fe
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jge 0x376ca
movq -0xd8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3440
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3769c
movq -0xc0(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0xd0(%rbp), %rsi
movl -0xb8(%rbp), %edx
leaq -0x118(%rbp), %rdi
callq 0x377b0
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rsi
movl $0x40, %edx
callq 0x3280
movq -0xc0(%rbp), %rax
movl $0x0, 0x28(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jge 0x37785
movq -0xd0(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x1, 0x28(%rax)
movq -0xd0(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x34400
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3771e
movq -0xd0(%rbp), %rdi
callq 0x3030
movq -0xd8(%rbp), %rdi
callq 0x3030
xorl %eax, %eax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax,%rax)