	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftgmac100_reset_and_config_mac
_ftgmac100_reset_and_config_mac:        ## @ftgmac100_reset_and_config_mac
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edx
	xorl	%r14d, %r14d
	cmpl	$128, %edx
	jg	LBB0_4
## %bb.1:
	testl	%edx, %edx
	je	LBB0_8
## %bb.2:
	cmpl	$128, %edx
	jne	LBB0_7
## %bb.3:
	movq	_FTGMAC100_MACCR_GIGA_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_8
LBB0_4:
	cmpl	$130, %edx
	je	LBB0_8
## %bb.5:
	cmpl	$129, %edx
	jne	LBB0_7
## %bb.6:
	movq	_FTGMAC100_MACCR_FAST_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_8
LBB0_7:
	movl	32(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ftgmac100_reset_mac
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movl	$10, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%rbx, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ftgmac100_reset_mac            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FTGMAC100_MACCR_FAST_MODE,4,2  ## @FTGMAC100_MACCR_FAST_MODE
	.comm	_FTGMAC100_MACCR_GIGA_MODE,4,2  ## @FTGMAC100_MACCR_GIGA_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown speed %d !\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ftgmac100_reset_and_config_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftgmac100_reset_and_config_mac
_ftgmac100_reset_and_config_mac:        ; @ftgmac100_reset_and_config_mac
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w20, #0
	ldr	w2, [x0]
	cmp	w2, #128
	b.gt	LBB0_4
; %bb.1:
	cbz	w2, LBB0_8
; %bb.2:
	cmp	w2, #128
	b.ne	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _FTGMAC100_MACCR_GIGA_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FTGMAC100_MACCR_GIGA_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_8
LBB0_4:
	cmp	w2, #130
	b.eq	LBB0_8
; %bb.5:
	cmp	w2, #129
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _FTGMAC100_MACCR_FAST_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FTGMAC100_MACCR_FAST_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #32]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	mov	w20, #0
LBB0_8:
	stp	xzr, xzr, [x19, #8]
	str	xzr, [x19, #24]
	mov	x0, x19
	mov	x1, x20
	bl	_ftgmac100_reset_mac
	cbz	w0, LBB0_10
; %bb.9:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w0, #10
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ftgmac100_reset_mac
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FTGMAC100_MACCR_FAST_MODE,4,2  ; @FTGMAC100_MACCR_FAST_MODE
	.comm	_FTGMAC100_MACCR_GIGA_MODE,4,2  ; @FTGMAC100_MACCR_GIGA_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown speed %d !\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ftgmac100_reset_and_config_mac
.subsections_via_symbols
