	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8925_init_charger
_max8925_init_charger:                  ## @max8925_init_charger
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	_MAX8925_IRQ_VCHG_DC_OVP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_REQUEST_IRQ
	cmpl	$0, 44(%rbx)
	je	LBB0_1
## %bb.2:
	cmpl	$0, 40(%rbx)
	je	LBB0_3
LBB0_4:
	movq	_MAX8925_IRQ_VCHG_SYSLOW_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	_MAX8925_IRQ_VCHG_SYSLOW_R@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	_MAX8925_IRQ_VCHG_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	_MAX8925_IRQ_VCHG_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	_MAX8925_IRQ_VCHG_TOPOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	_MAX8925_IRQ_VCHG_TMR_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.10(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	$0, 32(%rbx)
	movl	$0, (%rbx)
	movq	_MEASURE_VCHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_start_measure
	imull	$2000, %eax, %eax               ## imm = 0x7D0
	xorl	%ecx, %ecx
	cmpl	$500001, %eax                   ## imm = 0x7A121
	setge	%cl
	movl	%ecx, 4(%rbx)
	movl	16(%rbx), %edi
	movq	_MAX8925_CHG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_max8925_reg_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	cmpq	$0, 24(%rbx)
	sete	%cl
	movq	_MAX8925_CHG_MBDET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	sete	%dl
	orb	%cl, %dl
	movzbl	%dl, %ecx
	movl	%ecx, (%rbx)
	movq	_MAX8925_CHG_AC_RANGE_MASK@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, 4(%rbx)
LBB0_6:
	movl	16(%rbx), %edi
	movq	_MAX8925_CHG_CNTL1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$128, %edx
	movl	$128, %ecx
	callq	_max8925_set_bits
	movl	8(%rbx), %ecx
	movl	16(%rbx), %edi
	movl	(%r14), %esi
	shll	$5, %ecx
	movl	$96, %edx
	callq	_max8925_set_bits
	movl	12(%rbx), %ecx
	movl	16(%rbx), %edi
	movl	(%r14), %esi
	movl	$7, %edx
	callq	_max8925_set_bits
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	_MAX8925_IRQ_VCHG_DC_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	_MAX8925_IRQ_VCHG_DC_R@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_REQUEST_IRQ
	cmpl	$0, 40(%rbx)
	jne	LBB0_4
LBB0_3:
	movq	_MAX8925_IRQ_VCHG_THM_OK_R@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_REQUEST_IRQ
	movq	_MAX8925_IRQ_VCHG_THM_OK_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_REQUEST_IRQ
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX8925_IRQ_VCHG_DC_OVP,4,2    ## @MAX8925_IRQ_VCHG_DC_OVP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ac-ovp"

	.comm	_MAX8925_IRQ_VCHG_DC_F,4,2      ## @MAX8925_IRQ_VCHG_DC_F
L_.str.1:                               ## @.str.1
	.asciz	"ac-remove"

	.comm	_MAX8925_IRQ_VCHG_DC_R,4,2      ## @MAX8925_IRQ_VCHG_DC_R
L_.str.2:                               ## @.str.2
	.asciz	"ac-insert"

	.comm	_MAX8925_IRQ_VCHG_THM_OK_R,4,2  ## @MAX8925_IRQ_VCHG_THM_OK_R
L_.str.3:                               ## @.str.3
	.asciz	"batt-temp-in-range"

	.comm	_MAX8925_IRQ_VCHG_THM_OK_F,4,2  ## @MAX8925_IRQ_VCHG_THM_OK_F
L_.str.4:                               ## @.str.4
	.asciz	"batt-temp-out-range"

	.comm	_MAX8925_IRQ_VCHG_SYSLOW_F,4,2  ## @MAX8925_IRQ_VCHG_SYSLOW_F
L_.str.5:                               ## @.str.5
	.asciz	"vsys-high"

	.comm	_MAX8925_IRQ_VCHG_SYSLOW_R,4,2  ## @MAX8925_IRQ_VCHG_SYSLOW_R
L_.str.6:                               ## @.str.6
	.asciz	"vsys-low"

	.comm	_MAX8925_IRQ_VCHG_RST,4,2       ## @MAX8925_IRQ_VCHG_RST
L_.str.7:                               ## @.str.7
	.asciz	"charger-reset"

	.comm	_MAX8925_IRQ_VCHG_DONE,4,2      ## @MAX8925_IRQ_VCHG_DONE
L_.str.8:                               ## @.str.8
	.asciz	"charger-done"

	.comm	_MAX8925_IRQ_VCHG_TOPOFF,4,2    ## @MAX8925_IRQ_VCHG_TOPOFF
L_.str.9:                               ## @.str.9
	.asciz	"charger-topoff"

	.comm	_MAX8925_IRQ_VCHG_TMR_FAULT,4,2 ## @MAX8925_IRQ_VCHG_TMR_FAULT
L_.str.10:                              ## @.str.10
	.asciz	"charger-timer-expire"

	.comm	_MEASURE_VCHG,4,2               ## @MEASURE_VCHG
	.comm	_MAX8925_CHG_STATUS,4,2         ## @MAX8925_CHG_STATUS
	.comm	_MAX8925_CHG_MBDET,4,2          ## @MAX8925_CHG_MBDET
	.comm	_MAX8925_CHG_AC_RANGE_MASK,4,2  ## @MAX8925_CHG_AC_RANGE_MASK
	.comm	_MAX8925_CHG_CNTL1,4,2          ## @MAX8925_CHG_CNTL1
	.no_dead_strip	_max8925_init_charger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max8925_init_charger
_max8925_init_charger:                  ; @max8925_init_charger
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _MAX8925_IRQ_VCHG_DC_OVP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_DC_OVP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_REQUEST_IRQ
	ldr	w8, [x19, #44]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_6
LBB0_2:
Lloh5:
	adrp	x8, _MAX8925_IRQ_VCHG_SYSLOW_F@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_SYSLOW_F@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_REQUEST_IRQ
Lloh10:
	adrp	x8, _MAX8925_IRQ_VCHG_SYSLOW_R@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_SYSLOW_R@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.6@PAGE
Lloh14:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_REQUEST_IRQ
Lloh15:
	adrp	x8, _MAX8925_IRQ_VCHG_RST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_RST@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.7@PAGE
Lloh19:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_REQUEST_IRQ
Lloh20:
	adrp	x8, _MAX8925_IRQ_VCHG_DONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_DONE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.8@PAGE
Lloh24:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_REQUEST_IRQ
Lloh25:
	adrp	x8, _MAX8925_IRQ_VCHG_TOPOFF@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_TOPOFF@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str.9@PAGE
Lloh29:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_REQUEST_IRQ
Lloh30:
	adrp	x8, _MAX8925_IRQ_VCHG_TMR_FAULT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_TMR_FAULT@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str.10@PAGE
Lloh34:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_REQUEST_IRQ
	str	xzr, [x19, #32]
	str	wzr, [x19]
Lloh35:
	adrp	x8, _MEASURE_VCHG@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MEASURE_VCHG@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_start_measure
	mov	w8, #2000
	mul	w8, w0, w8
	mov	w9, #41248
	movk	w9, #7, lsl #16
	cmp	w8, w9
	cset	w8, gt
	str	w8, [x19, #4]
	ldr	w0, [x19, #16]
Lloh38:
	adrp	x8, _MAX8925_CHG_STATUS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MAX8925_CHG_STATUS@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	bl	_max8925_reg_read
	tbnz	w0, #31, LBB0_4
; %bb.3:
Lloh41:
	adrp	x8, _MAX8925_CHG_MBDET@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MAX8925_CHG_MBDET@GOTPAGEOFF]
	ldr	x9, [x19, #24]
Lloh43:
	ldr	w8, [x8]
	tst	w8, w0
	ccmp	x9, #0, #4, ne
	cset	w8, eq
	str	w8, [x19]
Lloh44:
	adrp	x8, _MAX8925_CHG_AC_RANGE_MASK@GOTPAGE
Lloh45:
	ldr	x8, [x8, _MAX8925_CHG_AC_RANGE_MASK@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	str	w8, [x19, #4]
LBB0_4:
	ldr	w0, [x19, #16]
Lloh47:
	adrp	x20, _MAX8925_CHG_CNTL1@GOTPAGE
Lloh48:
	ldr	x20, [x20, _MAX8925_CHG_CNTL1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #128
	mov	w3, #128
	bl	_max8925_set_bits
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
	ldr	w8, [x19, #8]
	lsl	w3, w8, #5
	mov	w2, #96
	bl	_max8925_set_bits
	ldr	w1, [x20]
	ldp	w3, w0, [x19, #12]
	mov	w2, #7
	bl	_max8925_set_bits
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh49:
	adrp	x8, _MAX8925_IRQ_VCHG_DC_F@GOTPAGE
Lloh50:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_DC_F@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
Lloh52:
	adrp	x1, l_.str.1@PAGE
Lloh53:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_REQUEST_IRQ
Lloh54:
	adrp	x8, _MAX8925_IRQ_VCHG_DC_R@GOTPAGE
Lloh55:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_DC_R@GOTPAGEOFF]
Lloh56:
	ldr	w0, [x8]
Lloh57:
	adrp	x1, l_.str.2@PAGE
Lloh58:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_REQUEST_IRQ
	ldr	w8, [x19, #40]
	cbnz	w8, LBB0_2
LBB0_6:
Lloh59:
	adrp	x8, _MAX8925_IRQ_VCHG_THM_OK_R@GOTPAGE
Lloh60:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_THM_OK_R@GOTPAGEOFF]
Lloh61:
	ldr	w0, [x8]
Lloh62:
	adrp	x1, l_.str.3@PAGE
Lloh63:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_REQUEST_IRQ
Lloh64:
	adrp	x8, _MAX8925_IRQ_VCHG_THM_OK_F@GOTPAGE
Lloh65:
	ldr	x8, [x8, _MAX8925_IRQ_VCHG_THM_OK_F@GOTPAGEOFF]
Lloh66:
	ldr	w0, [x8]
Lloh67:
	adrp	x1, l_.str.4@PAGE
Lloh68:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_REQUEST_IRQ
	b	LBB0_2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX8925_IRQ_VCHG_DC_OVP,4,2    ; @MAX8925_IRQ_VCHG_DC_OVP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ac-ovp"

	.comm	_MAX8925_IRQ_VCHG_DC_F,4,2      ; @MAX8925_IRQ_VCHG_DC_F
l_.str.1:                               ; @.str.1
	.asciz	"ac-remove"

	.comm	_MAX8925_IRQ_VCHG_DC_R,4,2      ; @MAX8925_IRQ_VCHG_DC_R
l_.str.2:                               ; @.str.2
	.asciz	"ac-insert"

	.comm	_MAX8925_IRQ_VCHG_THM_OK_R,4,2  ; @MAX8925_IRQ_VCHG_THM_OK_R
l_.str.3:                               ; @.str.3
	.asciz	"batt-temp-in-range"

	.comm	_MAX8925_IRQ_VCHG_THM_OK_F,4,2  ; @MAX8925_IRQ_VCHG_THM_OK_F
l_.str.4:                               ; @.str.4
	.asciz	"batt-temp-out-range"

	.comm	_MAX8925_IRQ_VCHG_SYSLOW_F,4,2  ; @MAX8925_IRQ_VCHG_SYSLOW_F
l_.str.5:                               ; @.str.5
	.asciz	"vsys-high"

	.comm	_MAX8925_IRQ_VCHG_SYSLOW_R,4,2  ; @MAX8925_IRQ_VCHG_SYSLOW_R
l_.str.6:                               ; @.str.6
	.asciz	"vsys-low"

	.comm	_MAX8925_IRQ_VCHG_RST,4,2       ; @MAX8925_IRQ_VCHG_RST
l_.str.7:                               ; @.str.7
	.asciz	"charger-reset"

	.comm	_MAX8925_IRQ_VCHG_DONE,4,2      ; @MAX8925_IRQ_VCHG_DONE
l_.str.8:                               ; @.str.8
	.asciz	"charger-done"

	.comm	_MAX8925_IRQ_VCHG_TOPOFF,4,2    ; @MAX8925_IRQ_VCHG_TOPOFF
l_.str.9:                               ; @.str.9
	.asciz	"charger-topoff"

	.comm	_MAX8925_IRQ_VCHG_TMR_FAULT,4,2 ; @MAX8925_IRQ_VCHG_TMR_FAULT
l_.str.10:                              ; @.str.10
	.asciz	"charger-timer-expire"

	.comm	_MEASURE_VCHG,4,2               ; @MEASURE_VCHG
	.comm	_MAX8925_CHG_STATUS,4,2         ; @MAX8925_CHG_STATUS
	.comm	_MAX8925_CHG_MBDET,4,2          ; @MAX8925_CHG_MBDET
	.comm	_MAX8925_CHG_AC_RANGE_MASK,4,2  ; @MAX8925_CHG_AC_RANGE_MASK
	.comm	_MAX8925_CHG_CNTL1,4,2          ; @MAX8925_CHG_CNTL1
	.no_dead_strip	_max8925_init_charger
.subsections_via_symbols
