	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xusbpadctl_phy_enable
_xusbpadctl_phy_enable:                 ## @xusbpadctl_phy_enable
	.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	%esi, %r12d
	movq	%rdi, %rbx
	callq	_phynode_get_device
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_phynode_get_id
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_device_get_softc
	testq	%rbx, %rbx
	js	LBB0_2
## %bb.1:
	movq	%rax, %r14
	movq	_lanes_tbl@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_nitems
	cmpq	%rax, %rbx
	jge	LBB0_2
## %bb.4:
	movq	(%r15), %rax
	leaq	(%rbx,%rbx,2), %rcx
	leaq	(%rax,%rcx,8), %r15
	cmpl	$0, 16(%rax,%rcx,8)
	je	LBB0_5
## %bb.6:
	movq	8(%rax,%rcx,8), %rbx
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.7:
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_8
LBB0_10:
	incl	%eax
	movl	%eax, (%r14)
	movq	(%rbx), %rax
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edi
	movq	%rbx, %rdx
LBB0_3:
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edi
	jmp	LBB0_3
LBB0_11:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*8(%rbx)
	testl	%eax, %eax
	jne	LBB0_16
## %bb.12:
	movl	(%r14), %eax
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	callq	_phy_powerdown
	testl	%eax, %eax
	jne	LBB0_16
## %bb.14:
	movl	(%r14), %eax
LBB0_15:
	decl	%eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_8:
	movq	%r14, %rdi
	callq	_phy_powerup
	testl	%eax, %eax
	jne	LBB0_16
## %bb.9:
	movl	(%r14), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_lanes_tbl,8,3                  ## @lanes_tbl
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown phy: %d\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"Lane is not enabled/configured: %s\n"

	.no_dead_strip	_xusbpadctl_phy_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xusbpadctl_phy_enable
_xusbpadctl_phy_enable:                 ; @xusbpadctl_phy_enable
	.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	x20, x1
	mov	x19, x0
	bl	_phynode_get_device
	mov	x22, x0
	mov	x0, x19
	bl	_phynode_get_id
	mov	x23, x0
	mov	x0, x22
	bl	_device_get_softc
	tbnz	x23, #63, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _lanes_tbl@GOTPAGE
Lloh1:
	ldr	x21, [x21, _lanes_tbl@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_nitems
	cmp	x23, x0
	b.ge	LBB0_6
; %bb.2:
	ldr	x8, [x21]
	mov	w9, #24
	madd	x21, x23, x9, x8
	ldr	w9, [x21, #16]
	cbz	w9, LBB0_9
; %bb.3:
	mov	w9, #24
	madd	x8, x23, x9, x8
	ldr	x22, [x8, #8]
	cbz	w20, LBB0_10
; %bb.4:
	ldr	w8, [x19]
	cbz	w8, LBB0_15
LBB0_5:
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x21
	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
	br	x2
LBB0_6:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x23
LBB0_7:
	bl	_device_printf
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
LBB0_8:
	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
LBB0_9:
	ldr	x2, [x21]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	b	LBB0_7
LBB0_10:
	ldr	x8, [x22, #8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	cbnz	w0, LBB0_8
; %bb.11:
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_phy_powerdown
	cbnz	w0, LBB0_8
; %bb.13:
	ldr	w8, [x19]
LBB0_14:
	mov	w0, #0
	sub	w8, w8, #1
	str	w8, [x19]
	b	LBB0_8
LBB0_15:
	mov	x0, x19
	bl	_phy_powerup
	cbnz	w0, LBB0_8
; %bb.16:
	ldr	w8, [x19]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_lanes_tbl,8,3                  ; @lanes_tbl
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown phy: %d\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"Lane is not enabled/configured: %s\n"

	.no_dead_strip	_xusbpadctl_phy_enable
.subsections_via_symbols
