	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zforce_send_wait
_zforce_send_wait:                      ## @zforce_send_wait
	.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	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	24(%rdi), %r14
	leaq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_mutex_trylock
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movsbl	1(%r12), %edx
	movsbl	2(%r12), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movb	2(%r12), %al
	movb	%al, (%r13)
	movq	%r14, %rbx
	leaq	16(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_i2c_master_send
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.4:
	movsbl	2(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	leaq	12(%r13), %rdi
	movq	_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	4(%r13), %r15d
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_5:
	movq	_ETIME@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"already waiting for a command\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"sending %d bytes for command 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"i2c send data request error: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"waiting for result for command 0x%x\n"

	.comm	_WAIT_TIMEOUT,4,2               ## @WAIT_TIMEOUT
	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_zforce_send_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zforce_send_wait
_zforce_send_wait:                      ; @zforce_send_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x21, [x0, #24]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_trylock
	cbz	w0, LBB0_4
; %bb.1:
	ldrsb	w2, [x22, #1]
	ldrsb	x8, [x22, #2]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldrb	w8, [x22, #2]
	mov	x24, x20
	strb	w8, [x24], #16
	mov	x0, x24
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_i2c_master_send
	mov	x23, x0
	mov	x0, x24
	bl	_mutex_unlock
	tbnz	w23, #31, LBB0_5
; %bb.2:
	ldrsb	w2, [x22, #2]
Lloh2:
	adrp	x1, l_.str.3@PAGE
Lloh3:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	add	x0, x20, #12
Lloh4:
	adrp	x8, _WAIT_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WAIT_TIMEOUT@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w23, [x20, #4]
	b	LBB0_7
LBB0_4:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_8
LBB0_5:
	str	x23, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _ETIME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"already waiting for a command\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"sending %d bytes for command 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"i2c send data request error: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"waiting for result for command 0x%x\n"

	.comm	_WAIT_TIMEOUT,4,2               ; @WAIT_TIMEOUT
	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_zforce_send_wait
.subsections_via_symbols
