	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_init_context
_bnx2_init_context:                     ## @bnx2_init_context
	.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, %r15
	movl	$96, %ebx
	movq	_PHY_CTX_SIZE@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	movq	_PHY_CTX_SIZE@GOTPCREL(%rip), %r12
	je	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_9 Depth 3
	decl	%ebx
	movq	%r15, %rdi
	callq	_BNX2_CHIP_ID
	movq	_BNX2_CHIP_ID_5706_A0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_GET_PCID_ADDR
	movl	%eax, %r13d
	movl	%ebx, %edi
	andl	$247, %edi
	addl	$96, %edi
	testb	$8, %bl
	cmovel	%ebx, %edi
	callq	_GET_PCID_ADDR
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_GET_CID_ADDR
	movl	%eax, %r13d
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ecx
	movq	_CTX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	(%r12)
	testl	%eax, %eax
	jle	LBB0_1
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	incl	%r12d
	movq	_CTX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%ecx
	cmpl	%eax, %r12d
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	jge	LBB0_1
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_9 Depth 3
	movl	%ecx, %eax
	movq	_PHY_CTX_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r12d, %ebx
	shll	%cl, %ebx
	addl	%ebx, %r13d
	addl	%eax, %ebx
	movq	_BNX2_CTX_VIRT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_BNX2_WR
	movq	_BNX2_CTX_PAGE_TBL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	callq	_BNX2_WR
	movq	_PHY_CTX_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_bnx2_ctx_wr
	addl	$4, %ebx
	movl	(%r14), %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_9
	jmp	LBB0_10
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_CHIP_ID_5706_A0,8,3       ## @BNX2_CHIP_ID_5706_A0
	.comm	_CTX_SIZE,4,2                   ## @CTX_SIZE
	.comm	_PHY_CTX_SIZE,4,2               ## @PHY_CTX_SIZE
	.comm	_PHY_CTX_SHIFT,4,2              ## @PHY_CTX_SHIFT
	.comm	_BNX2_CTX_VIRT_ADDR,4,2         ## @BNX2_CTX_VIRT_ADDR
	.comm	_BNX2_CTX_PAGE_TBL,4,2          ## @BNX2_CTX_PAGE_TBL
	.no_dead_strip	_bnx2_init_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_init_context
_bnx2_init_context:                     ; @bnx2_init_context
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	mov	w20, #96
Lloh0:
	adrp	x26, _CTX_SIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CTX_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x27, _PHY_CTX_SIZE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _PHY_CTX_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x28, _PHY_CTX_SHIFT@GOTPAGE
Lloh5:
	ldr	x28, [x28, _PHY_CTX_SHIFT@GOTPAGEOFF]
Lloh6:
	adrp	x25, _BNX2_CTX_VIRT_ADDR@GOTPAGE
Lloh7:
	ldr	x25, [x25, _BNX2_CTX_VIRT_ADDR@GOTPAGEOFF]
Lloh8:
	adrp	x24, _BNX2_CTX_PAGE_TBL@GOTPAGE
Lloh9:
	ldr	x24, [x24, _BNX2_CTX_PAGE_TBL@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	cbz	w20, LBB0_11
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
	sub	w20, w20, #1
	mov	x0, x19
	bl	_BNX2_CHIP_ID
Lloh10:
	adrp	x8, _BNX2_CHIP_ID_5706_A0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BNX2_CHIP_ID_5706_A0@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_GET_PCID_ADDR
	mov	x21, x0
	mov	w8, #247
	and	w8, w20, w8
	add	w8, w8, #96
	tst	w20, #0x8
	csel	w0, w20, w8, eq
	bl	_GET_PCID_ADDR
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_GET_CID_ADDR
	mov	x21, x0
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, x0
	ldr	w8, [x26]
	ldr	w9, [x27]
	sdiv	w8, w8, w9
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w20, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w20, w20, #1
	ldr	w9, [x26]
	sdiv	w8, w9, w8
	cmp	w20, w8
	b.ge	LBB0_1
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
	ldr	w8, [x28]
	lsl	w8, w20, w8
	add	w21, w8, w21
	add	w22, w8, w22
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x21
	bl	_BNX2_WR
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x22
	bl	_BNX2_WR
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	w23, #0
LBB0_10:                                ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	w3, #0
	bl	_bnx2_ctx_wr
	add	w23, w23, #4
	ldr	w8, [x27]
	cmp	w23, w8
	b.lt	LBB0_10
	b	LBB0_7
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_CHIP_ID_5706_A0,8,3       ; @BNX2_CHIP_ID_5706_A0
	.comm	_CTX_SIZE,4,2                   ; @CTX_SIZE
	.comm	_PHY_CTX_SIZE,4,2               ; @PHY_CTX_SIZE
	.comm	_PHY_CTX_SHIFT,4,2              ; @PHY_CTX_SHIFT
	.comm	_BNX2_CTX_VIRT_ADDR,4,2         ; @BNX2_CTX_VIRT_ADDR
	.comm	_BNX2_CTX_PAGE_TBL,4,2          ; @BNX2_CTX_PAGE_TBL
	.no_dead_strip	_bnx2_init_context
.subsections_via_symbols
