// File: jliesch[P]ofxget/ofxget.cc
// Function: ofxget::OfxGetContext::GetRequestTemplate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string OfxGetContext::GetRequestTemplate(const string& filename) {
  if (is_error()) return "";
  std::ifstream f(filename);
  if (!f.is_open()) {
    error_string_ = "Could not open " + filename;
    return "";
  }

  string line;
  string request_template;
  while (std::getline(f, line)) {
    request_template += line + "\r\n";
  }

  return request_template;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x2c0(%rbp)
movq %rdi, %rax
movq %rax, -0x2b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0xad00
testb $0x1, %al
jne 0x9a7e
jmp 0x9ad2
leaq -0x19(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x78f0
movq -0x2c0(%rbp), %rdi
movq -0x2c8(%rbp), %rdx
leaq 0x5f666(%rip), %rsi     # 0x69109
callq 0x77b0
jmp 0x9aaa
leaq -0x19(%rbp), %rdi
callq 0x7b70
jmp 0x9d06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x19(%rbp), %rdi
callq 0x7b70
jmp 0x9d16
movq -0x18(%rbp), %rsi
leaq -0x238(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
movl $0x8, %edx
callq 0x79f0
movq -0x2d8(%rbp), %rdi
callq 0x78b0
movb %al, -0x2c9(%rbp)
jmp 0x9b02
movb -0x2c9(%rbp), %al
testb $0x1, %al
jne 0x9bcd
jmp 0x9b12
movq -0x18(%rbp), %rdx
leaq 0x5f5da(%rip), %rsi     # 0x690f7
leaq -0x258(%rbp), %rdi
callq 0xaef0
jmp 0x9b2b
movq -0x2b0(%rbp), %rdi
addq $0x30, %rdi
leaq -0x258(%rbp), %rsi
movq %rsi, -0x2e8(%rbp)
callq 0x74e0
movq -0x2e8(%rbp), %rdi
callq 0x7b88
leaq -0x259(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x78f0
movq -0x2c0(%rbp), %rdi
movq -0x2e0(%rbp), %rdx
leaq 0x5f58c(%rip), %rsi     # 0x69109
callq 0x77b0
jmp 0x9b84
leaq -0x259(%rbp), %rdi
callq 0x7b70
movl $0x1, -0x260(%rbp)
jmp 0x9cea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x9cf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x259(%rbp), %rdi
callq 0x7b70
jmp 0x9cf8
leaq -0x280(%rbp), %rdi
callq 0x7320
movq -0x2c0(%rbp), %rdi
movb $0x0, -0x281(%rbp)
callq 0x7320
leaq -0x238(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x74b0
movq %rax, -0x2f0(%rbp)
jmp 0x9c08
movq -0x2f0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x7340
movb %al, -0x2f1(%rbp)
jmp 0x9c26
movb -0x2f1(%rbp), %al
testb $0x1, %al
jne 0x9c32
jmp 0x9c9c
leaq 0x5f4ce(%rip), %rdx     # 0x69107
leaq -0x2a8(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0xb400
jmp 0x9c4e
movq -0x2c0(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x70d0
jmp 0x9c63
leaq -0x2a8(%rbp), %rdi
callq 0x7b88
jmp 0x9bec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x9cd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x7b88
jmp 0x9cd0
movb $0x1, -0x281(%rbp)
movl $0x1, -0x260(%rbp)
testb $0x1, -0x281(%rbp)
jne 0x9cc2
movq -0x2c0(%rbp), %rdi
callq 0x7b88
leaq -0x280(%rbp), %rdi
callq 0x7b88
jmp 0x9cea
movq -0x2c0(%rbp), %rdi
callq 0x7b88
leaq -0x280(%rbp), %rdi
callq 0x7b88
jmp 0x9cf8
leaq -0x238(%rbp), %rdi
callq 0x7060
jmp 0x9d06
leaq -0x238(%rbp), %rdi
callq 0x7060
jmp 0x9d16
movq -0x2b8(%rbp), %rax
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x7600
nop