	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt9455_discover_charger
_rt9455_discover_charger:               ## @rt9455_discover_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	%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	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	8(%rdi), %r12
	cmpl	$0, (%r12)
	jne	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	callq	_ACPI_HANDLE
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	leaq	4(%r13), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_5
LBB0_10:
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
LBB0_5:
	movq	%r12, %rdi
	callq	_dev_err
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.9(%rip), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_device_property_read_u32
	leaq	L_.str.10(%rip), %rsi
	movq	%r12, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_device_property_read_u32
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No support for either device tree or ACPI\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"richtek,output-charge-current"

L_.str.2:                               ## @.str.2
	.asciz	"Error: missing \"output-charge-current\" property\n"

L_.str.3:                               ## @.str.3
	.asciz	"richtek,end-of-charge-percentage"

L_.str.4:                               ## @.str.4
	.asciz	"Error: missing \"end-of-charge-percentage\" property\n"

L_.str.5:                               ## @.str.5
	.asciz	"richtek,battery-regulation-voltage"

L_.str.6:                               ## @.str.6
	.asciz	"Error: missing \"battery-regulation-voltage\" property\n"

L_.str.7:                               ## @.str.7
	.asciz	"richtek,boost-output-voltage"

L_.str.8:                               ## @.str.8
	.asciz	"Error: missing \"boost-output-voltage\" property\n"

L_.str.9:                               ## @.str.9
	.asciz	"richtek,min-input-voltage-regulation"

L_.str.10:                              ## @.str.10
	.asciz	"richtek,avg-input-current-regulation"

	.no_dead_strip	_rt9455_discover_charger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt9455_discover_charger
_rt9455_discover_charger:               ; @rt9455_discover_charger
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x4
	mov	x21, x3
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x19, [x0, #8]
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ACPI_HANDLE
	cbz	w0, LBB0_6
LBB0_2:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_device_property_read_u32
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_4:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_device_property_read_u32
	cbz	w0, LBB0_7
; %bb.5:
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_7:
	add	x2, x23, #4
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_device_property_read_u32
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
Lloh15:
	adrp	x1, l_.str.6@PAGE
Lloh16:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh17:
	adrp	x1, l_.str.7@PAGE
Lloh18:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_device_property_read_u32
	mov	x22, x0
	cbz	w0, LBB0_13
; %bb.10:
Lloh19:
	adrp	x1, l_.str.8@PAGE
Lloh20:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_err
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh21:
	adrp	x1, l_.str.9@PAGE
Lloh22:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_device_property_read_u32
Lloh23:
	adrp	x1, l_.str.10@PAGE
Lloh24:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_device_property_read_u32
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No support for either device tree or ACPI\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"richtek,output-charge-current"

l_.str.2:                               ; @.str.2
	.asciz	"Error: missing \"output-charge-current\" property\n"

l_.str.3:                               ; @.str.3
	.asciz	"richtek,end-of-charge-percentage"

l_.str.4:                               ; @.str.4
	.asciz	"Error: missing \"end-of-charge-percentage\" property\n"

l_.str.5:                               ; @.str.5
	.asciz	"richtek,battery-regulation-voltage"

l_.str.6:                               ; @.str.6
	.asciz	"Error: missing \"battery-regulation-voltage\" property\n"

l_.str.7:                               ; @.str.7
	.asciz	"richtek,boost-output-voltage"

l_.str.8:                               ; @.str.8
	.asciz	"Error: missing \"boost-output-voltage\" property\n"

l_.str.9:                               ; @.str.9
	.asciz	"richtek,min-input-voltage-regulation"

l_.str.10:                              ; @.str.10
	.asciz	"richtek,avg-input-current-regulation"

	.no_dead_strip	_rt9455_discover_charger
.subsections_via_symbols
