// File: /workspace/github_c_makefile_star2_O3/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 0x28e5(%rip), %r14      # 0x4fd8
leaq 0x9ea(%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 0x9bd(%rip), %rsi       # 0x30fe
leaq 0x9bb(%rip), %rdx       # 0x3103
leaq 0x90(%rsp), %rdi
callq 0x2b96
leaq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x993(%rip), %rsi       # 0x3104
leaq 0x995(%rip), %rdx       # 0x310d
callq 0x2b96
movabsq $0x40b3880000000000, %rax # imm = 0x40B3880000000000
leaq 0x90(%rsp), %rdi
movq %rax, 0x40(%rdi)
callq 0x2389
movq 0x2839(%rip), %r14      # 0x4fd8
leaq 0x968(%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 0x2807(%rip), %rdi      # 0x4fd8
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq 0x27f3(%rip), %r14      # 0x4fd8
leaq 0x943(%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 0x27c1(%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 0x2a04
movq 0x10(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x2a04
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x2b00
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
callq 0x2b00
leaq 0x48(%rsp), %rdi
movsd (%rsp), %xmm0
movsd %xmm0, 0x40(%rdi)
callq 0x2389
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x28c5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2100
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x28dc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2100
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28f7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2100
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2912
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2100
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x292f
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2100
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x294c
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 0x2aca
jmp 0x298b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x298b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x298b
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29ab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x29ab
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29ef
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x29ef
jmp 0x29ec
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x29fc
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x2100
jmp 0x29fc
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x2aca
movq %rbx, %rdi
callq 0x2140