	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usb2_powerdown
_usb2_powerdown:                        ## @usb2_powerdown
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_search_lane_port
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_XUSB_PADCTL_USB2_BIAS_PAD_CTL0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_RD4
	movq	_USB2_BIAS_PAD_CTL0_PD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_WR4
	movq	(%r14), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.3:
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	movl	%ebx, %r14d
	jmp	LBB0_5
LBB0_1:
	movl	(%r15), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_device_printf
	movq	_XUSB_PADCTL_USB2_BIAS_PAD_CTL0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_RD4
	movq	_USB2_BIAS_PAD_CTL0_PD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_WR4
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot find port for lane: %s\n"

	.comm	_XUSB_PADCTL_USB2_BIAS_PAD_CTL0,4,2 ## @XUSB_PADCTL_USB2_BIAS_PAD_CTL0
	.comm	_USB2_BIAS_PAD_CTL0_PD,4,2      ## @USB2_BIAS_PAD_CTL0_PD
L_.str.1:                               ## @.str.1
	.asciz	"Cannot disable vbus regulator\n"

	.no_dead_strip	_usb2_powerdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usb2_powerdown
_usb2_powerdown:                        ; @usb2_powerdown
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_search_lane_port
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x21, _XUSB_PADCTL_USB2_BIAS_PAD_CTL0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _XUSB_PADCTL_USB2_BIAS_PAD_CTL0@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_RD4
Lloh2:
	adrp	x8, _USB2_BIAS_PAD_CTL0_PD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB2_BIAS_PAD_CTL0_PD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_WR4
	ldr	x0, [x20]
	cbz	x0, LBB0_5
; %bb.2:
	bl	_regulator_enable
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19]
	ldr	w8, [x21]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
Lloh9:
	adrp	x20, _XUSB_PADCTL_USB2_BIAS_PAD_CTL0@GOTPAGE
Lloh10:
	ldr	x20, [x20, _XUSB_PADCTL_USB2_BIAS_PAD_CTL0@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
Lloh11:
	adrp	x8, _USB2_BIAS_PAD_CTL0_PD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _USB2_BIAS_PAD_CTL0_PD@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
LBB0_5:
	mov	w20, #0
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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot find port for lane: %s\n"

	.comm	_XUSB_PADCTL_USB2_BIAS_PAD_CTL0,4,2 ; @XUSB_PADCTL_USB2_BIAS_PAD_CTL0
	.comm	_USB2_BIAS_PAD_CTL0_PD,4,2      ; @USB2_BIAS_PAD_CTL0_PD
l_.str.1:                               ; @.str.1
	.asciz	"Cannot disable vbus regulator\n"

	.no_dead_strip	_usb2_powerdown
.subsections_via_symbols
