// File: /workspace/github_c_makefile_star2_O1/vanhauser-thc[P]vulntest/andreas.cpp
// Function: main
int main(int argc, char *argv[]) {
  std::cout << "admin user does something" << std::endl;
  WebRequestForm admin_request = {"admin", "TopSecret", 5000.0};
  WebRequest(admin_request);
  std::cout << "\n\n--- some time is passing ---\n\n" << std::endl;
  std::cout << "attacker does something" << std::endl;
  double d = strtod(argv[3], NULL);
  std::string arg1(argv[1]);
  std::string arg2(argv[2]);
  WebRequestForm attacker_request = {arg1, arg2, d};
  WebRequest(attacker_request);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq 0x28af(%rip), %r14      # 0x4fd8
leaq 0x9b4(%rip), %rsi       # 0x30e4
movl $0x19, %edx
movq %r14, %rdi
callq 0x2110
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x987(%rip), %rsi       # 0x30fe
leaq 0x985(%rip), %rdx       # 0x3103
leaq 0x90(%rsp), %rdi
callq 0x2bc6
leaq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x95d(%rip), %rsi       # 0x3104
leaq 0x95f(%rip), %rdx       # 0x310d
callq 0x2bc6
movabsq $0x40b3880000000000, %rax # imm = 0x40B3880000000000
leaq 0x90(%rsp), %rdi
movq %rax, 0x40(%rdi)
callq 0x2389
movq 0x2803(%rip), %r14      # 0x4fd8
leaq 0x932(%rip), %rsi       # 0x310e
movl $0x20, %edx
movq %r14, %rdi
callq 0x2110
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq 0x27d1(%rip), %rdi      # 0x4fd8
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq 0x27bd(%rip), %r14      # 0x4fd8
leaq 0x90d(%rip), %rsi       # 0x312f
movl $0x17, %edx
movq %r14, %rdi
callq 0x2110
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq 0x278b(%rip), %rdi      # 0x4fd8
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x20c0
movsd %xmm0, (%rsp)
movq 0x8(%rbx), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x2a3a
movq 0x10(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x2a3a
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x2b36
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
callq 0x2b36
leaq 0x48(%rsp), %rdi
movsd (%rsp), %xmm0
movsd %xmm0, 0x40(%rdi)
callq 0x2389
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x28fb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2100
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x2912
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2100
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x292d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2100
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2948
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2100
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2965
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2100
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x2982
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x2100
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2b00
jmp 0x29c1
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x29c1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x29c1
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x29e1
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a25
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x2a25
jmp 0x2a22
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a32
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x2a32
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x2b00
movq %rbx, %rdi
callq 0x2140