	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_gmacclk_attach
_aw_gmacclk_attach:                     ## @aw_gmacclk_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	callq	_ofw_bus_get_node
	movl	%eax, %r14d
	leaq	-52(%rbp), %rdx
	leaq	-92(%rbp), %rcx
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_ofw_reg_to_paddr
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	leaq	-44(%rbp), %rcx
	movl	%r14d, %edi
	callq	_ofw_bus_parse_xref_list_get_length
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	-44(%rbp), %eax
	movq	_CLK_IDX_COUNT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.6:
	movl	%r12d, %edi
	callq	_clkdom_create
	movq	%rax, %r13
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	-72(%rbp), %rdx
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_clk_parse_ofw_clk_name
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	movl	%r12d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$1, -88(%rbp)
	movl	-44(%rbp), %edi
	shll	$3, %edi
	movq	_M_OFWPROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_malloc
	movq	%rax, -80(%rbp)
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_14
## %bb.9:
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movq	%r15, %rcx
	callq	_clk_get_by_ofw_index
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-48(%rbp), %edi
	callq	_clk_get_name
	movq	-80(%rbp), %rcx
	movl	%eax, (%rcx,%r13,4)
	movl	-48(%rbp), %edi
	callq	_clk_release
	incq	%r13
	movslq	-44(%rbp), %rax
	cmpq	%rax, %r13
	jl	LBB0_10
## %bb.13:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
LBB0_14:
	movl	%eax, -84(%rbp)
	movq	_aw_gmacclk_clknode_class@GOTPCREL(%rip), %rsi
	leaq	-88(%rbp), %rdx
	movq	%r13, %rdi
	callq	_clknode_create
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_clknode_get_softc
	movq	%rax, %rbx
	movl	-52(%rbp), %eax
	movl	%eax, 12(%rbx)
	movl	%r12d, %edi
	callq	_device_get_parent
	movl	%eax, 8(%rbx)
	leaq	4(%rbx), %r13
	movq	$-1, (%rbx)
	leaq	L_.str.7(%rip), %rsi
	movl	%r14d, %edi
	movq	%rbx, %rdx
	movl	$4, %ecx
	callq	_OF_getencprop
	leaq	L_.str.8(%rip), %rsi
	movl	%r14d, %edi
	movq	%r13, %rdx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	$4, %ecx
	callq	_OF_getencprop
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_clknode_register
	movq	%r14, %rdi
	callq	_clkdom_finit
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_2
LBB0_11:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_20
LBB0_15:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_2
LBB0_18:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_clkdom_dump
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot parse 'reg' property\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"clocks"

L_.str.2:                               ## @.str.2
	.asciz	"#clock-cells"

	.comm	_CLK_IDX_COUNT,4,2              ## @CLK_IDX_COUNT
L_.str.3:                               ## @.str.3
	.asciz	"couldn't find parent clocks\n"

L_.str.4:                               ## @.str.4
	.asciz	"cannot parse clock name\n"

	.comm	_M_OFWPROP,4,2                  ## @M_OFWPROP
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
L_.str.5:                               ## @.str.5
	.asciz	"cannot get clock %d\n"

	.comm	_aw_gmacclk_clknode_class,4,2   ## @aw_gmacclk_clknode_class
L_.str.6:                               ## @.str.6
	.asciz	"cannot create clknode\n"

L_.str.7:                               ## @.str.7
	.asciz	"tx-delay"

L_.str.8:                               ## @.str.8
	.asciz	"rx-delay"

L_.str.9:                               ## @.str.9
	.asciz	"cannot finalize clkdom initialization\n"

	.comm	_bootverbose,8,3                ## @bootverbose
	.no_dead_strip	_aw_gmacclk_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_gmacclk_attach
_aw_gmacclk_attach:                     ; @aw_gmacclk_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	bl	_ofw_bus_get_node
	mov	x20, x0
	add	x2, sp, #16
	add	x3, sp, #12
	mov	w1, #0
	mov	x4, #0
	bl	_ofw_reg_to_paddr
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh4:
	adrp	x2, l_.str.2@PAGE
