	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_phy_read
_cas_phy_read:                          ## @cas_phy_read
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_STOP_TRIES_PHY@GOTPCREL(%rip), %rax
	movq	_MIF_FRAME_ST@GOTPCREL(%rip), %rcx
	movq	_MIF_FRAME_OP_READ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
	orl	(%rcx), %r14d
	movl	(%rax), %ebx
	movq	_MIF_FRAME_PHY_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_CAS_BASE
	orl	%eax, %r14d
	movq	_MIF_FRAME_REG_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_CAS_BASE
	orl	%eax, %r14d
	movq	_MIF_FRAME_TURN_AROUND_MSB@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_REG_MIF_FRAME@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	movl	%r14d, %edi
	callq	_writel
	incl	%ebx
	movq	_MIF_FRAME_TURN_AROUND_LSB@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_udelay
	movq	(%r15), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	testl	%eax, (%r14)
	je	LBB0_1
## %bb.4:
	movq	_MIF_FRAME_DATA_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movl	$65535, %eax                    ## imm = 0xFFFF
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STOP_TRIES_PHY,4,2             ## @STOP_TRIES_PHY
	.comm	_MIF_FRAME_ST,4,2               ## @MIF_FRAME_ST
	.comm	_MIF_FRAME_OP_READ,4,2          ## @MIF_FRAME_OP_READ
	.comm	_MIF_FRAME_PHY_ADDR,4,2         ## @MIF_FRAME_PHY_ADDR
	.comm	_MIF_FRAME_REG_ADDR,4,2         ## @MIF_FRAME_REG_ADDR
	.comm	_MIF_FRAME_TURN_AROUND_MSB,4,2  ## @MIF_FRAME_TURN_AROUND_MSB
	.comm	_REG_MIF_FRAME,8,3              ## @REG_MIF_FRAME
	.comm	_MIF_FRAME_TURN_AROUND_LSB,4,2  ## @MIF_FRAME_TURN_AROUND_LSB
	.comm	_MIF_FRAME_DATA_MASK,4,2        ## @MIF_FRAME_DATA_MASK
	.no_dead_strip	_cas_phy_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_phy_read
_cas_phy_read:                          ; @cas_phy_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _STOP_TRIES_PHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STOP_TRIES_PHY@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _MIF_FRAME_ST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIF_FRAME_ST@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MIF_FRAME_OP_READ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MIF_FRAME_OP_READ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w22, w9, w8
Lloh9:
	adrp	x8, _MIF_FRAME_PHY_ADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MIF_FRAME_PHY_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_CAS_BASE
	orr	w22, w22, w0
Lloh12:
	adrp	x8, _MIF_FRAME_REG_ADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MIF_FRAME_REG_ADDR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_CAS_BASE
	orr	w8, w22, w0
Lloh15:
	adrp	x9, _MIF_FRAME_TURN_AROUND_MSB@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MIF_FRAME_TURN_AROUND_MSB@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
Lloh18:
	adrp	x20, _REG_MIF_FRAME@GOTPAGE
Lloh19:
	ldr	x20, [x20, _REG_MIF_FRAME@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	add	w21, w21, #1
Lloh20:
	adrp	x22, _MIF_FRAME_TURN_AROUND_LSB@GOTPAGE
Lloh21:
	ldr	x22, [x22, _MIF_FRAME_TURN_AROUND_LSB@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_1
; %bb.3:
Lloh22:
	adrp	x8, _MIF_FRAME_DATA_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MIF_FRAME_DATA_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	and	w0, w8, w0
	b	LBB0_5
LBB0_4:
	mov	w0, #65535
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_STOP_TRIES_PHY,4,2             ; @STOP_TRIES_PHY
	.comm	_MIF_FRAME_ST,4,2               ; @MIF_FRAME_ST
	.comm	_MIF_FRAME_OP_READ,4,2          ; @MIF_FRAME_OP_READ
	.comm	_MIF_FRAME_PHY_ADDR,4,2         ; @MIF_FRAME_PHY_ADDR
	.comm	_MIF_FRAME_REG_ADDR,4,2         ; @MIF_FRAME_REG_ADDR
	.comm	_MIF_FRAME_TURN_AROUND_MSB,4,2  ; @MIF_FRAME_TURN_AROUND_MSB
	.comm	_REG_MIF_FRAME,8,3              ; @REG_MIF_FRAME
	.comm	_MIF_FRAME_TURN_AROUND_LSB,4,2  ; @MIF_FRAME_TURN_AROUND_LSB
	.comm	_MIF_FRAME_DATA_MASK,4,2        ; @MIF_FRAME_DATA_MASK
	.no_dead_strip	_cas_phy_read
.subsections_via_symbols
