	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xemaclite_open
_xemaclite_open:                        ## @xemaclite_open
	.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
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_xemaclite_disable_interrupts
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.1:
	movq	8(%rbx), %rdi
	movq	_xemaclite_adjust_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PHY_INTERFACE_MODE_MII@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	callq	_of_phy_connect
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_phy_set_max_speed
	movq	(%rbx), %rdi
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_phy_write
	movq	(%rbx), %rdi
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rax
	movq	_ADVERTISE_CSMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_phy_write
	movq	(%rbx), %rdi
	movq	_MII_BMCR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_phy_read
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rcx
	movq	_BMCR_ANRESTART@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	(%rbx), %rdi
	movl	(%r15), %esi
	movl	%eax, %edx
	callq	_phy_write
	movq	(%rbx), %rdi
	callq	_phy_start
LBB0_4:
	movl	8(%r14), %esi
	movq	%rbx, %rdi
	callq	_xemaclite_update_address
	movq	_xemaclite_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edi
	movl	4(%r14), %ecx
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r12d
	movq	8(%rbx), %rdi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_phy_disconnect
LBB0_7:
	movq	$0, (%rbx)
	movl	%r12d, %r15d
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	callq	_xemaclite_enable_interrupts
	movq	%r14, %rdi
	callq	_netif_start_queue
	jmp	LBB0_9
LBB0_2:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xemaclite_adjust_link,4,2      ## @xemaclite_adjust_link
	.comm	_PHY_INTERFACE_MODE_MII,4,2     ## @PHY_INTERFACE_MODE_MII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"of_phy_connect() failed\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_ADVERTISE_CSMA,4,2             ## @ADVERTISE_CSMA
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_BMCR_ANRESTART,4,2             ## @BMCR_ANRESTART
	.comm	_xemaclite_interrupt,4,2        ## @xemaclite_interrupt
L_.str.1:                               ## @.str.1
	.asciz	"Could not allocate interrupt %d\n"

	.no_dead_strip	_xemaclite_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xemaclite_open
_xemaclite_open:                        ; @xemaclite_open
	.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, x0
	bl	_netdev_priv
	mov	x19, x0
	bl	_xemaclite_disable_interrupts
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_3
; %bb.1:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x8, _xemaclite_adjust_link@GOTPAGE
Lloh1:
	ldr	x8, [x8, _xemaclite_adjust_link@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _PHY_INTERFACE_MODE_MII@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_MII@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	w3, #0
	bl	_of_phy_connect
	str	x0, [x19]
	cbz	x0, LBB0_8
; %bb.2:
Lloh6:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_phy_set_max_speed
	ldr	x0, [x19]
Lloh9:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_phy_write
	ldr	x0, [x19]
Lloh12:
	adrp	x8, _MII_ADVERTISE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MII_ADVERTISE@GOTPAGEOFF]
Lloh14:
	adrp	x9, _ADVERTISE_ALL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	ldr	w8, [x9]
Lloh18:
	adrp	x9, _ADVERTISE_CSMA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ADVERTISE_CSMA@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_phy_write
	ldr	x0, [x19]
Lloh21:
	adrp	x21, _MII_BMCR@GOTPAGE
Lloh22:
	ldr	x21, [x21, _MII_BMCR@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_phy_read
Lloh23:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh25:
	adrp	x9, _BMCR_ANRESTART@GOTPAGE
Lloh26:
	ldr	x9, [x9, _BMCR_ANRESTART@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	x0, [x19]
	ldr	w1, [x21]
	bl	_phy_write
	ldr	x0, [x19]
	bl	_phy_start
LBB0_3:
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_xemaclite_update_address
Lloh29:
	adrp	x8, _xemaclite_interrupt@GOTPAGE
Lloh30:
	ldr	x8, [x8, _xemaclite_interrupt@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldp	w0, w3, [x20]
	mov	w2, #0
	mov	x4, x20
	bl	_request_irq
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x0, [x19, #8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_phy_disconnect
LBB0_6:
	str	xzr, [x19]
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_xemaclite_enable_interrupts
	mov	x0, x20
	bl	_netif_start_queue
	b	LBB0_9
LBB0_8:
	ldr	x0, [x19, #8]
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh36:
	adrp	x8, _ENODEV@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_xemaclite_adjust_link,4,2      ; @xemaclite_adjust_link
	.comm	_PHY_INTERFACE_MODE_MII,4,2     ; @PHY_INTERFACE_MODE_MII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"of_phy_connect() failed\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_ADVERTISE_CSMA,4,2             ; @ADVERTISE_CSMA
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_BMCR_ANRESTART,4,2             ; @BMCR_ANRESTART
	.comm	_xemaclite_interrupt,4,2        ; @xemaclite_interrupt
l_.str.1:                               ; @.str.1
	.asciz	"Could not allocate interrupt %d\n"

	.no_dead_strip	_xemaclite_open
.subsections_via_symbols