Lloh5:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x3, sp, #8
	mov	x0, x20
	bl	_ofw_bus_parse_xref_list_get_length
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w8, [sp, #8]
Lloh6:
	adrp	x9, _CLK_IDX_COUNT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CLK_IDX_COUNT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_clkdom_create
	mov	x21, x0
	add	x22, sp, #24
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	add	x2, x22, #16
	mov	x0, x19
	mov	x1, x20
	bl	_clk_parse_ofw_clk_name
	cbz	w0, LBB0_9
; %bb.5:
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_device_printf
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	mov	w8, #1
	str	w8, [sp, #24]
	ldr	w8, [sp, #8]
	lsl	w0, w8, #3
Lloh16:
	adrp	x8, _M_OFWPROP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _M_OFWPROP@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	bl	_malloc
	str	x0, [sp, #32]
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x23, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #20
	mov	x0, x19
	mov	w1, #0
	mov	x2, x23
	bl	_clk_get_by_ofw_index
	cbnz	w0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [sp, #20]
	bl	_clk_get_name
	ldr	x8, [sp, #32]
	str	w0, [x8, x23, lsl #2]
	ldr	w0, [sp, #20]
	bl	_clk_release
	add	x23, x23, #1
	ldrsw	x8, [sp, #8]
	cmp	x23, x8
	b.lt	LBB0_11
LBB0_13:
	str	w8, [sp, #28]
Lloh22:
	adrp	x1, _aw_gmacclk_clknode_class@GOTPAGE
Lloh23:
	ldr	x1, [x1, _aw_gmacclk_clknode_class@GOTPAGEOFF]
	add	x2, sp, #24
	mov	x0, x21
	bl	_clknode_create
	cbz	x0, LBB0_17
; %bb.14:
	mov	x22, x0
	bl	_clknode_get_softc
	mov	x23, x0
	ldr	w8, [sp, #16]
	str	w8, [x0, #12]
	mov	x0, x19
	bl	_device_get_parent
	str	w0, [x23, #8]
	add	x24, x23, #4
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x23]
Lloh24:
	adrp	x1, l_.str.7@PAGE
Lloh25:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	mov	w3, #4
	bl	_OF_getencprop
Lloh26:
	adrp	x1, l_.str.8@PAGE
Lloh27:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	mov	x2, x24
	mov	w3, #4
	bl	_OF_getencprop
	mov	x0, x21
	mov	x1, x22
	bl	_clknode_register
	mov	x0, x21
	bl	_clkdom_finit
	cbz	x0, LBB0_18
; %bb.15:
Lloh28:
	adrp	x1, l_.str.9@PAGE
Lloh29:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_7
LBB0_16:
	mov	x22, x0
	str	x22, [sp]
Lloh30:
	adrp	x1, l_.str.5@PAGE
Lloh31:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	b	LBB0_8
LBB0_17:
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_7
LBB0_18:
Lloh34:
	adrp	x8, _bootverbose@GOTPAGE
Lloh35:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.19:
	mov	x0, x21
	bl	_clkdom_dump
LBB0_20:
	mov	w22, #0
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot parse 'reg' property\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"clocks"

l_.str.2:                               ; @.str.2
	.asciz	"#clock-cells"

	.comm	_CLK_IDX_COUNT,4,2              ; @CLK_IDX_COUNT
l_.str.3:                               ; @.str.3
	.asciz	"couldn't find parent clocks\n"

l_.str.4:                               ; @.str.4
	.asciz	"cannot parse clock name\n"

	.comm	_M_OFWPROP,4,2                  ; @M_OFWPROP
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
l_.str.5:                               ; @.str.5
	.asciz	"cannot get clock %d\n"

	.comm	_aw_gmacclk_clknode_class,4,2   ; @aw_gmacclk_clknode_class
l_.str.6:                               ; @.str.6
	.asciz	"cannot create clknode\n"

l_.str.7:                               ; @.str.7
	.asciz	"tx-delay"

l_.str.8:                               ; @.str.8
	.asciz	"rx-delay"

l_.str.9:                               ; @.str.9
	.asciz	"cannot finalize clkdom initialization\n"

	.comm	_bootverbose,8,3                ; @bootverbose
	.no_dead_strip	_aw_gmacclk_attach
.subsections_via_symbols
