// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
leaq 0x14(%rdi), %rax
leaq 0x24(%rdi), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq (%rsi), %rdx
movq 0x8(%rsi), %rsi
xorl %r8d, %r8d
leaq 0x319f5(%rip), %r9      # 0x43190
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl $0x1, %r11d
xorl %ebx, %ebx
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpq %r8, %rsi
je 0x1189d
movzbl (%rdx,%r8), %r15d
addl $-0x42, %r15d
cmpl $0x34, %r15d
ja 0x11895
movslq (%r9,%r15,4), %r15
addq %r9, %r15
jmpq *%r15
orl $-0x1, (%rdi)
movl %r10d, %r14d
jmp 0x11895
orl $-0x1, 0x1c(%rdi)
jmp 0x11895
orl $-0x1, 0x2c(%rdi)
jmp 0x11895
orl $-0x1, 0x8(%rdi)
jmp 0x11895
movl $0x1, (%rdi)
movl %r11d, %r14d
jmp 0x11895
orl $-0x1, 0x4(%rdi)
jmp 0x11895
orl $-0x1, 0x20(%rdi)
jmp 0x11895
movl $0x1, 0x8(%rdi)
jmp 0x11895
movl $0x1, (%rax)
movl %r11d, %ebx
jmp 0x11895
movl $0x1, 0x2c(%rdi)
jmp 0x11895
movl $0x1, 0x4(%rdi)
jmp 0x11895
movl $0x1, 0x18(%rdi)
jmp 0x11895
movl $0x1, 0x1c(%rdi)
jmp 0x11895
orl $-0x1, 0xc(%rdi)
jmp 0x11895
orl $-0x1, 0x10(%rdi)
jmp 0x11895
movl $0x1, 0xc(%rdi)
jmp 0x11895
movl $0x1, 0x10(%rdi)
jmp 0x11895
movl $0x1, (%rcx)
movl %r11d, %ebp
jmp 0x11895
movl $0x1, 0x20(%rdi)
jmp 0x11895
orl $-0x1, 0x18(%rdi)
jmp 0x11895
orl $-0x1, (%rax)
movl %r10d, %ebx
jmp 0x11895
orl $-0x1, (%rcx)
movl %r10d, %ebp
incq %r8
jmp 0x117ae
testl %r14d, %r14d
js 0x118bb
sete %al
testl %ebp, %ebp
sete %dl
orb %al, %dl
movq %rcx, %rax
jne 0x118b4
orl $-0x1, (%rax)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %ebx, %ebx
jne 0x118b1
jmp 0x118b4
nop