	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socket_suspend
_socket_suspend:                        ## @socket_suspend
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_SOCKET_SUSPEND@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_3
## %bb.1:
	movq	_SOCKET_IN_RESUME@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
LBB0_3:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	movq	_SOCKET_IN_RESUME@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	jne	LBB0_5
## %bb.4:
	movl	%eax, 4(%rbx)
LBB0_5:
	movq	_dead_socket@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	24(%rbx), %rsi
	movl	%eax, 24(%rbx)
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_7:
	movl	(%rbx), %eax
	orl	(%r15), %eax
	movl	%eax, (%rbx)
	movl	(%r12), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_2:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCKET_SUSPEND,4,2             ## @SOCKET_SUSPEND
	.comm	_SOCKET_IN_RESUME,4,2           ## @SOCKET_IN_RESUME
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_dead_socket,4,2                ## @dead_socket
	.no_dead_strip	_socket_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socket_suspend
_socket_suspend:                        ; @socket_suspend
	.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
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x22, _SOCKET_SUSPEND@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SOCKET_SUSPEND@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh2:
	adrp	x21, _SOCKET_IN_RESUME@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SOCKET_IN_RESUME@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_2:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	str	w8, [x19, #4]
LBB0_4:
Lloh4:
	adrp	x8, _dead_socket@GOTPAGE
Lloh5:
	ldr	x8, [x8, _dead_socket@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	mov	x1, x19
	str	w8, [x1, #24]!
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	blr	x8
LBB0_6:
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w9, [x21]
	bic	w8, w8, w9
	str	w8, [x19]
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCKET_SUSPEND,4,2             ; @SOCKET_SUSPEND
	.comm	_SOCKET_IN_RESUME,4,2           ; @SOCKET_IN_RESUME
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_dead_socket,4,2                ; @dead_socket
	.no_dead_strip	_socket_suspend
.subsections_via_symbols
