	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arc_mdio_read
_arc_mdio_read:                         ## @arc_mdio_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, %r14d
	movl	%esi, %r15d
	movq	(%rdi), %r12
	movq	_R_MDIO@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%r15d, %eax
	shll	$23, %eax
	shll	$18, %edx
	orl	%eax, %edx
	orl	$1610743808, %edx               ## imm = 0x60020000
	movq	%r12, %rdi
	callq	_arc_reg_set
	movq	%r12, %rdi
	callq	_arc_mdio_complete_wait
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_arc_reg_get
	movzwl	%ax, %ebx
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	callq	_dev_dbg
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_MDIO,4,2                     ## @R_MDIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"arc_mdio_read(phy_addr=%i, reg_num=%x) = %x\n"

	.no_dead_strip	_arc_mdio_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arc_mdio_read
_arc_mdio_read:                         ; @arc_mdio_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	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x23, _R_MDIO@GOTPAGE
Lloh1:
	ldr	x23, [x23, _R_MDIO@GOTPAGEOFF]
	ldr	x21, [x0]
	ldr	w1, [x23]
	lsl	w8, w20, #23
	orr	w8, w8, w2, lsl #18
	mov	w9, #1610743808
	orr	w2, w8, w9
	mov	x0, x21
	bl	_arc_reg_set
	mov	x0, x21
	bl	_arc_mdio_complete_wait
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	w1, [x23]
	mov	x0, x21
	bl	_arc_reg_get
	and	w22, w0, #0xffff
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	mov	x4, x22
	bl	_dev_dbg
	b	LBB0_3
LBB0_2:
	mov	x22, x0
LBB0_3:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_R_MDIO,4,2                     ; @R_MDIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"arc_mdio_read(phy_addr=%i, reg_num=%x) = %x\n"

	.no_dead_strip	_arc_mdio_read
.subsections_via_symbols
