	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm8xxx_mpp_update
_pm8xxx_mpp_update:                     ## @pm8xxx_mpp_update
	.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	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.3:
	movl	4(%r15), %r13d
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.4:
	movq	_PM8XXX_MPP_TYPE_DTEST_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	decl	%r13d
	jmp	LBB0_22
LBB0_5:
	movslq	28(%r15), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	sarq	$33, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %ebx
	decl	%ebx
	movl	4(%r15), %r13d
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.6:
	movq	_PM8XXX_MPP_TYPE_DTEST_SINK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	decl	%r13d
	jmp	LBB0_23
LBB0_7:
	cmpl	$0, 40(%r15)
	je	LBB0_16
## %bb.8:
	movq	_PM8XXX_MPP_TYPE_A_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	12(%r15), %r13d
	movl	20(%r15), %ebx
	cmpl	$0, 36(%r15)
	jne	LBB0_15
	jmp	LBB0_23
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_10:
	cmpl	$0, 44(%r15)
	je	LBB0_17
## %bb.11:
	cmpl	$0, 40(%r15)
	je	LBB0_20
## %bb.12:
	movq	_PM8XXX_MPP_TYPE_D_BI_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpl	$0, 48(%r15)
	je	LBB0_27
## %bb.13:
	movq	_PM8XXX_MPP_BI_PULLUP_OPEN@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_14:
	movq	_PM8XXX_MPP_TYPE_SINK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	12(%r15), %r13d
	cmpl	$0, 36(%r15)
	je	LBB0_23
LBB0_15:
	movl	$1, %edi
	callq	_BIT
	orl	%eax, %r13d
	jmp	LBB0_23
LBB0_16:
	movq	_PM8XXX_MPP_TYPE_A_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	24(%r15), %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_23
LBB0_17:
	movq	_PM8XXX_MPP_TYPE_D_OUTPUT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	cmpl	$0, 12(%r15)
	movl	(%rax), %r12d
	setne	%r13b
	cmpl	$0, 36(%r15)
	je	LBB0_22
## %bb.18:
	movl	$1, %edi
	callq	_BIT
	orl	%eax, %r13d
	jmp	LBB0_22
LBB0_20:
	movq	_PM8XXX_MPP_TYPE_D_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_PM8XXX_MPP_DIN_TO_INT@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %r13d
LBB0_22:
	movl	16(%r15), %ebx
LBB0_23:
	shll	$5, %r12d
	shll	$2, %ebx
	orl	%r13d, %ebx
	orl	%r12d, %ebx
	movl	4(%r14), %edi
	movl	32(%r15), %esi
	movl	%ebx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_26
LBB0_25:
	xorl	%ebx, %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movl	8(%r15), %eax
	cmpl	$10000, %eax                    ## imm = 0x2710
	je	LBB0_30
## %bb.28:
	cmpl	$600, %eax                      ## imm = 0x258
	jne	LBB0_31
