// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/ofxhome.cc
// Function: ofxget::OfxDumpStringToInstitutions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<Institution> OfxDumpStringToInstitutions(const string& dump) {
  pugi::xml_document doc;
  pugi::xml_parse_result result = doc.load_string(dump.c_str());
  if (!result) {
    throw string("Could not parse institutions");
  }

  vector<Institution> insts;
  for (pugi::xml_node inst = doc.child("institution"); inst; inst = inst.next_sibling("institution")) {
    Institution i;
    i.ofxhome_id = inst.attribute("id").as_int();
    i.name = inst.child("name").child_value();
    i.url = inst.child("url").child_value();
    i.fid = inst.child("fid").child_value();
    i.org = inst.child("org").child_value();
    i.brokerid = inst.child("brokerid").child_value();
    i.bankid = inst.child("bankid").child_value();
    i.ofxfail = inst.child("ofxfail").text().as_int();
    i.sslfail = inst.child("sslfail").text().as_int();
    i.lastofxvalidation = inst.child("lastofxvalidation").child_value();
    i.lastsslvalidation = inst.child("lastsslvalidation").child_value();
    auto profile = inst.child("profile");
    for (pugi::xml_attribute_iterator ait = profile.attributes_begin(); ait != profile.attributes_end(); ++ait)
    {
      i.profile[ait->name()] = ait->value();
    }
    insts.push_back(i);
  }

  return insts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
leaq 0x1a8(%rsp), %r14
movq %r14, %rdi
callq 0x1c754
movq (%rbx), %rdx
leaq 0x190(%rsp), %rdi
pushq $0x74
popq %rcx
movq %r14, %rsi
callq 0x1d2ca
leaq 0x190(%rsp), %rdi
callq 0x1c72c
testb %al, %al
je 0x983f
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x20cb2(%rip), %rsi     # 0x2a0b7
leaq 0x1a8(%rsp), %rdi
callq 0x1878a
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %r15
leaq 0x30(%rsp), %r14
leaq 0x40(%rsp), %r12
leaq 0x7(%rsp), %rbx
movq %rax, 0x48(%rsp)
movq %rdi, %r13
callq 0x186e0
testq %rax, %rax
je 0x981b
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
andq $0x0, 0x60(%rsp)
xorl %ecx, %ecx
movb %cl, 0x68(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
andq $0x0, 0x80(%rsp)
movb %cl, 0x88(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
andq $0x0, 0xa0(%rsp)
movb %cl, 0xa8(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
andq $0x0, 0xc0(%rsp)
movb %cl, 0xc8(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0xe0(%rsp)
andq $0x0, 0xe8(%rsp)
movb %cl, 0xf0(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
andq $0x0, 0x108(%rsp)
movb %cl, 0x110(%rsp)
leaq 0x130(%rsp), %rax
movq %rax, 0x120(%rsp)
andq $0x0, 0x128(%rsp)
movb %cl, 0x130(%rsp)
leaq 0x150(%rsp), %rax
movq %rax, 0x140(%rsp)
andq $0x0, 0x148(%rsp)
movb %cl, 0x150(%rsp)
andl $0x0, 0x168(%rsp)
andq $0x0, 0x170(%rsp)
leaq 0x168(%rsp), %rax
movq %rax, 0x178(%rsp)
movq %rax, 0x180(%rsp)
andq $0x0, 0x188(%rsp)
movq %r13, %rdi
leaq 0x20b74(%rip), %rsi     # 0x2a0e4
callq 0x188c6
movq %rax, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x17f04
movl %eax, 0x50(%rsp)
movq %r13, %rdi
leaq 0x248af(%rip), %rsi     # 0x2de41
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20bb2(%rip), %rsi     # 0x2a16d
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0xb8(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20afc(%rip), %rsi     # 0x2a0e3
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0x78(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20acf(%rip), %rsi     # 0x2a0df
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0x98(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20aab(%rip), %rsi     # 0x2a0e7
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0x120(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20a88(%rip), %rsi     # 0x2a0f0
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0x140(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20e75(%rip), %rsi     # 0x2a509
callq 0x1878a
movq %rax, 0x30(%rsp)
movq %r14, %rdi
callq 0x18af8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x1bf76
movl %eax, 0xd8(%rsp)
movq %r13, %rdi
leaq 0x20e4b(%rip), %rsi     # 0x2a511
callq 0x1878a
movq %rax, 0x30(%rsp)
movq %r14, %rdi
callq 0x18af8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x1bf76
movl %eax, 0xdc(%rsp)
movq %r13, %rdi
leaq 0x20e21(%rip), %rsi     # 0x2a519
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20e07(%rip), %rsi     # 0x2a52b
callq 0x1878a
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x18afc
leaq 0x100(%rsp), %rdi
movq %rax, %rsi
callq 0x6840
movq %r13, %rdi
leaq 0x20ded(%rip), %rsi     # 0x2a53d
callq 0x1878a
movq %rax, 0x40(%rsp)
movq %r12, %rdi
callq 0x18712
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %r12, %rdi
callq 0x18722
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1c454
testb %al, %al
je 0x97eb
movq %r14, %rdi
callq 0x1c49e
movq %rax, %rdi
callq 0x1802e
movq %rax, %rbp
movq %r14, %rdi
callq 0x1c49e
movq %rax, %rdi
callq 0x1800a
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x66e0
leaq 0x160(%rsp), %rdi
movq %r15, %rsi
callq 0x8106
movq %rax, %rdi
movq %rbp, %rsi
callq 0x6840
movq %r15, %rdi
callq 0x6890
movq %r14, %rdi
callq 0x1c4c8
jmp 0x976c
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xa008
leaq 0x50(%rsp), %rdi
callq 0xa038
movq %r13, %rdi
leaq 0x208a9(%rip), %rsi     # 0x2a0b7
callq 0x1890a
movq %r13, %rdi
jmp 0x942b
leaq 0x1a8(%rsp), %rdi
callq 0x1c7de
movq 0x8(%rsp), %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x6250
movq %rax, %r14
leaq 0x20c9b(%rip), %rsi     # 0x2a4ec
leaq 0x50(%rsp), %rdx
movq %rax, %rdi
callq 0x66e0
leaq 0x38cbb(%rip), %rsi     # 0x42520
movq 0x3973c(%rip), %rdx     # 0x42fa8
movq %r14, %rdi
callq 0x6440
jmp 0x9885
movq %rax, %rbx
movq %r14, %rdi
callq 0x6630
jmp 0x98d7
jmp 0x988e
movq %rax, %rbx
jmp 0x98d7
jmp 0x988e
jmp 0x98c0
movq %rax, %rbx
jmp 0x98cd
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
jmp 0x98c0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6890
jmp 0x98c3
jmp 0x98c0
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xa038
movq 0x8(%rsp), %rdi
callq 0xa0a0
leaq 0x1a8(%rsp), %rdi
callq 0x1c7de
movq %rbx, %rdi
callq 0x6460