	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_bsc_read
_bnx2x_bsc_read:                        ## @bnx2x_bsc_read
	.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
	cmpl	$17, %r9d
	jl	LBB0_2
## %bb.1:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r9d, %edx
	callq	_DP
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	(%rdi), %r14
	callq	_bnx2x_bsc_module_sel
	movl	$16, %eax
	subl	%r12d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MCP_REG_MCPR_IMC_COMMAND@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_REG_RD
	movq	_MCPR_IMC_COMMAND_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_REG_WR
	shll	$16, %r15d
	orl	%r13d, %r15d
	movq	_MCP_REG_MCPR_IMC_SLAVE_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movq	%rbx, %r15
	callq	_REG_WR
	movq	_MCPR_IMC_COMMAND_WRITE_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MCPR_IMC_COMMAND_OPERATION_BITSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r12d, %edx
	shll	%cl, %edx
	movq	_MCPR_IMC_COMMAND_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%eax, %edx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_REG_WR
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_REG_RD
	movl	$1002, %ebx                     ## imm = 0x3EA
	movq	_MCPR_IMC_COMMAND_IMC_STATUS_BITSHIFT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r13), %ecx
	sarl	%cl, %eax
	andl	$3, %eax
	cmpl	$1, %eax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$10, %edi
	callq	_udelay
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_REG_RD
	decl	%ebx
	jne	LBB0_3
## %bb.5:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$1002, %edx                     ## imm = 0x3EA
	callq	_DP
	movq	_EFAULT@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.10:
	movq	_MCPR_IMC_COMMAND_READ_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MCPR_IMC_COMMAND_OPERATION_BITSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r12d, %esi
	shll	%cl, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	_MCPR_IMC_COMMAND_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	orl	%eax, %edx
	orl	%esi, %edx
	movq	_MCP_REG_MCPR_IMC_COMMAND@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_REG_WR
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_REG_RD
	movl	$1002, %ebx                     ## imm = 0x3EA
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%r13), %ecx
	sarl	%cl, %eax
	andl	$3, %eax
	cmpl	$1, %eax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$10, %edi
	callq	_udelay
	movq	_MCP_REG_MCPR_IMC_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_REG_RD
	decl	%ebx
	jne	LBB0_11
## %bb.13:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$1002, %edx                     ## imm = 0x3EA
	callq	_DP
	xorl	%r15d, %r15d
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_14:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.15:
	cmpl	$15, %r12d
	jg	LBB0_8
## %bb.16:
	movl	%r12d, %eax
	sarl	$2, %eax
	movslq	%eax, %rbx
	cmpl	$4, %ebx
	movl	$3, %r13d
	cmovgel	%ebx, %r13d
	incl	%r13d
	andl	$-4, %r12d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r12d, %r12
	movq	_MCP_REG_MCPR_IMC_DATAREG0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movq	%r14, %rdi
	callq	_REG_RD
	movq	16(%rbp), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	addl	$4, %r12d
	cmpq	%rbx, %r13
	jne	LBB0_17
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid xfer_cnt %d. Max is 16 bytes\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MCP_REG_MCPR_IMC_COMMAND,8,3   ## @MCP_REG_MCPR_IMC_COMMAND
	.comm	_MCPR_IMC_COMMAND_ENABLE,4,2    ## @MCPR_IMC_COMMAND_ENABLE
	.comm	_MCP_REG_MCPR_IMC_SLAVE_CONTROL,8,3 ## @MCP_REG_MCPR_IMC_SLAVE_CONTROL
	.comm	_MCPR_IMC_COMMAND_WRITE_OP,4,2  ## @MCPR_IMC_COMMAND_WRITE_OP
	.comm	_MCPR_IMC_COMMAND_OPERATION_BITSHIFT,4,2 ## @MCPR_IMC_COMMAND_OPERATION_BITSHIFT
	.comm	_MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT,4,2 ## @MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT
	.comm	_MCPR_IMC_COMMAND_IMC_STATUS_BITSHIFT,4,2 ## @MCPR_IMC_COMMAND_IMC_STATUS_BITSHIFT
L_.str.1:                               ## @.str.1
	.asciz	"wr 0 byte timed out after %d try\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_MCPR_IMC_COMMAND_READ_OP,4,2   ## @MCPR_IMC_COMMAND_READ_OP
L_.str.2:                               ## @.str.2
	.asciz	"rd op timed out after %d try\n"

	.comm	_MCP_REG_MCPR_IMC_DATAREG0,8,3  ## @MCP_REG_MCPR_IMC_DATAREG0
	.no_dead_strip	_bnx2x_bsc_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_bsc_read
_bnx2x_bsc_read:                        ; @bnx2x_bsc_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cmp	w5, #17
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x5
	bl	_DP
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x20, x6
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	ldr	x19, [x0]
	bl	_bnx2x_bsc_module_sel
	mov	w8, #16
	sub	w25, w8, w21
Lloh7:
	adrp	x24, _MCP_REG_MCPR_IMC_COMMAND@GOTPAGE
Lloh8:
	ldr	x24, [x24, _MCP_REG_MCPR_IMC_COMMAND@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_RD
Lloh9:
	adrp	x26, _MCPR_IMC_COMMAND_ENABLE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _MCPR_IMC_COMMAND_ENABLE@GOTPAGEOFF]
	ldr	w8, [x26]
	orr	w2, w8, w0
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_WR
	orr	w2, w22, w23, lsl #16
