// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/workbook.c
// Function: workbook_new_opt
lxw_workbook *
workbook_new_opt(const char *filename, lxw_workbook_options *options)
{
    lxw_format *format;
    lxw_workbook *workbook;

    /* Create the workbook object. */
    workbook = calloc(1, sizeof(lxw_workbook));
    GOTO_LABEL_ON_MEM_ERROR(workbook, mem_error);
    workbook->filename = lxw_strdup(filename);

    /* Add the sheets list. */
    workbook->sheets = calloc(1, sizeof(struct lxw_sheets));
    GOTO_LABEL_ON_MEM_ERROR(workbook->sheets, mem_error);
    STAILQ_INIT(workbook->sheets);

    /* Add the worksheets list. */
    workbook->worksheets = calloc(1, sizeof(struct lxw_worksheets));
    GOTO_LABEL_ON_MEM_ERROR(workbook->worksheets, mem_error);
    STAILQ_INIT(workbook->worksheets);

    /* Add the chartsheets list. */
    workbook->chartsheets = calloc(1, sizeof(struct lxw_chartsheets));
    GOTO_LABEL_ON_MEM_ERROR(workbook->chartsheets, mem_error);
    STAILQ_INIT(workbook->chartsheets);

    /* Add the worksheet names tree. */
    workbook->worksheet_names = calloc(1, sizeof(struct lxw_worksheet_names));
    GOTO_LABEL_ON_MEM_ERROR(workbook->worksheet_names, mem_error);
    RB_INIT(workbook->worksheet_names);

    /* Add the chartsheet names tree. */
    workbook->chartsheet_names = calloc(1,
                                        sizeof(struct lxw_chartsheet_names));
    GOTO_LABEL_ON_MEM_ERROR(workbook->chartsheet_names, mem_error);
    RB_INIT(workbook->chartsheet_names);

    /* Add the image MD5 tree. */
    workbook->image_md5s = calloc(1, sizeof(struct lxw_image_md5s));
    GOTO_LABEL_ON_MEM_ERROR(workbook->image_md5s, mem_error);
    RB_INIT(workbook->image_md5s);

    /* Add the header image MD5 tree. */
    workbook->header_image_md5s = calloc(1, sizeof(struct lxw_image_md5s));
    GOTO_LABEL_ON_MEM_ERROR(workbook->header_image_md5s, mem_error);
    RB_INIT(workbook->header_image_md5s);

    /* Add the background image MD5 tree. */
    workbook->background_md5s = calloc(1, sizeof(struct lxw_image_md5s));
    GOTO_LABEL_ON_MEM_ERROR(workbook->background_md5s, mem_error);
    RB_INIT(workbook->background_md5s);

    /* Add the charts list. */
    workbook->charts = calloc(1, sizeof(struct lxw_charts));
    GOTO_LABEL_ON_MEM_ERROR(workbook->charts, mem_error);
    STAILQ_INIT(workbook->charts);

    /* Add the ordered charts list to track chart insertion order. */
    workbook->ordered_charts = calloc(1, sizeof(struct lxw_charts));
    GOTO_LABEL_ON_MEM_ERROR(workbook->ordered_charts, mem_error);
    STAILQ_INIT(workbook->ordered_charts);

    /* Add the formats list. */
    workbook->formats = calloc(1, sizeof(struct lxw_formats));
    GOTO_LABEL_ON_MEM_ERROR(workbook->formats, mem_error);
    STAILQ_INIT(workbook->formats);

    /* Add the defined_names list. */
    workbook->defined_names = calloc(1, sizeof(struct lxw_defined_names));
    GOTO_LABEL_ON_MEM_ERROR(workbook->defined_names, mem_error);
    TAILQ_INIT(workbook->defined_names);

    /* Add the shared strings table. */
    workbook->sst = lxw_sst_new();
    GOTO_LABEL_ON_MEM_ERROR(workbook->sst, mem_error);

    /* Add the default workbook properties. */
    workbook->properties = calloc(1, sizeof(lxw_doc_properties));
    GOTO_LABEL_ON_MEM_ERROR(workbook->properties, mem_error);

    /* Add a hash table to track format indices. */
    workbook->used_xf_formats = lxw_hash_new(128, 1, 0);
    GOTO_LABEL_ON_MEM_ERROR(workbook->used_xf_formats, mem_error);

    /* Add a hash table to track format indices. */
    workbook->used_dxf_formats = lxw_hash_new(128, 1, 0);
    GOTO_LABEL_ON_MEM_ERROR(workbook->used_dxf_formats, mem_error);

    /* Add the worksheets list. */
    workbook->custom_properties =
        calloc(1, sizeof(struct lxw_custom_properties));
    GOTO_LABEL_ON_MEM_ERROR(workbook->custom_properties, mem_error);
    STAILQ_INIT(workbook->custom_properties);

    /* Add the default cell format. */
    format = workbook_add_format(workbook);
    GOTO_LABEL_ON_MEM_ERROR(format, mem_error);

    /* Initialize its index. */
    lxw_format_get_xf_index(format);

    /* Add the default hyperlink format. */
    format = workbook_add_format(workbook);
    GOTO_LABEL_ON_MEM_ERROR(format, mem_error);
    format_set_hyperlink(format);
    workbook->default_url_format = format;

    if (options) {
        workbook->options.constant_memory = options->constant_memory;
        workbook->options.tmpdir = lxw_strdup(options->tmpdir);
        workbook->options.use_zip64 = options->use_zip64;
        workbook->options.output_buffer = options->output_buffer;
        workbook->options.output_buffer_size = options->output_buffer_size;
    }

    workbook->max_url_length = 2079;

    return workbook;

mem_error:
    lxw_workbook_free(workbook);
    workbook = NULL;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, %edi
movl $0x108, %esi            # imm = 0x108
callq 0xc870
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3ca43
movq 0x405d7(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x296a5(%rip), %rsi     # 0x660d0
leaq 0x2ec1e(%rip), %rdx     # 0x6b650
movl $0x6f5, %ecx            # imm = 0x6F5
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3ca45
movq -0x10(%rbp), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x80(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x3caaa
movq 0x40570(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x2963e(%rip), %rsi     # 0x660d0
leaq 0x2ebb7(%rip), %rdx     # 0x6b650
movl $0x6fa, %ecx            # imm = 0x6FA
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3caac
jmp 0x3caae
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x3cb1f
movq 0x404fb(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x295c9(%rip), %rsi     # 0x660d0
leaq 0x2eb42(%rip), %rdx     # 0x6b650
movl $0x6ff, %ecx            # imm = 0x6FF
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cb21
jmp 0x3cb23
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3cb94
movq 0x40486(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x29554(%rip), %rsi     # 0x660d0
leaq 0x2eacd(%rip), %rdx     # 0x6b650
movl $0x704, %ecx            # imm = 0x704
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cb96
jmp 0x3cb98
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x8(%rax)
movl $0x1, %edi
movl $0x8, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x3cc09
movq 0x40411(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x294df(%rip), %rsi     # 0x660d0
leaq 0x2ea58(%rip), %rdx     # 0x6b650
movl $0x709, %ecx            # imm = 0x709
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cc0b
jmp 0x3cc0d
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq $0x0, (%rax)
movl $0x1, %edi
movl $0x8, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x3cc6a
movq 0x403b0(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x2947e(%rip), %rsi     # 0x660d0
leaq 0x2e9f7(%rip), %rdx     # 0x6b650
movl $0x70f, %ecx            # imm = 0x70F
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cc6c
jmp 0x3cc6e
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq $0x0, (%rax)
movl $0x1, %edi
movl $0x8, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x3cccb
movq 0x4034f(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x2941d(%rip), %rsi     # 0x660d0
leaq 0x2e996(%rip), %rdx     # 0x6b650
movl $0x714, %ecx            # imm = 0x714
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cccd
jmp 0x3cccf
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq $0x0, (%rax)
movl $0x1, %edi
movl $0x8, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3cd2c
movq 0x402ee(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x293bc(%rip), %rsi     # 0x660d0
leaq 0x2e935(%rip), %rdx     # 0x6b650
movl $0x719, %ecx            # imm = 0x719
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cd2e
jmp 0x3cd30
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq $0x0, (%rax)
movl $0x1, %edi
movl $0x8, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x3cd8d
movq 0x4028d(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x2935b(%rip), %rsi     # 0x660d0
leaq 0x2e8d4(%rip), %rdx     # 0x6b650
movl $0x71e, %ecx            # imm = 0x71E
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cd8f
jmp 0x3cd91
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq $0x0, (%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x3cdee
movq 0x4022c(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x292fa(%rip), %rsi     # 0x660d0
leaq 0x2e873(%rip), %rdx     # 0x6b650
movl $0x723, %ecx            # imm = 0x723
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cdf0
jmp 0x3cdf2
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq %rcx, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x3ce63
movq 0x401b7(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x29285(%rip), %rsi     # 0x660d0
leaq 0x2e7fe(%rip), %rdx     # 0x6b650
movl $0x728, %ecx            # imm = 0x728
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3ce65
jmp 0x3ce67
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x3ced8
movq 0x40142(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x29210(%rip), %rsi     # 0x660d0
leaq 0x2e789(%rip), %rdx     # 0x6b650
movl $0x72d, %ecx            # imm = 0x72D
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3ceda
jmp 0x3cedc
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movq %rcx, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x3cf4d
movq 0x400cd(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x2919b(%rip), %rsi     # 0x660d0
leaq 0x2e714(%rip), %rdx     # 0x6b650
movl $0x732, %ecx            # imm = 0x732
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cf4f
jmp 0x3cf51
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rax
movq %rcx, 0x8(%rax)
callq 0xc330
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x3cfb8
movq 0x40062(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x29130(%rip), %rsi     # 0x660d0
leaq 0x2e6a9(%rip), %rdx     # 0x6b650
movl $0x737, %ecx            # imm = 0x737
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3cfba
movl $0x1, %edi
movl $0x58, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x3d008
movq 0x40012(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x290e0(%rip), %rsi     # 0x660d0
leaq 0x2e659(%rip), %rdx     # 0x6b650
movl $0x73b, %ecx            # imm = 0x73B
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3d00a
movl $0x80, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0xc500
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0xd8(%rax)
jne 0x3d060
movq 0x3ffba(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x29088(%rip), %rsi     # 0x660d0
leaq 0x2e601(%rip), %rdx     # 0x6b650
movl $0x73f, %ecx            # imm = 0x73F
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3d062
movl $0x80, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0xc500
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
jne 0x3d0b8
movq 0x3ff62(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x29030(%rip), %rsi     # 0x660d0
leaq 0x2e5a9(%rip), %rdx     # 0x6b650
movl $0x743, %ecx            # imm = 0x743
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3d0ba
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x3d108
movq 0x3ff12(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x28fe0(%rip), %rsi     # 0x660d0
leaq 0x2e559(%rip), %rdx     # 0x6b650
movl $0x748, %ecx            # imm = 0x748
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3d10a
jmp 0x3d10c
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rdi
callq 0xd070
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3d16c
movq 0x3feae(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x28f7c(%rip), %rsi     # 0x660d0
leaq 0x2e4f5(%rip), %rdx     # 0x6b650
movl $0x74d, %ecx            # imm = 0x74D
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3d16e
movq -0x20(%rbp), %rdi
callq 0xca40
movq -0x28(%rbp), %rdi
callq 0xd070
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3d1b4
movq 0x3fe66(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x28f34(%rip), %rsi     # 0x660d0
leaq 0x2e4ad(%rip), %rdx     # 0x6b650
movl $0x754, %ecx            # imm = 0x754
movb $0x0, %al
callq 0xc8f0
jmp 0x3d24e
jmp 0x3d1b6
movq -0x20(%rbp), %rdi
callq 0xc1e0
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x100(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x3d237
movq -0x18(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, 0x88(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rax
movb 0x10(%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, 0x98(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x28(%rbp), %rax
movw $0x81f, 0xcc(%rax)      # imm = 0x81F
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d267
movq -0x28(%rbp), %rdi
callq 0xcbf0
movq $0x0, -0x28(%rbp)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)