	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pn_socket_listen
_pn_socket_listen:                      ## @pn_socket_listen
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_SS_UNCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movl	%esi, %r14d
	movq	8(%rdi), %r15
	callq	_pn_socket_autobind
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_lock_sock
	movq	(%r15), %rax
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	_TCP_LISTEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	$0, 16(%r15)
	movl	%r14d, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r15, %rdi
	callq	_release_sock
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SS_UNCONNECTED,8,3             ## @SS_UNCONNECTED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_TCP_CLOSE,8,3                  ## @TCP_CLOSE
	.comm	_TCP_LISTEN,8,3                 ## @TCP_LISTEN
	.no_dead_strip	_pn_socket_listen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pn_socket_listen
_pn_socket_listen:                      ; @pn_socket_listen
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SS_UNCONNECTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SS_UNCONNECTED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x1
	ldr	x19, [x0, #8]
	bl	_pn_socket_autobind
	cbz	x0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _TCP_CLOSE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TCP_CLOSE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	w21, #0
Lloh10:
	adrp	x8, _TCP_LISTEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TCP_LISTEN@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x19]
	str	xzr, [x19, #16]
	str	w20, [x19, #8]
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x19
	bl	_release_sock
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SS_UNCONNECTED,8,3             ; @SS_UNCONNECTED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_TCP_CLOSE,8,3                  ; @TCP_CLOSE
	.comm	_TCP_LISTEN,8,3                 ; @TCP_LISTEN
	.no_dead_strip	_pn_socket_listen
.subsections_via_symbols
