// File: /workspace/github_c_makefile_star2_O2/Paxa[P]fast_excel/libxlsxwriter/src/chart.c
// Function: lxw_chart_free
void
lxw_chart_free(lxw_chart *chart)
{
    lxw_chart_series *series;

    if (!chart)
        return;

    /* Chart series. */
    if (chart->series_list) {
        while (!STAILQ_EMPTY(chart->series_list)) {
            series = STAILQ_FIRST(chart->series_list);
            STAILQ_REMOVE_HEAD(chart->series_list, list_pointers);

            _chart_series_free(series);
        }

        free(chart->series_list);
    }

    /* X Axis. */
    if (chart->x_axis) {
        _chart_free_font(chart->x_axis->title.font);
        _chart_free_font(chart->x_axis->num_font);
        _chart_free_range(chart->x_axis->title.range);
        free(chart->x_axis->title.name);
        free(chart->x_axis->line);
        free(chart->x_axis->fill);
        free(chart->x_axis->pattern);
        free(chart->x_axis->major_gridlines.line);
        free(chart->x_axis->minor_gridlines.line);
        free(chart->x_axis->num_format);
        free(chart->x_axis->default_num_format);
        free(chart->x_axis);
    }

    /* Y Axis. */
    if (chart->y_axis) {
        _chart_free_font(chart->y_axis->title.font);
        _chart_free_font(chart->y_axis->num_font);
        _chart_free_range(chart->y_axis->title.range);
        free(chart->y_axis->title.name);
        free(chart->y_axis->line);
        free(chart->y_axis->fill);
        free(chart->y_axis->pattern);
        free(chart->y_axis->major_gridlines.line);
        free(chart->y_axis->minor_gridlines.line);
        free(chart->y_axis->num_format);
        free(chart->y_axis->default_num_format);
        free(chart->y_axis);
    }

    /* Chart title. */
    _chart_free_font(chart->title.font);
    _chart_free_range(chart->title.range);
    free(chart->title.name);

    /* Chart legend. */
    _chart_free_font(chart->legend.font);
    free(chart->delete_series);

    free(chart->default_marker);

    free(chart->chartarea_line);
    free(chart->chartarea_fill);
    free(chart->chartarea_pattern);
    free(chart->plotarea_line);
    free(chart->plotarea_fill);
    free(chart->plotarea_pattern);

    free(chart->drop_lines_line);
    free(chart->high_low_lines_line);

    free(chart->up_bar_line);
    free(chart->up_bar_fill);
    free(chart->down_bar_line);
    free(chart->down_bar_fill);

    _chart_free_font(chart->table_font);

    free(chart);
}

// Assembly:
testq %rdi, %rdi
je 0x11040
pushq %rbx
movq %rdi, %rbx
movq 0x128(%rdi), %rdi
testq %rdi, %rdi
jne 0x10df1
jmp 0x10dfe
movq 0x110(%rax), %rcx
movq %rcx, (%rdi)
testq %rcx, %rcx
jne 0x10de2
movq %rdi, 0x8(%rdi)
movq %rax, %rdi
callq 0x11041
movq 0x128(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
jne 0x10dcf
callq 0xc0d0
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x10ead
movq 0x10(%rax), %rdi
callq 0x11171
movq 0x20(%rbx), %rax
movq 0x88(%rax), %rdi
callq 0x11171
movq 0x20(%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x1118c
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rax
movq 0x90(%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rax
movq 0x98(%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rax
movq 0xa0(%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rax
movq 0x70(%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rax
movq 0x80(%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rax
movq 0x50(%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rax
movq 0x58(%rax), %rdi
callq 0xc0d0
movq 0x20(%rbx), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x10f5c
movq 0x10(%rax), %rdi
callq 0x11171
movq 0x28(%rbx), %rax
movq 0x88(%rax), %rdi
callq 0x11171
movq 0x28(%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x1118c
movq 0x28(%rbx), %rax
movq (%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
movq 0x90(%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
movq 0x98(%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
movq 0xa0(%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
movq 0x70(%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
movq 0x80(%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
movq 0x50(%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rax
movq 0x58(%rax), %rdi
callq 0xc0d0
movq 0x28(%rbx), %rdi
callq 0xc0d0
movq 0x40(%rbx), %rdi
callq 0x11171
movq 0x50(%rbx), %rdi
callq 0x1118c
movq 0x30(%rbx), %rdi
callq 0xc0d0
movq 0xb0(%rbx), %rdi
callq 0x11171
movq 0xc0(%rbx), %rdi
callq 0xc0d0
movq 0xd0(%rbx), %rdi
callq 0xc0d0
movq 0xd8(%rbx), %rdi
callq 0xc0d0
movq 0xe0(%rbx), %rdi
callq 0xc0d0
movq 0xe8(%rbx), %rdi
callq 0xc0d0
movq 0xf0(%rbx), %rdi
callq 0xc0d0
movq 0xf8(%rbx), %rdi
callq 0xc0d0
movq 0x100(%rbx), %rdi
callq 0xc0d0
movq 0x110(%rbx), %rdi
callq 0xc0d0
movq 0x120(%rbx), %rdi
callq 0xc0d0
movq 0x148(%rbx), %rdi
callq 0xc0d0
movq 0x158(%rbx), %rdi
callq 0xc0d0
movq 0x150(%rbx), %rdi
callq 0xc0d0
movq 0x160(%rbx), %rdi
callq 0xc0d0
movq 0x138(%rbx), %rdi
callq 0x11171
movq %rbx, %rdi
popq %rbx
jmp 0xc0d0
retq