// File: /workspace/github_cpp_makefile_star2_O1/Cell-veto[P]postlhc/io.cpp
// Function: add_data(AbstractParticleSink*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void add_data (AbstractParticleSink *sink, string_ref filename)
{
    Extrema <double> particle_coords[MAX_DIM];

    if (ends_with (filename, ".dat"))
    {
        std::ifstream ifs (filename);
        unsigned N = 0;
        string line;
        while (std::getline (ifs, line))
        {
            MostGeneralParticle part = parse_line_from_file (N, line);
            for (unsigned n = 0; n != MAX_DIM; ++n)
                particle_coords[n].add (part.coords[n]);
            sink->put (part);
            ++N;
        }

        if (ifs.eof ())
        {
            std::cerr << "npart " << N << " particles read successfully\n";
            std::cerr << "coord_min";
            for (unsigned n = 0; n != MAX_DIM; ++n)
                std::cerr << ' ' << particle_coords[n].min ();
            std::cerr << "\ncoord_max";
            for (unsigned n = 0; n != MAX_DIM; ++n)
                std::cerr << ' ' << particle_coords[n].max ();
            std::cerr << "\n";
            return;
        }

        if (!ifs)
        {
            rt_error ("error reading input file " + filename);
        }
    }
    else
    {
        rt_error ("Not implemented");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
movq %rdi, 0xe0(%rsp)
movl $0x10, %eax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
movabsq $-0x10000000000001, %rdx # imm = 0xFFEFFFFFFFFFFFFF
movq %rcx, 0x100(%rsp,%rax)
movq %rdx, 0x108(%rsp,%rax)
movq $0x0, 0x110(%rsp,%rax)
addq $0x18, %rax
cmpq $0x58, %rax
jne 0x43c68e
movq (%rsi), %rcx
movq 0x8(%rsi), %rax
addq %rax, %rcx
decq %rcx
negq %rax
xorl %edx, %edx
leaq 0x18dc81(%rip), %r9     # 0x5ca34e
cmpq %rdx, %rax
je 0x43c71e
cmpq $-0x4, %rdx
je 0x43c71e
movb (%rcx,%rdx), %dil
leaq -0x1(%rdx), %r8
cmpb 0x3(%rdx,%r9), %dil
movq %r8, %rdx
je 0x43c6cd
leaq 0x170(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1944da(%rip), %rsi    # 0x5d0bd7
leaq 0x1944e2(%rip), %rdx    # 0x5d0be6
leaq 0x160(%rsp), %rdi
callq 0x40843e
leaq 0x160(%rsp), %rdi
callq 0x440975
cmpq $-0x4, %rdx
jne 0x43c6ea
leaq 0x160(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0xd8(%rsp)
movl $0x8, %edx
callq 0x48dec0
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %ebx, %ebx
leaq 0x80(%rsp), %r15
leaq 0x28(%rsp), %r12
movq 0x160(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x492620
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x447540
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x43c98a
movq %r12, %rdi
movq %r15, %rsi
callq 0x440c26
movq %rbx, 0xe8(%rsp)
movq 0x28(%rsp), %r15
movq 0x30(%rsp), %rax
movq %rax, %rcx
subq %r15, %rcx
sarq $0x5, %rcx
leaq -0x2(%rcx), %rdx
cmpq $0x2, %rdx
jb 0x43c7db
cmpq $0x6, %rcx
jne 0x43cc2b
xorpd %xmm0, %xmm0
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
cmpq %r15, %rax
je 0x43c897
movl $0x8, %r12d
callq 0x4fc8e0
movq %rax, %rbp
xorl %r14d, %r14d
xorl %r13d, %r13d
movq -0x8(%r15,%r12), %r15
movl (%rbp), %ebx
movl $0x0, (%rbp)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x514210
movq 0x8(%rsp), %rax
subq %r15, %rax
je 0x43cb67
movl (%rbp), %ecx
cmpl $0x22, %ecx
je 0x43cbc3
testl %ecx, %ecx
jne 0x43c854
movl %ebx, (%rbp)
movsd %xmm0, 0xa0(%rsp,%r13,8)
ucomisd 0x18e782(%rip), %xmm0   # 0x5cafe8
jb 0x43cb15
movq 0x28(%rsp), %r15
cmpq (%r15,%r12), %rax
jne 0x43cb73
incq %r13
movq 0x30(%rsp), %rax
subq %r15, %rax
sarq $0x5, %rax
addq $-0x20, %r14
addq $0x20, %r12
cmpq %rax, %r13
jne 0x43c817
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movaps 0xa0(%rsp), %xmm0
movaps %xmm0, 0x40(%rsp)
movsd 0xb0(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0xe8(%rsp), %rbx
movl %ebx, 0x58(%rsp)
movups 0xb8(%rsp), %xmm0
movaps %xmm0, 0x60(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x43d76a
leaq 0x120(%rsp), %rax
xorl %ecx, %ecx
movsd 0x40(%rsp,%rcx,8), %xmm0
movsd -0x10(%rax), %xmm1
movsd -0x8(%rax), %xmm2
movapd %xmm0, %xmm3
minsd %xmm1, %xmm3
cmpunordsd %xmm1, %xmm1
movapd %xmm1, %xmm4
andpd %xmm0, %xmm4
andnpd %xmm3, %xmm1
orpd %xmm4, %xmm1
movlpd %xmm1, -0x10(%rax)
movapd %xmm2, %xmm1
cmpunordsd %xmm2, %xmm1
movapd %xmm1, %xmm3
andpd %xmm0, %xmm3
maxsd %xmm2, %xmm0
andnpd %xmm0, %xmm1
orpd %xmm3, %xmm1
movlpd %xmm1, -0x8(%rax)
incq (%rax)
incq %rcx
addq $0x18, %rax
cmpq $0x3, %rcx
jne 0x43c8fc
movq 0xe0(%rsp), %rdi
movq (%rdi), %rax
leaq 0x40(%rsp), %rsi
callq *0x10(%rax)
leaq 0x160(%rsp), %r14
leaq 0x80(%rsp), %r15
incl %ebx
jmp 0x43c767
movq 0x160(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x180(%rsp,%rax), %eax
testb $0x2, %al
jne 0x43c9cc
testb $0x5, %al
je 0x43cad1
leaq 0x19420d(%rip), %rsi    # 0x5d0bbd
leaq 0x40(%rsp), %rdi
movq 0xd8(%rsp), %rdx
callq 0x407ce4
leaq 0x40(%rsp), %rdi
callq 0x440975
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x1941a9(%rip), %rsi    # 0x5d0b83
movl $0x6, %edx
callq 0x4b14d0
movl %ebx, %esi
movq $0x656aa0, %rdi         # imm = 0x656AA0
callq 0x4b1dd0
leaq 0x194191(%rip), %rsi    # 0x5d0b8a
movl $0x1d, %edx
movq %rax, %rdi
callq 0x4b14d0
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x194194(%rip), %rsi    # 0x5d0ba8
movl $0x9, %edx
callq 0x4b14d0
xorl %r15d, %r15d
movq $0x656aa0, %rbx         # imm = 0x656AA0
leaq 0x40(%rsp), %r14
movb $0x20, 0x40(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4b14d0
movsd 0x110(%rsp,%r15), %xmm0
movq %rax, %rdi
callq 0x4b2730
addq $0x18, %r15
cmpq $0x48, %r15
jne 0x43ca2d
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x194146(%rip), %rsi    # 0x5d0bb2
movl $0xa, %edx
callq 0x4b14d0
movl $0x8, %r15d
movq $0x656aa0, %rbx         # imm = 0x656AA0
leaq 0x40(%rsp), %r14
movb $0x20, 0x40(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4b14d0
movsd 0x110(%rsp,%r15), %xmm0
movq %rax, %rdi
callq 0x4b2730
addq $0x18, %r15
cmpq $0x50, %r15
jne 0x43ca88
movq $0x656aa0, %rdi         # imm = 0x656AA0
leaq 0x19f123(%rip), %rsi    # 0x5dbbea
movl $0x1, %edx
callq 0x4b14d0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x43caf6
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4440d0
leaq 0x160(%rsp), %rdi
callq 0x48ebf0
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rsp), %rdx
subq %r14, %rdx
leaq 0x1940ef(%rip), %rsi    # 0x5d0c13
leaq 0xf0(%rsp), %rdi
callq 0x407ce4
leaq 0x1940f0(%rip), %rsi    # 0x5d0c28
leaq 0xf0(%rsp), %rdi
callq 0x4c3490
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x43cbcf
movupd (%rcx), %xmm0
movupd %xmm0, (%rbx)
jmp 0x43cbdc
leaq 0x1940de(%rip), %rdi    # 0x5d0c4c
callq 0x403323
subq %r14, %r15
leaq 0x1940ad(%rip), %rsi    # 0x5d0c2a
leaq 0xf0(%rsp), %rdi
movq %r15, %rdx
callq 0x407ce4
leaq 0x194094(%rip), %rsi    # 0x5d0c28
leaq 0xf0(%rsp), %rdi
callq 0x4c3490
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x43cbfd
movupd (%rcx), %xmm0
movupd %xmm0, (%rbx)
jmp 0x43cc0a
leaq 0x194082(%rip), %rdi    # 0x5d0c4c
callq 0x4033d3
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x440975
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x440975
leaq 0xb0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x193fb1(%rip), %rsi    # 0x5d0bef
leaq 0x193fcd(%rip), %rdx    # 0x5d0c12
leaq 0xa0(%rsp), %rdi
callq 0x40843e
leaq 0xa0(%rsp), %rdi
callq 0x440975
movq %rax, %r14
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43cd4c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4440d0
jmp 0x43cd4c
jmp 0x43cce4
jmp 0x43cce4
movq %rax, %r14
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x43cd42
movq 0xb0(%rsp), %rsi
jmp 0x43cd25
jmp 0x43cd31
movq %rax, %r14
movq 0x160(%rsp), %rdi
cmpq %rbx, %rdi
je 0x43cd7e
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x4440d0
jmp 0x43cd7e
movq %rax, %r14
jmp 0x43cd7e
jmp 0x43cce4
jmp 0x43cce4
jmp 0x43cce4
movq %rax, %r14
jmp 0x43cd4c
jmp 0x43cced
jmp 0x43cd09
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x43cd0c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4440d0
jmp 0x43cd0c
movq %rax, %r14
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43cd42
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x4440d0
jmp 0x43cd42
jmp 0x43cd31
movq %rax, %r14
jmp 0x43cd42
movq %rax, %r14
cmpl $0x0, (%rbp)
jne 0x43cd42
movl %ebx, (%rbp)
leaq 0x28(%rsp), %rdi
callq 0x43d76a
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x43cd71
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4440d0
leaq 0x160(%rsp), %rdi
callq 0x48ebf0
movq %r14, %rdi
callq 0x4f77a0