	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_get_comm_ownership
_xgbe_phy_get_comm_ownership:           ## @xgbe_phy_get_comm_ownership
	.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
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	_xgbe_phy_comm_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_XP_I2C_MUTEX@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_XGBE_MUTEX_RELEASE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_XP_IOWRITE
	movq	_XP_MDIO_MUTEX@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_XP_IOWRITE
	movl	(%r12), %esi
	movq	_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	xorl	%edi, %edi
	callq	_XP_SET_BITS
	movl	(%r12), %esi
	movq	_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	$1, %ecx
	callq	_XP_SET_BITS
	movq	_jiffies@GOTPCREL(%rip), %r14
	movslq	(%r14), %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%rax,4), %rbx
	addq	%rdi, %rbx
                                        ## kill: def $edi killed $edi killed $rdi
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r14), %edi
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_XP_IOREAD
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_XP_IOREAD
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:
	movl	(%r12), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_XP_IOWRITE
	movl	(%r13), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_XP_IOWRITE
	jmp	LBB0_6
LBB0_5:
	movq	_xgbe_phy_comm_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xgbe_phy_comm_lock,4,2         ## @xgbe_phy_comm_lock
	.comm	_XP_I2C_MUTEX,4,2               ## @XP_I2C_MUTEX
	.comm	_XGBE_MUTEX_RELEASE,4,2         ## @XGBE_MUTEX_RELEASE
	.comm	_XP_MDIO_MUTEX,4,2              ## @XP_MDIO_MUTEX
	.comm	_ID,4,2                         ## @ID
	.comm	_ACTIVE,4,2                     ## @ACTIVE
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to obtain hardware mutexes\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_xgbe_phy_get_comm_ownership
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_get_comm_ownership
_xgbe_phy_get_comm_ownership:           ; @xgbe_phy_get_comm_ownership
	.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, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x0, _xgbe_phy_comm_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _xgbe_phy_comm_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x21, _XP_I2C_MUTEX@GOTPAGE
Lloh3:
	ldr	x21, [x21, _XP_I2C_MUTEX@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh4:
	adrp	x23, _XGBE_MUTEX_RELEASE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _XGBE_MUTEX_RELEASE@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_XP_IOWRITE
Lloh6:
	adrp	x22, _XP_MDIO_MUTEX@GOTPAGE
Lloh7:
	ldr	x22, [x22, _XP_MDIO_MUTEX@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_XP_IOWRITE
	ldr	w1, [x21]
Lloh8:
	adrp	x8, _ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ID@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	w0, #0
	bl	_XP_SET_BITS
	ldr	w1, [x21]
Lloh11:
	adrp	x8, _ACTIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ACTIVE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w0, #0
	mov	w3, #1
	bl	_XP_SET_BITS
Lloh14:
	adrp	x23, _jiffies@GOTPAGE
Lloh15:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldrsw	x0, [x23]
Lloh16:
	adrp	x8, _HZ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh18:
	ldrsw	x8, [x8]
	add	x8, x8, x8, lsl #2
	add	x20, x8, x0
                                        ; kill: def $w0 killed $w0 killed $x0
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w0, [x23]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x20
	bl	_time_before
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_XP_IOREAD
	cbnz	x0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_XP_IOREAD
	cbnz	x0, LBB0_1
; %bb.5:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_XP_IOWRITE
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_XP_IOWRITE
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x0, _xgbe_phy_comm_lock@GOTPAGE
Lloh20:
	ldr	x0, [x0, _xgbe_phy_comm_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x19]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh23:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_xgbe_phy_comm_lock,4,2         ; @xgbe_phy_comm_lock
	.comm	_XP_I2C_MUTEX,4,2               ; @XP_I2C_MUTEX
	.comm	_XGBE_MUTEX_RELEASE,4,2         ; @XGBE_MUTEX_RELEASE
	.comm	_XP_MDIO_MUTEX,4,2              ; @XP_MDIO_MUTEX
	.comm	_ID,4,2                         ; @ID
	.comm	_ACTIVE,4,2                     ; @ACTIVE
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to obtain hardware mutexes\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_xgbe_phy_get_comm_ownership
.subsections_via_symbols
