	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socket_late_resume
_socket_late_resume:                    ## @socket_late_resume
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	32(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_SOCKET_SUSPEND@GOTPCREL(%rip), %rax
	movq	_SOCKET_IN_RESUME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%r14)
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	(%r14), %ecx
	movq	_SOCKET_PRESENT@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.2:
	cmpq	$0, 24(%r14)
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_socket_shutdown
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movq	%r14, %rdi
	callq	_socket_insert
	movl	%eax, %ecx
	movq	_ENODEV@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	movl	(%rdx), %edx
	addl	%ecx, %edx
	cmovnel	%ecx, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movl	4(%r14), %edx
	cmpl	%ecx, %edx
	jne	LBB0_8
## %bb.5:
	movq	_SOCKET_CARDBUS@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_7
## %bb.6:
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.9:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmpq	*(%rcx)                         ## TAILCALL
LBB0_8:
	leaq	16(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_socket_shutdown
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_socket_insert                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCKET_SUSPEND,4,2             ## @SOCKET_SUSPEND
	.comm	_SOCKET_IN_RESUME,4,2           ## @SOCKET_IN_RESUME
	.comm	_SOCKET_PRESENT,4,2             ## @SOCKET_PRESENT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"suspend state 0x%x != resume state 0x%x\n"

	.comm	_SOCKET_CARDBUS,4,2             ## @SOCKET_CARDBUS
	.no_dead_strip	_socket_late_resume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socket_late_resume
_socket_late_resume:                    ; @socket_late_resume
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x20, x0, #32
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x8, _SOCKET_SUSPEND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCKET_SUSPEND@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SOCKET_IN_RESUME@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SOCKET_IN_RESUME@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w3, [x19]
Lloh6:
	adrp	x8, _SOCKET_PRESENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCKET_PRESENT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_socket_shutdown
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_socket_insert
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	csel	w0, wzr, w0, eq
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w2, [x19, #4]
	cmp	w2, w3
	b.ne	LBB0_10
; %bb.7:
Lloh12:
	adrp	x8, _SOCKET_CARDBUS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SOCKET_CARDBUS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w3
	b.ne	LBB0_3
; %bb.8:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.9:
	ldr	x1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x1
LBB0_10:
	add	x0, x19, #16
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_socket_shutdown
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_socket_insert
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCKET_SUSPEND,4,2             ; @SOCKET_SUSPEND
	.comm	_SOCKET_IN_RESUME,4,2           ; @SOCKET_IN_RESUME
	.comm	_SOCKET_PRESENT,4,2             ; @SOCKET_PRESENT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"suspend state 0x%x != resume state 0x%x\n"

	.comm	_SOCKET_CARDBUS,4,2             ; @SOCKET_CARDBUS
	.no_dead_strip	_socket_late_resume
.subsections_via_symbols
