// File: /workspace/github_c_makefile_star2_O0/jfriesse[P]omping/cliprint.c
// Function: cliprint_client_state
void
cliprint_client_state(const char *host_name, int host_name_len,
    enum sf_transport_method transport_method, const struct sockaddr_storage *mcast_addr,
    const struct sockaddr_storage *remote_addr, enum rh_client_state state,
    enum rh_client_stop_reason stop_reason)
{
	char mcast_addr_str[INET6_ADDRSTRLEN];
	char rh_addr_str[INET6_ADDRSTRLEN];

	printf("%-*s : ", host_name_len, host_name);

	switch (state) {
	case RH_CS_INITIAL:
		printf("waiting for response msg");
		break;
	case RH_CS_QUERY:
		memset(mcast_addr_str, 0, sizeof(mcast_addr_str));
		memset(rh_addr_str, 0, sizeof(rh_addr_str));

		if (mcast_addr != NULL) {
			af_sa_to_str(AF_CAST_SA(mcast_addr), mcast_addr_str);
		}

		if (remote_addr != NULL) {
			af_sa_to_str(AF_CAST_SA(remote_addr), rh_addr_str);
		}

		switch (transport_method) {
		case SF_TM_ASM:
			printf("joined (S,G) = (*, %s), pinging", mcast_addr_str);
			break;
		case SF_TM_SSM:
			printf("joined (S,G) = (%s, %s), pinging", rh_addr_str, mcast_addr_str);
			break;
		case SF_TM_IPBC:
			printf("joined (S,G) = (*, %s), pinging", mcast_addr_str);
			break;
		}
		break;
	case RH_CS_STOP:
		switch (stop_reason) {
		case RH_CSR_NONE:
			DEBUG_PRINTF("internal program error.");
			errx(1, "Internal program error");
			break;
		case RH_CSR_SERVER:
			printf("server told us to stop");
			break;
		case RH_CSR_SEND_MAXIMUM:
			printf("maximum number of query messages exhausted");
			break;
		case RH_CSR_TO_SEND_EXHAUSTED:
			printf("given amount of query messages was sent");
			break;
		case RH_CSR_REMOTE_VERSION_RECEIVED:
			printf("remote version received");
			break;
		}
		break;
	}
	printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rdx
leaq 0x98fe(%rip), %rdi      # 0xea20
xorl %eax, %eax
callq 0x20f0
movl -0x24(%rbp), %eax
movl %eax, -0x94(%rbp)
testl %eax, %eax
je 0x5159
jmp 0x5138
movl -0x94(%rbp), %eax
subl $0x1, %eax
je 0x516c
jmp 0x5145
movl -0x94(%rbp), %eax
subl $0x2, %eax
je 0x5229
jmp 0x52c6
leaq 0x98c8(%rip), %rdi      # 0xea28
movb $0x0, %al
callq 0x20f0
jmp 0x52c6
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x2e, %edx
callq 0x2150
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x2e, %edx
callq 0x2150
cmpq $0x0, -0x18(%rbp)
je 0x51a3
movq -0x18(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3360
cmpq $0x0, -0x20(%rbp)
je 0x51ba
movq -0x20(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3360
movl -0x10(%rbp), %eax
movl %eax, -0x98(%rbp)
testl %eax, %eax
je 0x51e3
jmp 0x51c9
movl -0x98(%rbp), %eax
subl $0x1, %eax
je 0x51f7
jmp 0x51d6
movl -0x98(%rbp), %eax
subl $0x2, %eax
je 0x5212
jmp 0x5224
leaq -0x60(%rbp), %rsi
leaq 0x9853(%rip), %rdi      # 0xea41
movb $0x0, %al
callq 0x20f0
jmp 0x5224
leaq -0x90(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq 0x9858(%rip), %rdi      # 0xea61
movb $0x0, %al
callq 0x20f0
jmp 0x5224
leaq -0x60(%rbp), %rsi
leaq 0x9824(%rip), %rdi      # 0xea41
movb $0x0, %al
callq 0x20f0
jmp 0x52c6
movl 0x10(%rbp), %eax
movq %rax, -0xa0(%rbp)
subq $0x4, %rax
ja 0x52c4
movq -0xa0(%rbp), %rax
leaq 0x97b9(%rip), %rcx      # 0xea04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x9827(%rip), %rdi      # 0xea82
movl $0x50, %esi
movl $0x2, %edx
leaq 0x8da3(%rip), %rcx      # 0xe00f
movb $0x0, %al
callq 0x5dc0
movl $0x1, %edi
leaq 0x8da8(%rip), %rsi      # 0xe027
movb $0x0, %al
callq 0x20d0
leaq 0x9800(%rip), %rdi      # 0xea8d
movb $0x0, %al
callq 0x20f0
jmp 0x52c4
leaq 0x9807(%rip), %rdi      # 0xeaa4
movb $0x0, %al
callq 0x20f0
jmp 0x52c4
leaq 0x9822(%rip), %rdi      # 0xeacf
movb $0x0, %al
callq 0x20f0
jmp 0x52c4
leaq 0x983a(%rip), %rdi      # 0xeaf7
movb $0x0, %al
callq 0x20f0
jmp 0x52c6
leaq 0x9a49(%rip), %rdi      # 0xed16
movb $0x0, %al
callq 0x20f0
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)