	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_ccm_configure_gates
_aml8726_ccm_configure_gates:           ## @aml8726_ccm_configure_gates
	.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	%rdi, %r14
	movl	(%rdi), %edi
	callq	_ofw_bus_get_node
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	callq	_OF_getprop_alloc
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	je	LBB0_23
## %bb.3:
	movq	%rax, %r15
	movq	-48(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_AML_CCM_UNLOCK
LBB0_22:                                ##   in Loop: Header=BB0_4 Depth=1
	testq	%r15, %r15
	je	LBB0_23
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
	movq	8(%r14), %r13
	movq	8(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_25
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	24(%r13), %rdi
	addq	$16, %r13
	testq	%rdi, %rdi
	jne	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	8(%r13), %rbx
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%r12)
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	decq	%r15
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rax
	addq	$-1, %r15
	setb	%cl
	cmpb	$0, 1(%r12)
	leaq	1(%r12), %r12
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	testb	%cl, %cl
	jne	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	addq	%rcx, %r12
	testq	%rax, %rax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r15d, %r15d
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%rbx)
	jne	LBB0_18
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	decq	%r15
	incq	%r12
	cmpq	$0, (%rbx)
	je	LBB0_22
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_AML_CCM_LOCK
	movq	(%r13), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	addq	$8, %rbx
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-4(%rbx), %esi
	movq	%r14, %rdi
	callq	_CSR_READ_4
	orl	-8(%rbx), %eax
	movl	-4(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_CSR_WRITE_4
	cmpl	$0, (%rbx)
	leaq	8(%rbx), %rbx
	jne	LBB0_20
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	8(%r13), %rbx
	cmpq	$0, 8(%r13)
	jne	LBB0_10
	jmp	LBB0_9
LBB0_23:
	movq	-48(%rbp), %rdi
	callq	_OF_prop_free
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_1:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"functions"

L_.str.1:                               ## @.str.1
	.asciz	"missing functions attribute in FDT\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.2:                               ## @.str.2
	.asciz	"unknown function attribute %.*s in FDT\n"

	.no_dead_strip	_aml8726_ccm_configure_gates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_ccm_configure_gates
_aml8726_ccm_configure_gates:           ; @aml8726_ccm_configure_gates
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	ldr	w0, [x0]
	bl	_ofw_bus_get_node
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #24
	bl	_OF_getprop_alloc
	tbnz	x0, #63, LBB0_24
; %bb.1:
	mov	x21, x0
	cbz	x0, LBB0_23
; %bb.2:
	ldr	x20, [sp, #24]
Lloh2:
	adrp	x22, l_.str.2@PAGE
Lloh3:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_AML_CCM_UNLOCK
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	cbz	x21, LBB0_23
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_21 Depth 2
	ldr	x23, [x19, #8]
	ldr	x0, [x23, #8]
	cbz	x0, LBB0_8
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x1, x20
	mov	x2, x21
	bl	_strncmp
	cbz	x0, LBB0_22
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x23, #16
	ldr	x0, [x23, #24]
	mov	x23, x8
	cbnz	x0, LBB0_6
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x8, #8
	mov	x23, x8
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	stp	x21, x20, [sp]
	mov	x1, x22
	bl	_device_printf
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w8, [x20]
	cbz	w8, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	sub	x21, x21, #1
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x8, x21
	ldrb	w10, [x20, #1]!
	subs	x21, x21, #1
	cset	w9, hs
	cbz	w10, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	tbnz	w9, #0, LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x8, #0
	cinc	x20, x20, ne
	cbnz	x8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, #0
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x24]
	cbnz	x8, LBB0_19
	b	LBB0_4
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x21, x21, #1
	add	x20, x20, #1
	ldr	x8, [x24]
	cbz	x8, LBB0_4
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_AML_CCM_LOCK
	ldr	x8, [x23]
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.20:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x8, #4
LBB0_21:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x23]
	mov	x0, x19
	bl	_CSR_READ_4
	ldp	w8, w1, [x23, #-4]
	orr	w2, w8, w0
	mov	x0, x19
	bl	_CSR_WRITE_4
	ldr	w8, [x23, #4]
	add	x23, x23, #8
	cbnz	w8, LBB0_21
	b	LBB0_3
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x23
	ldr	x8, [x24, #8]!
	cbnz	x8, LBB0_11
	b	LBB0_10
LBB0_23:
	ldr	x0, [sp, #24]
	bl	_OF_prop_free
	mov	w0, #0
	b	LBB0_25
LBB0_24:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
Lloh6:
	adrp	x8, _ENXIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_25:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"functions"

l_.str.1:                               ; @.str.1
	.asciz	"missing functions attribute in FDT\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.2:                               ; @.str.2
	.asciz	"unknown function attribute %.*s in FDT\n"

	.no_dead_strip	_aml8726_ccm_configure_gates
.subsections_via_symbols
