	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w5100_hw_reset
_w5100_hw_reset:                        ## @w5100_hw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_w5100_reset
	movq	%rbx, %rdi
	callq	_w5100_disable_intr
	movq	%rbx, %rdi
	callq	_w5100_write_macaddr
	movq	(%rbx), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_w5100_memory_configure
	jmp	LBB0_7
LBB0_4:
	movq	%rbx, %rdi
	callq	_w5500_memory_configure
	movq	_W5500_RTR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_w5200_memory_configure
LBB0_7:
	movq	_W5100_RTR@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w5100_read16
	movq	%rax, %rcx
	movq	_RTR_DEFAULT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_11
## %bb.9:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_W5100_RTR,4,2                  ## @W5100_RTR
	.comm	_W5500_RTR,4,2                  ## @W5500_RTR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTR_DEFAULT,8,3                ## @RTR_DEFAULT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_w5100_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w5100_hw_reset
_w5100_hw_reset:                        ; @w5100_hw_reset
	.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
	bl	_w5100_reset
	mov	x0, x19
	bl	_w5100_disable_intr
	mov	x0, x19
	bl	_w5100_write_macaddr
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_10
; %bb.3:
	mov	x0, x19
	bl	_w5100_memory_configure
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_w5500_memory_configure
Lloh0:
	adrp	x8, _W5500_RTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _W5500_RTR@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_w5200_memory_configure
LBB0_6:
Lloh2:
	adrp	x8, _W5100_RTR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _W5100_RTR@GOTPAGEOFF]
LBB0_7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_w5100_read16
Lloh4:
	adrp	x8, _RTR_DEFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RTR_DEFAULT@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_W5100_RTR,4,2                  ; @W5100_RTR
	.comm	_W5500_RTR,4,2                  ; @W5500_RTR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTR_DEFAULT,8,3                ; @RTR_DEFAULT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_w5100_hw_reset
.subsections_via_symbols
