// File: knei-knurow[P]lidar-visualizations/src/app.cpp
// Function: App::get_arg_value(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string App::get_arg_value(std::vector<std::string>& all_args,
                               const std::string& short_arg,
                               const std::string& long_arg,
                               const std::string& default_value) {
  auto it = std::find_if(
      all_args.begin(), all_args.end(),
      [short_arg, long_arg](const std::string& s) { return s == short_arg || s == long_arg; });

  std::string value = default_value;
  if (it == all_args.end()) {
  } else if (it + 1 == all_args.end()) {
    all_args.erase(it);
  } else {
    value = *(it + 1);
    all_args.erase(it, it + 2);
  }
  return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x100(%rbp)
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5530
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5370
movq %rax, -0x48(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
movq -0x20(%rbp), %rsi
callq 0x4170
leaq -0x68(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4170
jmp 0x7144
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x73a0
movq %rax, -0x108(%rbp)
jmp 0x7161
movq -0x108(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x7490
movq -0x100(%rbp), %rdi
movb $0x0, -0x95(%rbp)
movq -0x30(%rbp), %rsi
callq 0x4170
movq -0x18(%rbp), %rdi
callq 0x5370
movq %rax, -0xa0(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x81c0
testb $0x1, %al
jne 0x71b5
jmp 0x7200
jmp 0x735d
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
callq 0x4230
jmp 0x7389
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x7490
jmp 0x7389
leaq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x82b0
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5370
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x81c0
testb $0x1, %al
jne 0x723e
jmp 0x72ab
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x8270
movq -0x118(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x8200
movq %rax, -0x110(%rbp)
jmp 0x7275
movq -0x110(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0x735b
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
callq 0x4230
jmp 0x7389
leaq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x82b0
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x5a20
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x4040
jmp 0x72dd
movq -0x18(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movq %rsi, -0x130(%rbp)
callq 0x8270
movq -0x130(%rbp), %rdi
movl $0x2, %esi
callq 0x82b0
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x8270
movq -0x128(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x82f0
movq %rax, -0x120(%rbp)
jmp 0x734d
movq -0x120(%rbp), %rax
movq %rax, -0xe8(%rbp)
jmp 0x735d
movb $0x1, -0x95(%rbp)
testb $0x1, -0x95(%rbp)
jne 0x7379
movq -0x100(%rbp), %rdi
callq 0x4230
movq -0xf8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x4610
nopw %cs:(%rax,%rax)