Lloh11:
	adrp	x8, _MCP_REG_MCPR_IMC_SLAVE_CONTROL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MCP_REG_MCPR_IMC_SLAVE_CONTROL@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_REG_WR
	ldr	w8, [x26]
Lloh14:
	adrp	x9, _MCPR_IMC_COMMAND_WRITE_OP@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MCPR_IMC_COMMAND_WRITE_OP@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x27, _MCPR_IMC_COMMAND_OPERATION_BITSHIFT@GOTPAGE
Lloh18:
	ldr	x27, [x27, _MCPR_IMC_COMMAND_OPERATION_BITSHIFT@GOTPAGEOFF]
	ldr	w10, [x27]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh19:
	adrp	x28, _MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT@GOTPAGE
Lloh20:
	ldr	x28, [x28, _MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT@GOTPAGEOFF]
	ldr	w9, [x28]
	lsl	w9, w21, w9
	orr	w2, w8, w9
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_WR
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_RD
	mov	w23, #1002
Lloh21:
	adrp	x22, _MCPR_IMC_COMMAND_IMC_STATUS_BITSHIFT@GOTPAGE
Lloh22:
	ldr	x22, [x22, _MCPR_IMC_COMMAND_IMC_STATUS_BITSHIFT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	asr	w8, w0, w8
	and	w8, w8, #0x3
	cmp	w8, #1
	b.eq	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_RD
	subs	w23, w23, #1
	b.ne	LBB0_3
; %bb.5:
Lloh23:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #1002
	bl	_DP
Lloh28:
	adrp	x8, _EFAULT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
LBB0_7:
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh30:
	adrp	x23, _EFAULT@GOTPAGE
Lloh31:
	ldr	x23, [x23, _EFAULT@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_17
; %bb.10:
	ldr	w8, [x26]
Lloh32:
	adrp	x9, _MCPR_IMC_COMMAND_READ_OP@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MCPR_IMC_COMMAND_READ_OP@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	ldr	w10, [x27]
	lsl	w9, w9, w10
	ldr	w10, [x28]
	lsl	w10, w21, w10
	orr	w8, w8, w25
	orr	w8, w8, w9
	orr	w2, w8, w10
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_WR
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_RD
	mov	w25, #1002
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	asr	w8, w0, w8
	and	w8, w8, #0x3
	cmp	w8, #1
	b.eq	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	x1, [x24]
	mov	x0, x19
	bl	_REG_RD
	subs	w25, w25, #1
	b.ne	LBB0_11
; %bb.13:
Lloh35:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #1002
	bl	_DP
	ldr	w8, [x23]
	b	LBB0_7
LBB0_14:
	ldr	w8, [x23]
	cmp	w8, #0
	ccmp	w21, #15, #0, ne
	b.gt	LBB0_17
; %bb.15:
	asr	w8, w21, #2
	sbfx	x9, x21, #2, #30
	mov	w10, #3
	cmp	w8, #3
	csel	w10, w8, w10, gt
	and	w21, w21, #0xfffffffc
	add	x20, x20, w8, sxtw #2
	sub	x8, x10, x9
	add	x22, x8, #1
Lloh40:
	adrp	x23, _MCP_REG_MCPR_IMC_DATAREG0@GOTPAGE
Lloh41:
	ldr	x23, [x23, _MCP_REG_MCPR_IMC_DATAREG0@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x1, x8, w21, sxtw
	mov	x0, x19
	bl	_REG_RD
	str	w0, [x20], #4
	add	w21, w21, #4
	subs	x22, x22, #1
	b.ne	LBB0_16
LBB0_17:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid xfer_cnt %d. Max is 16 bytes\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MCP_REG_MCPR_IMC_COMMAND,8,3   ; @MCP_REG_MCPR_IMC_COMMAND
	.comm	_MCPR_IMC_COMMAND_ENABLE,4,2    ; @MCPR_IMC_COMMAND_ENABLE
	.comm	_MCP_REG_MCPR_IMC_SLAVE_CONTROL,8,3 ; @MCP_REG_MCPR_IMC_SLAVE_CONTROL
	.comm	_MCPR_IMC_COMMAND_WRITE_OP,4,2  ; @MCPR_IMC_COMMAND_WRITE_OP
	.comm	_MCPR_IMC_COMMAND_OPERATION_BITSHIFT,4,2 ; @MCPR_IMC_COMMAND_OPERATION_BITSHIFT
	.comm	_MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT,4,2 ; @MCPR_IMC_COMMAND_TRANSFER_ADDRESS_BITSHIFT
	.comm	_MCPR_IMC_COMMAND_IMC_STATUS_BITSHIFT,4,2 ; @MCPR_IMC_COMMAND_IMC_STATUS_BITSHIFT
l_.str.1:                               ; @.str.1
	.asciz	"wr 0 byte timed out after %d try\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_MCPR_IMC_COMMAND_READ_OP,4,2   ; @MCPR_IMC_COMMAND_READ_OP
l_.str.2:                               ; @.str.2
	.asciz	"rd op timed out after %d try\n"

	.comm	_MCP_REG_MCPR_IMC_DATAREG0,8,3  ; @MCP_REG_MCPR_IMC_DATAREG0
	.no_dead_strip	_bnx2x_bsc_read
.subsections_via_symbols
