	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda18218_wr_regs
_tda18218_wr_regs:                      ## @tda18218_wr_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leal	1(%r14), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%rax, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	%r12, -144(%rbp)                ## 8-byte Spill
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	movl	%ecx, -64(%rbp)
	movslq	(%rax), %rsi
	leal	-1(%rsi), %ecx
	movl	%r14d, %eax
	cltd
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	idivl	%ecx
	movl	%eax, %ecx
	xorl	%r12d, %r12d
	movl	$0, %eax
	movl	%edx, -92(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	je	LBB0_7
## %bb.1:
	movl	$0, %eax
	testl	%ecx, %ecx
	js	LBB0_7
## %bb.2:
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	movq	-104(%rbp), %rax                ## 8-byte Reload
	addq	$4, %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movl	%ecx, %r12d
	leaq	-4(,%rsi,4), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%r12, -128(%rbp)                ## 8-byte Spill
	negq	%r12
	movq	$-1, %r14
	movl	%r15d, -88(%rbp)                ## 4-byte Spill
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r12,%r14), %rax
	cmpq	$-1, %rax
	cmovel	-92(%rbp), %r13d                ## 4-byte Folded Reload
	leal	1(%r13), %eax
	movl	%eax, -72(%rbp)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	%r15d, (%rax)
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movq	-144(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edi
	leaq	-80(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	addl	-84(%rbp), %r15d                ## 4-byte Folded Reload
	addq	-120(%rbp), %rbx                ## 8-byte Folded Reload
	cmpq	-128(%rbp), %r14                ## 8-byte Folded Reload
	jb	LBB0_3
## %bb.5:
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_6:
	movq	-112(%rbp), %r14                ## 8-byte Reload
	movl	-88(%rbp), %r15d                ## 4-byte Reload
	xorl	%r12d, %r12d
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_warn
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c wr failed ret:%d reg:%02x len:%d"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_tda18218_wr_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda18218_wr_regs
_tda18218_wr_regs:                      ; @tda18218_wr_regs
	.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
	sub	sp, sp, #48
	mov	x21, x2
	mov	x2, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	add	w8, w3, #1
	lsl	x8, x8, #2
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	mov	w1, #0
	stp	x25, xzr, [x29, #-112]
	stur	x0, [x29, #-120]                ; 8-byte Folded Spill
	ldr	x8, [x0, #8]
	ldr	w9, [x8, #4]
	stur	w9, [x29, #-96]
	ldr	w8, [x8]
	sub	w26, w8, #1
	sdiv	w27, w3, w26
	msub	w28, w27, w26, w3
	cbz	w28, LBB0_7
; %bb.1:
	tbnz	w27, #31, LBB0_7
; %bb.2:
	stp	w2, w3, [x29, #-128]            ; 8-byte Folded Spill
	mov	x20, #0
	add	x23, x25, #4
	sbfiz	x19, x26, #2, #32
	mov	x22, x2
	mov	x24, x26
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, x20
	csel	w24, w28, w24, eq
	add	w8, w24, #1
	stur	w8, [x29, #-104]
	str	w22, [x25]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x24
	bl	_memcpy
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	ldr	w0, [x8]
	sub	x1, x29, #112
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x20, #1
	add	w22, w22, w26
	add	x21, x21, x19
	cmp	x20, x27
	mov	x20, x8
	b.lo	LBB0_3
; %bb.5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	mov	x1, x0
	ldp	w2, w3, [x29, #-128]            ; 8-byte Folded Reload
LBB0_7:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
Lloh7:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldur	x8, [x29, #-88]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	sub	sp, x29, #80
	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
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c wr failed ret:%d reg:%02x len:%d"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_tda18218_wr_regs
.subsections_via_symbols
