// File: ATOMIC-LICHESS[P]ATOMKRAFT/uci.cpp
// Function: (anonymous namespace)::set_option(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&)
void set_option(UCIParser& up) {

    string token, name;
    string value = "true"; // UCI buttons don't have a "value" field

    up >> token; // Consume "name" token
    up >> name;  // Read option name

    // Handle names with included spaces
    while (up >> token && token != "value")
        name += " " + token;

    up >> value; // Read option value

    // Handle values with included spaces
    while (up >> token)
        value += " " + token;

    if (Options.find(name) != Options.end())
        Options[name].set_value(value);
    else
        cout << "No such option: " << name << endl;
  }

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x110(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x6730
leaq 0xd0(%rsp), %rdi
callq 0x6730
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x6980
movq 0x40(%rsp), %rdx
leaq 0x6aa8(%rip), %rsi      # 0x59f5f
leaq 0xb0(%rsp), %rdi
callq 0x12070
jmp 0x534c6
leaq 0xaf(%rsp), %rdi
callq 0x6550
movq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6680
jmp 0x534ea
movq 0x110(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x6680
jmp 0x53501
jmp 0x53503
movq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6680
movq %rax, 0x38(%rsp)
jmp 0x5351f
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, 0x37(%rsp)
jmp 0x53539
movb 0x37(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x36(%rsp)
jne 0x5354a
jmp 0x5356e
leaq 0x8929(%rip), %rsi      # 0x5be7a
leaq 0xf0(%rsp), %rdi
callq 0x4ee40
movb %al, 0x35(%rsp)
jmp 0x53564
movb 0x35(%rsp), %al
movb %al, 0x36(%rsp)
jmp 0x5356e
movb 0x36(%rsp), %al
testb $0x1, %al
jne 0x5357b
jmp 0x5361b
leaq 0x5fde(%rip), %rsi      # 0x59560
leaq 0x78(%rsp), %rdi
leaq 0xf0(%rsp), %rdx
callq 0x3e080
jmp 0x53596
leaq 0xd0(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x6690
jmp 0x535aa
leaq 0x78(%rsp), %rdi
callq 0x6a78
jmp 0x53503
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xaf(%rsp), %rdi
callq 0x6550
jmp 0x537d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x537c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x6a78
jmp 0x537c3
movq 0x110(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x6680
jmp 0x53632
jmp 0x53634
movq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6680
movq %rax, 0x28(%rsp)
jmp 0x53650
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, 0x27(%rsp)
jmp 0x5366a
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x53674
jmp 0x536d2
leaq 0x5ee5(%rip), %rsi      # 0x59560
leaq 0x58(%rsp), %rdi
leaq 0xf0(%rsp), %rdx
callq 0x3e080
jmp 0x5368f
leaq 0xb0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x6690
jmp 0x536a3
leaq 0x58(%rsp), %rdi
callq 0x6a78
jmp 0x53634
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x6a78
jmp 0x537c3
leaq 0x3a9b4f(%rip), %rdi    # 0x3fd228
leaq 0xd0(%rsp), %rsi
callq 0x53940
movq %rax, 0x18(%rsp)
jmp 0x536ed
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x3a9b2a(%rip), %rdi    # 0x3fd228
callq 0x28370
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x53920
testb $0x1, %al
jne 0x5371d
jmp 0x5374e
leaq 0x3a9b04(%rip), %rdi    # 0x3fd228
leaq 0xd0(%rsp), %rsi
callq 0x28210
movq %rax, 0x10(%rsp)
jmp 0x53738
movq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x56710
jmp 0x5374c
jmp 0x53794
movq 0x18863(%rip), %rdi     # 0x6bfb8
leaq 0x8724(%rip), %rsi      # 0x5be80
callq 0x64b0
movq %rax, 0x8(%rsp)
jmp 0x53768
movq 0x8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x6420
movq %rax, (%rsp)
jmp 0x53780
movq (%rsp), %rdi
movq 0x18805(%rip), %rsi     # 0x6bf90
callq 0x6520
jmp 0x53792
jmp 0x53794
leaq 0xb0(%rsp), %rdi
callq 0x6a78
leaq 0xd0(%rsp), %rdi
callq 0x6a78
leaq 0xf0(%rsp), %rdi
callq 0x6a78
addq $0x118, %rsp            # imm = 0x118
retq
leaq 0xb0(%rsp), %rdi
callq 0x6a78
leaq 0xd0(%rsp), %rdi
callq 0x6a78
leaq 0xf0(%rsp), %rdi
callq 0x6a78
movq 0xa0(%rsp), %rdi
callq 0x6970
nopw (%rax,%rax)