	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs4270_i2c_write
_cs4270_i2c_write:                      ## @cs4270_i2c_write
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_CS4270_FIRSTREG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%esi, %eax
	ja	LBB0_6
## %bb.1:
	movl	%esi, %ebx
	movq	_CS4270_LASTREG@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	jb	LBB0_6
## %bb.2:
	movl	%edx, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %r13
	movl	%ebx, %ecx
	subl	%eax, %ecx
	xorl	%r15d, %r15d
	cmpl	%edx, (%r13,%rcx,4)
	je	LBB0_7
## %bb.3:
	movq	16(%r12), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_i2c_smbus_write_byte_data
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_CS4270_FIRSTREG@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%r14d, (%r13,%rbx,4)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_CS4270_FIRSTREG,4,2            ## @CS4270_FIRSTREG
	.comm	_CS4270_LASTREG,4,2             ## @CS4270_LASTREG
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c write failed\n"

	.no_dead_strip	_cs4270_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs4270_i2c_write
_cs4270_i2c_write:                      ; @cs4270_i2c_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x22, _CS4270_FIRSTREG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CS4270_FIRSTREG@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _CS4270_LASTREG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CS4270_LASTREG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #0, ls
	b.lo	LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x0]
	sub	w8, w1, w8
	ldr	w8, [x23, w8, uxtw #2]
	cmp	w8, w2
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_6
LBB0_3:
	ldr	x0, [x21, #16]
	mov	x1, x20
	mov	x2, x19
	bl	_i2c_smbus_write_byte_data
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w0, [x21, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w8, [x22]
	sub	w8, w20, w8
	str	w19, [x23, w8, uxtw #2]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CS4270_FIRSTREG,4,2            ; @CS4270_FIRSTREG
	.comm	_CS4270_LASTREG,4,2             ; @CS4270_LASTREG
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c write failed\n"

	.no_dead_strip	_cs4270_i2c_write
.subsections_via_symbols