## %bb.29:
	movq	_PM8XXX_MPP_BI_PULLUP_1KOHM@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_30:
	movq	_PM8XXX_MPP_BI_PULLUP_10KOHM@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_31:
	movq	_PM8XXX_MPP_BI_PULLUP_30KOHM@GOTPCREL(%rip), %rax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_PM8XXX_MPP_TYPE_DTEST_OUTPUT,4,2 ## @PM8XXX_MPP_TYPE_DTEST_OUTPUT
	.comm	_PM8XXX_MPP_TYPE_D_BI_DIR,4,2   ## @PM8XXX_MPP_TYPE_D_BI_DIR
	.comm	_PM8XXX_MPP_BI_PULLUP_OPEN,4,2  ## @PM8XXX_MPP_BI_PULLUP_OPEN
	.comm	_PM8XXX_MPP_BI_PULLUP_1KOHM,4,2 ## @PM8XXX_MPP_BI_PULLUP_1KOHM
	.comm	_PM8XXX_MPP_BI_PULLUP_10KOHM,4,2 ## @PM8XXX_MPP_BI_PULLUP_10KOHM
	.comm	_PM8XXX_MPP_BI_PULLUP_30KOHM,4,2 ## @PM8XXX_MPP_BI_PULLUP_30KOHM
	.comm	_PM8XXX_MPP_TYPE_D_INPUT,4,2    ## @PM8XXX_MPP_TYPE_D_INPUT
	.comm	_PM8XXX_MPP_DIN_TO_INT,4,2      ## @PM8XXX_MPP_DIN_TO_INT
	.comm	_PM8XXX_MPP_TYPE_D_OUTPUT,4,2   ## @PM8XXX_MPP_TYPE_D_OUTPUT
	.comm	_PM8XXX_MPP_TYPE_A_OUTPUT,4,2   ## @PM8XXX_MPP_TYPE_A_OUTPUT
	.comm	_PM8XXX_MPP_TYPE_A_INPUT,4,2    ## @PM8XXX_MPP_TYPE_A_INPUT
	.comm	_PM8XXX_MPP_TYPE_DTEST_SINK,4,2 ## @PM8XXX_MPP_TYPE_DTEST_SINK
	.comm	_PM8XXX_MPP_TYPE_SINK,4,2       ## @PM8XXX_MPP_TYPE_SINK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write register\n"

	.no_dead_strip	_pm8xxx_mpp_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm8xxx_mpp_update
_pm8xxx_mpp_update:                     ; @pm8xxx_mpp_update
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.3:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_10
; %bb.4:
Lloh0:
	adrp	x9, _PM8XXX_MPP_TYPE_DTEST_OUTPUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PM8XXX_MPP_TYPE_DTEST_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x9]
	sub	w22, w8, #1
	b	LBB0_22
LBB0_5:
	ldrsw	x8, [x20, #28]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	sub	w23, w8, #1
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_14
; %bb.6:
Lloh3:
	adrp	x9, _PM8XXX_MPP_TYPE_DTEST_SINK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PM8XXX_MPP_TYPE_DTEST_SINK@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x9]
	sub	w22, w8, #1
	b	LBB0_23
