	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs_hsi_read_on_control
_cs_hsi_read_on_control:                ## @cs_hsi_read_on_control
	.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, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	(%rbx), %edx
	movq	_SSI_CHANNEL_STATE_READING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %eax
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	_SSI_CHANNEL_STATE_ERROR@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	callq	_dev_err
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
LBB0_5:
	orl	%edx, %eax
	movl	%eax, (%rbx)
	movq	8(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_cs_claim_cmd
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	$0, 8(%r15)
	movq	_cs_hsi_peek_on_control_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	8(%rbx), %rdi
	movq	%r15, %rsi
	callq	_hsi_async_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cs_hsi_control_read_error      ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSI_CHANNEL_STATE_READING,4,2  ## @SSI_CHANNEL_STATE_READING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Control read already pending (%d)\n"

	.comm	_SSI_CHANNEL_STATE_ERROR,4,2    ## @SSI_CHANNEL_STATE_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Control read error (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Issuing RX on control\n"

	.comm	_cs_hsi_peek_on_control_complete,4,2 ## @cs_hsi_peek_on_control_complete
	.no_dead_strip	_cs_hsi_read_on_control
.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_control
_cs_hsi_read_on_control:                ; @cs_hsi_read_on_control
	.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
	add	x20, x0, #16
	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	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x9, _SSI_CHANNEL_STATE_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SSI_CHANNEL_STATE_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w2
	b.eq	LBB0_5
; %bb.3:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	bl	_dev_err
	mov	x0, x20
	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
	b	_spin_unlock
LBB0_5:
	orr	w8, w8, w2
	str	w8, [x19]
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_cs_claim_cmd
	mov	x21, x0
	mov	x0, x20
	bl	_spin_unlock
	str	xzr, [x21, #8]
Lloh12:
	adrp	x8, _cs_hsi_peek_on_control_complete@GOTPAGE
Lloh13:
	ldr	x8, [x8, _cs_hsi_peek_on_control_complete@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x21]
	ldr	x0, [x19, #8]
	mov	x1, x21
	bl	_hsi_async_read
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, 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
	b	_cs_hsi_control_read_error
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SSI_CHANNEL_STATE_READING,4,2  ; @SSI_CHANNEL_STATE_READING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Control read already pending (%d)\n"

	.comm	_SSI_CHANNEL_STATE_ERROR,4,2    ; @SSI_CHANNEL_STATE_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Control read error (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Issuing RX on control\n"

	.comm	_cs_hsi_peek_on_control_complete,4,2 ; @cs_hsi_peek_on_control_complete
	.no_dead_strip	_cs_hsi_read_on_control
.subsections_via_symbols
