	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m920x_i2c_xfer
_m920x_i2c_xfer:                        ## @m920x_i2c_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, %ebx
	movq	%rsi, %r15
	callq	_i2c_get_adapdata
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_17
## %bb.1:
	testl	%ebx, %ebx
	jle	LBB0_21
## %bb.2:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ebx
	xorl	%r13d, %r13d
	movq	_I2C_M_NO_RD_ACK@GOTPCREL(%rip), %rax
	movq	_I2C_M_IGNORE_NAK@GOTPCREL(%rip), %rcx
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rdx
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rsi
	movq	_I2C_M_RD@GOTPCREL(%rip), %r12
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	leaq	(,%r13,2), %r14
	addq	%r13, %r14
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	(%r15,%r14,8), %eax
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	jne	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 4(%r15,%r14,8)
	je	LBB0_20
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, (%rsi)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %edi
	movq	_M9206_I2C@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	8(%r15,%r14,8), %ecx
	xorl	%edx, %edx
	andl	(%r12), %eax
	setne	%dl
	leal	(%rdx,%rcx,2), %edx
	movl	$128, %ecx
	callq	_m920x_write
	testl	%eax, %eax
	jne	LBB0_23
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r15,%r14,8), %rax
	movl	(%rax), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r15,%r14,8), %r14
	addq	$4, %r14
	incq	%r13
	testl	%eax, (%r12)
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%r14), %rax
	cmpq	%rax, %r12
	jge	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	%eax, %eax
	movq	%r13, %rcx
	xorq	%rbx, %rcx
	incq	%r12
	xorq	%r12, %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	4(%rdx), %edi
	movq	_M9206_I2C@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orq	%rcx, %rax
	movl	$33, %ecx
	movl	$96, %eax
	cmovel	%eax, %ecx
	movq	12(%r14), %r8
	addq	%r15, %r8
	xorl	%edx, %edx
	movl	$1, %r9d
	callq	_m920x_read
	addq	$4, %r15
	testl	%eax, %eax
	je	LBB0_10
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%r14), %rax
	cmpq	%rax, %rdx
	jge	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	%eax, %eax
	movq	%r13, %rsi
	xorq	%rbx, %rsi
	movq	%rbx, %r15
	leaq	1(%rdx), %rbx
	xorq	%rbx, %rax
	xorl	%ecx, %ecx
	orq	%rsi, %rax
	sete	%cl
	shll	$6, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	_M9206_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	12(%r14), %rax
	movl	(%rax,%rdx,4), %edx
	callq	_m920x_write
	movq	%rbx, %rdx
	movq	%r15, %rbx
	testl	%eax, %eax
	je	LBB0_13
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rbx, %r13
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	_I2C_M_NO_RD_ACK@GOTPCREL(%rip), %rax
	movq	_I2C_M_IGNORE_NAK@GOTPCREL(%rip), %rcx
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rdx
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rsi
	movq	_I2C_M_RD@GOTPCREL(%rip), %r12
	jne	LBB0_3
## %bb.16:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_21
LBB0_17:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_23:
	movl	%eax, %ebx
LBB0_21:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_22:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_I2C_M_NO_RD_ACK,4,2            ## @I2C_M_NO_RD_ACK
	.comm	_I2C_M_IGNORE_NAK,4,2           ## @I2C_M_IGNORE_NAK
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_I2C_M_NOSTART,4,2              ## @I2C_M_NOSTART
	.comm	_M9206_I2C,4,2                  ## @M9206_I2C
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_m920x_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m920x_i2c_xfer
_m920x_i2c_xfer:                        ; @m920x_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_17
; %bb.1:
	cmp	w19, #1
	b.lt	LBB0_19
; %bb.2:
	mov	x26, #0
	mov	w8, #24
Lloh0:
	adrp	x9, _I2C_M_NO_RD_ACK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_NO_RD_ACK@GOTPAGEOFF]
Lloh2:
	adrp	x10, _I2C_M_IGNORE_NAK@GOTPAGE