LBB0_7:
	ldr	w8, [x20, #40]
	cbz	w8, LBB0_17
; %bb.8:
Lloh6:
	adrp	x8, _PM8XXX_MPP_TYPE_A_OUTPUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PM8XXX_MPP_TYPE_A_OUTPUT@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	ldr	w23, [x20, #20]
	b	LBB0_15
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_25
LBB0_10:
	ldr	w8, [x20, #44]
	cbz	w8, LBB0_18
; %bb.11:
	ldr	w8, [x20, #40]
	cbz	w8, LBB0_20
; %bb.12:
Lloh12:
	adrp	x8, _PM8XXX_MPP_TYPE_D_BI_DIR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PM8XXX_MPP_TYPE_D_BI_DIR@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	ldr	w8, [x20, #48]
	cbz	w8, LBB0_26
; %bb.13:
Lloh15:
	adrp	x8, _PM8XXX_MPP_BI_PULLUP_OPEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PM8XXX_MPP_BI_PULLUP_OPEN@GOTPAGEOFF]
	b	LBB0_21
LBB0_14:
Lloh17:
	adrp	x8, _PM8XXX_MPP_TYPE_SINK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PM8XXX_MPP_TYPE_SINK@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
LBB0_15:
	ldr	w22, [x20, #12]
	ldr	w8, [x20, #36]
	cbz	w8, LBB0_23
; %bb.16:
	mov	w0, #1
	bl	_BIT
	orr	w22, w0, w22
	b	LBB0_23
LBB0_17:
	mov	w22, #0
Lloh20:
	adrp	x8, _PM8XXX_MPP_TYPE_A_INPUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PM8XXX_MPP_TYPE_A_INPUT@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
	ldr	w23, [x20, #24]
	b	LBB0_23
LBB0_18:
Lloh23:
	adrp	x8, _PM8XXX_MPP_TYPE_D_OUTPUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PM8XXX_MPP_TYPE_D_OUTPUT@GOTPAGEOFF]
Lloh25:
	ldr	w21, [x8]
	ldr	w8, [x20, #12]
	cmp	w8, #0
	cset	w22, ne
	ldr	w8, [x20, #36]
	cbz	w8, LBB0_22
; %bb.19:
	mov	w0, #1
	bl	_BIT
	orr	w22, w0, w22
	b	LBB0_22
LBB0_20:
Lloh26:
	adrp	x8, _PM8XXX_MPP_TYPE_D_INPUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PM8XXX_MPP_TYPE_D_INPUT@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x8]
Lloh29:
	adrp	x8, _PM8XXX_MPP_DIN_TO_INT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PM8XXX_MPP_DIN_TO_INT@GOTPAGEOFF]
LBB0_21:
	ldr	w22, [x8]
LBB0_22:
	ldr	w23, [x20, #16]
LBB0_23:
	orr	w8, w22, w21, lsl #5
	orr	w2, w8, w23, lsl #2
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #32]
	bl	_regmap_write
	mov	x20, x0
	cbz	w0, LBB0_25
; %bb.24:
	ldr	w0, [x19]
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_25:
	mov	x0, x20
	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_26:
	ldr	w8, [x20, #8]
	mov	w9, #10000
	cmp	w8, w9
	b.eq	LBB0_29
; %bb.27:
	cmp	w8, #600
	b.ne	LBB0_30
; %bb.28:
Lloh33:
	adrp	x8, _PM8XXX_MPP_BI_PULLUP_1KOHM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PM8XXX_MPP_BI_PULLUP_1KOHM@GOTPAGEOFF]
	b	LBB0_21
LBB0_29:
Lloh35:
	adrp	x8, _PM8XXX_MPP_BI_PULLUP_10KOHM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PM8XXX_MPP_BI_PULLUP_10KOHM@GOTPAGEOFF]
	b	LBB0_21
LBB0_30:
Lloh37:
	adrp	x8, _PM8XXX_MPP_BI_PULLUP_30KOHM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PM8XXX_MPP_BI_PULLUP_30KOHM@GOTPAGEOFF]
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_PM8XXX_MPP_TYPE_DTEST_OUTPUT,4,2 ; @PM8XXX_MPP_TYPE_DTEST_OUTPUT
	.comm	_PM8XXX_MPP_TYPE_D_BI_DIR,4,2   ; @PM8XXX_MPP_TYPE_D_BI_DIR
	.comm	_PM8XXX_MPP_BI_PULLUP_OPEN,4,2  ; @PM8XXX_MPP_BI_PULLUP_OPEN
	.comm	_PM8XXX_MPP_BI_PULLUP_1KOHM,4,2 ; @PM8XXX_MPP_BI_PULLUP_1KOHM
	.comm	_PM8XXX_MPP_BI_PULLUP_10KOHM,4,2 ; @PM8XXX_MPP_BI_PULLUP_10KOHM
	.comm	_PM8XXX_MPP_BI_PULLUP_30KOHM,4,2 ; @PM8XXX_MPP_BI_PULLUP_30KOHM
	.comm	_PM8XXX_MPP_TYPE_D_INPUT,4,2    ; @PM8XXX_MPP_TYPE_D_INPUT
	.comm	_PM8XXX_MPP_DIN_TO_INT,4,2      ; @PM8XXX_MPP_DIN_TO_INT
	.comm	_PM8XXX_MPP_TYPE_D_OUTPUT,4,2   ; @PM8XXX_MPP_TYPE_D_OUTPUT
	.comm	_PM8XXX_MPP_TYPE_A_OUTPUT,4,2   ; @PM8XXX_MPP_TYPE_A_OUTPUT
	.comm	_PM8XXX_MPP_TYPE_A_INPUT,4,2    ; @PM8XXX_MPP_TYPE_A_INPUT
	.comm	_PM8XXX_MPP_TYPE_DTEST_SINK,4,2 ; @PM8XXX_MPP_TYPE_DTEST_SINK
	.comm	_PM8XXX_MPP_TYPE_SINK,4,2       ; @PM8XXX_MPP_TYPE_SINK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write register\n"

	.no_dead_strip	_pm8xxx_mpp_update
.subsections_via_symbols
