// File: /workspace/github_cpp_makefile_star2_O3/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 0x22408
movq (%rbx), %rdx
leaq 0x190(%rsp), %rdi
movq %r14, %rsi
movl $0x74, %ecx
callq 0x2301c
leaq 0x190(%rsp), %rdi
callq 0x223e0
testb %al, %al
je 0xb960
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x24c85(%rip), %rsi     # 0x300b7
leaq 0x1a8(%rsp), %rdi
callq 0x1d6e8
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %r15
leaq 0x38(%rsp), %r14
movq %rax, 0x48(%rsp)
movq %rdi, %r12
callq 0x1d638
testq %rax, %rax
je 0xb93c
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x60(%rsp)
movb %cl, 0x68(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rcx, 0x80(%rsp)
movb %cl, 0x88(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq %rcx, 0xa0(%rsp)
movb %cl, 0xa8(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq %rcx, 0xc0(%rsp)
movb %cl, 0xc8(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq %rcx, 0xe8(%rsp)
movb %cl, 0xf0(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
movq %rcx, 0x108(%rsp)
movb %cl, 0x110(%rsp)
leaq 0x130(%rsp), %rax
movq %rax, 0x120(%rsp)
movq %rcx, 0x128(%rsp)
movb %cl, 0x130(%rsp)
leaq 0x150(%rsp), %rax
movq %rax, 0x140(%rsp)
movq %rcx, 0x148(%rsp)
movb %cl, 0x150(%rsp)
movl $0x0, 0x168(%rsp)
movq %rcx, 0x170(%rsp)
leaq 0x168(%rsp), %rax
movq %rax, 0x178(%rsp)
movq %rax, 0x180(%rsp)
movq %rcx, 0x188(%rsp)
movq %r12, %rdi
leaq 0x24b58(%rip), %rsi     # 0x300e4
callq 0x1d828
movq %rax, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x1ccfe
movl %eax, 0x50(%rsp)
movq %r12, %rdi
leaq 0x28729(%rip), %rsi     # 0x33cd7
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0x60(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x24b7e(%rip), %rsi     # 0x3016d
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0xc0(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x24aad(%rip), %rsi     # 0x300e3
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0x80(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x24a65(%rip), %rsi     # 0x300df
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0xa0(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x24a26(%rip), %rsi     # 0x300e7
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0x128(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x249e8(%rip), %rsi     # 0x300f0
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0x148(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0x140(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x24dda(%rip), %rsi     # 0x30529
callq 0x1d6e8
movq %rax, 0x38(%rsp)
movq %r14, %rdi
callq 0x1da3e
movq %rax, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x21b44
movl %eax, 0xd8(%rsp)
movq %r12, %rdi
leaq 0x24db0(%rip), %rsi     # 0x30531
callq 0x1d6e8
movq %rax, 0x38(%rsp)
movq %r14, %rdi
callq 0x1da3e
movq %rax, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x21b44
movl %eax, 0xdc(%rsp)
movq %r12, %rdi
leaq 0x24d86(%rip), %rsi     # 0x30539
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0xe8(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0xe0(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x24d51(%rip), %rsi     # 0x3054b
callq 0x1d6e8
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1da42
movq %rax, %rbp
movq 0x108(%rsp), %r13
movq %rax, %rdi
callq 0x6270
leaq 0x100(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq %r12, %rdi
leaq 0x24d1c(%rip), %rsi     # 0x3055d
callq 0x1d6e8
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1d66a
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1d67a
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x220ca
testb %al, %al
je 0xb90c
movq %r14, %rdi
callq 0x22114
movq %rax, %rdi
callq 0x1ce30
movq %rax, %rbp
movq %r14, %rdi
callq 0x22114
movq %rax, %rdi
callq 0x1ce0c
movq %r15, %rdi
movq %rax, %rsi
leaq 0x7(%rsp), %rdx
callq 0x66c0
leaq 0x160(%rsp), %rdi
movq %r15, %rsi
callq 0x9e46
movq %rax, %r13
movq 0x8(%rax), %rbx
movq %rbp, %rdi
callq 0x6270
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x6350
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb8ff
callq 0x63b0
movq %r14, %rdi
callq 0x2213e
jmp 0xb85f
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xc594
leaq 0x50(%rsp), %rdi
callq 0xc5c4
movq %r12, %rdi
leaq 0x24788(%rip), %rsi     # 0x300b7
callq 0x1d86c
movq %r12, %rdi
jmp 0xb44e
leaq 0x1a8(%rsp), %rdi
callq 0x22494
movq 0x8(%rsp), %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x6260
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
leaq 0x24b91(%rip), %rsi     # 0x3050c
leaq 0x24ba6(%rip), %rdx     # 0x30528
movq %r14, %rdi
callq 0xa246
leaq 0x39b8f(%rip), %rsi     # 0x45520
movq 0x3a600(%rip), %rdx     # 0x45f98
movq %r14, %rdi
callq 0x6420
jmp 0xb9b1
movq %rax, %rbx
movq %r14, %rdi
callq 0x6600
jmp 0xba0d
jmp 0xb9ba
movq %rax, %rbx
jmp 0xba0d
jmp 0xb9ba
jmp 0xb9f6
movq %rax, %rbx
jmp 0xba03
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xb9f9
callq 0x63b0
jmp 0xb9f9
jmp 0xb9f6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xc5c4
movq 0x8(%rsp), %rdi
callq 0xc680
leaq 0x1a8(%rsp), %rdi
callq 0x22494
movq %rbx, %rdi
callq 0x6430