	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs_hsi_read_on_data
_cs_hsi_read_on_data:                   ## @cs_hsi_read_on_data
	.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, %rbx
	leaq	32(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	(%rbx), %edx
	movq	_SSI_CHANNEL_STATE_READING@GOTPCREL(%rip), %rcx
	movq	_SSI_CHANNEL_STATE_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	testl	%edx, %ecx
	je	LBB0_1
## %bb.3:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
LBB0_1:
	orl	%edx, %eax
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	16(%rbx), %rsi
	movq	24(%rbx), %r14
	movl	16(%r14), %edi
	xorl	%edx, %edx
	callq	_sg_init_one
	movq	$0, 8(%r14)
	movq	_cs_hsi_peek_on_data_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	8(%rbx), %rdi
	movq	%r14, %rsi
	callq	_hsi_async_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_cs_hsi_data_read_error         ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSI_CHANNEL_STATE_READING,4,2  ## @SSI_CHANNEL_STATE_READING
	.comm	_SSI_CHANNEL_STATE_POLL,4,2     ## @SSI_CHANNEL_STATE_POLL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Data read already pending (%u)\n"

	.comm	_cs_hsi_peek_on_data_complete,4,2 ## @cs_hsi_peek_on_data_complete
	.no_dead_strip	_cs_hsi_read_on_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs_hsi_read_on_data
_cs_hsi_read_on_data:                   ; @cs_hsi_read_on_data
	.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	_spin_lock
	ldr	w2, [x19]
Lloh0:
	adrp	x8, _SSI_CHANNEL_STATE_READING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSI_CHANNEL_STATE_READING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _SSI_CHANNEL_STATE_POLL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSI_CHANNEL_STATE_POLL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w9, w8, w9
	tst	w9, w2
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock
LBB0_2:
	orr	w8, w8, w2
	str	w8, [x19]
	mov	x0, x20
	bl	_spin_unlock
	ldp	x1, x20, [x19, #16]
	ldr	w0, [x20, #16]
	mov	w2, #0
	bl	_sg_init_one
	str	xzr, [x20, #8]
Lloh8:
	adrp	x8, _cs_hsi_peek_on_data_complete@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cs_hsi_peek_on_data_complete@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20]
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_hsi_async_read
	cbz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cs_hsi_data_read_error
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SSI_CHANNEL_STATE_READING,4,2  ; @SSI_CHANNEL_STATE_READING
	.comm	_SSI_CHANNEL_STATE_POLL,4,2     ; @SSI_CHANNEL_STATE_POLL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Data read already pending (%u)\n"

	.comm	_cs_hsi_peek_on_data_complete,4,2 ; @cs_hsi_peek_on_data_complete
	.no_dead_strip	_cs_hsi_read_on_data
.subsections_via_symbols
