	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxd2841er_write_regs
_cxd2841er_write_regs:                  ## @cxd2841er_write_regs
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_WRITE_REGSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	incl	%ebx
	shlq	$3, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_I2C_SLVX@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	%r12, (%rax)
	setne	%cl
	movq	(%r13,%rcx,8), %rsi
	movq	%rsi, -80(%rbp)
	movq	%r14, -72(%rbp)
	leal	1(%r15), %ecx
	movl	%ecx, -64(%rbp)
	movl	$0, -60(%rbp)
	movslq	%ecx, %rax
	cmpq	%rax, %rbx
	jbe	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	$1, %ecx
	movq	%r15, %r12
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %r8
	movl	%r12d, %r9d
	callq	_cxd2841er_i2c_debug
	movq	%rbx, (%r14)
	addq	$8, %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movq	16(%r13), %rdi
	leaq	-80(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	xorl	%r14d, %r14d
	cmpl	$1, %eax
	cmovel	%eax, %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_4
## %bb.3:
	movq	16(%r13), %rdi
	movq	_KBUILD_MODNAME@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %ecx
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	xorl	%eax, %eax
	pushq	%r12
	callq	_dev_warn
	addq	$16, %rsp
	movl	%ebx, %r14d
	jmp	LBB0_4
LBB0_1:
	movq	16(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_E2BIG@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_WRITE_REGSIZE,4,2          ## @MAX_WRITE_REGSIZE
	.comm	_I2C_SLVX,8,3                   ## @I2C_SLVX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wr reg=%04x: len=%d is too big!\n"

	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"%s: i2c wr failed=%d addr=%02x reg=%02x len=%d\n"

	.comm	_KBUILD_MODNAME,4,2             ## @KBUILD_MODNAME
	.no_dead_strip	_cxd2841er_write_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxd2841er_write_regs
_cxd2841er_write_regs:                  ; @cxd2841er_write_regs
	.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
	sub	sp, sp, #32
	mov	x20, x4
	mov	x23, x3
	mov	x19, x2
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAX_WRITE_REGSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_WRITE_REGSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #1
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0xffffffff0
	sub	x24, x9, x10
	mov	sp, x24
Lloh8:
	adrp	x9, _I2C_SLVX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_SLVX@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x1
	cset	w9, ne
	ldr	x22, [x0, w9, uxtw #3]
	stp	x22, x24, [x29, #-80]
	add	w3, w4, #1
	stp	w3, wzr, [x29, #-64]
	cmp	x8, w3, sxtw
	b.ls	LBB0_3
; %bb.1:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	w3, #1
	mov	x4, x23
	mov	x5, x20
	bl	_cxd2841er_i2c_debug
	str	x19, [x24], #8
	mov	x0, x24
	mov	x1, x23
	mov	x2, x20
	bl	_memcpy
	ldr	x0, [x21, #16]
	sub	x1, x29, #80
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	mov	w8, #-1
	ccmp	w0, w8, #4, ne
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	csneg	w23, w0, w8, le
	tbnz	w23, #31, LBB0_4
; %bb.2:
	mov	w23, #0
	b	LBB0_5
LBB0_3:
	ldr	x0, [x21, #16]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_warn
Lloh16:
	adrp	x8, _E2BIG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_5
LBB0_4:
	ldr	x0, [x21, #16]
Lloh19:
	adrp	x8, _KBUILD_MODNAME@GOTPAGE
Lloh20:
	ldr	x8, [x8, _KBUILD_MODNAME@GOTPAGEOFF]
Lloh21:
	ldrsw	x2, [x8]
	sub	sp, sp, #32
	stp	x19, x20, [sp, #8]
	str	x22, [sp]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x23
	bl	_dev_warn
	add	sp, sp, #32
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x23
	sub	sp, x29, #48
	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:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_WRITE_REGSIZE,4,2          ; @MAX_WRITE_REGSIZE
	.comm	_I2C_SLVX,8,3                   ; @I2C_SLVX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wr reg=%04x: len=%d is too big!\n"

	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"%s: i2c wr failed=%d addr=%02x reg=%02x len=%d\n"

	.comm	_KBUILD_MODNAME,4,2             ; @KBUILD_MODNAME
	.no_dead_strip	_cxd2841er_write_regs
.subsections_via_symbols