Lloh3:
	ldr	x10, [x10, _I2C_M_IGNORE_NAK@GOTPAGEOFF]
Lloh4:
	adrp	x11, _I2C_M_TEN@GOTPAGE
Lloh5:
	ldr	x11, [x11, _I2C_M_TEN@GOTPAGEOFF]
	mov	w28, #33
Lloh6:
	adrp	x23, _M9206_I2C@GOTPAGE
Lloh7:
	ldr	x23, [x23, _M9206_I2C@GOTPAGEOFF]
	mov	w27, #96
	str	w19, [sp, #4]                   ; 4-byte Folded Spill
	mov	w25, w19
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	madd	x22, x26, x8, x21
	ldr	w8, [x22]
	ldr	w9, [x9]
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x11]
	orr	w9, w9, w10
	tst	w9, w8
	mov	w19, #24
	b.ne	LBB0_21
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x24, x26, x19, x21
	ldr	w9, [x24, #4]!
	cbz	w9, LBB0_21
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh8:
	adrp	x9, _I2C_M_NOSTART@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_M_NOSTART@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20, #4]
	ldr	w1, [x23]
	madd	x9, x26, x19, x21
	ldr	w9, [x9, #8]
Lloh11:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh12:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w2, ne
	bfi	w2, w9, #1, #31
	mov	w3, #128
	bl	_m920x_write
	cbnz	w0, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh14:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	add	x22, x26, #1
	madd	x10, x26, x19, x21
	add	x26, x10, #16
	tst	w9, w8
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, #0
	mov	x21, #0
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x8, [x24]
	cmp	x21, x8
	b.ge	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	and	x8, x8, #0xffffffff
	add	x21, x21, #1
	cmp	x21, x8
	ccmp	x22, x25, #0, eq
	ldr	w0, [x20, #4]
	ldr	w1, [x23]
	csel	w3, w27, w28, eq
	ldr	x8, [x26]
	add	x4, x8, x19
	mov	w2, #0
	mov	w5, #1
	bl	_m920x_read
	add	x19, x19, #4
	cbz	w0, LBB0_10
	b	LBB0_18
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, #0
LBB0_13:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x9, [x24]
	cmp	x8, x9
	b.ge	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	and	x9, x9, #0xffffffff
	add	x19, x8, #1
	cmp	x19, x9
	ccmp	x22, x25, #0, eq
	mov	w9, #64
	csel	w3, w9, wzr, eq
	ldr	w0, [x20, #4]
	ldr	w1, [x23]
	ldr	x9, [x26]
	ldr	w2, [x9, x8, lsl #2]
	bl	_m920x_write
	mov	x8, x19
	cbz	w0, LBB0_13
	b	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x22
	cmp	x22, x25
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	mov	w8, #24
Lloh17:
	adrp	x9, _I2C_M_NO_RD_ACK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _I2C_M_NO_RD_ACK@GOTPAGEOFF]
Lloh19:
	adrp	x10, _I2C_M_IGNORE_NAK@GOTPAGE
Lloh20:
	ldr	x10, [x10, _I2C_M_IGNORE_NAK@GOTPAGEOFF]
Lloh21:
	adrp	x11, _I2C_M_TEN@GOTPAGE
Lloh22:
	ldr	x11, [x11, _I2C_M_TEN@GOTPAGEOFF]
	b.ne	LBB0_3
; %bb.16:
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
	b	LBB0_19
LBB0_17:
Lloh23:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_20
LBB0_18:
	mov	x19, x0
LBB0_19:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_21:
Lloh26:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_19
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_I2C_M_NO_RD_ACK,4,2            ; @I2C_M_NO_RD_ACK
	.comm	_I2C_M_IGNORE_NAK,4,2           ; @I2C_M_IGNORE_NAK
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_I2C_M_NOSTART,4,2              ; @I2C_M_NOSTART
	.comm	_M9206_I2C,4,2                  ; @M9206_I2C
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_m920x_i2c_xfer
.subsections_via_symbols
