// File: jliesch[P]ofxget/ofxget.cc
// Function: ofxget::OfxGetContext::request[abi:cxx11]()
string OfxGetContext::request() {
  if (is_error()) return "";
  string subbed = request_template_;
  for (std::size_t i = 0; i < subbed.size(); i++) {
    if (subbed[i] == '$') {
      std::size_t j;
      for (j = i + 1; j < subbed.size(); j++) {
        if (!isupper(subbed[j])) {
          break;
        }
      }
      string var = subbed.substr(i + 1, j - i - 1);
      VarsMap::const_iterator it = vars_map_.find(var);
      if (it != vars_map_.end()) {
        subbed.replace(i, j - i, it->second);
      } else {
        error_string_ = "Unspecified variable: " + var;
        return "";
      }
    }
  }
  return subbed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0xd8(%rbp)
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0xad00
testb $0x1, %al
jne 0x9daa
jmp 0x9dfe
leaq -0x11(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x78f0
movq -0xd8(%rbp), %rdi
movq -0xe0(%rbp), %rdx
leaq 0x5f33a(%rip), %rsi     # 0x69109
callq 0x77b0
jmp 0x9dd6
leaq -0x11(%rbp), %rdi
callq 0x7b70
jmp 0xa0e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x7b70
jmp 0xa0f7
movq -0xc8(%rbp), %rsi
addq $0x50, %rsi
leaq -0x48(%rbp), %rdi
callq 0x7110
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x7290
movq %rax, %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
jae 0xa0b7
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x7ab0
movq %rax, -0xf0(%rbp)
jmp 0x9e57
movq -0xf0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0xa0a4
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x7290
movq %rax, %rcx
movq -0xf8(%rbp), %rax
cmpq %rcx, %rax
jae 0x9ee6
movq -0x58(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x7ab0
movq %rax, -0x100(%rbp)
jmp 0x9eaf
movq -0x100(%rbp), %rax
movsbl (%rax), %edi
callq 0x78c0
cmpl $0x0, %eax
jne 0x9ed6
jmp 0x9ee6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xa0dc
jmp 0x9ed8
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x9e76
movq -0x50(%rbp), %rcx
movq %rcx, %rdx
incq %rdx
movq -0x58(%rbp), %rax
notq %rcx
addq %rax, %rcx
leaq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x7940
jmp 0x9f09
movq -0xc8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xb480
movq %rax, -0x108(%rbp)
jmp 0x9f22
movq -0x108(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xb4b0
movq -0xc8(%rbp), %rdi
callq 0xb500
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xb4b0
leaq -0x80(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xb4d0
testb $0x1, %al
jne 0x9f7c
jmp 0x9fd4
movq -0x50(%rbp), %rcx
movq %rcx, -0x118(%rbp)
movq -0x58(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x110(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xb530
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
movq %rax, %rcx
addq $0x20, %rcx
leaq -0x48(%rbp), %rdi
callq 0x7900
jmp 0x9fbe
jmp 0xa078
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xa099
leaq 0x5f12f(%rip), %rsi     # 0x6910a
leaq -0xb8(%rbp), %rdi
leaq -0x78(%rbp), %rdx
callq 0xaef0
jmp 0x9fed
movq -0xc8(%rbp), %rdi
addq $0x30, %rdi
leaq -0xb8(%rbp), %rsi
movq %rsi, -0x128(%rbp)
callq 0x74e0
movq -0x128(%rbp), %rdi
callq 0x7b88
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x78f0
movq -0xd8(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0x5f0ca(%rip), %rsi     # 0x69109
callq 0x77b0
jmp 0xa046
leaq -0xb9(%rbp), %rdi
callq 0x7b70
movl $0x1, -0xc0(%rbp)
jmp 0xa082
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xb9(%rbp), %rdi
callq 0x7b70
jmp 0xa099
movl $0x0, -0xc0(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x7b88
movl -0xc0(%rbp), %eax
testl %eax, %eax
jne 0xa0d1
jmp 0xa097
jmp 0xa0a4
leaq -0x78(%rbp), %rdi
callq 0x7b88
jmp 0xa0dc
jmp 0xa0a6
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x9e1a
movq -0xd8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x78a0
movl $0x1, -0xc0(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x7b88
jmp 0xa0e7
leaq -0x48(%rbp), %rdi
callq 0x7b88
jmp 0xa0f7
movq -0xd0(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x7600