// File: fulhax[P]ncpamixer/src/ui/ui.cpp
// Function: Ui::switchTab(int)
void Ui::switchTab(int index)
{
    if (disconnect) {
        return;
    }

    delete current_tab;

    tab_index = index;

    switch (index) {
        default:
        case TAB_PLAYBACK:
            tab_index = TAB_PLAYBACK;
            current_tab = new Playback();
            break;

        case TAB_RECORDING:
            current_tab = new Recording();
            break;

        case TAB_OUTPUT:
            current_tab = new Output();
            break;

        case TAB_INPUT:
            current_tab = new Input();
            break;

        case -1:
        case TAB_CONFIGURATION:
            tab_index = TAB_CONFIGURATION;
            current_tab = new Configuration();
            break;
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x40(%rsp)
testb $0x1, 0x105(%rax)
je 0x15a35
jmp 0x15c45
movq 0x40(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x15a57
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x130(%rax)
movl 0x5c(%rsp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, 0x30(%rsp)
subl $0x5, %eax
ja 0x15a8d
movq 0x30(%rsp), %rax
leaq 0xbc50(%rip), %rcx      # 0x216d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x15a8f
movq 0x40(%rsp), %rax
movl $0x0, 0x130(%rax)
movl $0x28, %edi
callq 0x76a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
callq 0x1eb60
jmp 0x15aba
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x138(%rax)
jmp 0x15c45
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x28, %esi
callq 0x76c0
jmp 0x15c4a
movl $0x28, %edi
callq 0x76a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
callq 0x1ec60
jmp 0x15b0e
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x138(%rax)
jmp 0x15c45
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x28, %esi
callq 0x76c0
jmp 0x15c4a
movl $0x28, %edi
callq 0x76a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
callq 0x1ed60
jmp 0x15b62
movq 0x40(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x138(%rax)
jmp 0x15c45
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x28, %esi
callq 0x76c0
jmp 0x15c4a
movl $0x28, %edi
callq 0x76a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
callq 0x1ee60
jmp 0x15bb6
movq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x138(%rax)
jmp 0x15c45
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x28, %esi
callq 0x76c0
jmp 0x15c4a
movq 0x40(%rsp), %rax
movl $0x4, 0x130(%rax)
movl $0x28, %edi
callq 0x76a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x1ef60
jmp 0x15c13
movq 0x40(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x138(%rax)
jmp 0x15c45
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x28, %esi
callq 0x76c0
jmp 0x15c4a
addq $0x68, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x7c40
nopw %cs:(%rax,%rax)