	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function al_serdes_attach
_al_serdes_attach:                      ## @al_serdes_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, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movq	_al_serdes_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movq	%r14, %rdx
	callq	_bus_alloc_resources
	testl	%eax, %eax
	je	LBB0_1
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	jmp	LBB0_6
LBB0_1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_alpine_serdes_eth_group_mode@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_nitems
	testl	%eax, %eax
	jle	LBB0_4
## %bb.2:
	movl	$4, %ebx
	xorl	%r13d, %r13d
	movq	_MTX_DEF@GOTPCREL(%rip), %r14
	leaq	L_.str.1(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	%rbx, %rdi
	movl	(%r14), %ecx
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	(%r12), %rdi
	movl	$0, -4(%rdi,%rbx)
	incq	%r13
	callq	_nitems
	cltq
	addq	$8, %rbx
	cmpq	%rax, %r13
	jl	LBB0_3
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movq	_serdes_base@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	xorl	%r15d, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_al_serdes_spec,4,2             ## @al_serdes_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_alpine_serdes_eth_group_mode,8,3 ## @alpine_serdes_eth_group_mode
L_.str.1:                               ## @.str.1
	.asciz	"AlSerdesMtx"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
	.comm	_serdes_base,8,3                ## @serdes_base
	.no_dead_strip	_al_serdes_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function al_serdes_attach
_al_serdes_attach:                      ; @al_serdes_attach
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x8, _al_serdes_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _al_serdes_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x19
	bl	_bus_alloc_resources
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_device_printf
	b	LBB0_6
LBB0_2:
Lloh5:
	adrp	x21, _alpine_serdes_eth_group_mode@GOTPAGE
Lloh6:
	ldr	x21, [x21, _alpine_serdes_eth_group_mode@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_nitems
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x22, #0
	mov	x23, #0
Lloh7:
	adrp	x24, _MTX_DEF@GOTPAGE
Lloh8:
	ldr	x24, [x24, _MTX_DEF@GOTPAGEOFF]
Lloh9:
	adrp	x20, l_.str.1@PAGE
Lloh10:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x8, x8, x22
	add	x0, x8, #4
	ldr	w3, [x24]
	mov	x1, x20
	mov	x2, #0
	bl	_mtx_init
	ldr	x0, [x21]
	str	wzr, [x0, x22]
	add	x23, x23, #1
	bl	_nitems
	add	x22, x22, #8
	cmp	x23, w0, sxtw
	b.lt	LBB0_4
LBB0_5:
	ldr	w0, [x19]
	bl	_rman_get_bushandle
	mov	w20, #0
Lloh11:
	adrp	x8, _serdes_base@GOTPAGE
Lloh12:
	ldr	x8, [x8, _serdes_base@GOTPAGEOFF]
Lloh13:
	str	x0, [x8]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_al_serdes_spec,4,2             ; @al_serdes_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_alpine_serdes_eth_group_mode,8,3 ; @alpine_serdes_eth_group_mode
l_.str.1:                               ; @.str.1
	.asciz	"AlSerdesMtx"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
	.comm	_serdes_base,8,3                ; @serdes_base
	.no_dead_strip	_al_serdes_attach
.subsections_via_symbols
