// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x14, -0x2c(%rbp)
movl $0x40, -0x30(%rbp)
movsd 0x1f0ba(%rip), %xmm0    # 0x67a98
movsd %xmm0, -0x38(%rbp)
movsd 0x1f0ad(%rip), %xmm0    # 0x67a98
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movw 0x4(%rax), %ax
movw %ax, -0x46(%rbp)
movb $0x0, -0x71(%rbp)
movb $0x0, -0x72(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x48c49
movq -0x20(%rbp), %rax
movzwl 0x18(%rax), %eax
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x48a38
movq -0x20(%rbp), %rax
movzwl 0x18(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x1a(%rax), %eax
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x48a58
movq -0x20(%rbp), %rax
movzwl 0x1a(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movsd 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x48a78
movq -0x20(%rbp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movsd 0x28(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x48a98
movq -0x20(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x48aac
movq -0x20(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0x48ac0
movq -0x20(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x48b28
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x48b22
movq 0x344ff(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1d5cd(%rip), %rsi     # 0x660d0
leaq 0x238ea(%rip), %rdx     # 0x6c3f4
movl $0xc73, %ecx            # imm = 0xC73
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x48dc4
jmp 0x48b24
movb $0x1, -0x71(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x48bdf
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xc4e0
addq $0x5, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rsi
movl $0x1, %edi
callq 0xc870
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x48ba6
movq 0x3447b(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1d549(%rip), %rsi     # 0x660d0
leaq 0x23866(%rip), %rdx     # 0x6c3f4
movl $0xc7b, %ecx            # imm = 0xC7B
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x48dc4
jmp 0x48ba8
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0x48bdb
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdi
movq -0x80(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x23ccc(%rip), %rdx     # 0x6c8a0
movb $0x0, %al
callq 0xc5d0
movb $0x1, -0x72(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x48c47
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
jne 0x48c43
movq 0x343de(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1d4ac(%rip), %rsi     # 0x660d0
leaq 0x237c9(%rip), %rdx     # 0x6c3f4
movl $0xc85, %ecx            # imm = 0xC85
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x48dc4
jmp 0x48c45
jmp 0x48c47
jmp 0x48c49
cmpb $0x0, -0x71(%rbp)
jne 0x48cc3
leaq -0x70(%rbp), %rdi
movzwl -0x12(%rbp), %ecx
movl $0x20, %esi
leaq 0x23c44(%rip), %rdx     # 0x6c8a7
movb $0x0, %al
callq 0xc5d0
leaq -0x70(%rbp), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x48cbf
movq 0x34362(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1d430(%rip), %rsi     # 0x660d0
leaq 0x2374d(%rip), %rdx     # 0x6c3f4
movl $0xc8c, %ecx            # imm = 0xC8C
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x48dc4
jmp 0x48cc1
jmp 0x48cc3
cmpb $0x0, -0x72(%rbp)
jne 0x48d3d
leaq -0x70(%rbp), %rdi
movzwl -0x12(%rbp), %ecx
movl $0x20, %esi
leaq 0x23bd4(%rip), %rdx     # 0x6c8b1
movb $0x0, %al
callq 0xc5d0
leaq -0x70(%rbp), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x48d39
movq 0x342e8(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1d3b6(%rip), %rsi     # 0x660d0
leaq 0x236d3(%rip), %rdx     # 0x6c3f4
movl $0xc93, %ecx            # imm = 0xC93
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x48dc4
jmp 0x48d3b
jmp 0x48d3d
movsd -0x38(%rbp), %xmm0
movl -0x30(%rbp), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
movsd 0x1d5ca(%rip), %xmm1    # 0x66320
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x30(%rbp)
movsd -0x40(%rbp), %xmm0
movl -0x2c(%rbp), %eax
cvtsi2sd %rax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movw -0x46(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
movl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq