// File: /workspace/github_c_makefile_star2_O2/martintopholm[P]xping/icmp-unpriv.c
// Function: probe_send
void
probe_send(struct probe *prb, int seq)
{
	int pair[2];
	pid_t pid;

	if (!prb->resolved) {
		target_mark(prb->owner, seq, '@');
		return;
	}

	/* Save most recent sequence number to close gap between
	 * probe_send returning (target_probe increasing npkts) and forked
	 * program outputting */
	prb->seqlast = seq;

	/* Clear ahead to avoid overwriting a result in case of small
	 * timing indiscrepancies */
	target_mark(prb->owner, seq+1, ' ');

	/* If we have a cached early mark, send it right away. */
	if (prb->early_mark != '\0') {
		target_mark(prb->owner, seq, prb->early_mark);
		prb->early_mark = '\0';
	}

	/* Check for existing ping process */
	if (prb->pid && kill(prb->pid, 0) == 0)
		return;

	/* Create ipc socket pair and fork ping process */
	if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) < 0) {
		target_mark(prb->owner, seq, '!'); /* transmit error */
		return;
	}
	prb->seqdelta = seq - 1; /* linux ping(8) begins icmp_seq=1 */
	evutil_make_socket_nonblocking(pair[0]);
	if (prb->fd >= 0)
		close(prb->fd);
	if (prb->ev_read != NULL)
		event_free(prb->ev_read);
	prb->ev_read = event_new(ev_base, pair[0], EV_READ|EV_PERSIST, readping, prb);
	event_add(prb->ev_read, NULL);
	switch (pid = fork()) {
	case -1:
		target_mark(prb->owner, seq, '!'); /* transmit error */
		return;
	case 0:
		evutil_closesocket(pair[0]);
		dup2(pair[1], 1);
		dup2(pair[1], 2);
		execping(prb);
		/* NEVER REACHED */
		break;
	default:
		evutil_closesocket(pair[1]);
		prb->pid = pid;
		prb->fd = pair[0];
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x0, 0x40(%rdi)
je 0x30fd
movl %r14d, 0x6c(%rbx)
movq 0x90(%rbx), %rdi
leal 0x1(%r14), %esi
pushq $0x20
popq %rdx
callq 0x2520
movl 0x70(%rbx), %edx
testl %edx, %edx
je 0x3051
movq 0x90(%rbx), %rdi
movl %r14d, %esi
callq 0x2520
andl $0x0, 0x70(%rbx)
movl 0x60(%rbx), %edi
testl %edi, %edi
je 0x3067
xorl %esi, %esi
callq 0x22f0
testl %eax, %eax
je 0x312b
pushq $0x1
popq %rdi
leaq 0x8(%rsp), %rcx
movl %edi, %esi
xorl %edx, %edx
callq 0x2370
testl %eax, %eax
js 0x3119
leal -0x1(%r14), %eax
movl %eax, 0x68(%rbx)
movl 0x8(%rsp), %edi
callq 0x2300
movl 0x64(%rbx), %edi
testl %edi, %edi
js 0x309c
callq 0x23e0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x30aa
callq 0x2390
leaq 0x41bf(%rip), %rax      # 0x7270
movq (%rax), %rdi
movl 0x8(%rsp), %esi
leaq 0x120(%rip), %rcx       # 0x31df
pushq $0x12
popq %rdx
movq %rbx, %r8
callq 0x2190
movq %rax, 0x78(%rbx)
movq %rax, %rdi
xorl %esi, %esi
callq 0x20c0
callq 0x2060
cmpl $-0x1, %eax
je 0x3119
movl %eax, %ebp
testl %eax, %eax
je 0x3136
movl 0xc(%rsp), %edi
callq 0x2120
movl %ebp, 0x60(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x64(%rbx)
jmp 0x312b
movq 0x90(%rbx), %rdi
pushq $0x40
popq %rdx
movl %r14d, %esi
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2520
movq 0x90(%rbx), %rdi
pushq $0x21
popq %rdx
movl %r14d, %esi
callq 0x2520
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rsp), %edi
callq 0x2120
movl 0xc(%rsp), %edi
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x21b0
movl 0xc(%rsp), %edi
pushq $0x2
popq %rsi
callq 0x21b0
leaq 0x40b0(%rip), %rax      # 0x7210
cvtsi2sdl (%rax), %xmm0
divsd 0xe9c(%rip), %xmm0      # 0x4008
leaq 0x10e3(%rip), %rdx      # 0x4256
leaq 0x10(%rsp), %r14
pushq $0x18
popq %rsi
movq %r14, %rdi
movb $0x1, %al
callq 0x2110
movzwl 0x44(%rbx), %edi
xorl %eax, %eax
cmpl $0xa, %edi
sete %al
leaq 0x10c1(%rip), %rcx      # 0x4259
leaq 0xf3f(%rip), %r15       # 0x40de
cmoveq %rcx, %r15
leaq (%rbx,%rax,4), %rsi
addq $0x48, %rsi
leaq 0x30(%rsp), %rbx
pushq $0x40
popq %rcx
movq %rbx, %rdx
callq 0x23c0
leaq 0x109d(%rip), %rdx      # 0x425f
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x2070
movl %ebp, %edi
callq 0x2230