	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ugeth_enable
_ugeth_enable:                          ## @ugeth_enable
	.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, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_UCC_MAX_NUM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.4:
	movl	%esi, %r14d
	movq	8(%rbx), %r15
	movl	4(%r15), %r12d
	movq	_COMM_DIR_TX@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_8
## %bb.5:
	cmpl	$0, (%r15)
	jne	LBB0_8
## %bb.6:
	cmpq	$0, 16(%r15)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_ugeth_restart_tx
LBB0_8:
	movq	_COMM_DIR_RX@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_12
## %bb.9:
	testl	%r12d, %r12d
	jne	LBB0_12
## %bb.10:
	cmpq	$0, 8(%r15)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_ugeth_restart_rx
LBB0_12:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_ucc_fast_enable
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_1:
	movq	%rbx, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UCC_MAX_NUM,8,3                ## @UCC_MAX_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ucc_num out of range\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_COMM_DIR_TX,4,2                ## @COMM_DIR_TX
	.comm	_COMM_DIR_RX,4,2                ## @COMM_DIR_RX
	.no_dead_strip	_ugeth_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ugeth_enable
_ugeth_enable:                          ; @ugeth_enable
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _UCC_MAX_NUM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UCC_MAX_NUM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.1:
	mov	x19, x1
	ldr	x21, [x20, #8]
	ldp	w8, w22, [x21]
Lloh3:
	adrp	x9, _COMM_DIR_TX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _COMM_DIR_TX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w1
	cmp	w9, #0
	ccmp	w8, #0, #0, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_ugeth_restart_tx
LBB0_4:
Lloh6:
	adrp	x8, _COMM_DIR_RX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _COMM_DIR_RX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w19
	cmp	w8, #0
	ccmp	w22, #0, #0, ne
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_ugeth_restart_rx
LBB0_7:
	mov	x0, x21
	mov	x1, x19
	bl	_ucc_fast_enable
	mov	w0, #0
	b	LBB0_11
LBB0_8:
	mov	x0, x20
	bl	_netif_msg_probe
	cbz	x0, LBB0_10
; %bb.9:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_10:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_UCC_MAX_NUM,8,3                ; @UCC_MAX_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ucc_num out of range\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_COMM_DIR_TX,4,2                ; @COMM_DIR_TX
	.comm	_COMM_DIR_RX,4,2                ; @COMM_DIR_RX
	.no_dead_strip	_ugeth_enable
.subsections_via_symbols
