// File: flightaware[P]beast-splitter/beast_settings.cc
// Function: beast::Settings::Settings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Settings::Settings(const std::string &str) {
        // starts with everything dontcare

        for (char ch : str) {
            switch (ch) {
            case 'B':
                radarcape = false;
                break; // no equivalent dipswitch
            case 'R':
                radarcape = true;
                break; // no equivalent dipswitch
            case 'c':
                binary_format = false;
                break;
            case 'C':
                binary_format = true;
                break;
            case 'd':
                filter_11_17_18 = false;
                break;
            case 'D':
                filter_11_17_18 = true;
                break;
            case 'e':
                avrmlat = false;
                break;
            case 'E':
                avrmlat = true;
                break;
            case 'f':
                crc_disable = false;
                break;
            case 'F':
                crc_disable = true;
                break;
            case 'g':
                gps_timestamps = false;
                break;
            case 'G':
                gps_timestamps = true;
                break;
            case 'h':
                rts_handshake = false;
                break;
            case 'H':
                rts_handshake = true;
                break;
            case 'i':
                fec_disable = false;
                break;
            case 'I':
                fec_disable = true;
                break;
            case 'j':
                modeac_enable = false;
                break;
            case 'J':
                modeac_enable = true;
                break;
            case 'k':
                filter_0_4_5 = false;
                break; // this is g/G on the Beast, but we separate it out
            case 'K':
                filter_0_4_5 = true;
                break;
            case 'v':
                verbatim = false;
                break;
            case 'V':
                verbatim = true;
                break;
            }
        }

        // ensure settings are selfconsistent
        if (radarcape.off() && !gps_timestamps.dontcare())
            gps_timestamps = false;
        else if (radarcape.on() && !filter_0_4_5.dontcare())
            filter_0_4_5 = false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x1ad10
movq -0x38(%rbp), %rdi
addq $0x4, %rdi
callq 0x1ad30
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x1ad50
movq -0x38(%rbp), %rdi
addq $0xc, %rdi
callq 0x1ad70
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
callq 0x1ad90
movq -0x38(%rbp), %rdi
addq $0x14, %rdi
callq 0x1adb0
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
callq 0x1add0
movq -0x38(%rbp), %rdi
addq $0x1c, %rdi
callq 0x1adf0
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
callq 0x1ae10
movq -0x38(%rbp), %rdi
addq $0x24, %rdi
callq 0x1ae30
movq -0x38(%rbp), %rdi
addq $0x28, %rdi
callq 0x1ae50
movq -0x38(%rbp), %rdi
addq $0x2c, %rdi
callq 0x1ae70
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x127d0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x13070
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1b0d0
testb $0x1, %al
jne 0x19d04
jmp 0x19f06
leaq -0x20(%rbp), %rdi
callq 0x1b110
movb (%rax), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
addl $-0x42, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x34, %eax
ja 0x19ef6
movq -0x40(%rbp), %rax
leaq 0x993a9(%rip), %rcx     # 0xb30dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x1b130
jmp 0x19ef6
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x1b130
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x4, %rdi
xorl %esi, %esi
callq 0x1b160
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x4, %rdi
movl $0x1, %esi
callq 0x1b160
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x1b070
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x1b070
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0xc, %rdi
xorl %esi, %esi
callq 0x1b190
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0xc, %rdi
movl $0x1, %esi
callq 0x1b190
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x1b1c0
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
movl $0x1, %esi
callq 0x1b1c0
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x14, %rdi
xorl %esi, %esi
callq 0x1b1f0
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x14, %rdi
movl $0x1, %esi
callq 0x1b1f0
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
callq 0x1b220
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
movl $0x1, %esi
callq 0x1b220
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x1c, %rdi
xorl %esi, %esi
callq 0x1b250
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x1c, %rdi
movl $0x1, %esi
callq 0x1b250
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
xorl %esi, %esi
callq 0x1b280
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
movl $0x1, %esi
callq 0x1b280
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x24, %rdi
xorl %esi, %esi
callq 0x1b2b0
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x24, %rdi
movl $0x1, %esi
callq 0x1b2b0
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x2c, %rdi
xorl %esi, %esi
callq 0x1b0a0
jmp 0x19ef6
movq -0x38(%rbp), %rdi
addq $0x2c, %rdi
movl $0x1, %esi
callq 0x1b0a0
jmp 0x19ef8
leaq -0x20(%rbp), %rdi
callq 0x1b2e0
jmp 0x19cee
movq -0x38(%rbp), %rdi
callq 0x1b300
testb $0x1, %al
jne 0x19f15
jmp 0x19f37
movq -0x38(%rbp), %rdi
addq $0x14, %rdi
callq 0x1b320
testb $0x1, %al
jne 0x19f37
movq -0x38(%rbp), %rdi
addq $0x14, %rdi
xorl %esi, %esi
callq 0x1b1f0
jmp 0x19f68
movq -0x38(%rbp), %rdi
callq 0x1b340
testb $0x1, %al
jne 0x19f46
jmp 0x19f66
movq -0x38(%rbp), %rdi
addq $0x24, %rdi
callq 0x1b360
testb $0x1, %al
jne 0x19f66
movq -0x38(%rbp), %rdi
addq $0x24, %rdi
xorl %esi, %esi
callq 0x1b2b0
jmp 0x19f68
addq $0x40, %rsp
popq %rbp
retq
nop