// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/chart.c
// Function: chart_write_trendline
STATIC void
_chart_write_trendline(lxw_chart *self, lxw_chart_series *series)
{
    if (!series->has_trendline)
        return;

    lxw_xml_start_tag(self->file, "c:trendline", NULL);

    /* Write the c:name element. */
    if (series->trendline_name)
        _chart_write_name(self, series->trendline_name);

    /* Write the c:spPr element. */
    _chart_write_sp_pr(self, series->trendline_line, NULL, NULL);

    /* Write the c:trendlineType element. */
    _chart_write_trendline_type(self, series->trendline_type);

    /* Write the c:order element. */
    if (series->trendline_type == LXW_CHART_TRENDLINE_TYPE_POLY
        && series->trendline_value >= 2) {

        _chart_write_order(self, series->trendline_value);
    }

    /* Write the c:period element. */
    if (series->trendline_type == LXW_CHART_TRENDLINE_TYPE_AVERAGE
        && series->trendline_value >= 2) {

        _chart_write_period(self, series->trendline_value);
    }

    if (series->has_trendline_forecast) {
        /* Write the c:forward element. */
        _chart_write_forward(self, series->trendline_forward);

        /* Write the c:backward element. */
        _chart_write_backward(self, series->trendline_backward);
    }

    /* Write the c:intercept element. */
    if (series->has_trendline_intercept)
        _chart_write_intercept(self, series->trendline_intercept);

    /* Write the c:dispRSqr element. */
    if (series->has_trendline_r_squared)
        _chart_write_disp_rsqr(self);

    if (series->has_trendline_equation) {
        /* Write the c:dispEq element. */
        _chart_write_disp_eq(self);

        /* Write the c:trendlineLbl element. */
        _chart_write_trendline_lbl(self);

    }

    lxw_xml_end_tag(self->file, "c:trendline");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0xd8(%rax)
jne 0x19172
jmp 0x192e6
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x4e021(%rip), %rsi     # 0x671a1
xorl %eax, %eax
movl %eax, %edx
callq 0xc390
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x191ab
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rsi
callq 0x1c170
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x15030
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0xdd(%rax), %esi
callq 0x1c1b0
movq -0x10(%rbp), %rax
movzbl 0xdd(%rax), %eax
cmpl $0x2, %eax
jne 0x19211
movq -0x10(%rbp), %rax
movzbl 0xde(%rax), %eax
cmpl $0x2, %eax
jl 0x19211
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0xde(%rax), %eax
movzwl %ax, %esi
callq 0x18c30
movq -0x10(%rbp), %rax
movzbl 0xdd(%rax), %eax
cmpl $0x5, %eax
jne 0x19245
movq -0x10(%rbp), %rax
movzbl 0xde(%rax), %eax
cmpl $0x2, %eax
jl 0x19245
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0xde(%rax), %esi
callq 0x1c420
movq -0x10(%rbp), %rax
cmpb $0x0, 0xd9(%rax)
je 0x1927c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd 0xe0(%rax), %xmm0
callq 0x1c4f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd 0xe8(%rax), %xmm0
callq 0x1c5c0
movq -0x10(%rbp), %rax
cmpb $0x0, 0xdc(%rax)
je 0x1929e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd 0x108(%rax), %xmm0
callq 0x1c690
movq -0x10(%rbp), %rax
cmpb $0x0, 0xdb(%rax)
je 0x192b4
movq -0x8(%rbp), %rdi
callq 0x1c760
movq -0x10(%rbp), %rax
cmpb $0x0, 0xda(%rax)
je 0x192d3
movq -0x8(%rbp), %rdi
callq 0x1c830
movq -0x8(%rbp), %rdi
callq 0x1c900
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x4dec0(%rip), %rsi     # 0x671a1
callq 0xc060
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)