	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp2xx_attach
_axp2xx_attach:                         ## @axp2xx_attach
	.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
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r15
	leaq	68(%rax), %rbx
	movl	%r14d, %edi
	callq	_device_get_nameunit
	movq	_MTX_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_axp_res_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	64(%r15), %edx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_2:
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_ofw_bus_search_compatible
	movl	(%rax), %eax
	movl	%eax, (%r15)
	cmpl	$128, %eax
	je	LBB0_6
## %bb.3:
	cmpl	$129, %eax
	jne	LBB0_4
## %bb.5:
	movq	_axp209_pins@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 56(%r15)
	callq	_nitems
	movq	%rax, 48(%r15)
	movl	%r14d, %edi
	callq	_gpiobus_attach_bus
	movq	%rax, 40(%r15)
	movq	_axp209_sensors@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 32(%r15)
	callq	_nitems
	movq	%rax, 24(%r15)
	movq	_axp209_regdefs@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_axp221_pins@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 56(%r15)
	callq	_nitems
	movq	%rax, 48(%r15)
	movl	%r14d, %edi
	callq	_gpiobus_attach_bus
	movq	%rax, 40(%r15)
	movq	_axp221_sensors@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 32(%r15)
	callq	_nitems
	movq	%rax, 24(%r15)
	movq	_axp221_regdefs@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_nitems
	movq	%rax, %rdi
	movl	%edi, 4(%r15)
	jmp	LBB0_8
LBB0_4:
	movl	4(%r15), %edi
                                        ## implicit-def: $rbx
LBB0_8:
	shll	$3, %edi
	movq	_M_AXP2XX_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	%rax, 8(%r15)
	movq	_axp2xx_start@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %rdi
	addq	$16, %rdi
	movl	%eax, 20(%r15)
	movl	%r14d, 16(%r15)
	callq	_config_intrhook_establish
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_10:
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_ofw_bus_find_child
	movq	%rax, %r12
	xorl	%eax, %eax
	testq	%r12, %r12
	jle	LBB0_19
## %bb.11:
	cmpl	$0, 4(%r15)
	jle	LBB0_19
## %bb.12:
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	(%rbx), %rdx
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r13
	movslq	4(%r15), %rax
	addq	$8, %rbx
	cmpq	%rax, %r13
	jge	LBB0_18
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	callq	_ofw_bus_find_child
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%r14d, %edi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_axp2xx_reg_attach
	leaq	L_.str.2(%rip), %rsi
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r15), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	leaq	L_.str.3(%rip), %rsi
	jne	LBB0_16
	jmp	LBB0_17
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
	.comm	_axp_res_spec,4,2               ## @axp_res_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't allocate device resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_compat_data,4,2                ## @compat_data
	.comm	_axp209_pins,8,3                ## @axp209_pins
	.comm	_axp209_sensors,8,3             ## @axp209_sensors
	.comm	_axp209_regdefs,8,3             ## @axp209_regdefs
	.comm	_axp221_pins,8,3                ## @axp221_pins
	.comm	_axp221_sensors,8,3             ## @axp221_sensors
	.comm	_axp221_regdefs,8,3             ## @axp221_regdefs
	.comm	_M_AXP2XX_REG,4,2               ## @M_AXP2XX_REG
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_axp2xx_start,4,2               ## @axp2xx_start
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"regulators"

L_.str.2:                               ## @.str.2
	.asciz	"cannot attach regulator %s\n"

	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.3:                               ## @.str.3
	.asciz	"Regulator %s attached\n"

	.no_dead_strip	_axp2xx_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp2xx_attach
_axp2xx_attach:                         ; @axp2xx_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	add	x21, x0, #68
	mov	x0, x19
	bl	_device_get_nameunit
	mov	x1, x0
Lloh0:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_mtx_init
Lloh3:
	adrp	x8, _axp_res_spec@GOTPAGE
