	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pn_socket_bind
_pn_socket_bind:                        ## @pn_socket_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, %ebx
	movq	%rsi, %r14
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_pn_sk
	movq	%rax, %r15
	movq	8(%r12), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.17:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	cmpl	$15, %ebx
	ja	LBB0_4
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	(%r14), %rax
	movq	_AF_PHONET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	callq	_pn_sockaddr_get_object
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_pn_addr
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	%r12, %rdi
	callq	_sock_net
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_phonet_address_lookup
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_EAFNOSUPPORT@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, %rdi
	callq	_lock_sock
	movq	(%r12), %rax
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movl	4(%r15), %edi
	callq	_pn_port
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_15:
	movq	%r12, %rdi
	callq	_release_sock
	jmp	LBB0_16
LBB0_12:
	movq	%r12, %rdi
	callq	_sk_hashed
	movl	%eax, %edi
	callq	_WARN_ON
	movq	_port_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	8(%r12), %rax
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	callq	_pn_port
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movl	4(%r15), %edi
	callq	_pn_port
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_pn_object
	movl	%eax, 4(%r15)
	movl	8(%r14), %eax
	movl	%eax, (%r15)
	movq	8(%r12), %rax
	movq	%r12, %rdi
	callq	*16(%rax)
LBB0_14:
	movq	_port_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_PHONET,8,3                  ## @AF_PHONET
	.comm	_EAFNOSUPPORT,4,2               ## @EAFNOSUPPORT
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_TCP_CLOSE,8,3                  ## @TCP_CLOSE
	.comm	_port_mutex,4,2                 ## @port_mutex
	.no_dead_strip	_pn_socket_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pn_socket_bind
_pn_socket_bind:                        ; @pn_socket_bind
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_pn_sk
	ldr	x8, [x19, #8]
	ldr	x3, [x8]
	cbz	x3, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x3
LBB0_2:
	cmp	w22, #15
	b.hi	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _AF_PHONET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AF_PHONET@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	mov	x21, x0
	mov	x0, x20
	bl	_pn_sockaddr_get_object
	mov	x23, x0
	bl	_pn_addr
	mov	x22, x0
	cbz	x0, LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_sock_net
	mov	x1, x22
	bl	_phonet_address_lookup
	cbz	x0, LBB0_11
; %bb.7:
Lloh5:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x8, _EAFNOSUPPORT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EAFNOSUPPORT@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _TCP_CLOSE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TCP_CLOSE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	ldr	w0, [x21, #4]
	bl	_pn_port
	cbz	x0, LBB0_15
LBB0_13:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_14:
	mov	x0, x19
	bl	_release_sock
	b	LBB0_10
LBB0_15:
	mov	x0, x19
	bl	_sk_hashed
	bl	_WARN_ON
Lloh15:
	adrp	x0, _port_mutex@GOTPAGE
Lloh16:
	ldr	x0, [x0, _port_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldr	x24, [x8, #8]
	mov	x0, x23
	bl	_pn_port
	mov	x1, x0
	mov	x0, x19
	blr	x24
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.16:
	ldr	w0, [x21, #4]
	bl	_pn_port
	mov	x1, x0
	mov	x0, x22
	bl	_pn_object
	ldr	w8, [x20, #8]
	stp	w8, w0, [x21]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	mov	x0, x19
	blr	x8
LBB0_17:
Lloh17:
	adrp	x0, _port_mutex@GOTPAGE
Lloh18:
	ldr	x0, [x0, _port_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_PHONET,8,3                  ; @AF_PHONET
	.comm	_EAFNOSUPPORT,4,2               ; @EAFNOSUPPORT
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_TCP_CLOSE,8,3                  ; @TCP_CLOSE
	.comm	_port_mutex,4,2                 ; @port_mutex
	.no_dead_strip	_pn_socket_bind
.subsections_via_symbols
