	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax88172a_bind
_ax88172a_bind:                         ## @ax88172a_bind
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_usbnet_get_endpoints
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, 24(%r12)
	movq	_AX_CMD_READ_NODE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %r8d
	subq	$8, %rsp
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r9
	pushq	$0
	callq	_asix_read_cmd
	addq	$16, %rsp
	movq	16(%r12), %rdi
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movl	16(%rdi), %edi
	movl	(%r13), %edx
	movq	%r15, %rsi
	callq	_memcpy
	movq	16(%r12), %rax
	movq	_ax88172a_netdev_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_ax88172a_ethtool_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_AX_CMD_SW_PHY_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	$8, %rsp
	movl	$1, %r13d
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movq	%r15, %r9
	pushq	$0
	callq	_asix_read_cmd
	addq	$16, %rsp
	movq	16(%r12), %rdi
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_dbg
	movq	_AX_PHY_SELECT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.9:
	cmpl	$129, %eax
	jne	LBB0_17
## %bb.10:
	xorl	%r13d, %r13d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_14
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
LBB0_11:
	movq	16(%r12), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_netdev_dbg
	movl	%r13d, (%r14)
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_asix_read_phy_addr
	movl	%eax, 4(%r14)
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_ax88172a_reset_phy
	movq	8(%r12), %rax
	movq	_FLAG_FRAMING_AX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_13
## %bb.12:
	movl	$2048, (%r12)                   ## imm = 0x800
LBB0_13:
	movq	%r12, %rdi
	callq	_ax88172a_init_mdio
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_15
LBB0_17:
	movq	16(%r12), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_14:
	movq	%r14, %rdi
	callq	_kfree
	movl	%ebx, %r15d
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.16:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AX_CMD_READ_NODE_ID,4,2        ## @AX_CMD_READ_NODE_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read MAC address: %d\n"

	.comm	_ax88172a_netdev_ops,4,2        ## @ax88172a_netdev_ops
	.comm	_ax88172a_ethtool_ops,4,2       ## @ax88172a_ethtool_ops
	.comm	_AX_CMD_SW_PHY_STATUS,4,2       ## @AX_CMD_SW_PHY_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read software interface selection register: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"AX_CMD_SW_PHY_STATUS = 0x%02x\n"

	.comm	_AX_PHY_SELECT_MASK,4,2         ## @AX_PHY_SELECT_MASK
L_.str.3:                               ## @.str.3
	.asciz	"use internal phy\n"

L_.str.4:                               ## @.str.4
	.asciz	"use external phy\n"

L_.str.5:                               ## @.str.5
	.asciz	"Interface mode not supported by driver\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_FLAG_FRAMING_AX,4,2            ## @FLAG_FRAMING_AX
	.no_dead_strip	_ax88172a_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax88172a_bind
_ax88172a_bind:                         ; @ax88172a_bind
	.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
	sub	sp, sp, #16
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	bl	_usbnet_get_endpoints
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	str	x0, [x20, #24]
Lloh10:
	adrp	x8, _AX_CMD_READ_NODE_ID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AX_CMD_READ_NODE_ID@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w4, [x23]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	mov	x5, x21
	mov	w6, #0
	bl	_asix_read_cmd
	mov	x22, x0
	ldr	x0, [x20, #16]
	tbnz	w22, #31, LBB0_7
; %bb.2:
	ldr	w0, [x0, #16]
	ldr	w2, [x23]
	mov	x1, x21
	bl	_memcpy
Lloh13:
	adrp	x8, _ax88172a_netdev_ops@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ax88172a_netdev_ops@GOTPAGEOFF]
Lloh15:
	adrp	x9, _ax88172a_ethtool_ops@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ax88172a_ethtool_ops@GOTPAGEOFF]
	ldr	x10, [x20, #16]
	stp	x9, x8, [x10]
Lloh17:
	adrp	x8, _AX_CMD_SW_PHY_STATUS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AX_CMD_SW_PHY_STATUS@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	mov	w4, #1
	mov	x5, x21
	mov	w6, #0
	bl	_asix_read_cmd
	mov	x22, x0
	ldr	x0, [x20, #16]
	tbnz	w22, #31, LBB0_8
; %bb.3:
	ldr	w8, [x21]
	str	x8, [sp, #-16]!
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_dbg
	add	sp, sp, #16
	ldr	w8, [x21]
Lloh22:
	adrp	x9, _AX_PHY_SELECT_MASK@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AX_PHY_SELECT_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_13
; %bb.5:
	mov	w21, #0
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_6:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_7:
	str	x22, [sp, #-16]!
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	add	sp, sp, #16
	b	LBB0_14
LBB0_8:
	str	x22, [sp, #-16]!
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	add	sp, sp, #16
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_14
LBB0_9:
	mov	w21, #1
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	ldr	x0, [x20, #16]
	bl	_netdev_dbg
	str	w21, [x19]
	mov	x0, x20
	mov	x1, x21
	bl	_asix_read_phy_addr
	str	w0, [x19, #4]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_ax88172a_reset_phy
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _FLAG_FRAMING_AX@GOTPAGE
Lloh37:
	ldr	x9, [x9, _FLAG_FRAMING_AX@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	w8, #2048
	str	w8, [x20]
LBB0_12:
	mov	x0, x20
	bl	_ax88172a_init_mdio
	mov	x22, x0
	cbnz	w0, LBB0_14
	b	LBB0_15
LBB0_13:
	ldr	x0, [x20, #16]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_netdev_err
Lloh41:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_14:
	mov	x0, x19
	bl	_kfree
LBB0_15:
	ldur	x8, [x29, #-56]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x22
	sub	sp, x29, #48
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AX_CMD_READ_NODE_ID,4,2        ; @AX_CMD_READ_NODE_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read MAC address: %d\n"

	.comm	_ax88172a_netdev_ops,4,2        ; @ax88172a_netdev_ops
	.comm	_ax88172a_ethtool_ops,4,2       ; @ax88172a_ethtool_ops
	.comm	_AX_CMD_SW_PHY_STATUS,4,2       ; @AX_CMD_SW_PHY_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read software interface selection register: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"AX_CMD_SW_PHY_STATUS = 0x%02x\n"

	.comm	_AX_PHY_SELECT_MASK,4,2         ; @AX_PHY_SELECT_MASK
l_.str.3:                               ; @.str.3
	.asciz	"use internal phy\n"

l_.str.4:                               ; @.str.4
	.asciz	"use external phy\n"

l_.str.5:                               ; @.str.5
	.asciz	"Interface mode not supported by driver\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_FLAG_FRAMING_AX,4,2            ; @FLAG_FRAMING_AX
	.no_dead_strip	_ax88172a_bind
.subsections_via_symbols
