	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax_open
_ax_open:                               ## @ax_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_ax_dev
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_dbg
	movq	%r15, %rdi
	callq	_ax_mii_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	16(%r14), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.3:
	movq	_ax_ei_interrupt@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_ax_ei_interrupt_filtered@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movl	(%r15), %edi
	movl	8(%r15), %ecx
	movq	%r15, %r8
	callq	_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_ax_phy_switch
	movq	%r15, %rdi
	callq	_ax_mii_probe
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movl	4(%r15), %edi
	callq	_phy_start
	movq	%r15, %rdi
	callq	_ax_ei_open
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movl	4(%r15), %edi
	callq	_phy_disconnect
LBB0_9:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ax_phy_switch
	movl	(%r15), %edi
	movq	%r15, %rsi
	callq	_free_irq
LBB0_10:
	movl	4(%r14), %edi
	callq	_mdiobus_unregister
	movl	4(%r14), %edi
	callq	_free_mdio_bitbang
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$1, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open\n"

	.comm	_ax_ei_interrupt_filtered,4,2   ## @ax_ei_interrupt_filtered
	.comm	_ax_ei_interrupt,4,2            ## @ax_ei_interrupt
	.no_dead_strip	_ax_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax_open
_ax_open:                               ; @ax_open
	.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, x0
	bl	_to_ax_dev
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_dbg
	mov	x0, x20
	bl	_ax_mii_init
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _ax_ei_interrupt@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ax_ei_interrupt@GOTPAGEOFF]
Lloh4:
	adrp	x10, _ax_ei_interrupt_filtered@GOTPAGE
Lloh5:
	ldr	x10, [x10, _ax_ei_interrupt_filtered@GOTPAGEOFF]
	ldr	w0, [x20]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	ldr	w3, [x20, #8]
	mov	x4, x20
	bl	_request_irq
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x20
	mov	w1, #1
	bl	_ax_phy_switch
	mov	x0, x20
	bl	_ax_mii_probe
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x20, #4]
	bl	_phy_start
	mov	x0, x20
	bl	_ax_ei_open
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.4:
	ldr	w0, [x20, #4]
	bl	_phy_disconnect
LBB0_5:
	mov	x0, x20
	mov	w1, #0
	bl	_ax_phy_switch
	ldr	w0, [x20]
	mov	x1, x20
	bl	_free_irq
LBB0_6:
	ldr	w0, [x19, #4]
	bl	_mdiobus_unregister
	ldr	w0, [x19, #4]
	bl	_free_mdio_bitbang
LBB0_7:
	mov	x0, x21
	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
LBB0_8:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open\n"

	.comm	_ax_ei_interrupt_filtered,4,2   ; @ax_ei_interrupt_filtered
	.comm	_ax_ei_interrupt,4,2            ; @ax_ei_interrupt
	.no_dead_strip	_ax_open
.subsections_via_symbols
