	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_usb_write_phy_register
_rtsx_usb_write_phy_register:           ## @rtsx_usb_write_phy_register
	.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	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_rtsx_usb_init_cmd
	movq	_WRITE_REG_CMD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_HS_VSTAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	movl	%r15d, %r8d
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movq	_HS_VCONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%r14d, %r8d
	andl	$15, %r8d
	movq	%rbx, %rdi
	movl	$255, %ecx
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movq	_HS_VLOADM@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	xorl	%r8d, %r8d
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	xorl	%r8d, %r8d
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	movl	$1, %r8d
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movl	(%r13), %edx
	shrl	$4, %r14d
	andl	$15, %r14d
	movq	%rbx, %rdi
	movl	$255, %ecx
	movl	%r14d, %r8d
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	xorl	%r8d, %r8d
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	xorl	%r8d, %r8d
	callq	_rtsx_usb_add_cmd
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	movl	$1, %r8d
	callq	_rtsx_usb_add_cmd
	movq	_MODE_C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$100, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtsx_usb_send_cmd              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Write 0x%x to phy register 0x%x\n"

	.comm	_WRITE_REG_CMD,4,2              ## @WRITE_REG_CMD
	.comm	_HS_VSTAIN,4,2                  ## @HS_VSTAIN
	.comm	_HS_VCONTROL,4,2                ## @HS_VCONTROL
	.comm	_HS_VLOADM,4,2                  ## @HS_VLOADM
	.comm	_MODE_C,4,2                     ## @MODE_C
	.no_dead_strip	_rtsx_usb_write_phy_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_usb_write_phy_register
_rtsx_usb_write_phy_register:           ; @rtsx_usb_write_phy_register
	.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, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_dbg
	mov	x0, x19
	bl	_rtsx_usb_init_cmd
Lloh2:
	adrp	x22, _WRITE_REG_CMD@GOTPAGE
Lloh3:
	ldr	x22, [x22, _WRITE_REG_CMD@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh4:
	adrp	x8, _HS_VSTAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HS_VSTAIN@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #255
	mov	x4, x21
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
Lloh7:
	adrp	x23, _HS_VCONTROL@GOTPAGE
Lloh8:
	ldr	x23, [x23, _HS_VCONTROL@GOTPAGEOFF]
	ldr	w2, [x23]
	and	w4, w20, #0xf
	mov	x0, x19
	mov	w3, #255
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
Lloh9:
	adrp	x21, _HS_VLOADM@GOTPAGE
Lloh10:
	ldr	x21, [x21, _HS_VLOADM@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #0
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #0
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #1
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
	ldr	w2, [x23]
	ubfx	w4, w20, #4, #4
	mov	x0, x19
	mov	w3, #255
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #0
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #0
	bl	_rtsx_usb_add_cmd
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #1
	bl	_rtsx_usb_add_cmd
Lloh11:
	adrp	x8, _MODE_C@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE_C@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #100
	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
	b	_rtsx_usb_send_cmd
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Write 0x%x to phy register 0x%x\n"

	.comm	_WRITE_REG_CMD,4,2              ; @WRITE_REG_CMD
	.comm	_HS_VSTAIN,4,2                  ; @HS_VSTAIN
	.comm	_HS_VCONTROL,4,2                ; @HS_VCONTROL
	.comm	_HS_VLOADM,4,2                  ; @HS_VLOADM
	.comm	_MODE_C,4,2                     ; @MODE_C
	.no_dead_strip	_rtsx_usb_write_phy_register
.subsections_via_symbols
