// File: /workspace/github_cpp_makefile_star2_O3/solaldunckel[P]webserv/srcs/HTTP/CGI.cpp
// Function: CGI::setCGIEnv()
bool CGI::setCGIEnv() {
  if (config_.getMethod() == "POST") {
		cgi_env_["CONTENT_TYPE"] = req_headers_["Content-Type"];
		cgi_env_["CONTENT_LENGTH"] = ft::to_string(req_body_.length());
	}
	cgi_env_["GATEWAY_INTERFACE"] = "CGI/1.1";
  cgi_env_["PATH_INFO"] = file_path_;
	cgi_env_["PATH_TRANSLATED"] = file_path_;
  cgi_env_["QUERY_STRING"] = config_.getQuery();
  cgi_env_["REMOTE_ADDR"] = config_.getClient().getAddr();

  if (config_.getAuth() != "off") {
    cgi_env_["AUTH_TYPE"] = "Basic";
    cgi_env_["REMOTE_IDENT"] = config_.getAuth().substr(0, config_.getAuth().find(':'));
    cgi_env_["REMOTE_USER"] = config_.getAuth().substr(0, config_.getAuth().find(':'));
  }

  cgi_env_["REQUEST_METHOD"] = config_.getMethod();
	cgi_env_["REQUEST_URI"] = file_path_;

  cgi_env_["SCRIPT_NAME"] = cgi_path_;
	cgi_env_["SERVER_NAME"] = config_.getHost();
	cgi_env_["SERVER_PROTOCOL"] = config_.getProtocol();
	cgi_env_["SERVER_PORT"] = ft::to_string(config_.getPort());
  cgi_env_["SERVER_SOFTWARE"] = "WEBSERV/1.0";

	if (extension_ == ".php")
		cgi_env_["REDIRECT_STATUS"] = "200";

  for (std::map<std::string, std::string, ft::comp>::iterator it = req_headers_.begin(); it != req_headers_.end(); it++) {
    if (!it->second.empty()) {
      std::string header = "HTTP_" + ft::to_upper(it->first);
      std::replace(header.begin(), header.end(), '-', '_');
      cgi_env_[header] = it->second;
    }
  }

	if (!(env_ = (char **)malloc(sizeof(char *) * (cgi_env_.size() + 1))))
		return false;

	int i = 0;

	for (std::map<std::string, std::string>::iterator it = cgi_env_.begin(); it != cgi_env_.end(); it++) {
		std::string tmp = it->first + "=" + it->second;
		if (!(env_[i] = ft::strdup(tmp.c_str())))
      return false;
		i++;
	}
	env_[i] = NULL;
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r13
movq 0x8(%rdi), %rdi
callq 0x9f5a
leaq 0x15e38(%rip), %rsi     # 0x2558f
movq %rax, %rdi
callq 0x40f0
leaq 0x18(%rsp), %r12
testl %eax, %eax
jne 0xf87d
movq 0x10(%r13), %r14
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15e61(%rip), %rsi     # 0x255e0
leaq 0x15e66(%rip), %rdx     # 0x255ec
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0xa828
movq %rax, %r15
leaq 0x38(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x15e42(%rip), %rsi     # 0x255ed
leaq 0x15e47(%rip), %rdx     # 0x255f9
leaq 0x28(%rsp), %rdi
callq 0x579e
leaq 0x198(%r13), %r14
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r15, %rsi
callq 0x4230
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0xf7f2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf809
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0xe0(%r13), %rsi
leaq 0x8(%rsp), %rdi
callq 0x10646
leaq 0x28(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x15dd1(%rip), %rsi     # 0x255fa
leaq 0x15dd8(%rip), %rdx     # 0x25608
callq 0x579e
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x105ca
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4570
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0xf866
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf87d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15d85(%rip), %rsi     # 0x25611
leaq 0x15d8f(%rip), %rdx     # 0x25622
callq 0x579e
leaq 0x198(%r13), %rbp
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq 0x8(%rax), %rdx
leaq 0x15d52(%rip), %rcx     # 0x25609
movl $0x7, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x4690
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf8de
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15d36(%rip), %rsi     # 0x25623
leaq 0x15d38(%rip), %rdx     # 0x2562c
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
leaq 0x98(%r13), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf92f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15cef(%rip), %rsi     # 0x2562d
leaq 0x15cf7(%rip), %rdx     # 0x2563c
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r15, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf979
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9eb8
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15ca9(%rip), %rsi     # 0x2563d
leaq 0x15cae(%rip), %rdx     # 0x25649
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r14, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf9cf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9eda
movq %rax, %rdi
callq 0x10e82
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15c58(%rip), %rsi     # 0x2564a
leaq 0x15c5c(%rip), %rdx     # 0x25655
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r14, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfa2d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9eea
leaq 0x166da(%rip), %rsi     # 0x26117
movq %rax, %rdi
callq 0x40f0
testl %eax, %eax
je 0xfbdf
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15c00(%rip), %rsi     # 0x2565c
leaq 0x15c02(%rip), %rdx     # 0x25665
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq 0x8(%rax), %rdx
leaq 0x15bd6(%rip), %rcx     # 0x25656
movl $0x5, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x4690
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfaa7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9eea
movq %rax, %r14
movq 0x8(%r13), %rdi
callq 0x9eea
movq %rax, %rdi
movl $0x3a, %esi
xorl %edx, %edx
callq 0x4590
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x4490
leaq 0x38(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x15b79(%rip), %rsi     # 0x25666
leaq 0x15b7e(%rip), %rdx     # 0x25672
leaq 0x28(%rsp), %rdi
callq 0x579e
leaq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4570
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0xfb2f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfb46
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9eea
movq %rax, %r14
movq 0x8(%r13), %rdi
callq 0x9eea
movq %rax, %rdi
movl $0x3a, %esi
xorl %edx, %edx
callq 0x4590
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x4490
leaq 0x28(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x15ae8(%rip), %rsi     # 0x25673
leaq 0x15aec(%rip), %rdx     # 0x2567e
callq 0x579e
leaq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4570
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0xfbc8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfbdf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9f5a
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15a85(%rip), %rsi     # 0x2567f
leaq 0x15a8c(%rip), %rdx     # 0x2568d
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r14, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfc35
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15a4a(%rip), %rsi     # 0x2568e
leaq 0x15a4e(%rip), %rdx     # 0x25699
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r15, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfc7f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15a0c(%rip), %rsi     # 0x2569a
leaq 0x15a10(%rip), %rdx     # 0x256a5
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
leaq 0x18(%r13), %rsi
movq %rax, %rdi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfcca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9eca
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x159c1(%rip), %rsi     # 0x256a6
leaq 0x159c5(%rip), %rdx     # 0x256b1
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r14, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfd20
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9f7c
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x15977(%rip), %rsi     # 0x256b2
leaq 0x1597f(%rip), %rdx     # 0x256c1
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq %rax, %rdi
movq %r14, %rsi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfd76
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%r13), %rdi
callq 0x9ed0
movl (%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x106c9
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x15927(%rip), %rsi     # 0x256c2
leaq 0x1592b(%rip), %rdx     # 0x256cd
leaq 0x28(%rsp), %rdi
callq 0x579e
leaq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4570
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xfde2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfdf9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x158d2(%rip), %rsi     # 0x256da
leaq 0x158da(%rip), %rdx     # 0x256e9
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq 0x8(%rax), %rdx
leaq 0x158a2(%rip), %rcx     # 0x256ce
movl $0xb, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x4690
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfe53
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
leaq 0x58(%r13), %rdi
leaq 0x1588c(%rip), %rsi     # 0x256ea
callq 0x40f0
testl %eax, %eax
jne 0xfec1
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x1587d(%rip), %rsi     # 0x256f3
leaq 0x15885(%rip), %rdx     # 0x25702
callq 0x579e
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x105ca
movq 0x8(%rax), %rdx
leaq 0x15855(%rip), %rcx     # 0x256ef
movl $0x3, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x4690
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xfec1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbp, %r14
movq %r13, %rbx
movq 0x10(%r13), %rbp
movq 0x18(%rbp), %r15
leaq 0x8(%rbp), %rax
cmpq %rax, %r15
je 0x10020
leaq 0x48(%rsp), %r12
leaq 0x28(%rsp), %r13
cmpq $0x0, 0x48(%r15)
je 0x10008
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6c2a
movq %r13, %rdi
movq %r12, %rsi
callq 0x2416d
movl $0x5, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x157d6(%rip), %rcx     # 0x25703
callq 0x44d0
leaq 0x18(%rsp), %rbp
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xff5a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xff61
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xff95
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xffb1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xffd4
movq 0x8(%rsp), %rcx
xorl %edx, %edx
cmpb $0x2d, (%rcx,%rdx)
jne 0xffcc
movb $0x5f, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0xffc2
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0xcf2e
leaq 0x40(%r15), %rsi
movq %rax, %rdi
callq 0x4230
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x10004
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x10(%rbx), %rbp
movq %r15, %rdi
callq 0x42e0
movq %rax, %r15
leaq 0x8(%rbp), %rax
cmpq %rax, %r15
jne 0xfee6
movq %rbx, %r15
movq 0x1c0(%rbx), %rax
leaq 0x8(,%rax,8), %rdi
callq 0x45a0
movq %rax, 0x1c8(%rbx)
testq %rax, %rax
je 0x1015e
movq 0x1b0(%r15), %r14
leaq 0x1a0(%r15), %r12
cmpq %r12, %r14
je 0x10162
xorl %ebp, %ebp
leaq 0x28(%rsp), %r15
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x6c2a
movq %r15, %rdi
leaq 0x15863(%rip), %rsi     # 0x258ef
callq 0x4840
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
movq %r15, %rdi
callq 0x4100
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x100c9
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x100cf
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x10103
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x8(%rsp), %rdi
callq 0x2438f
movq %rax, %r13
movq 0x1c8(%rbx), %rax
movq %r13, (%rax,%rbp,8)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x10137
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
testq %r13, %r13
je 0x1015e
movq %r14, %rdi
callq 0x42e0
movq %rax, %r14
incq %rbp
cmpq %r12, %rax
jne 0x10065
movq 0x1c8(%rbx), %rax
movl %ebp, %ecx
jmp 0x10164
xorl %eax, %eax
jmp 0x1016e
xorl %ecx, %ecx
movq $0x0, (%rax,%rcx,8)
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x101e7
jmp 0x101a1
jmp 0x10219
jmp 0x10219
jmp 0x10219
jmp 0x101e7
jmp 0x101a1
jmp 0x10219
jmp 0x101a1
jmp 0x10219
jmp 0x101e7
jmp 0x10205
movq %rax, %r15
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x101c4
jmp 0x1021c
jmp 0x101e7
movq %rax, %r15
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1021c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
jmp 0x1021c
jmp 0x10219
jmp 0x101e7
jmp 0x101e7
jmp 0x101e7
jmp 0x101e7
jmp 0x101e7
jmp 0x101e7
jmp 0x101e7
jmp 0x101e7
jmp 0x101e7
movq %rax, %r15
jmp 0x1029a
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
jmp 0x10205
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x1028d
jmp 0x1029a
jmp 0x1022d
movq %rax, %r15
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
jne 0x1028d
jmp 0x1029a
movq %rax, %r15
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1029a
movq 0x38(%rsp), %rsi
jmp 0x10292
movq %rax, %r15
jmp 0x1026a
movq %rax, %r15
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1026a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4470
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1029a
movq 0x58(%rsp), %rsi
jmp 0x10292
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1029a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r15, %rdi
callq 0x4790