// File: /workspace/github_c_makefile_star2_O2/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: lxw_worksheet_prepare_header_vml_objects
void
lxw_worksheet_prepare_header_vml_objects(lxw_worksheet *self,
                                         uint32_t vml_header_id,
                                         uint32_t vml_drawing_id)
{

    lxw_rel_tuple *relationship;
    char filename[LXW_FILENAME_LENGTH];
    char *vml_data_id_str;

    self->vml_header_id = vml_header_id;

    /* Set up the VML relationship for header images. */
    relationship = calloc(1, sizeof(lxw_rel_tuple));
    GOTO_LABEL_ON_MEM_ERROR(relationship, mem_error);

    relationship->type = lxw_strdup("/vmlDrawing");
    GOTO_LABEL_ON_MEM_ERROR(relationship->type, mem_error);

    lxw_snprintf(filename, 32, "../drawings/vmlDrawing%d.vml",
                 vml_drawing_id);

    relationship->target = lxw_strdup(filename);
    GOTO_LABEL_ON_MEM_ERROR(relationship->target, mem_error);

    self->external_vml_header_link = relationship;

    /* If this allocation fails it will be dealt with in packager.c. */
    vml_data_id_str = calloc(1, sizeof("4294967295"));
    GOTO_LABEL_ON_MEM_ERROR(vml_data_id_str, mem_error);

    lxw_snprintf(vml_data_id_str, sizeof("4294967295"), "%d", vml_header_id);

    self->vml_header_id_str = vml_data_id_str;

    return;

mem_error:
    if (relationship) {
        free(relationship->type);
        free(relationship->target);
        free(relationship->target_mode);
        free(relationship);
    }

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, %r14
movl %esi, 0x2e4(%rdi)
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0xc850
testq %rax, %rax
je 0x2f6df
movq %rax, %rbx
leaq 0x1494e(%rip), %rdi     # 0x43f9d
callq 0xcd50
movq %rax, (%rbx)
testq %rax, %rax
je 0x2f714
movq %rax, %r15
leaq 0x1493f(%rip), %rdx     # 0x43fa9
movq %rsp, %r13
pushq $0x20
popq %rsi
movq %r13, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0xc5b0
movq %r13, %rdi
callq 0xcd50
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x2f736
movq %rbx, 0x2b8(%r14)
pushq $0x1
popq %rdi
pushq $0xb
popq %rsi
callq 0xc850
testq %rax, %rax
je 0x2f75c
movq %rax, %r15
leaq 0x12e99(%rip), %rdx     # 0x42550
pushq $0xb
popq %rsi
movq %rax, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xc5b0
movq %r15, 0x2d8(%r14)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x23912(%rip), %rax     # 0x52ff8
movq (%rax), %rdi
leaq 0xd9f0(%rip), %rsi      # 0x3d0e0
leaq 0x142e9(%rip), %rdx     # 0x439e0
movl $0xed5, %ecx            # imm = 0xED5
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc8d0
movq 0x238dd(%rip), %rax     # 0x52ff8
movq (%rax), %rdi
leaq 0xd9bb(%rip), %rsi      # 0x3d0e0
leaq 0x142b4(%rip), %rdx     # 0x439e0
xorl %r15d, %r15d
movl $0xed8, %ecx            # imm = 0xED8
jmp 0x2f753
movq 0x238bb(%rip), %rax     # 0x52ff8
movq (%rax), %rdi
leaq 0xd999(%rip), %rsi      # 0x3d0e0
leaq 0x14292(%rip), %rdx     # 0x439e0
movl $0xede, %ecx            # imm = 0xEDE
xorl %eax, %eax
callq 0xc8d0
jmp 0x2f783
movq 0x23895(%rip), %rax     # 0x52ff8
movq (%rax), %rdi
leaq 0xd973(%rip), %rsi      # 0x3d0e0
leaq 0x1426c(%rip), %rdx     # 0x439e0
movl $0xee4, %ecx            # imm = 0xEE4
xorl %eax, %eax
callq 0xc8d0
movq (%rbx), %r15
movq %r15, %rdi
callq 0xc0d0
movq 0x8(%rbx), %rdi
callq 0xc0d0
movq 0x10(%rbx), %rdi
callq 0xc0d0
movq %rbx, %rdi
callq 0xc0d0
jmp 0x2f6cd