// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: get_comment_params
void
_get_comment_params(lxw_vml_obj *comment, lxw_comment_options *options)
{

    lxw_row_t start_row;
    lxw_col_t start_col;
    int32_t x_offset;
    int32_t y_offset;
    uint32_t height = 74;
    uint32_t width = 128;
    double x_scale = 1.0;
    double y_scale = 1.0;
    lxw_row_t row = comment->row;
    lxw_col_t col = comment->col;;

    /* Set the default start cell and offsets for the comment. These are
     * generally fixed in relation to the parent cell. However there are some
     * edge cases for cells at the, well yes, edges. */
    if (row == 0)
        y_offset = 2;
    else if (row == LXW_ROW_MAX - 3)
        y_offset = 16;
    else if (row == LXW_ROW_MAX - 2)
        y_offset = 16;
    else if (row == LXW_ROW_MAX - 1)
        y_offset = 14;
    else
        y_offset = 10;

    if (col == LXW_COL_MAX - 3)
        x_offset = 49;
    else if (col == LXW_COL_MAX - 2)
        x_offset = 49;
    else if (col == LXW_COL_MAX - 1)
        x_offset = 49;
    else
        x_offset = 15;

    if (row == 0)
        start_row = 0;
    else if (row == LXW_ROW_MAX - 3)
        start_row = LXW_ROW_MAX - 7;
    else if (row == LXW_ROW_MAX - 2)
        start_row = LXW_ROW_MAX - 6;
    else if (row == LXW_ROW_MAX - 1)
        start_row = LXW_ROW_MAX - 5;
    else
        start_row = row - 1;

    if (col == LXW_COL_MAX - 3)
        start_col = LXW_COL_MAX - 6;
    else if (col == LXW_COL_MAX - 2)
        start_col = LXW_COL_MAX - 5;
    else if (col == LXW_COL_MAX - 1)
        start_col = LXW_COL_MAX - 4;
    else
        start_col = col + 1;

    /* Set the default font properties. */
    comment->font_size = 8;
    comment->font_family = 2;

    /* 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->start_row > 0 || options->start_col > 0) {
            start_row = options->start_row;
            start_col = options->start_col;
        }

        if (options->font_size > 0.0)
            comment->font_size = options->font_size;

        if (options->font_family > 0)
            comment->font_family = options->font_family;

        comment->visible = options->visible;
        comment->color = options->color;
        comment->author = lxw_strdup(options->author);
        comment->font_name = lxw_strdup(options->font_name);
    }

    /* 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);

    comment->width = width;
    comment->height = height;
    comment->start_col = start_col;
    comment->start_row = start_row;
    comment->x_offset = x_offset;
    comment->y_offset = y_offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x4a, -0x24(%rbp)
movl $0x80, -0x28(%rbp)
movsd 0x1f472(%rip), %xmm0    # 0x67a98
movsd %xmm0, -0x30(%rbp)
movsd 0x1f465(%rip), %xmm0    # 0x67a98
movsd %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movw 0x4(%rax), %ax
movw %ax, -0x3e(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0x4865c
movl $0x2, -0x20(%rbp)
jmp 0x4869f
cmpl $0xffffd, -0x3c(%rbp)   # imm = 0xFFFFD
jne 0x4866e
movl $0x10, -0x20(%rbp)
jmp 0x4869d
cmpl $0xffffe, -0x3c(%rbp)   # imm = 0xFFFFE
jne 0x48680
movl $0x10, -0x20(%rbp)
jmp 0x4869b
cmpl $0xfffff, -0x3c(%rbp)   # imm = 0xFFFFF
jne 0x48692
movl $0xe, -0x20(%rbp)
jmp 0x48699
movl $0xa, -0x20(%rbp)
jmp 0x4869b
jmp 0x4869d
jmp 0x4869f
movzwl -0x3e(%rbp), %eax
cmpl $0x3ffd, %eax           # imm = 0x3FFD
jne 0x486b3
movl $0x31, -0x1c(%rbp)
jmp 0x486e6
movzwl -0x3e(%rbp), %eax
cmpl $0x3ffe, %eax           # imm = 0x3FFE
jne 0x486c7
movl $0x31, -0x1c(%rbp)
jmp 0x486e4
movzwl -0x3e(%rbp), %eax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jne 0x486db
movl $0x31, -0x1c(%rbp)
jmp 0x486e2
movl $0xf, -0x1c(%rbp)
jmp 0x486e4
jmp 0x486e6
cmpl $0x0, -0x3c(%rbp)
jne 0x486f5
movl $0x0, -0x14(%rbp)
jmp 0x4873a
cmpl $0xffffd, -0x3c(%rbp)   # imm = 0xFFFFD
jne 0x48707
movl $0xffff9, -0x14(%rbp)   # imm = 0xFFFF9
jmp 0x48738
cmpl $0xffffe, -0x3c(%rbp)   # imm = 0xFFFFE
jne 0x48719
movl $0xffffa, -0x14(%rbp)   # imm = 0xFFFFA
jmp 0x48736
cmpl $0xfffff, -0x3c(%rbp)   # imm = 0xFFFFF
jne 0x4872b
movl $0xffffb, -0x14(%rbp)   # imm = 0xFFFFB
jmp 0x48734
movl -0x3c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x48736
jmp 0x48738
jmp 0x4873a
movzwl -0x3e(%rbp), %eax
cmpl $0x3ffd, %eax           # imm = 0x3FFD
jne 0x4874d
movw $0x3ffa, -0x16(%rbp)    # imm = 0x3FFA
jmp 0x48782
movzwl -0x3e(%rbp), %eax
cmpl $0x3ffe, %eax           # imm = 0x3FFE
jne 0x48760
movw $0x3ffb, -0x16(%rbp)    # imm = 0x3FFB
jmp 0x48780
movzwl -0x3e(%rbp), %eax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jne 0x48773
movw $0x3ffc, -0x16(%rbp)    # imm = 0x3FFC
jmp 0x4877e
movzwl -0x3e(%rbp), %eax
addl $0x1, %eax
movw %ax, -0x16(%rbp)
jmp 0x48780
jmp 0x48782
movq -0x8(%rbp), %rax
movsd 0x209ca(%rip), %xmm0    # 0x69158
movsd %xmm0, 0x50(%rax)
movq -0x8(%rbp), %rax
movb $0x2, 0x44(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x4890b
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %eax
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x487c6
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x487e6
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movsd 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x48806
movq -0x10(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movsd 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x48826
movq -0x10(%rbp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x4883a
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x4884e
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
ja 0x48865
movq -0x10(%rbp), %rax
movzwl 0x48(%rax), %eax
cmpl $0x0, %eax
jle 0x4887b
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movw 0x48(%rax), %ax
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rax
movsd 0x38(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4889f
movq -0x10(%rbp), %rax
movsd 0x38(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x50(%rax)
movq -0x10(%rbp), %rax
movzbl 0x40(%rax), %eax
cmpl $0x0, %eax
jle 0x488ba
movq -0x10(%rbp), %rax
movb 0x40(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x44(%rax)
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x45(%rax)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xcd80
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x90(%rax)
movsd -0x30(%rbp), %xmm0
movl -0x28(%rbp), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
movsd 0x1d9fc(%rip), %xmm1    # 0x66320
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x28(%rbp)
movsd -0x38(%rbp), %xmm0
movl -0x24(%rbp), %eax
cvtsi2sd %rax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movw -0x16(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0xc(%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)