// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2e4(%rax)
movl $0x1, %edi
movl $0x20, %esi
callq 0xc870
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4b135
movq 0x31ee5(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1afb3(%rip), %rsi     # 0x660d0
leaq 0x212d0(%rip), %rdx     # 0x6c3f4
movl $0xed5, %ecx            # imm = 0xED5
movb $0x0, %al
callq 0xc8f0
jmp 0x4b274
jmp 0x4b137
leaq 0x2187c(%rip), %rdi     # 0x6c9ba
callq 0xcd80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x4b180
movq 0x31e9a(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1af68(%rip), %rsi     # 0x660d0
leaq 0x21285(%rip), %rdx     # 0x6c3f4
movl $0xed8, %ecx            # imm = 0xED8
movb $0x0, %al
callq 0xc8f0
jmp 0x4b274
jmp 0x4b182
leaq -0xa0(%rbp), %rdi
movl -0x10(%rbp), %ecx
movl $0x20, %esi
leaq 0x2182e(%rip), %rdx     # 0x6c9c6
movb $0x0, %al
callq 0xc5d0
leaq -0xa0(%rbp), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4b1ea
movq 0x31e30(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1aefe(%rip), %rsi     # 0x660d0
leaq 0x2121b(%rip), %rdx     # 0x6c3f4
movl $0xede, %ecx            # imm = 0xEDE
movb $0x0, %al
callq 0xc8f0
jmp 0x4b274
jmp 0x4b1ec
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2b8(%rax)
movl $0x1, %edi
movl $0xb, %esi
callq 0xc870
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x4b241
movq 0x31dd6(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1aea4(%rip), %rsi     # 0x660d0
leaq 0x211c1(%rip), %rdx     # 0x6c3f4
movl $0xee4, %ecx            # imm = 0xEE4
movb $0x0, %al
callq 0xc8f0
jmp 0x4b274
jmp 0x4b243
movq -0xa8(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl $0xb, %esi
leaq 0x20023(%rip), %rdx     # 0x6b27c
movb $0x0, %al
callq 0xc5d0
movq -0xa8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2d8(%rax)
jmp 0x4b2ac
cmpq $0x0, -0x18(%rbp)
je 0x4b2aa
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xc0d0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xc0d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xc0d0
movq -0x18(%rbp), %rdi
callq 0xc0d0
jmp 0x4b2ac
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)