	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb347_interrupt
_smb347_interrupt:                      ## @smb347_interrupt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	28(%rsi), %edi
	movq	_STAT_C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.4:
	movl	28(%rbx), %edi
	movq	_IRQSTAT_C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	28(%rbx), %edi
	movq	_IRQSTAT_D@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	28(%rbx), %edi
	movq	_IRQSTAT_E@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	_STAT_C_CHARGER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -24(%rbp)
	je	LBB0_11
## %bb.12:
	movl	24(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	movl	20(%rbx), %edi
	callq	_power_supply_changed
	movl	$1, %eax
	jmp	LBB0_13
LBB0_1:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movl	24(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_7:
	movl	24(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_9:
	movl	24(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	callq	_dev_warn
LBB0_3:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
LBB0_13:
	movl	-20(%rbp), %ecx
	movq	_IRQSTAT_C_TERMINATION_IRQ@GOTPCREL(%rip), %rdx
	movq	_IRQSTAT_C_TAPER_IRQ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	testl	%ecx, %esi
	je	LBB0_17
## %bb.14:
	movq	_IRQSTAT_C_TERMINATION_STAT@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_16
## %bb.15:
	movl	20(%rbx), %edi
	callq	_power_supply_changed
LBB0_16:
	movl	24(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_dbg
	movl	$1, %eax
LBB0_17:
	movq	_IRQSTAT_D_CHARGE_TIMEOUT_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, -12(%rbp)
	je	LBB0_21
## %bb.18:
	movl	24(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_dbg
	movq	_IRQSTAT_D_CHARGE_TIMEOUT_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -12(%rbp)
	je	LBB0_20
## %bb.19:
	movl	24(%rbx), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_dev_warn
LBB0_20:
	movl	20(%rbx), %edi
	callq	_power_supply_changed
	movl	$1, %eax
LBB0_21:
	movq	_IRQSTAT_E_USBIN_UV_IRQ@GOTPCREL(%rip), %rcx
	movq	_IRQSTAT_E_DCIN_UV_IRQ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%edx, -16(%rbp)
	je	LBB0_27
## %bb.22:
	movq	%rbx, %rdi
	callq	_smb347_update_ps_status
	testq	%rax, %rax
	jle	LBB0_28
## %bb.23:
	movq	%rbx, %rdi
	callq	_smb347_start_stop_charging
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_25
## %bb.24:
	movl	16(%rbx), %edi
	callq	_power_supply_changed
	movq	8(%rbx), %rax
LBB0_25:
	cmpq	$0, (%rax)
	je	LBB0_28
## %bb.26:
	movl	(%rbx), %edi
	callq	_power_supply_changed
	jmp	LBB0_28
LBB0_27:
	testl	%eax, %eax
	je	LBB0_3
LBB0_28:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_STAT_C,4,2                     ## @STAT_C
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reading STAT_C failed\n"

	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_IRQSTAT_C,4,2                  ## @IRQSTAT_C
L_.str.1:                               ## @.str.1
	.asciz	"reading IRQSTAT_C failed\n"

	.comm	_IRQSTAT_D,4,2                  ## @IRQSTAT_D
L_.str.2:                               ## @.str.2
	.asciz	"reading IRQSTAT_D failed\n"

	.comm	_IRQSTAT_E,4,2                  ## @IRQSTAT_E
L_.str.3:                               ## @.str.3
	.asciz	"reading IRQSTAT_E failed\n"

	.comm	_STAT_C_CHARGER_ERROR,4,2       ## @STAT_C_CHARGER_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"charging stopped due to charger error\n"

	.comm	_IRQSTAT_C_TERMINATION_IRQ,4,2  ## @IRQSTAT_C_TERMINATION_IRQ
	.comm	_IRQSTAT_C_TAPER_IRQ,4,2        ## @IRQSTAT_C_TAPER_IRQ
	.comm	_IRQSTAT_C_TERMINATION_STAT,4,2 ## @IRQSTAT_C_TERMINATION_STAT
L_.str.5:                               ## @.str.5
	.asciz	"going to HW maintenance mode\n"

	.comm	_IRQSTAT_D_CHARGE_TIMEOUT_IRQ,4,2 ## @IRQSTAT_D_CHARGE_TIMEOUT_IRQ
L_.str.6:                               ## @.str.6
	.asciz	"total Charge Timeout INT received\n"

	.comm	_IRQSTAT_D_CHARGE_TIMEOUT_STAT,4,2 ## @IRQSTAT_D_CHARGE_TIMEOUT_STAT
L_.str.7:                               ## @.str.7
	.asciz	"charging stopped due to timeout\n"

	.comm	_IRQSTAT_E_USBIN_UV_IRQ,4,2     ## @IRQSTAT_E_USBIN_UV_IRQ
	.comm	_IRQSTAT_E_DCIN_UV_IRQ,4,2      ## @IRQSTAT_E_DCIN_UV_IRQ
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_smb347_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb347_interrupt
_smb347_interrupt:                      ; @smb347_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w0, [x1, #28]
Lloh0:
	adrp	x8, _STAT_C@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STAT_C@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	w0, [x19, #28]
Lloh3:
	adrp	x8, _IRQSTAT_C@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQSTAT_C@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	w0, [x19, #28]
Lloh6:
	adrp	x8, _IRQSTAT_D@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQSTAT_D@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #4
	bl	_regmap_read
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w0, [x19, #28]
Lloh9:
	adrp	x8, _IRQSTAT_E@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQSTAT_E@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_regmap_read
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x9, _STAT_C_CHARGER_ERROR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _STAT_C_CHARGER_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.5:
	ldr	w0, [x19, #24]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #20]
	bl	_power_supply_changed
	mov	w8, #1
	b	LBB0_13
LBB0_6:
	ldr	w0, [x19, #24]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_7:
	ldr	w0, [x19, #24]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	w0, [x19, #24]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #24]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	bl	_dev_warn
Lloh25:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_12:
	mov	w8, #0
LBB0_13:
	ldr	w9, [sp, #8]
Lloh27:
	adrp	x10, _IRQSTAT_C_TERMINATION_IRQ@GOTPAGE
Lloh28:
	ldr	x10, [x10, _IRQSTAT_C_TERMINATION_IRQ@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
Lloh30:
	adrp	x11, _IRQSTAT_C_TAPER_IRQ@GOTPAGE
Lloh31:
	ldr	x11, [x11, _IRQSTAT_C_TAPER_IRQ@GOTPAGEOFF]
Lloh32:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w10, w9
	b.eq	LBB0_17
; %bb.14:
Lloh33:
	adrp	x8, _IRQSTAT_C_TERMINATION_STAT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IRQSTAT_C_TERMINATION_STAT@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_16
; %bb.15:
	ldr	w0, [x19, #20]
	bl	_power_supply_changed
LBB0_16:
	ldr	w0, [x19, #24]
Lloh36:
	adrp	x1, l_.str.5@PAGE
Lloh37:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	mov	w8, #1
LBB0_17:
	ldr	w9, [sp, #4]
Lloh38:
	adrp	x10, _IRQSTAT_D_CHARGE_TIMEOUT_IRQ@GOTPAGE
Lloh39:
	ldr	x10, [x10, _IRQSTAT_D_CHARGE_TIMEOUT_IRQ@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_21
; %bb.18:
	ldr	w0, [x19, #24]
Lloh41:
	adrp	x1, l_.str.6@PAGE
Lloh42:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [sp, #4]
Lloh43:
	adrp	x9, _IRQSTAT_D_CHARGE_TIMEOUT_STAT@GOTPAGE
Lloh44:
	ldr	x9, [x9, _IRQSTAT_D_CHARGE_TIMEOUT_STAT@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.19:
	ldr	w0, [x19, #24]
Lloh46:
	adrp	x1, l_.str.7@PAGE
Lloh47:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_warn
LBB0_20:
	ldr	w0, [x19, #20]
	bl	_power_supply_changed
	mov	w8, #1
LBB0_21:
	ldr	w9, [sp]
Lloh48:
	adrp	x10, _IRQSTAT_E_USBIN_UV_IRQ@GOTPAGE
Lloh49:
	ldr	x10, [x10, _IRQSTAT_E_USBIN_UV_IRQ@GOTPAGEOFF]
Lloh50:
	ldr	w10, [x10]
Lloh51:
	adrp	x11, _IRQSTAT_E_DCIN_UV_IRQ@GOTPAGE
Lloh52:
	ldr	x11, [x11, _IRQSTAT_E_DCIN_UV_IRQ@GOTPAGEOFF]
Lloh53:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w10, w9
	b.eq	LBB0_28
; %bb.22:
	mov	x0, x19
	bl	_smb347_update_ps_status
	cmp	x0, #1
	b.lt	LBB0_27
; %bb.23:
	mov	x0, x19
	bl	_smb347_start_stop_charging
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_25
; %bb.24:
	ldr	w0, [x19, #16]
	bl	_power_supply_changed
	ldr	x8, [x19, #8]
LBB0_25:
	ldr	x8, [x8]
	cbz	x8, LBB0_27
; %bb.26:
	ldr	w0, [x19]
	bl	_power_supply_changed
LBB0_27:
Lloh54:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh55:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_11
LBB0_28:
Lloh56:
	adrp	x9, _IRQ_HANDLED@GOTPAGE
Lloh57:
	ldr	x9, [x9, _IRQ_HANDLED@GOTPAGEOFF]
Lloh58:
	adrp	x10, _IRQ_NONE@GOTPAGE
Lloh59:
	ldr	x10, [x10, _IRQ_NONE@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	b	LBB0_11
	.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 AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_STAT_C,4,2                     ; @STAT_C
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reading STAT_C failed\n"

	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_IRQSTAT_C,4,2                  ; @IRQSTAT_C
l_.str.1:                               ; @.str.1
	.asciz	"reading IRQSTAT_C failed\n"

	.comm	_IRQSTAT_D,4,2                  ; @IRQSTAT_D
l_.str.2:                               ; @.str.2
	.asciz	"reading IRQSTAT_D failed\n"

	.comm	_IRQSTAT_E,4,2                  ; @IRQSTAT_E
l_.str.3:                               ; @.str.3
	.asciz	"reading IRQSTAT_E failed\n"

	.comm	_STAT_C_CHARGER_ERROR,4,2       ; @STAT_C_CHARGER_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"charging stopped due to charger error\n"

	.comm	_IRQSTAT_C_TERMINATION_IRQ,4,2  ; @IRQSTAT_C_TERMINATION_IRQ
	.comm	_IRQSTAT_C_TAPER_IRQ,4,2        ; @IRQSTAT_C_TAPER_IRQ
	.comm	_IRQSTAT_C_TERMINATION_STAT,4,2 ; @IRQSTAT_C_TERMINATION_STAT
l_.str.5:                               ; @.str.5
	.asciz	"going to HW maintenance mode\n"

	.comm	_IRQSTAT_D_CHARGE_TIMEOUT_IRQ,4,2 ; @IRQSTAT_D_CHARGE_TIMEOUT_IRQ
l_.str.6:                               ; @.str.6
	.asciz	"total Charge Timeout INT received\n"

	.comm	_IRQSTAT_D_CHARGE_TIMEOUT_STAT,4,2 ; @IRQSTAT_D_CHARGE_TIMEOUT_STAT
l_.str.7:                               ; @.str.7
	.asciz	"charging stopped due to timeout\n"

	.comm	_IRQSTAT_E_USBIN_UV_IRQ,4,2     ; @IRQSTAT_E_USBIN_UV_IRQ
	.comm	_IRQSTAT_E_DCIN_UV_IRQ,4,2      ; @IRQSTAT_E_DCIN_UV_IRQ
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_smb347_interrupt
.subsections_via_symbols
