	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan743x_csr_init
_lan743x_csr_init:                      ## @lan743x_csr_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %r15d
	movq	8(%rbx), %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movq	8(%rbx), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_devm_ioremap
	movl	%eax, 32(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_ID_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lan743x_csr_read
	movl	%eax, 16(%rbx)
	movq	_FPGA_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lan743x_csr_read
	movq	%rax, 24(%rbx)
	movq	_probe@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	(%rbx), %r15d
	movl	16(%rbx), %r12d
	movq	%rax, %rdi
	callq	_FPGA_REV_GET_MAJOR_
	movl	%eax, %r13d
	movq	24(%rbx), %rdi
	callq	_FPGA_REV_GET_MINOR_
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%r12d, %r8d
	movl	%r13d, %r9d
	callq	_netif_info
	movl	16(%rbx), %edi
	callq	_ID_REV_IS_VALID_CHIP_ID_
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_ID_REV_CHIP_REV_MASK_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	16(%rbx), %ecx
	cmpl	$128, %ecx
	je	LBB0_7
## %bb.5:
	cmpl	$129, %ecx
	jne	LBB0_9
## %bb.6:
	movq	_LAN743X_CSR_FLAG_IS_A0@GOTPCREL(%rip), %rcx
	notl	%eax
	andl	(%rcx), %eax
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_7:
	movq	_LAN743X_CSR_FLAG_IS_B0@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_8:
	movl	%eax, 20(%rbx)
LBB0_9:
	movq	%rbx, %rdi
	callq	_lan743x_csr_light_reset
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ID_REV,4,2                     ## @ID_REV
	.comm	_FPGA_REV,4,2                   ## @FPGA_REV
	.comm	_probe,4,2                      ## @probe
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ID_REV = 0x%08X, FPGA_REV = %d.%d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR,4,2 ## @LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR
	.comm	_ID_REV_CHIP_REV_MASK_,4,2      ## @ID_REV_CHIP_REV_MASK_
	.comm	_LAN743X_CSR_FLAG_IS_A0,4,2     ## @LAN743X_CSR_FLAG_IS_A0
	.comm	_LAN743X_CSR_FLAG_IS_B0,4,2     ## @LAN743X_CSR_FLAG_IS_B0
	.no_dead_strip	_lan743x_csr_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan743x_csr_init
_lan743x_csr_init:                      ; @lan743x_csr_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x0, [x0, #8]
	mov	w1, #0
	bl	_pci_resource_start
	mov	x20, x0
	ldr	x0, [x19, #8]
	mov	w1, #0
	bl	_pci_resource_len
	mov	x2, x0
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_devm_ioremap
	str	w0, [x19, #32]
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _ID_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ID_REV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lan743x_csr_read
	str	w0, [x19, #16]
Lloh3:
	adrp	x8, _FPGA_REV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FPGA_REV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lan743x_csr_read
	str	x0, [x19, #24]
Lloh6:
	adrp	x8, _probe@GOTPAGE
Lloh7:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	ldr	w21, [x19]
	ldr	w22, [x19, #16]
	bl	_FPGA_REV_GET_MAJOR_
	mov	x23, x0
	ldr	x0, [x19, #24]
	bl	_FPGA_REV_GET_MINOR_
	mov	x6, x0
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x4, x22
	mov	x5, x23
	bl	_netif_info
	ldr	w0, [x19, #16]
	bl	_ID_REV_IS_VALID_CHIP_ID_
	cbz	w0, LBB0_6
; %bb.2:
Lloh11:
	adrp	x8, _LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	ldr	w9, [x19, #16]
Lloh14:
	adrp	x10, _ID_REV_CHIP_REV_MASK_@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ID_REV_CHIP_REV_MASK_@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	and	w9, w10, w9
	cmp	w9, #128
	b.eq	LBB0_8
; %bb.3:
	cmp	w9, #129
	b.ne	LBB0_10
; %bb.4:
Lloh17:
	adrp	x9, _LAN743X_CSR_FLAG_IS_A0@GOTPAGE
Lloh18:
	ldr	x9, [x9, _LAN743X_CSR_FLAG_IS_A0@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	bic	w8, w9, w8
	b	LBB0_9
LBB0_5:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh22:
	adrp	x8, _ENODEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_8:
Lloh24:
	adrp	x9, _LAN743X_CSR_FLAG_IS_B0@GOTPAGE
Lloh25:
	ldr	x9, [x9, _LAN743X_CSR_FLAG_IS_B0@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_9:
	str	w8, [x19, #20]
LBB0_10:
	mov	x0, x19
	bl	_lan743x_csr_light_reset
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ID_REV,4,2                     ; @ID_REV
	.comm	_FPGA_REV,4,2                   ; @FPGA_REV
	.comm	_probe,4,2                      ; @probe
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ID_REV = 0x%08X, FPGA_REV = %d.%d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR,4,2 ; @LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR
	.comm	_ID_REV_CHIP_REV_MASK_,4,2      ; @ID_REV_CHIP_REV_MASK_
	.comm	_LAN743X_CSR_FLAG_IS_A0,4,2     ; @LAN743X_CSR_FLAG_IS_A0
	.comm	_LAN743X_CSR_FLAG_IS_B0,4,2     ; @LAN743X_CSR_FLAG_IS_B0
	.no_dead_strip	_lan743x_csr_init
.subsections_via_symbols
