	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function solo_i2c_master_xfer
_solo_i2c_master_xfer:                  ## @solo_i2c_master_xfer
	.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, %r14
	movq	(%rdi), %r13
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movq	_SOLO_I2C_ADAPTERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.8:
	movq	40(%r13), %rcx
	addq	$-8, %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	addq	$8, %rcx
	cmpq	%r14, %rcx
	je	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_9
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
LBB0_2:
	cmpl	%eax, %ebx
	je	LBB0_11
## %bb.3:
	leaq	16(%r13), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movl	%ebx, (%r13)
	movq	%r12, 32(%r13)
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, 4(%r13)
	movq	$0, 24(%r13)
	movq	_SOLO_IIC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_solo_reg_write
	movq	_SOLO_IRQ_IIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_solo_irq_on
	movq	%r13, %rdi
	callq	_solo_i2c_start
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %r15
	leaq	20(%r13), %rbx
	movq	_wait@GOTPCREL(%rip), %r12
	movq	_IIC_STATE_STOP@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_prepare_to_wait
	movq	8(%r13), %rax
	cmpq	(%r14), %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_schedule_timeout
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r15
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_4
LBB0_7:
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_finish_wait
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	subl	4(%r13), %r15d
	movq	_IIC_STATE_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	movl	$-1, (%r13)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_11:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_SOLO_I2C_ADAPTERS,4,2          ## @SOLO_I2C_ADAPTERS
	.comm	_SOLO_IIC_CTRL,4,2              ## @SOLO_IIC_CTRL
	.comm	_SOLO_IRQ_IIC,4,2               ## @SOLO_IRQ_IIC
	.comm	_HZ,4,2                         ## @HZ
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_IIC_STATE_STOP,8,3             ## @IIC_STATE_STOP
	.comm	_current,4,2                    ## @current
	.comm	_IIC_STATE_IDLE,8,3             ## @IIC_STATE_IDLE
	.no_dead_strip	_solo_i2c_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function solo_i2c_master_xfer
_solo_i2c_master_xfer:                  ; @solo_i2c_master_xfer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
Lloh3:
	adrp	x8, _SOLO_I2C_ADAPTERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOLO_I2C_ADAPTERS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
	ldr	x9, [x20, #40]
	sub	x9, x9, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x9, x9, #8
	cmp	x9, x21
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	cmp	x8, x23
	b.ne	LBB0_2
	b	LBB0_11
LBB0_4:
	mov	w23, #0
LBB0_5:
	cmp	w23, w8
	b.eq	LBB0_11
; %bb.6:
	add	x21, x20, #16
	mov	x0, x21
	bl	_mutex_lock
	stp	w23, w19, [x20]
	stp	xzr, x22, [x20, #24]
Lloh6:
	adrp	x8, _SOLO_IIC_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOLO_IIC_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_solo_reg_write
Lloh9:
	adrp	x8, _SOLO_IRQ_IIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOLO_IRQ_IIC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_solo_irq_on
	mov	x0, x20
	bl	_solo_i2c_start
Lloh12:
	adrp	x8, _HZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	sbfx	x23, x8, #1, #31
	add	x22, x20, #20
Lloh15:
	adrp	x25, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh16:
	ldr	x25, [x25, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh17:
	adrp	x24, _wait@GOTPAGE
Lloh18:
	ldr	x24, [x24, _wait@GOTPAGEOFF]
Lloh19:
	adrp	x26, _IIC_STATE_STOP@GOTPAGE
Lloh20:
	ldr	x26, [x26, _IIC_STATE_STOP@GOTPAGEOFF]
Lloh21:
	adrp	x27, _current@GOTPAGE
Lloh22:
	ldr	x27, [x27, _current@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x25]
	mov	x0, x22
	mov	x1, x24
	bl	_prepare_to_wait
	ldr	x8, [x20, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_schedule_timeout
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x23, x0
	ldr	w0, [x27]
	bl	_signal_pending
	cbz	x0, LBB0_7
LBB0_10:
Lloh23:
	adrp	x1, _wait@GOTPAGE
Lloh24:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x22
	bl	_finish_wait
	ldr	w8, [x20, #4]
	sub	w19, w19, w8
Lloh25:
	adrp	x8, _IIC_STATE_IDLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IIC_STATE_IDLE@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	str	x8, [x20, #8]
	mov	w8, #-1
	str	w8, [x20]
	mov	x0, x21
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_SOLO_I2C_ADAPTERS,4,2          ; @SOLO_I2C_ADAPTERS
	.comm	_SOLO_IIC_CTRL,4,2              ; @SOLO_IIC_CTRL
	.comm	_SOLO_IRQ_IIC,4,2               ; @SOLO_IRQ_IIC
	.comm	_HZ,4,2                         ; @HZ
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_IIC_STATE_STOP,8,3             ; @IIC_STATE_STOP
	.comm	_current,4,2                    ; @current
	.comm	_IIC_STATE_IDLE,8,3             ; @IIC_STATE_IDLE
	.no_dead_strip	_solo_i2c_master_xfer
.subsections_via_symbols
