// File: /workspace/github_c_makefile_star2_O0/esheldon[P]xshear/src/lensum.c
// Function: lensum_write
void lensum_write(Lensum* self, FILE* stream) {
    int nbin = self->nbin;
    int i=0;

    fprintf(stream,"%lld %.16g %lld",
            self->index, self->weight, self->totpairs);

    for (i=0; i<nbin; i++) 
        fprintf(stream," %lld", self->npair[i]);

    for (i=0; i<nbin; i++) 
        fprintf(stream," %.16g", self->rsum[i]);
    for (i=0; i<nbin; i++) 
        fprintf(stream," %.16g", self->wsum[i]);

    if(self->shear_units==UNITS_BOTH) {
        for (i=0; i<nbin; i++) 
            fprintf(stream," %.16g", self->ssum[i]);
    }

    for (i=0; i<nbin; i++) 
        fprintf(stream," %.16g", self->dsum[i]);
    for (i=0; i<nbin; i++) 
        fprintf(stream," %.16g", self->osum[i]);

    if(self->shear_units==UNITS_BOTH || self->shear_style==SHEAR_STYLE_LENSFIT) {
        for (i=0; i<nbin; i++) 
            fprintf(stream," %.16g", self->dsensum_w[i]);
        for (i=0; i<nbin; i++) 
            fprintf(stream," %.16g", self->osensum_w[i]);
    }
    
    if(self->shear_units==UNITS_BOTH) {
        for (i=0; i<nbin; i++) 
            fprintf(stream," %.16g", self->dsensum_s[i]);
        for (i=0; i<nbin; i++) 
            fprintf(stream," %.16g", self->osensum_s[i]);
    }

    fprintf(stream,"\n");

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
leaq 0x8c6c(%rip), %rsi      # 0xe4c2
movb $0x1, %al
callq 0x2170
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5899
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x8c45(%rip), %rsi      # 0xe4cc
movb $0x0, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5864
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x58d6
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8c0e(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x58a0
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5913
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8bd1(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x58dd
movq -0x8(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x595c
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x595a
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8b8a(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5924
jmp 0x595c
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5999
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8b4b(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5963
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x59d6
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8b0e(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x59a0
movq -0x8(%rbp), %rax
cmpl $0x3, 0x4(%rax)
je 0x59e9
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x5a65
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5a26
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8abe(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x59f0
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5a63
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8a81(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5a2d
jmp 0x5a65
movq -0x8(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x5aeb
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5aac
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x8a38(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5a76
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5ae9
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x89fb(%rip), %rsi      # 0xe4d2
movb $0x1, %al
callq 0x2170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5ab3
jmp 0x5aeb
movq -0x10(%rbp), %rdi
leaq 0x94c9(%rip), %rsi      # 0xefbf
movb $0x0, %al
callq 0x2170
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)