	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm831x_write
_wm831x_write:                          ## @wm831x_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	andl	$-2, %eax
	movl	%edx, %edi
	subl	%eax, %edi
	callq	_BUG_ON
	xorl	%edi, %edi
	testl	%r15d, %r15d
	setle	%dil
	callq	_BUG_ON
	xorl	%eax, %eax
	cmpl	$2, %r15d
	jl	LBB0_7
## %bb.1:
	movl	%r13d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	shrl	%r15d
	movzwl	%r13w, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_wm831x_reg_locked
	testq	%rax, %rax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	movl	(%r14,%r12,4), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%r12d, %eax
	movzwl	%ax, %r13d
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %ecx
	movl	%r13d, %r8d
	callq	_dev_vdbg
	movl	(%rbx), %edi
	movl	(%r14,%r12,4), %edx
	movl	%r13d, %esi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	cmpq	%r12, %r15
	jne	LBB0_2
## %bb.5:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Write %04x to R%d(0x%x)\n"

	.no_dead_strip	_wm831x_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm831x_write
_wm831x_write:                          ; @wm831x_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	and	w8, w2, #0x1
	cmp	w2, #0
	cneg	w0, w8, lt
	bl	_BUG_ON
	cmp	w22, #1
	cset	w0, lt
	bl	_BUG_ON
	cmp	w22, #2
	b.lt	LBB0_5
; %bb.1:
	mov	x24, #0
	lsr	w25, w22, #1
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_wm831x_reg_locked
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x21, #4]
	lsl	x26, x24, #2
	ldr	w2, [x19, x26]
	add	w8, w24, w20
	and	w23, w8, #0xffff
	mov	x1, x22
	mov	x3, x23
	mov	x4, x23
	bl	_dev_vdbg
	ldr	w0, [x21]
	ldr	w2, [x19, x26]
	mov	x1, x23
	bl	_regmap_write
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	cmp	x25, x24
	b.ne	LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _EPERM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Write %04x to R%d(0x%x)\n"

	.no_dead_strip	_wm831x_write
.subsections_via_symbols
