	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as3722_regnode_init
_as3722_regnode_init:                   ## @as3722_regnode_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_regnode_get_softc
	movq	%rax, %rbx
	movl	$500, (%rax)                    ## imm = 0x1F4
	movq	8(%rax), %rax
	movq	(%rax), %rcx
	movq	_AS3722_REG_ID_SD0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	callq	_as3722_sd0_is_low_voltage
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_as3722_sd0_lv_ranges@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movl	%edi, 20(%rax)
	callq	_nitems
	movq	8(%rbx), %rcx
	movl	%eax, 16(%rcx)
LBB0_3:
	movl	$600, (%rbx)                    ## imm = 0x258
	jmp	LBB0_4
LBB0_7:
	movq	_AS3722_REG_ID_LDO3@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.8:
	cmpq	$0, 32(%rbx)
	je	LBB0_4
## %bb.9:
	movq	16(%rbx), %rdi
	movl	12(%rax), %esi
	movq	_AS3722_LDO3_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AS3722_LDO3_MODE_PMOS_TRACKING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_RM1
	testl	%eax, %eax
	js	LBB0_10
LBB0_4:
	xorl	%r14d, %r14d
	cmpq	$0, 24(%rbx)
	je	LBB0_14
## %bb.5:
	movq	%rbx, %rdi
	callq	_as3722_reg_enable
	testl	%eax, %eax
	js	LBB0_6
## %bb.11:
	movq	24(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_as3722_reg_extreg_setup
	testl	%eax, %eax
	jns	LBB0_14
## %bb.12:
	movl	%eax, %r15d
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx), %edi
	movl	8(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_13
LBB0_6:
	movl	%eax, %r15d
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx), %edi
	movl	8(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_13:
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_device_printf
	movl	%r15d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%eax, %r14d
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_AS3722_REG_ID_SD0,8,3          ## @AS3722_REG_ID_SD0
	.comm	_as3722_sd0_lv_ranges,4,2       ## @as3722_sd0_lv_ranges
	.comm	_AS3722_REG_ID_LDO3,8,3         ## @AS3722_REG_ID_LDO3
	.comm	_AS3722_LDO3_MODE_MASK,4,2      ## @AS3722_LDO3_MODE_MASK
	.comm	_AS3722_LDO3_MODE_PMOS_TRACKING,4,2 ## @AS3722_LDO3_MODE_PMOS_TRACKING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LDO3 tracking failed: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable %s regulator: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s ext control failed: %d"

	.no_dead_strip	_as3722_regnode_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function as3722_regnode_init
_as3722_regnode_init:                   ; @as3722_regnode_init
	.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
	bl	_regnode_get_softc
	mov	x19, x0
	mov	w8, #500
	str	w8, [x0]
	ldr	x8, [x0, #8]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _AS3722_REG_ID_SD0@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AS3722_REG_ID_SD0@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_as3722_sd0_is_low_voltage
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _as3722_sd0_lv_ranges@GOTPAGE
Lloh4:
	ldr	x8, [x8, _as3722_sd0_lv_ranges@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	str	w0, [x8, #20]
	bl	_nitems
	ldr	x8, [x19, #8]
	str	w0, [x8, #16]
LBB0_3:
	mov	w8, #600
	str	w8, [x19]
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x10, _AS3722_REG_ID_LDO3@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AS3722_REG_ID_LDO3@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.5:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_7
; %bb.6:
	ldr	x0, [x19, #16]
	ldr	w1, [x8, #12]
Lloh9:
	adrp	x8, _AS3722_LDO3_MODE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AS3722_LDO3_MODE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _AS3722_LDO3_MODE_PMOS_TRACKING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AS3722_LDO3_MODE_PMOS_TRACKING@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	bl	_RM1
	tbnz	w0, #31, LBB0_13
LBB0_7:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_as3722_reg_enable
	tbnz	w0, #31, LBB0_11
; %bb.9:
	ldr	x1, [x19, #24]
	mov	x0, x19
	bl	_as3722_reg_extreg_setup
	tbnz	w0, #31, LBB0_12
LBB0_10:
	mov	w20, #0
	b	LBB0_15
LBB0_11:
	mov	x20, x0
	ldp	x9, x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x9, #8]
	str	x20, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
	mov	x20, x0
	ldp	x9, x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x9, #8]
	str	x20, [sp]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_15
LBB0_13:
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
LBB0_14:
	bl	_device_printf
LBB0_15:
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AS3722_REG_ID_SD0,8,3          ; @AS3722_REG_ID_SD0
	.comm	_as3722_sd0_lv_ranges,4,2       ; @as3722_sd0_lv_ranges
	.comm	_AS3722_REG_ID_LDO3,8,3         ; @AS3722_REG_ID_LDO3
	.comm	_AS3722_LDO3_MODE_MASK,4,2      ; @AS3722_LDO3_MODE_MASK
	.comm	_AS3722_LDO3_MODE_PMOS_TRACKING,4,2 ; @AS3722_LDO3_MODE_PMOS_TRACKING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LDO3 tracking failed: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable %s regulator: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s ext control failed: %d"

	.no_dead_strip	_as3722_regnode_init
.subsections_via_symbols
