	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___rtsx_pci_write_phy_register  ## -- Begin function __rtsx_pci_write_phy_register
	.p2align	4, 0x90
___rtsx_pci_write_phy_register:         ## @__rtsx_pci_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, %r13
	callq	_rtsx_pci_init_cmd
	movq	_WRITE_REG_CMD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_PHYDATA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$255, %ecx
	movl	%r15d, %r8d
	callq	_rtsx_pci_add_cmd
	movl	(%r12), %esi
	movq	_PHYDATA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	sarl	$8, %r15d
	movq	%r13, %rdi
	movl	$255, %ecx
	movl	%r15d, %r8d
	callq	_rtsx_pci_add_cmd
	movl	(%r12), %esi
	movq	_PHYADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$255, %ecx
	movl	%r14d, %r8d
	callq	_rtsx_pci_add_cmd
	movl	(%r12), %esi
	movq	_PHYRWCTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r13, %rdi
	movl	$255, %ecx
	movl	$129, %r8d
	callq	_rtsx_pci_add_cmd
	movq	%r13, %rdi
	movl	$100, %esi
	callq	_rtsx_pci_send_cmd
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movl	$100000, %ebx                   ## imm = 0x186A0
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_rtsx_pci_read_register
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	$-128, -44(%rbp)
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	jne	LBB0_3
## %bb.6:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WRITE_REG_CMD,4,2              ## @WRITE_REG_CMD
	.comm	_PHYDATA0,4,2                   ## @PHYDATA0
	.comm	_PHYDATA1,4,2                   ## @PHYDATA1
	.comm	_PHYADDR,4,2                    ## @PHYADDR
	.comm	_PHYRWCTL,4,2                   ## @PHYRWCTL
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___rtsx_pci_write_phy_register  ; -- Begin function __rtsx_pci_write_phy_register
	.p2align	2
___rtsx_pci_write_phy_register:         ; @__rtsx_pci_write_phy_register
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_rtsx_pci_init_cmd
Lloh0:
	adrp	x22, _WRITE_REG_CMD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _WRITE_REG_CMD@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _PHYDATA0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PHYDATA0@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #255
	mov	x4, x20
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _PHYDATA1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHYDATA1@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	asr	w4, w20, #8
	mov	x0, x19
	mov	w3, #255
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _PHYADDR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PHYADDR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #255
	mov	x4, x21
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x22]
Lloh11:
	adrp	x20, _PHYRWCTL@GOTPAGE
Lloh12:
	ldr	x20, [x20, _PHYRWCTL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #129
	bl	_rtsx_pci_add_cmd
	mov	x0, x19
	mov	w1, #100
	bl	_rtsx_pci_send_cmd
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	w21, #34464
	movk	w21, #1, lsl #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_rtsx_pci_read_register
	tbnz	w0, #31, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [sp, #12]
	tbz	w8, #7, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_2
; %bb.5:
Lloh13:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_WRITE_REG_CMD,4,2              ; @WRITE_REG_CMD
	.comm	_PHYDATA0,4,2                   ; @PHYDATA0
	.comm	_PHYDATA1,4,2                   ; @PHYDATA1
	.comm	_PHYADDR,4,2                    ; @PHYADDR
	.comm	_PHYRWCTL,4,2                   ; @PHYRWCTL
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
