	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs_cmd_destructor
_cs_cmd_destructor:                     ## @cs_cmd_destructor
	.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, %r15
	movq	8(%rdi), %rbx
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_cs_char_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	(%rbx), %rax
	movq	_CS_STATE_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movq	(%r15), %rax
	movq	_HSI_MSG_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_SSI_CHANNEL_STATE_POLL@GOTPCREL(%rip), %rax
	movq	_SSI_CHANNEL_STATE_READING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 8(%rbx)
	jmp	LBB0_7
LBB0_4:
	movq	_HSI_MSG_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movl	8(%rbx), %eax
	movq	_SSI_CHANNEL_STATE_WRITING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_7
## %bb.6:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 8(%rbx)
LBB0_7:
	movq	%r15, %rdi
	callq	_cs_release_cmd
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cs_char_data,8,3               ## @cs_char_data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"control cmd destructor\n"

	.comm	_CS_STATE_CLOSED,8,3            ## @CS_STATE_CLOSED
L_.str.1:                               ## @.str.1
	.asciz	"Cmd flushed while driver active\n"

	.comm	_HSI_MSG_READ,8,3               ## @HSI_MSG_READ
	.comm	_SSI_CHANNEL_STATE_POLL,4,2     ## @SSI_CHANNEL_STATE_POLL
	.comm	_SSI_CHANNEL_STATE_READING,4,2  ## @SSI_CHANNEL_STATE_READING
	.comm	_HSI_MSG_WRITE,8,3              ## @HSI_MSG_WRITE
	.comm	_SSI_CHANNEL_STATE_WRITING,4,2  ## @SSI_CHANNEL_STATE_WRITING
	.no_dead_strip	_cs_cmd_destructor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs_cmd_destructor
_cs_cmd_destructor:                     ; @cs_cmd_destructor
	.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	x20, x0
	ldr	x21, [x0, #8]
	add	x19, x21, #12
	mov	x0, x19
	bl	_spin_lock
Lloh0:
	adrp	x8, _cs_char_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cs_char_data@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _CS_STATE_CLOSED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CS_STATE_CLOSED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x21, #16]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_2:
	ldr	x8, [x20]
Lloh10:
	adrp	x9, _HSI_MSG_READ@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HSI_MSG_READ@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _SSI_CHANNEL_STATE_POLL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SSI_CHANNEL_STATE_POLL@GOTPAGEOFF]
Lloh15:
	adrp	x9, _SSI_CHANNEL_STATE_READING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SSI_CHANNEL_STATE_READING@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x21, #8]
	bic	w8, w9, w8
	b	LBB0_7
LBB0_4:
Lloh19:
	adrp	x9, _HSI_MSG_WRITE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HSI_MSG_WRITE@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	ldr	w8, [x21, #8]
Lloh22:
	adrp	x9, _SSI_CHANNEL_STATE_WRITING@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SSI_CHANNEL_STATE_WRITING@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	bic	w8, w8, w9
LBB0_7:
	str	w8, [x21, #8]
LBB0_8:
	mov	x0, x20
	bl	_cs_release_cmd
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_cs_char_data,8,3               ; @cs_char_data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"control cmd destructor\n"

	.comm	_CS_STATE_CLOSED,8,3            ; @CS_STATE_CLOSED
l_.str.1:                               ; @.str.1
	.asciz	"Cmd flushed while driver active\n"

	.comm	_HSI_MSG_READ,8,3               ; @HSI_MSG_READ
	.comm	_SSI_CHANNEL_STATE_POLL,4,2     ; @SSI_CHANNEL_STATE_POLL
	.comm	_SSI_CHANNEL_STATE_READING,4,2  ; @SSI_CHANNEL_STATE_READING
	.comm	_HSI_MSG_WRITE,8,3              ; @HSI_MSG_WRITE
	.comm	_SSI_CHANNEL_STATE_WRITING,4,2  ; @SSI_CHANNEL_STATE_WRITING
	.no_dead_strip	_cs_cmd_destructor
.subsections_via_symbols
