	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_bci_interrupt
_twl4030_bci_interrupt:                 ## @twl4030_bci_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	_TWL4030_MODULE_INTERRUPTS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_TWL4030_INTERRUPTS_BCIISR1A@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	js	LBB0_14
## %bb.1:
	movl	(%rbx), %edi
	movq	_TWL4030_INTERRUPTS_BCIISR2A@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-20(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	js	LBB0_14
## %bb.2:
	movl	(%r14), %edi
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_TWL4030_ICHGLOW@GOTPCREL(%rip), %rax
	movq	_TWL4030_ICHGEOC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, -24(%rbp)
	je	LBB0_4
## %bb.3:
	movl	8(%r14), %edi
	callq	_power_supply_changed
	movl	4(%r14), %edi
	callq	_power_supply_changed
LBB0_4:
	movq	%r14, %rdi
	callq	_twl4030_charger_update_current
	movl	-24(%rbp), %eax
	movq	_TWL4030_TBATOR2@GOTPCREL(%rip), %rcx
	movq	_TWL4030_TBATOR1@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	movl	-24(%rbp), %eax
LBB0_6:
	movq	_TWL4030_BATSTS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_crit
LBB0_8:
	movl	-20(%rbp), %eax
	movq	_TWL4030_VBATOV@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_crit
	movl	-20(%rbp), %eax
LBB0_10:
	movq	_TWL4030_VBUSOV@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movl	(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_crit
	movl	-20(%rbp), %eax
LBB0_12:
	movq	_TWL4030_ACCHGOV@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_crit
LBB0_14:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWL4030_MODULE_INTERRUPTS,4,2  ## @TWL4030_MODULE_INTERRUPTS
	.comm	_TWL4030_INTERRUPTS_BCIISR1A,4,2 ## @TWL4030_INTERRUPTS_BCIISR1A
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_TWL4030_INTERRUPTS_BCIISR2A,4,2 ## @TWL4030_INTERRUPTS_BCIISR2A
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BCI irq %02x %02x\n"

	.comm	_TWL4030_ICHGLOW,4,2            ## @TWL4030_ICHGLOW
	.comm	_TWL4030_ICHGEOC,4,2            ## @TWL4030_ICHGEOC
	.comm	_TWL4030_TBATOR2,4,2            ## @TWL4030_TBATOR2
	.comm	_TWL4030_TBATOR1,4,2            ## @TWL4030_TBATOR1
L_.str.1:                               ## @.str.1
	.asciz	"battery temperature out of range\n"

	.comm	_TWL4030_BATSTS,4,2             ## @TWL4030_BATSTS
L_.str.2:                               ## @.str.2
	.asciz	"battery disconnected\n"

	.comm	_TWL4030_VBATOV,4,2             ## @TWL4030_VBATOV
L_.str.3:                               ## @.str.3
	.asciz	"VBAT overvoltage\n"

	.comm	_TWL4030_VBUSOV,4,2             ## @TWL4030_VBUSOV
L_.str.4:                               ## @.str.4
	.asciz	"VBUS overvoltage\n"

	.comm	_TWL4030_ACCHGOV,4,2            ## @TWL4030_ACCHGOV
L_.str.5:                               ## @.str.5
	.asciz	"Ac charger overvoltage\n"

	.no_dead_strip	_twl4030_bci_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_bci_interrupt
_twl4030_bci_interrupt:                 ; @twl4030_bci_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
Lloh0:
	adrp	x20, _TWL4030_MODULE_INTERRUPTS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _TWL4030_MODULE_INTERRUPTS@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _TWL4030_INTERRUPTS_BCIISR1A@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TWL4030_INTERRUPTS_BCIISR1A@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	tbnz	w0, #31, LBB0_14
; %bb.1:
	ldr	w0, [x20]
Lloh5:
	adrp	x8, _TWL4030_INTERRUPTS_BCIISR2A@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TWL4030_INTERRUPTS_BCIISR2A@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_twl_i2c_read_u8
	tbnz	w0, #31, LBB0_14
; %bb.2:
	ldr	w0, [x19]
	ldp	w2, w3, [sp, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [sp, #12]
Lloh10:
	adrp	x9, _TWL4030_ICHGLOW@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TWL4030_ICHGLOW@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _TWL4030_ICHGEOC@GOTPAGE
Lloh14:
	ldr	x10, [x10, _TWL4030_ICHGEOC@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_power_supply_changed
	ldr	w0, [x19, #4]
	bl	_power_supply_changed
LBB0_4:
	mov	x0, x19
	bl	_twl4030_charger_update_current
	ldr	w8, [sp, #12]
Lloh16:
	adrp	x9, _TWL4030_TBATOR2@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TWL4030_TBATOR2@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _TWL4030_TBATOR1@GOTPAGE
Lloh20:
	ldr	x10, [x10, _TWL4030_TBATOR1@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	ldr	w8, [sp, #12]
LBB0_6:
Lloh24:
	adrp	x9, _TWL4030_BATSTS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TWL4030_BATSTS@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_crit
LBB0_8:
	ldr	w8, [sp, #8]
Lloh29:
	adrp	x9, _TWL4030_VBATOV@GOTPAGE
Lloh30:
	ldr	x9, [x9, _TWL4030_VBATOV@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x19]
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_crit
	ldr	w8, [sp, #8]
LBB0_10:
Lloh34:
	adrp	x9, _TWL4030_VBUSOV@GOTPAGE
Lloh35:
	ldr	x9, [x9, _TWL4030_VBUSOV@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	ldr	w0, [x19]
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_crit
	ldr	w8, [sp, #8]
LBB0_12:
Lloh39:
	adrp	x9, _TWL4030_ACCHGOV@GOTPAGE
Lloh40:
	ldr	x9, [x9, _TWL4030_ACCHGOV@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	ldr	w0, [x19]
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_crit
LBB0_14:
Lloh44:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh45:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh46:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_TWL4030_MODULE_INTERRUPTS,4,2  ; @TWL4030_MODULE_INTERRUPTS
	.comm	_TWL4030_INTERRUPTS_BCIISR1A,4,2 ; @TWL4030_INTERRUPTS_BCIISR1A
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_TWL4030_INTERRUPTS_BCIISR2A,4,2 ; @TWL4030_INTERRUPTS_BCIISR2A
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BCI irq %02x %02x\n"

	.comm	_TWL4030_ICHGLOW,4,2            ; @TWL4030_ICHGLOW
	.comm	_TWL4030_ICHGEOC,4,2            ; @TWL4030_ICHGEOC
	.comm	_TWL4030_TBATOR2,4,2            ; @TWL4030_TBATOR2
	.comm	_TWL4030_TBATOR1,4,2            ; @TWL4030_TBATOR1
l_.str.1:                               ; @.str.1
	.asciz	"battery temperature out of range\n"

	.comm	_TWL4030_BATSTS,4,2             ; @TWL4030_BATSTS
l_.str.2:                               ; @.str.2
	.asciz	"battery disconnected\n"

	.comm	_TWL4030_VBATOV,4,2             ; @TWL4030_VBATOV
l_.str.3:                               ; @.str.3
	.asciz	"VBAT overvoltage\n"

	.comm	_TWL4030_VBUSOV,4,2             ; @TWL4030_VBUSOV
l_.str.4:                               ; @.str.4
	.asciz	"VBUS overvoltage\n"

	.comm	_TWL4030_ACCHGOV,4,2            ; @TWL4030_ACCHGOV
l_.str.5:                               ; @.str.5
	.asciz	"Ac charger overvoltage\n"

	.no_dead_strip	_twl4030_bci_interrupt
.subsections_via_symbols
