	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gemini_ethernet_probe
_gemini_ethernet_probe:                 ## @gemini_ethernet_probe
	.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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 8(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.12:
	movq	8(%r12), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_11:
	subl	(%rax), %ebx
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, 16(%r12)
	movl	$2, %edi
	callq	_udelay
	movq	_GLOBAL_TOE_VERSION_REG@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_barrier
	testl	%r15d, %r15d
	jne	LBB0_13
## %bb.6:
	movl	$2, %edi
	callq	_udelay
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_barrier
	testl	%r15d, %r15d
	jne	LBB0_13
## %bb.7:
	movl	$2, %edi
	callq	_udelay
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_barrier
	testl	%r15d, %r15d
	jne	LBB0_13
## %bb.8:
	movl	$2, %edi
	callq	_udelay
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_barrier
	testl	%r15d, %r15d
	jne	LBB0_13
## %bb.9:
	movl	$2, %edi
	callq	_udelay
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_barrier
	testl	%r15d, %r15d
	je	LBB0_10
LBB0_13:
	movl	%r15d, %edx
	shrl	$4, %edx
	andl	$4095, %edx                     ## imm = 0xFFF
	andl	$15, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %ecx
	callq	_dev_info
	movq	%r12, %rdi
	addq	$4, %rdi
	callq	_spin_lock_init
	movq	%r12, %rdi
	callq	_spin_lock_init
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_of_platform_populate      ## TAILCALL
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GLOBAL_TOE_VERSION_REG,8,3     ## @GLOBAL_TOE_VERSION_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reset ethernet\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Ethernet device ID: 0x%03x, revision 0x%01x\n"

	.no_dead_strip	_gemini_ethernet_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gemini_ethernet_probe
_gemini_ethernet_probe:                 ; @gemini_ethernet_probe
	.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	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_5
; %bb.2:
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x0, [x20, #8]
	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
	b	_PTR_ERR
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_7:
	str	x19, [x20, #16]
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x20, #8]
Lloh10:
	adrp	x22, _GLOBAL_TOE_VERSION_REG@GOTPAGE
Lloh11:
	ldr	x22, [x22, _GLOBAL_TOE_VERSION_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	bl	_barrier
	cbnz	w21, LBB0_12
; %bb.8:
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	bl	_barrier
	cbnz	w21, LBB0_12
; %bb.9:
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	bl	_barrier
	cbnz	w21, LBB0_12
; %bb.10:
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	bl	_barrier
	cbnz	w21, LBB0_12
; %bb.11:
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	bl	_barrier
	cbz	w21, LBB0_13
LBB0_12:
	ubfx	w2, w21, #4, #12
	and	w3, w21, #0xf
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	add	x0, x20, #4
	bl	_spin_lock_init
	mov	x0, x20
	bl	_spin_lock_init
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x19
	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
	b	_devm_of_platform_populate
LBB0_13:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GLOBAL_TOE_VERSION_REG,8,3     ; @GLOBAL_TOE_VERSION_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reset ethernet\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Ethernet device ID: 0x%03x, revision 0x%01x\n"

	.no_dead_strip	_gemini_ethernet_probe
.subsections_via_symbols