Lloh4:
	ldr	x8, [x8, _axp_res_spec@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x20, #64]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_19
LBB0_2:
Lloh11:
	adrp	x8, _compat_data@GOTPAGE
Lloh12:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	w8, [x0]
	str	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.4:
Lloh14:
	adrp	x8, _axp209_pins@GOTPAGE
Lloh15:
	ldr	x8, [x8, _axp209_pins@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	str	x0, [x20, #56]
	bl	_nitems
	str	x0, [x20, #48]
	mov	x0, x19
	bl	_gpiobus_attach_bus
Lloh17:
	adrp	x8, _axp209_sensors@GOTPAGE
Lloh18:
	ldr	x8, [x8, _axp209_sensors@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	stp	x8, x0, [x20, #32]
	mov	x0, x8
	bl	_nitems
	str	x0, [x20, #24]
Lloh20:
	adrp	x8, _axp209_regdefs@GOTPAGE
Lloh21:
	ldr	x8, [x8, _axp209_regdefs@GOTPAGEOFF]
Lloh22:
	ldr	x21, [x8]
	mov	x0, x21
	bl	_nitems
	str	w0, [x20, #4]
	b	LBB0_7
LBB0_5:
Lloh23:
	adrp	x8, _axp221_pins@GOTPAGE
Lloh24:
	ldr	x8, [x8, _axp221_pins@GOTPAGEOFF]
Lloh25:
	ldr	x0, [x8]
	str	x0, [x20, #56]
	bl	_nitems
	str	x0, [x20, #48]
	mov	x0, x19
	bl	_gpiobus_attach_bus
Lloh26:
	adrp	x8, _axp221_sensors@GOTPAGE
Lloh27:
	ldr	x8, [x8, _axp221_sensors@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	stp	x8, x0, [x20, #32]
	mov	x0, x8
	bl	_nitems
	str	x0, [x20, #24]
Lloh29:
	adrp	x8, _axp221_regdefs@GOTPAGE
Lloh30:
	ldr	x8, [x8, _axp221_regdefs@GOTPAGEOFF]
Lloh31:
	ldr	x21, [x8]
	mov	x0, x21
	bl	_nitems
	str	w0, [x20, #4]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_7
LBB0_6:
	ldr	w0, [x20, #4]
                                        ; implicit-def: $x21
LBB0_7:
	lsl	w0, w0, #3
Lloh32:
	adrp	x8, _M_AXP2XX_REG@GOTPAGE
Lloh33:
	ldr	x8, [x8, _M_AXP2XX_REG@GOTPAGEOFF]
Lloh34:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh35:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	ldr	w8, [x9]
Lloh38:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh39:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_malloc
	mov	x8, x20
	str	w19, [x8, #16]!
	stur	x0, [x8, #-8]
Lloh41:
	adrp	x9, _axp2xx_start@GOTPAGE
Lloh42:
	ldr	x9, [x9, _axp2xx_start@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	str	w9, [x8, #4]
	mov	x0, x8
	bl	_config_intrhook_establish
	cbz	x0, LBB0_9
; %bb.8:
Lloh44:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	b	LBB0_19
LBB0_9:
	mov	x0, x19
	bl	_ofw_bus_get_node
Lloh47:
	adrp	x1, l_.str.1@PAGE
Lloh48:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ofw_bus_find_child
	cmp	x0, #1
	b.lt	LBB0_18
; %bb.10:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.11:
	mov	x22, x0
	mov	x23, #0
Lloh49:
	adrp	x24, l_.str.2@PAGE
Lloh50:
	add	x24, x24, l_.str.2@PAGEOFF
Lloh51:
	adrp	x25, _bootverbose@GOTPAGE
Lloh52:
	ldr	x25, [x25, _bootverbose@GOTPAGEOFF]
Lloh53:
	adrp	x26, l_.str.3@PAGE
Lloh54:
	add	x26, x26, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x1, x24
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x21]
	str	x8, [sp]
	mov	x0, x19
	bl	_device_printf
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20, #4]
	add	x21, x21, #8
	cmp	x23, x8
	b.ge	LBB0_18
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x21]
	mov	x0, x22
	bl	_ofw_bus_find_child
	cbz	x0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_axp2xx_reg_attach
	cbz	x0, LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x20, #8]
	str	x0, [x8, x23, lsl #3]
	ldr	x8, [x25]
	mov	x1, x26
	cbnz	x8, LBB0_13
	b	LBB0_14
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
	.comm	_axp_res_spec,4,2               ; @axp_res_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't allocate device resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_compat_data,4,2                ; @compat_data
	.comm	_axp209_pins,8,3                ; @axp209_pins
	.comm	_axp209_sensors,8,3             ; @axp209_sensors
	.comm	_axp209_regdefs,8,3             ; @axp209_regdefs
	.comm	_axp221_pins,8,3                ; @axp221_pins
	.comm	_axp221_sensors,8,3             ; @axp221_sensors
	.comm	_axp221_regdefs,8,3             ; @axp221_regdefs
	.comm	_M_AXP2XX_REG,4,2               ; @M_AXP2XX_REG
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_axp2xx_start,4,2               ; @axp2xx_start
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"regulators"

l_.str.2:                               ; @.str.2
	.asciz	"cannot attach regulator %s\n"

	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.3:                               ; @.str.3
	.asciz	"Regulator %s attached\n"

	.no_dead_strip	_axp2xx_attach
.subsections_via_symbols
