	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_ape_lock_init
_tg3_ape_lock_init:                     ## @tg3_ape_lock_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, %r14
	callq	_tg3_asic_rev
	movq	_ASIC_REV_5761@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_TG3_APE_LOCK_GRANT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_TG3_APE_PER_LOCK_GRANT@GOTPCREL(%rip), %rax
LBB0_3:
	movq	_TG3_APE_LOCK_GPIO@GOTPCREL(%rip), %r15
	cmpl	$131, (%r15)
	jge	LBB0_5
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%rax), %ebx
	addl	$524, %ebx                      ## imm = 0x20C
	movl	$130, %r12d
	movq	_APE_LOCK_GRANT_DRIVER@GOTPCREL(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r13), %edx
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_tg3_ape_write32
	addl	$4, %ebx
	cmpl	(%r15), %r12d
	jge	LBB0_4
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r12d
	movl	%r12d, %eax
	andl	$2147483644, %eax               ## imm = 0x7FFFFFFC
	cmpl	$128, %eax
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ASIC_REV_5761,8,3              ## @ASIC_REV_5761
	.comm	_TG3_APE_LOCK_GRANT,4,2         ## @TG3_APE_LOCK_GRANT
	.comm	_TG3_APE_PER_LOCK_GRANT,4,2     ## @TG3_APE_PER_LOCK_GRANT
	.comm	_TG3_APE_LOCK_GPIO,4,2          ## @TG3_APE_LOCK_GPIO
	.comm	_APE_LOCK_GRANT_DRIVER,4,2      ## @APE_LOCK_GRANT_DRIVER
	.no_dead_strip	_tg3_ape_lock_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_ape_lock_init
_tg3_ape_lock_init:                     ; @tg3_ape_lock_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
	bl	_tg3_asic_rev
Lloh0:
	adrp	x8, _ASIC_REV_5761@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ASIC_REV_5761@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _TG3_APE_LOCK_GRANT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TG3_APE_LOCK_GRANT@GOTPAGEOFF]
Lloh5:
	adrp	x10, _TG3_APE_PER_LOCK_GRANT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TG3_APE_PER_LOCK_GRANT@GOTPAGEOFF]
	cmp	x0, x8
	csel	x8, x9, x10, eq
Lloh7:
	adrp	x21, _TG3_APE_LOCK_GPIO@GOTPAGE
Lloh8:
	ldr	x21, [x21, _TG3_APE_LOCK_GPIO@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w9, #131
	b.ge	LBB0_2
LBB0_1:
	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
LBB0_2:
	ldr	w8, [x8]
	add	w20, w8, #524
	mov	w22, #130
Lloh9:
	adrp	x23, _APE_LOCK_GRANT_DRIVER@GOTPAGE
Lloh10:
	ldr	x23, [x23, _APE_LOCK_GRANT_DRIVER@GOTPAGEOFF]
	mov	w24, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x23]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_tg3_ape_write32
	ldr	w8, [x21]
	add	w22, w22, #1
	add	w20, w20, #4
	cmp	w22, w8
	b.ge	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w22, #1
	and	w8, w8, #0x7ffffffc
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	w2, w24, w8
	b	LBB0_4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ASIC_REV_5761,8,3              ; @ASIC_REV_5761
	.comm	_TG3_APE_LOCK_GRANT,4,2         ; @TG3_APE_LOCK_GRANT
	.comm	_TG3_APE_PER_LOCK_GRANT,4,2     ; @TG3_APE_PER_LOCK_GRANT
	.comm	_TG3_APE_LOCK_GPIO,4,2          ; @TG3_APE_LOCK_GPIO
	.comm	_APE_LOCK_GRANT_DRIVER,4,2      ; @APE_LOCK_GRANT_DRIVER
	.no_dead_strip	_tg3_ape_lock_init
.subsections_via_symbols
