// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_pushname
static lso_nargs_t lso_pushname(lua_State *L, struct sockaddr_storage *ss, socklen_t salen) {
	switch (ss->ss_family) {
	case AF_INET:
		/* FALL THROUGH */
	case AF_INET6:
		lua_pushinteger(L, ss->ss_family);
		lua_pushstring(L, sa_ntoa(ss));
		lua_pushinteger(L, ntohs(*sa_port(ss, SA_PORT_NONE, NULL)));

		return 3;
	case AF_UNIX:
		lua_pushinteger(L, ss->ss_family);

		/* support nameless sockets and Linux's abstract namespace */
		if (salen > offsetof(struct sockaddr_un, sun_path)) {
			struct sockaddr_un *sun = (struct sockaddr_un *)ss;
			char *pe = (char *)sun + SO_MIN(sizeof *sun, salen);
			size_t plen;

			while (pe > sun->sun_path && pe[-1] == '\0')
				--pe;

			if ((plen = (pe - sun->sun_path)) > 0) {
				lua_pushlstring(L, sun->sun_path, plen);
			} else {
				lua_pushnil(L);
			}
		} else {
			lua_pushnil(L);
		}

		return 2;
	default:
		lua_pushinteger(L, ss->ss_family);

		return 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0xbc(%rbp)
subl $0x1, %eax
je 0x1ff0b
jmp 0x1fe3e
movl -0xbc(%rbp), %eax
subl $0x2, %eax
je 0x1fe5c
jmp 0x1fe4b
movl -0xbc(%rbp), %eax
subl $0xa, %eax
jne 0x20034
jmp 0x1fe5c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, %esi
callq 0xf9a0
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x89(%rbp), %rdi
xorl %esi, %esi
movl $0x6d, %edx
callq 0xf7d0
leaq -0x89(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x6d, %esi
callq 0x20060
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0xfcc0
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movw $0x0, -0x9a(%rbp)
movq -0x98(%rbp), %rdi
leaq -0x9a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1fb40
movzwl (%rax), %edi
callq 0x10a80
movq -0xc8(%rbp), %rdi
movzwl %ax, %eax
movl %eax, %esi
callq 0xf9a0
movl $0x3, -0x4(%rbp)
jmp 0x2004d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, %esi
callq 0xf9a0
movl -0x1c(%rbp), %eax
cmpq $0x2, %rax
jbe 0x20022
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
movl $0x6e, %eax
cmpq %rcx, %rax
jae 0x1ff60
movl $0x6e, %eax
movq %rax, -0xe0(%rbp)
jmp 0x1ff6a
movl -0x1c(%rbp), %eax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
movq -0xe0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rdx
addq $0x2, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xe1(%rbp)
jbe 0x1ffb8
movq -0xb0(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0xe1(%rbp)
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x1ffc4
jmp 0x1ffd8
movq -0xb0(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x1ff82
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
addq $0x2, %rcx
subq %rcx, %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, %rax
jbe 0x20017
movq -0x10(%rbp), %rdi
movq -0xa8(%rbp), %rsi
addq $0x2, %rsi
movq -0xb8(%rbp), %rdx
callq 0xf510
jmp 0x20020
movq -0x10(%rbp), %rdi
callq 0xfa10
jmp 0x2002b
movq -0x10(%rbp), %rdi
callq 0xfa10
movl $0x2, -0x4(%rbp)
jmp 0x2004d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, %esi
callq 0xf9a0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)