	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipx_bind
_ipx_bind:                              ## @ipx_bind
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_ipx_sk
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_EINVAL@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	subl	(%r13), %ebx
	movq	_SOCK_ZAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_sock_flag
	cmpl	$12, %r14d
	jne	LBB0_14
## %bb.1:
	testl	%eax, %eax
	je	LBB0_14
## %bb.2:
	movl	8(%r15), %edi
	callq	_ipxitf_find_using_net
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movl	(%r15), %edi
	testl	%edi, %edi
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_ipx_first_free_socketnum
	movl	%eax, %edi
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movq	_EACCES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_ntohs
	movq	_IPX_MIN_EPHEMERAL_SOCKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_10
## %bb.8:
	movq	_CAP_NET_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movl	(%r15), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%esi, (%rax)
	movq	_EADDRINUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_ipxitf_find_socket
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	negl	%ebx
	movl	(%r15), %edi
	callq	_ntohs
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	_SOCK_DEBUG
	jmp	LBB0_13
LBB0_3:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_12:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ipxitf_insert_socket
	movq	_SOCK_ZAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_sock_reset_flag
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_9:
	negl	%ebx
	jmp	LBB0_13
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%r13), %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_ipxitf_put
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SOCK_ZAPPED,4,2                ## @SOCK_ZAPPED
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_IPX_MIN_EPHEMERAL_SOCKET,8,3   ## @IPX_MIN_EPHEMERAL_SOCKET
	.comm	_CAP_NET_ADMIN,4,2              ## @CAP_NET_ADMIN
	.comm	_EADDRINUSE,4,2                 ## @EADDRINUSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IPX: bind failed because port %X in use.\n"

	.comm	_IPX_NODE_LEN,4,2               ## @IPX_NODE_LEN
	.comm	_ipx_broadcast_node,4,2         ## @ipx_broadcast_node
	.comm	_ipx_internal_net,8,3           ## @ipx_internal_net
	.comm	_ipx_this_node,4,2              ## @ipx_this_node
	.no_dead_strip	_ipx_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipx_bind
_ipx_bind:                              ; @ipx_bind
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_ipx_sk
	mov	x22, x0
Lloh0:
	adrp	x25, _EINVAL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x25]
	neg	w23, w8
Lloh2:
	adrp	x24, _SOCK_ZAPPED@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SOCK_ZAPPED@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_sock_flag
	cmp	w20, #12
	b.ne	LBB0_14
; %bb.1:
	cbz	w0, LBB0_14
; %bb.2:
	ldr	w0, [x21, #8]
	bl	_ipxitf_find_using_net
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	ldr	w0, [x21]
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_ipx_first_free_socketnum
	str	w0, [x21]
	cbz	w0, LBB0_12
LBB0_5:
Lloh4:
	adrp	x8, _EACCES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh6:
	ldr	w23, [x8]
	bl	_ntohs
Lloh7:
	adrp	x8, _IPX_MIN_EPHEMERAL_SOCKET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IPX_MIN_EPHEMERAL_SOCKET@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_7
; %bb.6:
Lloh10:
	adrp	x8, _CAP_NET_ADMIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CAP_NET_ADMIN@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_11
LBB0_7:
	ldr	w1, [x21]
	str	w1, [x22]
Lloh13:
	adrp	x8, _EADDRINUSE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EADDRINUSE@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_ipxitf_find_socket
	cbz	x0, LBB0_10
; %bb.8:
	neg	w23, w22
	ldr	w0, [x21]
	bl	_ntohs
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_SOCK_DEBUG
	b	LBB0_13
LBB0_9:
Lloh18:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	bl	_ipxitf_insert_socket
	ldr	w1, [x24]
	mov	x0, x19
	bl	_sock_reset_flag
	mov	w23, #0
	b	LBB0_13
LBB0_11:
	neg	w23, w23
	b	LBB0_13
LBB0_12:
	ldr	w8, [x25]
	neg	w23, w8
LBB0_13:
	mov	x0, x20
	bl	_ipxitf_put
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SOCK_ZAPPED,4,2                ; @SOCK_ZAPPED
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_IPX_MIN_EPHEMERAL_SOCKET,8,3   ; @IPX_MIN_EPHEMERAL_SOCKET
	.comm	_CAP_NET_ADMIN,4,2              ; @CAP_NET_ADMIN
	.comm	_EADDRINUSE,4,2                 ; @EADDRINUSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IPX: bind failed because port %X in use.\n"

	.comm	_IPX_NODE_LEN,4,2               ; @IPX_NODE_LEN
	.comm	_ipx_broadcast_node,4,2         ; @ipx_broadcast_node
	.comm	_ipx_internal_net,8,3           ; @ipx_internal_net
	.comm	_ipx_this_node,4,2              ; @ipx_this_node
	.no_dead_strip	_ipx_bind
.subsections_via_symbols
