	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftmac100_reset
_ftmac100_reset:                        ## @ftmac100_reset
	.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	8(%rdi), %r14
	movq	_FTMAC100_MACCR_SW_RST@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_FTMAC100_OFFSET_MACCR@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%rbx), %rsi
	callq	_iowrite32
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.2:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.3:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.4:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.5:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.6:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_1:
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FTMAC100_MACCR_SW_RST,4,2      ## @FTMAC100_MACCR_SW_RST
	.comm	_FTMAC100_OFFSET_MACCR,8,3      ## @FTMAC100_OFFSET_MACCR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"software reset failed\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftmac100_reset
_ftmac100_reset:                        ; @ftmac100_reset
	.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
Lloh0:
	adrp	x21, _FTMAC100_MACCR_SW_RST@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FTMAC100_MACCR_SW_RST@GOTPAGEOFF]
	ldr	w0, [x21]
	ldp	x8, x19, [x20]
Lloh2:
	adrp	x22, _FTMAC100_OFFSET_MACCR@GOTPAGE
Lloh3:
	ldr	x22, [x22, _FTMAC100_OFFSET_MACCR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
	mov	w0, #1000
	bl	_udelay
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.2:
	mov	w0, #1000
	bl	_udelay
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.3:
	mov	w0, #1000
	bl	_udelay
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:
	mov	w0, #1000
	bl	_udelay
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	mov	w0, #1000
	bl	_udelay
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #500
	bl	_udelay
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FTMAC100_MACCR_SW_RST,4,2      ; @FTMAC100_MACCR_SW_RST
	.comm	_FTMAC100_OFFSET_MACCR,8,3      ; @FTMAC100_OFFSET_MACCR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"software reset failed\n"

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