// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_ta.c
// Function: lv_ta_set_one_line
void lv_ta_set_one_line(lv_obj_t * ta, bool en)
{
    LV_ASSERT_OBJ(ta, LV_OBJX_NAME);

    lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
    if(ext->one_line == en) return;

    if(en) {
        const lv_style_t * style_ta    = lv_obj_get_style(ta);
        const lv_style_t * style_scrl  = lv_obj_get_style(lv_page_get_scrl(ta));
        const lv_style_t * style_label = lv_obj_get_style(ext->label);
        lv_coord_t font_h              = lv_font_get_line_height(style_label->text.font);

        ext->one_line = 1;
        lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD);
        lv_obj_set_height(ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom +
                                  style_scrl->body.padding.top + style_scrl->body.padding.bottom);
        lv_label_set_long_mode(ext->label, LV_LABEL_LONG_EXPAND);
        if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_EXPAND);
        lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top);
    } else {
        const lv_style_t * style_ta = lv_obj_get_style(ta);

        ext->one_line = 0;
        lv_page_set_scrl_fit2(ta, LV_FIT_FLOOD, LV_FIT_TIGHT);
        lv_label_set_long_mode(ext->label, LV_LABEL_LONG_BREAK);
        if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_BREAK);

        lv_obj_set_height(ta, LV_TA_DEF_HEIGHT);
        lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top);
    }

    placeholder_update(ta);
    refr_cursor_area(ta);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x31b93
movq -0x8(%rbp), %rsi
leaq 0x36570(%rip), %rdi     # 0x680fc
callq 0xd410
jmp 0x31b91
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb 0x98(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
movb -0x9(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x31bc3
jmp 0x31d70
testb $0x1, -0x9(%rbp)
je 0x31cc7
movq -0x8(%rbp), %rdi
callq 0xa080
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3e970
movq %rax, %rdi
callq 0xa080
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xa080
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x33480
movzbl %al, %eax
movw %ax, -0x32(%rbp)
movq -0x18(%rbp), %rax
movb 0x98(%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, 0x98(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x31590
movq -0x8(%rbp), %rdi
movswl -0x32(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movq -0x28(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x28(%rbp), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movswl %ax, %esi
callq 0x84a0
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
xorl %esi, %esi
callq 0x2a4f0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x31c9e
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
xorl %esi, %esi
callq 0x2a4f0
movq -0x8(%rbp), %rdi
callq 0x3e970
movq %rax, %rdi
movq -0x20(%rbp), %rax
movw 0x1a(%rax), %cx
movq -0x20(%rbp), %rax
movswl %cx, %esi
movswl 0x16(%rax), %edx
callq 0x71f0
jmp 0x31d5e
movq -0x8(%rbp), %rdi
callq 0xa080
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movb 0x98(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x98(%rax)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x31590
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movl $0x1, %esi
callq 0x2a4f0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x31d2c
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movl $0x1, %esi
callq 0x2a4f0
movq -0x8(%rbp), %rdi
movl $0x64, %esi
callq 0x84a0
movq -0x8(%rbp), %rdi
callq 0x3e970
movq %rax, %rdi
movq -0x40(%rbp), %rax
movw 0x1a(%rax), %cx
movq -0x40(%rbp), %rax
movswl %cx, %esi
movswl 0x16(%rax), %edx
callq 0x71f0
movq -0x8(%rbp), %rdi
callq 0x32b00
movq -0x8(%rbp), %rdi
callq 0x334a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)