// File: /workspace/github_c_makefile_star2_O0/martintopholm[P]xping/http.c
// Function: probe_send
void probe_send(struct probe *prb, int seq)
{
	struct session *session;
	char buf[512];
	int salen;

	if (!prb->resolved) {
		target_mark(prb->owner, seq, '@');
		return;
	}
	session = calloc(1, sizeof(*session));
	if (session == NULL) {
		target_mark(prb->owner, seq, '!');
		return;
	}
	session->prb = prb;
	session->seq = seq;
	LL_APPEND(prb->sessions, session);
#ifdef WITH_SSL
	if (prb->ssl_ctx != NULL) {
		session->ssl = SSL_new(prb->ssl_ctx);
		if (session->ssl == NULL) {
			target_mark(prb->owner, seq, '!');
			session_free(session);
			return;
		}
		session->bev = bufferevent_openssl_socket_new(ev_base, -1,
		    session->ssl, BUFFEREVENT_SSL_CONNECTING,
		    BEV_OPT_DEFER_CALLBACKS | BEV_OPT_CLOSE_ON_FREE);
	} else {
		session->bev = bufferevent_socket_new(ev_base, -1,
		    BEV_OPT_CLOSE_ON_FREE);
	}
#else /* !WITH_SSL */
	session->bev = bufferevent_socket_new(ev_base, -1,
	    BEV_OPT_CLOSE_ON_FREE);
#endif
	if (session->bev == NULL) {
		target_mark(prb->owner, seq, '!');
		session_free(session);
		return;
	}
	bufferevent_setcb(session->bev, session_readcb_status, NULL,
	    session_eventcb, session);
	evutil_inet_ntop(AF_INET, &sin(prb)->sin_addr, buf, sizeof(buf));
	bufferevent_enable(session->bev, EV_READ);
	salen = sa(prb)->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) :
	    sizeof(struct sockaddr_in);
	if (bufferevent_socket_connect(session->bev, sa(prb), salen) < 0) {
		target_mark(prb->owner, seq, '!');
		return;
	}
	bufferevent_setwatermark(session->bev, EV_READ, 0, 4096);

	session->ev_timeout = event_new(ev_base, -1, 0, session_timeout,
	    session);
	if (session->ev_timeout == NULL) {
		target_mark(prb->owner, seq, '!');
		session_free(session);
		return;
	}
	event_add(session->ev_timeout, &tv_timeout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x3b19
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rdi
movl -0xc(%rbp), %esi
movl $0x40, %edx
callq 0x2550
jmp 0x3d66
movl $0x1, %edi
movl $0x38, %esi
callq 0x2130
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3b50
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rdi
movl -0xc(%rbp), %esi
movl $0x21, %edx
callq 0x2550
jmp 0x3d66
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x3bc4
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x3bb3
movq -0x230(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x230(%rbp)
jmp 0x3b91
movq -0x18(%rbp), %rcx
movq -0x230(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x3bd3
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa0(%rax)
jmp 0x3bd5
leaq 0x56b4(%rip), %rax      # 0x9290
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x23a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x3c2a
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rdi
movl -0xc(%rbp), %esi
movl $0x21, %edx
callq 0x2550
movq -0x18(%rbp), %rdi
callq 0x39c0
jmp 0x3d66
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %r8
leaq 0x133(%rip), %rsi       # 0x3d70
xorl %eax, %eax
movl %eax, %edx
leaq 0x278(%rip), %rcx       # 0x3ec0
callq 0x21c0
movq -0x8(%rbp), %rsi
addq $0x44, %rsi
addq $0x4, %rsi
leaq -0x220(%rbp), %rdx
movl $0x2, %edi
movl $0x200, %ecx            # imm = 0x200
callq 0x23d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
callq 0x23e0
movq -0x8(%rbp), %rax
movzwl 0x44(%rax), %edx
movl $0x10, %eax
movl $0x1c, %ecx
cmpl $0xa, %edx
cmoveq %rcx, %rax
movl %eax, -0x224(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0x44, %rsi
movl -0x224(%rbp), %edx
callq 0x2220
cmpl $0x0, %eax
jge 0x3cdd
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rdi
movl -0xc(%rbp), %esi
movl $0x21, %edx
callq 0x2550
jmp 0x3d66
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x2060
leaq 0x5591(%rip), %rax      # 0x9290
movq (%rax), %rdi
movq -0x18(%rbp), %r8
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
leaq 0x2dc(%rip), %rcx       # 0x3ff0
callq 0x21a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3d52
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rdi
movl -0xc(%rbp), %esi
movl $0x21, %edx
callq 0x2550
movq -0x18(%rbp), %rdi
callq 0x39c0
jmp 0x3d66
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x555f(%rip), %rsi      # 0x92c0
callq 0x20c0
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nop