	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt9455_irq_handler_check_irq3_register
_rt9455_irq_handler_check_irq3_register: ## @rt9455_irq_handler_check_irq3_register
	.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, %r14
	movq	%rdi, %r12
	movq	16(%rdi), %r15
	movl	8(%rdi), %edi
	movq	_RT9455_REG_IRQ3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movl	8(%r12), %edi
	movq	_RT9455_REG_MASK3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movl	-44(%rbp), %ebx
	movq	_F_BSTBUSOVI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GET_MASK
	testl	%ebx, %eax
	je	LBB0_6
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	$1, %r13d
	jmp	LBB0_8
LBB0_6:
	xorl	%r13d, %r13d
LBB0_8:
	movl	-44(%rbp), %ebx
	movq	_F_BSTOLI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GET_MASK
	testl	%ebx, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	$1, %r13d
LBB0_10:
	movl	-44(%rbp), %ebx
	movq	_F_BSTLOWVI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GET_MASK
	testl	%ebx, %eax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	$1, %r13d
LBB0_12:
	movl	-44(%rbp), %ebx
	movq	_F_BST32SI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GET_MASK
	testl	%ebx, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_15
LBB0_14:
	testl	%r13d, %r13d
	je	LBB0_20
LBB0_15:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	%r12, %rdi
	callq	_rt9455_set_voreg_before_charge_mode
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_2
LBB0_17:
	movq	(%r12), %rax
	movq	_F_OPA_MODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_RT9455_CHARGE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
LBB0_2:
	movq	%r15, %rdi
	callq	_dev_err
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	$1, (%r14)
LBB0_20:
	xorl	%ebx, %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_RT9455_REG_IRQ3,4,2            ## @RT9455_REG_IRQ3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read IRQ3 register\n"

	.comm	_RT9455_REG_MASK3,4,2           ## @RT9455_REG_MASK3
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read MASK3 register\n"

	.comm	_F_BSTBUSOVI,4,2                ## @F_BSTBUSOVI
L_.str.2:                               ## @.str.2
	.asciz	"Boost fault. Overvoltage input occurred\n"

	.comm	_F_BSTOLI,4,2                   ## @F_BSTOLI
L_.str.3:                               ## @.str.3
	.asciz	"Boost fault. Overload\n"

	.comm	_F_BSTLOWVI,4,2                 ## @F_BSTLOWVI
L_.str.4:                               ## @.str.4
	.asciz	"Boost fault. Battery voltage too low\n"

	.comm	_F_BST32SI,4,2                  ## @F_BST32SI
L_.str.5:                               ## @.str.5
	.asciz	"Boost fault. 32 seconds timeout occurred.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Boost fault occurred, therefore the charger goes into charge mode\n"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to set VOREG before entering charge mode\n"

	.comm	_F_OPA_MODE,8,3                 ## @F_OPA_MODE
	.comm	_RT9455_CHARGE_MODE,4,2         ## @RT9455_CHARGE_MODE
L_.str.8:                               ## @.str.8
	.asciz	"Failed to set charger in charge mode\n"

	.no_dead_strip	_rt9455_irq_handler_check_irq3_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt9455_irq_handler_check_irq3_register
_rt9455_irq_handler_check_irq3_register: ; @rt9455_irq_handler_check_irq3_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #16]
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _RT9455_REG_IRQ3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RT9455_REG_IRQ3@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_18
LBB0_2:
	ldr	w0, [x21, #8]
Lloh5:
	adrp	x8, _RT9455_REG_MASK3@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RT9455_REG_MASK3@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_4:
	ldr	w22, [sp, #12]
Lloh10:
	adrp	x8, _F_BSTBUSOVI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _F_BSTBUSOVI@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_GET_MASK
	tst	w0, w22
	b.eq	LBB0_6
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w22, #1
	b	LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
	ldr	w23, [sp, #12]
Lloh15:
	adrp	x8, _F_BSTOLI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _F_BSTOLI@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_GET_MASK
	tst	w0, w23
	b.eq	LBB0_9
; %bb.8:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w22, #1
LBB0_9:
	ldr	w23, [sp, #12]
Lloh20:
	adrp	x8, _F_BSTLOWVI@GOTPAGE
Lloh21:
	ldr	x8, [x8, _F_BSTLOWVI@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_GET_MASK
	tst	w0, w23
	b.eq	LBB0_11
; %bb.10:
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w22, #1
LBB0_11:
	ldr	w23, [sp, #12]
Lloh25:
	adrp	x8, _F_BST32SI@GOTPAGE
Lloh26:
	ldr	x8, [x8, _F_BST32SI@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_GET_MASK
	tst	w0, w23
	b.eq	LBB0_13
; %bb.12:
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_14
LBB0_13:
	cbz	w22, LBB0_19
LBB0_14:
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	x0, x21
	bl	_rt9455_set_voreg_before_charge_mode
	cbz	w0, LBB0_16
; %bb.15:
	mov	x22, x0
Lloh32:
	adrp	x1, l_.str.7@PAGE
Lloh33:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_18
LBB0_16:
	ldr	x8, [x21]
Lloh34:
	adrp	x9, _F_OPA_MODE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _F_OPA_MODE@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
Lloh37:
	adrp	x8, _RT9455_CHARGE_MODE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _RT9455_CHARGE_MODE@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_regmap_field_write
	mov	x22, x0
	cbz	w0, LBB0_20
; %bb.17:
Lloh40:
	adrp	x1, l_.str.8@PAGE
Lloh41:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_dev_err
LBB0_19:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_20:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_RT9455_REG_IRQ3,4,2            ; @RT9455_REG_IRQ3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read IRQ3 register\n"

	.comm	_RT9455_REG_MASK3,4,2           ; @RT9455_REG_MASK3
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read MASK3 register\n"

	.comm	_F_BSTBUSOVI,4,2                ; @F_BSTBUSOVI
l_.str.2:                               ; @.str.2
	.asciz	"Boost fault. Overvoltage input occurred\n"

	.comm	_F_BSTOLI,4,2                   ; @F_BSTOLI
l_.str.3:                               ; @.str.3
	.asciz	"Boost fault. Overload\n"

	.comm	_F_BSTLOWVI,4,2                 ; @F_BSTLOWVI
l_.str.4:                               ; @.str.4
	.asciz	"Boost fault. Battery voltage too low\n"

	.comm	_F_BST32SI,4,2                  ; @F_BST32SI
l_.str.5:                               ; @.str.5
	.asciz	"Boost fault. 32 seconds timeout occurred.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Boost fault occurred, therefore the charger goes into charge mode\n"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to set VOREG before entering charge mode\n"

	.comm	_F_OPA_MODE,8,3                 ; @F_OPA_MODE
	.comm	_RT9455_CHARGE_MODE,4,2         ; @RT9455_CHARGE_MODE
l_.str.8:                               ; @.str.8
	.asciz	"Failed to set charger in charge mode\n"

	.no_dead_strip	_rt9455_irq_handler_check_irq3_register
.subsections_via_symbols
