// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: get_button_params
lxw_error
_get_button_params(lxw_vml_obj *button, uint16_t button_number,
                   lxw_button_options *options)
{

    int32_t x_offset = 0;
    int32_t y_offset = 0;
    uint32_t height = LXW_DEF_ROW_HEIGHT_PIXELS;
    uint32_t width = LXW_DEF_COL_WIDTH_PIXELS;
    double x_scale = 1.0;
    double y_scale = 1.0;
    lxw_row_t row = button->row;
    lxw_col_t col = button->col;
    char buffer[LXW_ATTR_32];
    uint8_t has_caption = LXW_FALSE;
    uint8_t has_macro = LXW_FALSE;
    size_t len;

    /* Set any user defined options. */
    if (options) {

        if (options->width > 0.0)
            width = options->width;

        if (options->height > 0.0)
            height = options->height;

        if (options->x_scale > 0.0)
            x_scale = options->x_scale;

        if (options->y_scale > 0.0)
            y_scale = options->y_scale;

        if (options->x_offset != 0)
            x_offset = options->x_offset;

        if (options->y_offset != 0)
            y_offset = options->y_offset;

        if (options->caption) {
            button->name = lxw_strdup(options->caption);
            RETURN_ON_MEM_ERROR(button->name, LXW_ERROR_MEMORY_MALLOC_FAILED);
            has_caption = LXW_TRUE;
        }

        if (options->macro) {
            len = sizeof("[0]!") + strlen(options->macro);
            button->macro = calloc(1, len);
            RETURN_ON_MEM_ERROR(button->macro,
                                LXW_ERROR_MEMORY_MALLOC_FAILED);

            if (button->macro)
                lxw_snprintf(button->macro, len, "[0]!%s", options->macro);

            has_macro = LXW_TRUE;
        }

        if (options->description) {
            button->text = lxw_strdup(options->description);
            RETURN_ON_MEM_ERROR(button->text, LXW_ERROR_MEMORY_MALLOC_FAILED);
        }
    }

    if (!has_caption) {
        lxw_snprintf(buffer, LXW_ATTR_32, "Button %d", button_number);
        button->name = lxw_strdup(buffer);
        RETURN_ON_MEM_ERROR(button->name, LXW_ERROR_MEMORY_MALLOC_FAILED);
    }

    if (!has_macro) {
        lxw_snprintf(buffer, LXW_ATTR_32, "[0]!Button%d_Click",
                     button_number);
        button->macro = lxw_strdup(buffer);
        RETURN_ON_MEM_ERROR(button->macro, LXW_ERROR_MEMORY_MALLOC_FAILED);
    }

    /* Scale the width/height to the default/user scale and round to the
     * nearest pixel. */
    width = (uint32_t) (0.5 + x_scale * width);
    height = (uint32_t) (0.5 + y_scale * height);

    button->width = width;
    button->height = height;
    button->start_col = col;
    button->start_row = row;
    button->x_offset = x_offset;
    button->y_offset = y_offset;

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %rbx
movl (%rdi), %r13d
movzwl 0x4(%rdi), %ebp
testq %rdx, %rdx
je 0x30af8
movq %rdx, %r15
movsd 0x18(%rdx), %xmm0
movaps %xmm0, 0x10(%rsp)
movups 0x20(%rdx), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x30(%rdx), %xmm0
movapd %xmm0, 0x30(%rsp)
movq (%rdx), %r14
testq %r14, %r14
je 0x30a93
movq %r14, %rdi
callq 0xcce0
movq %rax, 0xa8(%rbx)
testq %rax, %rax
je 0x30c8e
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x30b22
movw %bp, 0xa(%rsp)
movl %r13d, %ebp
movq %r12, %rdi
callq 0xc480
movq %rax, %r13
addq $0x5, %r13
movl $0x1, %edi
movq %r13, %rsi
callq 0xc7f0
movq %rax, 0xb0(%rbx)
testq %rax, %rax
je 0x30c95
leaq 0x163c5(%rip), %rdx     # 0x46ea0
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xc570
movb $0x1, %r12b
movl %ebp, %r13d
movzwl 0xa(%rsp), %ebp
jmp 0x30b25
movsd 0x15b30(%rip), %xmm0    # 0x46630
movaps %xmm0, 0x10(%rsp)
movapd 0x15b13(%rip), %xmm0    # 0x46620
movapd %xmm0, 0x20(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
xorl %r12d, %r12d
jmp 0x30b99
xorl %r12d, %r12d
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x30b43
callq 0xcce0
movq %rax, 0x98(%rbx)
testq %rax, %rax
je 0x30c9c
pxor %xmm1, %xmm1
movdqa 0x10(%rsp), %xmm3
movdqa %xmm3, %xmm2
pcmpeqw %xmm1, %xmm2
movdqa %xmm2, %xmm0
pandn %xmm3, %xmm0
pand 0x15adb(%rip), %xmm2    # 0x46640
por %xmm0, %xmm2
punpcklwd %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
movdqa %xmm2, 0x10(%rsp)
movapd 0x20(%rsp), %xmm0
cmpltpd %xmm0, %xmm1
andpd %xmm1, %xmm0
andnpd 0x15a96(%rip), %xmm1    # 0x46620
orpd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
testq %r14, %r14
jne 0x30bd1
movzwl 0xc(%rsp), %ecx
leaq 0x16302(%rip), %rdx     # 0x46ea7
leaq 0x40(%rsp), %r14
movl $0x20, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0xc570
movq %r14, %rdi
callq 0xcce0
movq %rax, 0xa8(%rbx)
testq %rax, %rax
je 0x30c87
testb %r12b, %r12b
jne 0x30c0e
movzwl 0xc(%rsp), %ecx
leaq 0x162cf(%rip), %rdx     # 0x46eb1
leaq 0x40(%rsp), %r14
movl $0x20, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0xc570
movq %r14, %rdi
callq 0xcce0
movq %rax, 0xb0(%rbx)
testq %rax, %rax
je 0x30ca3
xorpd %xmm0, %xmm0
movapd 0x10(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x15a2d(%rip), %xmm0    # 0x46650
orpd %xmm0, %xmm1
subpd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm2
mulpd %xmm1, %xmm2
addpd 0x15a23(%rip), %xmm2    # 0x46660
cvttpd2dq %xmm2, %xmm0
movapd %xmm0, %xmm1
addpd 0x15a23(%rip), %xmm2    # 0x46670
cvttpd2dq %xmm2, %xmm2
psrad $0x1f, %xmm1
andpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movlpd %xmm2, 0x28(%rbx)
movw %bp, 0xc(%rbx)
movl %r13d, 0x8(%rbx)
movapd 0x30(%rsp), %xmm0
movlpd %xmm0, 0x10(%rbx)
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xea73
jmp 0x30ca8
callq 0xe9dd
jmp 0x30ca8
callq 0xea01
jmp 0x30ca8
callq 0xea25
jmp 0x30ca8
callq 0xea49
movl $0x1, %eax
jmp 0x30c78