	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa168_smi_read
_pxa168_smi_read:                       ## @pxa168_smi_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	%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, %ebx
	movl	%esi, %r15d
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_smi_wait_ready
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_3:
	movq	_SMI@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	shll	$16, %r15d
	shll	$21, %ebx
	orl	%r15d, %ebx
	movq	_SMI_OP_R@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_wrl
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_rdl
	movq	_SMI_R_VALID@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	jne	LBB0_8
## %bb.4:
	movl	$-1, %ebx
	movq	_PHY_WAIT_ITERATIONS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$10, %edi
	callq	_msleep
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_rdl
	testl	%eax, (%r15)
	je	LBB0_5
LBB0_8:
	movzwl	%ax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_warn
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pxa168_eth: SMI bus busy timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_SMI,4,2                        ## @SMI
	.comm	_SMI_OP_R,4,2                   ## @SMI_OP_R
	.comm	_SMI_R_VALID,4,2                ## @SMI_R_VALID
	.comm	_PHY_WAIT_ITERATIONS,4,2        ## @PHY_WAIT_ITERATIONS
L_.str.1:                               ## @.str.1
	.asciz	"pxa168_eth: SMI bus read not valid\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_pxa168_smi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxa168_smi_read
_pxa168_smi_read:                       ; @pxa168_smi_read
	.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
	ldr	x19, [x0]
	mov	x0, x19
	bl	_smi_wait_ready
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_warn
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
Lloh4:
	adrp	x22, _SMI@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SMI@GOTPAGEOFF]
	ldr	w1, [x22]
	lsl	w8, w21, #21
	orr	w8, w8, w20, lsl #16
Lloh6:
	adrp	x9, _SMI_OP_R@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SMI_OP_R@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_wrl
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rdl
Lloh9:
	adrp	x20, _SMI_R_VALID@GOTPAGE
Lloh10:
	ldr	x20, [x20, _SMI_R_VALID@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.4:
	mov	w21, #-1
Lloh11:
	adrp	x23, _PHY_WAIT_ITERATIONS@GOTPAGE
Lloh12:
	ldr	x23, [x23, _PHY_WAIT_ITERATIONS@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	add	w21, w21, #1
	cmp	w21, w8
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #10
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rdl
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_5
LBB0_7:
	and	w0, w0, #0xffff
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	w0, [x19]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_warn
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pxa168_eth: SMI bus busy timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_SMI,4,2                        ; @SMI
	.comm	_SMI_OP_R,4,2                   ; @SMI_OP_R
	.comm	_SMI_R_VALID,4,2                ; @SMI_R_VALID
	.comm	_PHY_WAIT_ITERATIONS,4,2        ; @PHY_WAIT_ITERATIONS
l_.str.1:                               ; @.str.1
	.asciz	"pxa168_eth: SMI bus read not valid\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_pxa168_smi_read
.subsections_via_symbols
