	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mace_probe
_mace_probe:                            ## @mace_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PRIV_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_alloc_etherdev
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%r14, 24(%rax)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_SET_NETDEV_DEV
	movq	_MACE_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r12)
	movq	%rax, 8(%rbx)
	movq	_IRQ_MAC_MACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%r12)
	movq	_IRQ_MAC_MACE_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movl	(%rax), %ecx
	shll	$8, %ecx
	orl	4(%rax), %ecx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, (%rbx)
	movq	_MACE_PROM@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movzbl	(%r13), %edi
	callq	_bitrev8
	movb	%al, -42(%rbp)                  ## 1-byte Spill
	movq	(%r12), %rcx
	movb	%al, (%rcx)
	movzbl	16(%r13), %edi
	callq	_bitrev8
	movl	%eax, %ebx
	movq	(%r12), %rax
	movb	%bl, 1(%rax)
	movzbl	32(%r13), %edi
	callq	_bitrev8
	movl	%eax, %r14d
	movq	(%r12), %rax
	movb	%r14b, 2(%rax)
	movzbl	48(%r13), %edi
	callq	_bitrev8
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	(%r12), %rcx
	movb	%al, 3(%rcx)
	movzbl	64(%r13), %edi
	callq	_bitrev8
	movl	%eax, %r15d
	movq	(%r12), %rax
	movb	%r15b, 4(%rax)
	movzbl	80(%r13), %edi
	callq	_bitrev8
	movq	(%r12), %rcx
	movb	%al, 5(%rcx)
	xorb	-42(%rbp), %bl                  ## 1-byte Folded Reload
	xorb	-41(%rbp), %r14b                ## 1-byte Folded Reload
	xorb	%bl, %r14b
	xorb	%al, %r15b
	movzbl	96(%r13), %edi
	callq	_bitrev8
	movl	%eax, %ebx
	xorb	%r15b, %bl
	xorb	%r14b, %bl
	movzbl	112(%r13), %edi
	callq	_bitrev8
	xorb	%bl, %al
	cmpb	$-1, %al
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_free_netdev
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_mace_netdev_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r12)
	movq	_TX_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	(%r12), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movq	%r12, %rdi
	callq	_register_netdev
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_free_netdev
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_PRIV_BYTES,4,2                 ## @PRIV_BYTES
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MACE_BASE,8,3                  ## @MACE_BASE
	.comm	_IRQ_MAC_MACE,4,2               ## @IRQ_MAC_MACE
	.comm	_IRQ_MAC_MACE_DMA,4,2           ## @IRQ_MAC_MACE_DMA
	.comm	_MACE_PROM,8,3                  ## @MACE_PROM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_mace_netdev_ops,4,2            ## @mace_netdev_ops
	.comm	_TX_TIMEOUT,4,2                 ## @TX_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Onboard MACE, hardware address %pM, chip revision 0x%04X\n"

	.no_dead_strip	_mace_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mace_probe
_mace_probe:                            ; @mace_probe
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
Lloh0:
	adrp	x8, _PRIV_BYTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRIV_BYTES@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_alloc_etherdev
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	str	x21, [x0, #24]
	mov	x0, x21
	mov	x1, x19
	bl	_platform_set_drvdata
	mov	x0, x19
	mov	x1, x21
	bl	_SET_NETDEV_DEV
Lloh3:
	adrp	x8, _MACE_BASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MACE_BASE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19, #32]
	str	x8, [x20, #8]
Lloh6:
	adrp	x9, _IRQ_MAC_MACE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IRQ_MAC_MACE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x19, #24]
Lloh9:
	adrp	x9, _IRQ_MAC_MACE_DMA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IRQ_MAC_MACE_DMA@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	str	w9, [x20, #16]
	ldp	w9, w8, [x8]
	orr	w8, w8, w9, lsl #8
	str	w8, [x20]
Lloh12:
	adrp	x8, _MACE_PROM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MACE_PROM@GOTPAGEOFF]
Lloh14:
	ldr	x26, [x8]
	ldrb	w0, [x26]
	bl	_bitrev8
	mov	x21, x0
	ldr	x8, [x19]
	strb	w0, [x8]
	ldrb	w0, [x26, #16]
	bl	_bitrev8
	mov	x22, x0
	ldr	x8, [x19]
	strb	w0, [x8, #1]
	ldrb	w0, [x26, #32]
	bl	_bitrev8
	mov	x23, x0
	ldr	x8, [x19]
	strb	w0, [x8, #2]
	ldrb	w0, [x26, #48]
	bl	_bitrev8
	mov	x24, x0
	ldr	x8, [x19]
	strb	w0, [x8, #3]
	ldrb	w0, [x26, #64]
	bl	_bitrev8
	mov	x25, x0
	ldr	x8, [x19]
	strb	w0, [x8, #4]
	ldrb	w0, [x26, #80]
	bl	_bitrev8
	ldr	x8, [x19]
	strb	w0, [x8, #5]
	eor	w8, w22, w21
	eor	w8, w23, w8
	eor	w8, w24, w8
	eor	w8, w25, w8
	eor	w21, w0, w8
	ldrb	w0, [x26, #96]
	bl	_bitrev8
	eor	w21, w0, w21
	ldrb	w0, [x26, #112]
	bl	_bitrev8
	eor	w8, w0, w21
	cmp	w8, #255
	b.ne	LBB0_5
; %bb.2:
Lloh15:
	adrp	x8, _mace_netdev_ops@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mace_netdev_ops@GOTPAGEOFF]
	str	x8, [x19, #16]
Lloh17:
	adrp	x8, _TX_TIMEOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TX_TIMEOUT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	x1, [x19]
	ldr	w2, [x20]
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	mov	x0, x19
	bl	_register_netdev
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_free_netdev
	b	LBB0_7
LBB0_4:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_free_netdev
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PRIV_BYTES,4,2                 ; @PRIV_BYTES
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MACE_BASE,8,3                  ; @MACE_BASE
	.comm	_IRQ_MAC_MACE,4,2               ; @IRQ_MAC_MACE
	.comm	_IRQ_MAC_MACE_DMA,4,2           ; @IRQ_MAC_MACE_DMA
	.comm	_MACE_PROM,8,3                  ; @MACE_PROM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_mace_netdev_ops,4,2            ; @mace_netdev_ops
	.comm	_TX_TIMEOUT,4,2                 ; @TX_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Onboard MACE, hardware address %pM, chip revision 0x%04X\n"

	.no_dead_strip	_mace_probe
.subsections_via_symbols
