// File: Ciaxur[P]yagb-emu/include/imgui/imgui_tables.cpp
// Function: TableSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void*, char const*)
static void TableSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void* entry, const char* line)
{
    // "Column 0  UserID=0x42AD2D21 Width=100 Visible=1 Order=0 Sort=0v"
    ImGuiTableSettings* settings = (ImGuiTableSettings*)entry;
    float f = 0.0f;
    int column_n = 0, r = 0, n = 0;

    if (sscanf(line, "RefScale=%f", &f) == 1) { settings->RefScale = f; return; }

    if (sscanf(line, "Column %d%n", &column_n, &r) == 1)
    {
        if (column_n < 0 || column_n >= settings->ColumnsCount)
            return;
        line = ImStrSkipBlank(line + r);
        char c = 0;
        ImGuiTableColumnSettings* column = settings->GetColumnSettings() + column_n;
        column->Index = (ImGuiTableColumnIdx)column_n;
        if (sscanf(line, "UserID=0x%08X%n", (ImU32*)&n, &r)==1) { line = ImStrSkipBlank(line + r); column->UserID = (ImGuiID)n; }
        if (sscanf(line, "Width=%d%n", &n, &r) == 1)            { line = ImStrSkipBlank(line + r); column->WidthOrWeight = (float)n; column->IsStretch = 0; settings->SaveFlags |= ImGuiTableFlags_Resizable; }
        if (sscanf(line, "Weight=%f%n", &f, &r) == 1)           { line = ImStrSkipBlank(line + r); column->WidthOrWeight = f; column->IsStretch = 1; settings->SaveFlags |= ImGuiTableFlags_Resizable; }
        if (sscanf(line, "Visible=%d%n", &n, &r) == 1)          { line = ImStrSkipBlank(line + r); column->IsEnabled = (ImU8)n; settings->SaveFlags |= ImGuiTableFlags_Hideable; }
        if (sscanf(line, "Order=%d%n", &n, &r) == 1)            { line = ImStrSkipBlank(line + r); column->DisplayOrder = (ImGuiTableColumnIdx)n; settings->SaveFlags |= ImGuiTableFlags_Reorderable; }
        if (sscanf(line, "Sort=%d%c%n", &n, &c, &r) == 2)       { line = ImStrSkipBlank(line + r); column->SortOrder = (ImGuiTableColumnIdx)n; column->SortDirection = (c == '^') ? ImGuiSortDirection_Descending : ImGuiSortDirection_Ascending; settings->SaveFlags |= ImGuiTableFlags_Sortable; }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x5a0ac(%rip), %rsi     # 0x18dc04
leaq -0x2c(%rbp), %rdx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0x133b7b
movss -0x2c(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x8(%rax)
jmp 0x133e0b
movq -0x20(%rbp), %rdi
leaq 0x5a08a(%rip), %rsi     # 0x18dc10
leaq -0x30(%rbp), %rdx
leaq -0x34(%rbp), %rcx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0x133e0b
cmpl $0x0, -0x30(%rbp)
jl 0x133bb3
movl -0x30(%rbp), %eax
movq -0x28(%rbp), %rcx
movsbl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jl 0x133bb8
jmp 0x133e0b
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0xc4ce0
movq %rax, -0x20(%rbp)
movb $0x0, -0x39(%rbp)
movq -0x28(%rbp), %rdi
callq 0x137910
movslq -0x30(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0x30(%rbp), %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rdi
leaq 0x5a01d(%rip), %rsi     # 0x18dc1c
leaq -0x38(%rbp), %rdx
leaq -0x34(%rbp), %rcx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0x133c31
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0xc4ce0
movq %rax, -0x20(%rbp)
movl -0x38(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
leaq 0x59ff0(%rip), %rsi     # 0x18dc2c
leaq -0x38(%rbp), %rdx
leaq -0x34(%rbp), %rcx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0x133c8e
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0xc4ce0
movq %rax, -0x20(%rbp)
cvtsi2ssl -0x38(%rbp), %xmm0
movq -0x48(%rbp), %rax
movss %xmm0, (%rax)
movq -0x48(%rbp), %rax
movb 0xb(%rax), %cl
andb $-0x9, %cl
orb $0x0, %cl
movb %cl, 0xb(%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
leaq 0x59f9e(%rip), %rsi     # 0x18dc37
leaq -0x2c(%rbp), %rdx
leaq -0x34(%rbp), %rcx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0x133ceb
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0xc4ce0
movq %rax, -0x20(%rbp)
movss -0x2c(%rbp), %xmm0
movq -0x48(%rbp), %rax
movss %xmm0, (%rax)
movq -0x48(%rbp), %rax
movb 0xb(%rax), %cl
andb $-0x9, %cl
orb $0x8, %cl
movb %cl, 0xb(%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
leaq 0x59f4d(%rip), %rsi     # 0x18dc43
leaq -0x38(%rbp), %rdx
leaq -0x34(%rbp), %rcx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0x133d45
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0xc4ce0
movq %rax, -0x20(%rbp)
movl -0x38(%rbp), %eax
movb %al, %dl
movq -0x48(%rbp), %rax
movb 0xb(%rax), %cl
andb $0x1, %dl
shlb $0x2, %dl
andb $-0x5, %cl
orb %dl, %cl
movb %cl, 0xb(%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
leaq 0x59f00(%rip), %rsi     # 0x18dc50
leaq -0x38(%rbp), %rdx
leaq -0x34(%rbp), %rcx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0x133d91
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0xc4ce0
movq %rax, -0x20(%rbp)
movl -0x38(%rbp), %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
leaq 0x59ebf(%rip), %rsi     # 0x18dc5b
leaq -0x38(%rbp), %rdx
leaq -0x39(%rbp), %rcx
leaq -0x34(%rbp), %r8
movb $0x0, %al
callq 0xd0d0
cmpl $0x2, %eax
jne 0x133e09
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0xc4ce0
movq %rax, -0x20(%rbp)
movl -0x38(%rbp), %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0xa(%rax)
movsbl -0x39(%rbp), %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x5e, %edx
cmovel %ecx, %eax
movb %al, %dl
movq -0x48(%rbp), %rax
movb 0xb(%rax), %cl
andb $0x3, %dl
andb $-0x4, %cl
orb %dl, %cl
movb %cl, 0xb(%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x4(%rax)
jmp 0x133e0b
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)