// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/vml.c
// Function: vml_write_image_shape
STATIC void
_vml_write_image_shape(lxw_vml *self, uint32_t vml_shape_id, uint32_t z_index,
                       lxw_vml_obj *image_obj)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    char width_str[LXW_ATTR_32];
    char height_str[LXW_ATTR_32];
    char style[LXW_MAX_ATTRIBUTE_LENGTH];
    char o_spid[LXW_ATTR_32];
    char type[] = "#_x0000_t75";
    double width;
    double height;

    /* Scale the height/width by the resolution, relative to 72dpi. */
    width = image_obj->width * (72.0 / image_obj->x_dpi);
    height = image_obj->height * (72.0 / image_obj->y_dpi);

    /* Excel uses a rounding based around 72 and 96 dpi. */
    width = 72.0 / 96.0 * (uint32_t) (width * 96.0 / 72 + 0.25);
    height = 72.0 / 96.0 * (uint32_t) (height * 96.0 / 72 + 0.25);

    lxw_sprintf_dbl(width_str, width);
    lxw_sprintf_dbl(height_str, height);

    lxw_snprintf(o_spid, LXW_ATTR_32, "_x0000_s%d", vml_shape_id);

    lxw_snprintf(style,
                 LXW_MAX_ATTRIBUTE_LENGTH,
                 "position:absolute;"
                 "margin-left:0;"
                 "margin-top:0;"
                 "width:%spt;"
                 "height:%spt;" "z-index:%d", width_str, height_str, z_index);

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("id", image_obj->image_position);
    LXW_PUSH_ATTRIBUTES_STR("o:spid", o_spid);
    LXW_PUSH_ATTRIBUTES_STR("type", type);
    LXW_PUSH_ATTRIBUTES_STR("style", style);

    lxw_xml_start_tag(self->file, "v:shape", &attributes);

    /* Write the v:imagedata element. */
    _vml_write_imagedata(self, image_obj->rel_index, image_obj->name);

    /* Write the o:lock element. */
    _vml_write_rotation_lock(self);

    lxw_xml_end_tag(self->file, "v:shape");

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x8d0, %rsp            # imm = 0x8D0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movabsq $0x5f30303030785f23, %rax # imm = 0x5F30303030785F23
movq %rax, -0x8c0(%rbp)
movl $0x353774, -0x8b8(%rbp) # imm = 0x353774
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
cvtsi2sd %rcx, %xmm0
movsd 0x30(%rax), %xmm3
movsd 0x31c43(%rip), %xmm2    # 0x6afe0
movaps %xmm2, %xmm1
divsd %xmm3, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8c8(%rbp)
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %ecx
cvtsi2sd %rcx, %xmm0
movsd 0x38(%rax), %xmm3
movaps %xmm2, %xmm1
divsd %xmm3, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8d0(%rbp)
movsd -0x8c8(%rbp), %xmm0
movsd 0x31c04(%rip), %xmm3    # 0x6afe8
mulsd %xmm3, %xmm0
divsd %xmm2, %xmm0
movsd 0x31bfc(%rip), %xmm1    # 0x6aff0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd 0x31bcc(%rip), %xmm4    # 0x6afd8
mulsd %xmm4, %xmm0
movsd %xmm0, -0x8c8(%rbp)
movsd -0x8d0(%rbp), %xmm0
mulsd %xmm3, %xmm0
divsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %eax
cvtsi2sd %rax, %xmm1
movsd 0x31b98(%rip), %xmm0    # 0x6afd8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8d0(%rbp)
leaq -0x50(%rbp), %rdi
movsd -0x8c8(%rbp), %xmm0
movl $0x20, %esi
leaq 0x2db25(%rip), %rdx     # 0x66f89
movb $0x1, %al
callq 0xc5d0
leaq -0x70(%rbp), %rdi
movsd -0x8d0(%rbp), %xmm0
movl $0x20, %esi
leaq 0x2db06(%rip), %rdx     # 0x66f89
movb $0x1, %al
callq 0xc5d0
leaq -0x8b0(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl $0x20, %esi
leaq 0x31c6a(%rip), %rdx     # 0x6b10a
movb $0x0, %al
callq 0xc5d0
leaq -0x890(%rbp), %rdi
leaq -0x50(%rbp), %rcx
leaq -0x70(%rbp), %r8
movl -0x10(%rbp), %r9d
movl $0x820, %esi            # imm = 0x820
leaq 0x3202a(%rip), %rdx     # 0x6b4f0
movb $0x0, %al
callq 0xc5d0
movq $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x394df
movq -0x18(%rbp), %rax
movq 0xa0(%rax), %rsi
leaq 0x35694(%rip), %rdi     # 0x6eb85
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x39524
jmp 0x39526
leaq -0x8b0(%rbp), %rsi
leaq 0x3200b(%rip), %rdi     # 0x6b53f
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x39567
jmp 0x39569
leaq -0x8c0(%rbp), %rsi
leaq 0x2ee39(%rip), %rdi     # 0x683b0
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x395aa
jmp 0x395ac
leaq -0x890(%rbp), %rsi
leaq 0x2e08c(%rip), %rdi     # 0x67646
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x395ed
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x31bb3(%rip), %rsi     # 0x6b1ae
leaq -0x28(%rbp), %rdx
callq 0xc390
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x4c(%rax), %esi
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rdx
callq 0x3ae80
movq -0x8(%rbp), %rdi
callq 0x39b80
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x31b78(%rip), %rsi     # 0x6b1ae
callq 0xc060
jmp 0x3963d
cmpq $0x0, -0x28(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3964d
jmp 0x3967f
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x1040(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x39672
leaq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x39674
movq -0x30(%rbp), %rdi
callq 0xc0d0
jmp 0x3963d
jmp 0x39681
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbp
retq
nopw (%rax,%rax)