	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st95hf_spi_send                ## -- Begin function st95hf_spi_send
	.p2align	4, 0x90
_st95hf_spi_send:                       ## @st95hf_spi_send
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	%rsi, -64(%rbp)
	movl	%edx, -56(%rbp)
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_SYNC@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	leaq	8(%rbx), %rdi
	callq	_reinit_completion
	jmp	LBB0_3
LBB0_2:
	movl	$0, (%rbx)
LBB0_3:
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_spi_message_init
	leaq	-64(%rbp), %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_spi_sync
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_5:
	movq	_ASYNC@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	%r13d, (%rax)
	je	LBB0_8
## %bb.6:
	addq	$8, %rbx
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYNC,4,2                       ## @SYNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error: sending cmd to st95hf using SPI = %d\n"

	.comm	_ASYNC,4,2                      ## @ASYNC
L_.str.1:                               ## @.str.1
	.asciz	"error: response not ready timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st95hf_spi_send                ; -- Begin function st95hf_spi_send
	.p2align	2
_st95hf_spi_send:                       ; @st95hf_spi_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x21, x0
	ldr	x20, [x0, #16]
	str	x1, [sp, #8]
	str	w2, [sp, #16]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _SYNC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYNC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #1
	mov	x0, x21
	str	w8, [x0], #8
	bl	_reinit_completion
	b	LBB0_3
LBB0_2:
	str	wzr, [x21]
LBB0_3:
	add	x0, sp, #24
	bl	_spi_message_init
	add	x0, sp, #8
	add	x1, sp, #24
	bl	_spi_message_add_tail
	add	x1, sp, #24
	mov	x0, x20
	bl	_spi_sync
	cbz	w0, LBB0_5
; %bb.4:
	mov	x23, x0
	str	x23, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _ASYNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASYNC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w22
	b.eq	LBB0_7
; %bb.6:
	add	x21, x21, #8
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_8
LBB0_7:
	mov	w23, #0
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SYNC,4,2                       ; @SYNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error: sending cmd to st95hf using SPI = %d\n"

	.comm	_ASYNC,4,2                      ; @ASYNC
l_.str.1:                               ; @.str.1
	.asciz	"error: response not ready timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
