	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8903_dcin
_max8903_dcin:                          ## @max8903_dcin
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	32(%rsi), %r12
	movl	8(%r12), %edi
	callq	_gpio_get_value
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
	cmpl	%ebx, (%r15)
	je	LBB0_14
## %bb.1:
	movq	%rax, %r14
	movl	%ebx, (%r15)
	movl	4(%r12), %edi
	callq	_gpio_is_valid
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	4(%r12), %edi
	movl	%ebx, %esi
	callq	_gpio_set_value
LBB0_3:
	movl	(%r12), %edi
	callq	_gpio_is_valid
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	(%r12), %edi
	xorl	%esi, %esi
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	cmpq	$0, 16(%r15)
	sete	%sil
LBB0_6:
	callq	_gpio_set_value
LBB0_7:
	testq	%r14, %r14
	movl	24(%r15), %edi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	8(%r15), %eax
	cmpl	$0, (%r15)
	je	LBB0_9
## %bb.8:
	movq	_POWER_SUPPLY_TYPE_MAINS@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_9:
	cmpq	$0, 16(%r15)
	jne	LBB0_10
## %bb.11:
	movq	_POWER_SUPPLY_TYPE_BATTERY@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_10:
	movq	_POWER_SUPPLY_TYPE_USB@GOTPCREL(%rip), %rcx
LBB0_12:
	movl	(%rcx), %ecx
	movl	%ecx, 8(%r15)
	cmpl	%ecx, %eax
	je	LBB0_14
## %bb.13:
	movl	4(%r15), %edi
	callq	_power_supply_changed
LBB0_14:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TA(DC-IN) Charger %s.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Connected"

L_.str.2:                               ## @.str.2
	.asciz	"Disconnected"

	.comm	_POWER_SUPPLY_TYPE_MAINS,4,2    ## @POWER_SUPPLY_TYPE_MAINS
	.comm	_POWER_SUPPLY_TYPE_USB,4,2      ## @POWER_SUPPLY_TYPE_USB
	.comm	_POWER_SUPPLY_TYPE_BATTERY,4,2  ## @POWER_SUPPLY_TYPE_BATTERY
	.no_dead_strip	_max8903_dcin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max8903_dcin
_max8903_dcin:                          ; @max8903_dcin
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	ldr	x22, [x1, #32]
	ldr	w0, [x22, #8]
	bl	_gpio_get_value
	cmp	x0, #0
	cset	w21, eq
	ldr	w8, [x19]
	cmp	w8, w21
	b.eq	LBB0_13
; %bb.1:
	mov	x20, x0
	str	w21, [x19]
	ldr	w0, [x22, #4]
	bl	_gpio_is_valid
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x22, #4]
	mov	x1, x21
	bl	_gpio_set_value
LBB0_3:
	ldr	w0, [x22]
	bl	_gpio_is_valid
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w0, [x22]
	cbz	x20, LBB0_6
; %bb.5:
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w1, eq
	b	LBB0_7
LBB0_6:
	mov	w1, #0
LBB0_7:
	bl	_gpio_set_value
LBB0_8:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x8, l_.str.2@PAGE
Lloh1:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x20, #0
	csel	x2, x9, x8, eq
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19, #8]
	ldr	w9, [x19]
	cbz	w9, LBB0_10
; %bb.9:
Lloh6:
	adrp	x9, _POWER_SUPPLY_TYPE_MAINS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POWER_SUPPLY_TYPE_MAINS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
	ldr	x9, [x19, #16]
Lloh8:
	adrp	x10, _POWER_SUPPLY_TYPE_USB@GOTPAGE
Lloh9:
	ldr	x10, [x10, _POWER_SUPPLY_TYPE_USB@GOTPAGEOFF]
Lloh10:
	adrp	x11, _POWER_SUPPLY_TYPE_BATTERY@GOTPAGE
Lloh11:
	ldr	x11, [x11, _POWER_SUPPLY_TYPE_BATTERY@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x11, x10, eq
LBB0_11:
	ldr	w9, [x9]
	str	w9, [x19, #8]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.12:
	ldr	w0, [x19, #4]
	bl	_power_supply_changed
LBB0_13:
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TA(DC-IN) Charger %s.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Connected"

l_.str.2:                               ; @.str.2
	.asciz	"Disconnected"

	.comm	_POWER_SUPPLY_TYPE_MAINS,4,2    ; @POWER_SUPPLY_TYPE_MAINS
	.comm	_POWER_SUPPLY_TYPE_USB,4,2      ; @POWER_SUPPLY_TYPE_USB
	.comm	_POWER_SUPPLY_TYPE_BATTERY,4,2  ; @POWER_SUPPLY_TYPE_BATTERY
	.no_dead_strip	_max8903_dcin
.subsections_via_symbols
