	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_da9063_device_init             ## -- Begin function da9063_device_init
	.p2align	4, 0x90
_da9063_device_init:                    ## @da9063_device_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_da9063_clear_fault_log
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	24(%r12), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_2:
	movq	$0, 40(%r12)
	movl	$-1, (%r12)
	movl	%ebx, 4(%r12)
	movl	32(%r12), %edi
	movq	_DA9063_REG_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movl	-44(%rbp), %edx
	movq	_PMIC_CHIP_ID_DA9063@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_9
## %bb.4:
	movl	32(%r12), %edi
	movq	_DA9063_REG_CHIP_VARIANT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movl	-48(%rbp), %eax
	movq	_DA9063_CHIP_VARIANT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %r15d
	sarl	%cl, %r15d
	movl	24(%r12), %edi
	movl	-44(%rbp), %edx
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_info
	movq	_PMIC_DA9063_BB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_15
## %bb.6:
	movq	_PMIC_DA9063_AD@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_15
## %bb.7:
	movl	24(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r15d, %edx
	jmp	LBB0_10
LBB0_8:
	movl	24(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_9:
	movl	24(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
LBB0_10:
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movl	24(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_12:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	%r15d, 8(%r12)
	movq	%r12, %rdi
	callq	_da9063_irq_init
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r14d
	movl	24(%r12), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_17:
	movl	28(%r12), %edi
	callq	_regmap_irq_chip_get_base
	movl	%eax, (%r12)
	movl	24(%r12), %r15d
	movq	_PLATFORM_DEVID_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_da9063_common_devs@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	(%r12), %r9d
	movq	$0, (%rsp)
	xorl	%r14d, %r14d
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_devm_mfd_add_devices
	testl	%eax, %eax
	je	LBB0_19
LBB0_18:
	movl	%eax, %ebx
	movl	24(%r12), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%ebx, %r14d
	jmp	LBB0_14
LBB0_19:
	movq	_PLATFORM_DEVID_NONE@GOTPCREL(%rip), %rdx
	movq	16(%r12), %rax
	movq	_PMIC_TYPE_DA9063@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.20:
	movl	24(%r12), %r13d
	movl	(%rdx), %r15d
	movq	_da9063_devs@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	(%r12), %r9d
	movq	$0, (%rsp)
	xorl	%r14d, %r14d
	movl	%r13d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_devm_mfd_add_devices
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot clear fault log\n"

	.comm	_DA9063_REG_CHIP_ID,4,2         ## @DA9063_REG_CHIP_ID
L_.str.1:                               ## @.str.1
	.asciz	"Cannot read chip model id.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_PMIC_CHIP_ID_DA9063,4,2        ## @PMIC_CHIP_ID_DA9063
L_.str.2:                               ## @.str.2
	.asciz	"Invalid chip model id: 0x%02x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DA9063_REG_CHIP_VARIANT,4,2    ## @DA9063_REG_CHIP_VARIANT
L_.str.3:                               ## @.str.3
	.asciz	"Cannot read chip variant id.\n"

	.comm	_DA9063_CHIP_VARIANT_SHIFT,4,2  ## @DA9063_CHIP_VARIANT_SHIFT
L_.str.4:                               ## @.str.4
	.asciz	"Device detected (chip-ID: 0x%02X, var-ID: 0x%02X)\n"

	.comm	_PMIC_DA9063_BB,4,2             ## @PMIC_DA9063_BB
	.comm	_PMIC_DA9063_AD,4,2             ## @PMIC_DA9063_AD
L_.str.5:                               ## @.str.5
	.asciz	"Cannot support variant code: 0x%02X\n"

L_.str.6:                               ## @.str.6
	.asciz	"Cannot initialize interrupts.\n"

	.comm	_PLATFORM_DEVID_NONE,4,2        ## @PLATFORM_DEVID_NONE
	.comm	_da9063_common_devs,4,2         ## @da9063_common_devs
L_.str.7:                               ## @.str.7
	.asciz	"Failed to add child devices\n"

	.comm	_PMIC_TYPE_DA9063,8,3           ## @PMIC_TYPE_DA9063
	.comm	_da9063_devs,4,2                ## @da9063_devs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_da9063_device_init             ; -- Begin function da9063_device_init
	.p2align	2
_da9063_device_init:                    ; @da9063_device_init
	.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	x19, x0
	bl	_da9063_clear_fault_log
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	str	xzr, [x19, #40]
	mov	w8, #-1
	stp	w8, w20, [x19]
	ldr	w0, [x19, #32]
Lloh2:
	adrp	x8, _DA9063_REG_CHIP_ID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DA9063_REG_CHIP_ID@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _PMIC_CHIP_ID_DA9063@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PMIC_CHIP_ID_DA9063@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.4:
	ldr	w0, [x19, #32]
Lloh8:
	adrp	x8, _DA9063_REG_CHIP_VARIANT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DA9063_REG_CHIP_VARIANT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	tbnz	w0, #31, LBB0_10
; %bb.5:
	ldp	w3, w2, [sp, #8]
Lloh11:
	adrp	x8, _DA9063_CHIP_VARIANT_SHIFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DA9063_CHIP_VARIANT_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	asr	w20, w3, w8
	ldr	w0, [x19, #24]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
Lloh16:
	adrp	x8, _PMIC_DA9063_BB@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PMIC_DA9063_BB@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _PMIC_DA9063_AD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PMIC_DA9063_AD@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w20, w8
	ccmp	w20, w9, #4, lt
	b.ne	LBB0_12
; %bb.6:
	str	w20, [x19, #8]
	mov	x0, x19
	bl	_da9063_irq_init
	cbz	w0, LBB0_16
; %bb.7:
	mov	x20, x0
	ldr	w0, [x19, #24]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_19
LBB0_8:
	ldr	w0, [x19, #24]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
	ldr	w0, [x19, #24]
	str	x8, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_10:
	ldr	w0, [x19, #24]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_11:
	bl	_dev_err
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	ldr	w0, [x19, #24]
	str	x20, [sp]
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_13:
	bl	_dev_err
Lloh34:
	adrp	x8, _ENODEV@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_15:
	mov	x0, x20
	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_16:
	ldr	w0, [x19, #28]
	bl	_regmap_irq_chip_get_base
	str	w0, [x19]
	ldr	w20, [x19, #24]
Lloh36:
	adrp	x23, _PLATFORM_DEVID_NONE@GOTPAGE
Lloh37:
	ldr	x23, [x23, _PLATFORM_DEVID_NONE@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh38:
	adrp	x8, _da9063_common_devs@GOTPAGE
Lloh39:
	ldr	x8, [x8, _da9063_common_devs@GOTPAGEOFF]
Lloh40:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x3, x0
	ldr	w5, [x19]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x4, #0
	mov	x6, #0
	bl	_devm_mfd_add_devices
	cbz	w0, LBB0_20
; %bb.17:
	mov	x20, x0
LBB0_18:
	ldr	w0, [x19, #24]
Lloh41:
	adrp	x1, l_.str.7@PAGE
Lloh42:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_19:
	bl	_dev_err
	b	LBB0_15
LBB0_20:
	ldr	x8, [x19, #16]
Lloh43:
	adrp	x9, _PMIC_TYPE_DA9063@GOTPAGE
Lloh44:
	ldr	x9, [x9, _PMIC_TYPE_DA9063@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.21:
	ldr	w20, [x19, #24]
	ldr	w21, [x23]
Lloh46:
	adrp	x8, _da9063_devs@GOTPAGE
Lloh47:
	ldr	x8, [x8, _da9063_devs@GOTPAGEOFF]
Lloh48:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x3, x0
	ldr	w5, [x19]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x4, #0
	mov	x6, #0
	bl	_devm_mfd_add_devices
	mov	x20, x0
	cbnz	w0, LBB0_18
	b	LBB0_15
LBB0_22:
	mov	w20, #0
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot clear fault log\n"

	.comm	_DA9063_REG_CHIP_ID,4,2         ; @DA9063_REG_CHIP_ID
l_.str.1:                               ; @.str.1
	.asciz	"Cannot read chip model id.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_PMIC_CHIP_ID_DA9063,4,2        ; @PMIC_CHIP_ID_DA9063
l_.str.2:                               ; @.str.2
	.asciz	"Invalid chip model id: 0x%02x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DA9063_REG_CHIP_VARIANT,4,2    ; @DA9063_REG_CHIP_VARIANT
l_.str.3:                               ; @.str.3
	.asciz	"Cannot read chip variant id.\n"

	.comm	_DA9063_CHIP_VARIANT_SHIFT,4,2  ; @DA9063_CHIP_VARIANT_SHIFT
l_.str.4:                               ; @.str.4
	.asciz	"Device detected (chip-ID: 0x%02X, var-ID: 0x%02X)\n"

	.comm	_PMIC_DA9063_BB,4,2             ; @PMIC_DA9063_BB
	.comm	_PMIC_DA9063_AD,4,2             ; @PMIC_DA9063_AD
l_.str.5:                               ; @.str.5
	.asciz	"Cannot support variant code: 0x%02X\n"

l_.str.6:                               ; @.str.6
	.asciz	"Cannot initialize interrupts.\n"

	.comm	_PLATFORM_DEVID_NONE,4,2        ; @PLATFORM_DEVID_NONE
	.comm	_da9063_common_devs,4,2         ; @da9063_common_devs
l_.str.7:                               ; @.str.7
	.asciz	"Failed to add child devices\n"

	.comm	_PMIC_TYPE_DA9063,8,3           ; @PMIC_TYPE_DA9063
	.comm	_da9063_devs,4,2                ; @da9063_devs
.subsections_via_symbols
