// File: mh0fm4[P]SCDC/src/components/dataprov/dataprov_relay.cc
// Function: scdc_dataprov_relay::relay_put(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>>&)
bool scdc_dataprov_relay::relay_put(const std::string &path, const std::string &url, std::string &r)
{
  SCDC_TRACE("relay_put: path: '" << path << "', url: '" << url << "'");

  scdcint_t i = 0;

  r = path;

  while (relay.find(r) != relay.end())
  {
    char s[64];
    sprintf(s, "_%" scdcint_fmt, i);

    r = path + s;

    ++i;
  }

  pair<relay_t::iterator, bool> ret = relay.insert(relay_t::value_type(r, url));

  if (!ret.second)
  {
    SCDC_FAIL("relay_put: inserting relay entry '" << r << "' failed");
    return false;
  }

  reg_put(url);

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
jmp 0x33fd8
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdi
callq 0xc070
movq -0x118(%rbp), %rdi
addq $0x98, %rdi
movq -0x28(%rbp), %rsi
callq 0x34e40
movq -0x118(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0x98, %rdi
callq 0x349b0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x34980
testb $0x1, %al
jne 0x34032
jmp 0x34089
leaq -0x80(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x72918(%rip), %rsi     # 0xa6959
movb $0x0, %al
callq 0xc0f0
movq -0x18(%rbp), %rsi
leaq -0x80(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x31740
movq -0x28(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xc850
leaq -0xa0(%rbp), %rdi
callq 0xc3e0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x33fed
movq -0x118(%rbp), %rax
addq $0x98, %rax
movq %rax, -0x138(%rbp)
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x34eb0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x34e70
movb %dl, -0x121(%rbp)
movq %rax, -0x120(%rbp)
jmp 0x340da
movb -0x121(%rbp), %al
movq -0x120(%rbp), %rcx
movq %rcx, -0x110(%rbp)
movb %al, -0x108(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0xb0(%rbp)
movb -0x108(%rbp), %al
movb %al, -0xa8(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x34f10
testb $0x1, -0xa8(%rbp)
jne 0x341f0
jmp 0x34129
leaq 0xa0578(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x341e8
leaq 0xa055f(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
leaq 0xa0550(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x72046(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, %rdi
leaq 0x72718(%rip), %rsi     # 0xa6891
callq 0xc670
movq %rax, %rdi
leaq 0x727d7(%rip), %rsi     # 0xa695f
callq 0xc670
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, %rdi
leaq 0x73d69(%rip), %rsi     # 0xa7f0c
callq 0xc670
movq %rax, %rdi
movq 0x9fe0e(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
leaq 0xa04ea(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x341e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x34f10
jmp 0x34212
jmp 0x341ea
movb $0x0, -0x1(%rbp)
jmp 0x34204
movq -0x118(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30aa0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0xcba0
nop