	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_handle_module_detect_int ## -- Begin function bnx2x_handle_module_detect_int
	.p2align	4, 0x90
_bnx2x_handle_module_detect_int:        ## @bnx2x_handle_module_detect_int
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r15
	movq	%r15, %rdi
	callq	_CHIP_IS_E3
	movq	16(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_INT_PHY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rcx,%rax,4), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_bnx2x_sfp_set_transmitter
	jmp	LBB0_3
LBB0_2:
	movq	_EXT_PHY1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rcx,%rax,4), %r14
LBB0_3:
	movl	12(%rbx), %esi
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	leaq	-32(%rbp), %r8
	leaq	-28(%rbp), %r9
	movq	%r15, %rdi
	callq	_bnx2x_get_mod_abs_int_cfg
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_9:
	callq	_DP
	jmp	LBB0_10
LBB0_5:
	movq	_MISC_REGISTERS_GPIO_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2x_set_sfp_module_fault_led
	movl	-32(%rbp), %esi
	movl	-28(%rbp), %edx
	movq	%r15, %rdi
	callq	_bnx2x_get_gpio
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	-32(%rbp), %esi
	movq	_MISC_REGISTERS_GPIO_INT_OUTPUT_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	%r15, %rdi
	callq	_bnx2x_set_gpio_int
	movq	_ETH_PHY_NOT_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_set_mdio_emac_per_phy
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bnx2x_set_aer_mmd
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_bnx2x_power_sfp_module
	movl	-32(%rbp), %esi
	movq	_MISC_REGISTERS_GPIO_INT_OUTPUT_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	%r15, %rdi
	callq	_bnx2x_set_gpio_int
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_wait_for_sfp_module_initialized
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_11:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_sfp_module_detection
	movq	%r15, %rdi
	callq	_CHIP_IS_E3
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:
	movq	_MDIO_WC_DEVAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MDIO_WC_REG_DIGITAL5_MISC6@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-36(%rbp), %r8
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_bnx2x_cl45_read
	cmpl	$0, -36(%rbp)
	jne	LBB0_10
## %bb.13:
	movq	_PHY_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.14:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_bnx2x_warpcore_reset_lane
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_warpcore_config_sfi
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_bnx2x_warpcore_reset_lane
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_PHY,8,3                    ## @INT_PHY
	.comm	_EXT_PHY1,8,3                   ## @EXT_PHY1
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get MOD_ABS interrupt config\n"

	.comm	_MISC_REGISTERS_GPIO_HIGH,4,2   ## @MISC_REGISTERS_GPIO_HIGH
	.comm	_MISC_REGISTERS_GPIO_INT_OUTPUT_CLR,4,2 ## @MISC_REGISTERS_GPIO_INT_OUTPUT_CLR
	.comm	_MDIO_WC_DEVAD,4,2              ## @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_DIGITAL5_MISC6,4,2 ## @MDIO_WC_REG_DIGITAL5_MISC6
	.comm	_PHY_INITIALIZED,4,2            ## @PHY_INITIALIZED
L_.str.1:                               ## @.str.1
	.asciz	"SFP+ module is not initialized\n"

	.comm	_MISC_REGISTERS_GPIO_INT_OUTPUT_SET,4,2 ## @MISC_REGISTERS_GPIO_INT_OUTPUT_SET
	.comm	_ETH_PHY_NOT_PRESENT,4,2        ## @ETH_PHY_NOT_PRESENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_handle_module_detect_int ; -- Begin function bnx2x_handle_module_detect_int
	.p2align	2
_bnx2x_handle_module_detect_int:        ; @bnx2x_handle_module_detect_int
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x0
	ldr	x19, [x0, #24]
	mov	x0, x19
	bl	_CHIP_IS_E3
	ldr	x8, [x21, #16]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _INT_PHY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT_PHY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x20, x8, x9, lsl #2
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_bnx2x_sfp_set_transmitter
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x9, _EXT_PHY1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXT_PHY1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x20, x8, x9, lsl #2
LBB0_3:
	ldp	w2, w1, [x21, #8]
	ldr	w3, [x21, #4]
	add	x4, sp, #12
	add	x5, sp, #8
	mov	x0, x19
	bl	_bnx2x_get_mod_abs_int_cfg
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	bl	_DP
	b	LBB0_8
LBB0_6:
Lloh14:
	adrp	x8, _MISC_REGISTERS_GPIO_HIGH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_HIGH@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bnx2x_set_sfp_module_fault_led
	ldp	w2, w1, [sp, #8]
	mov	x0, x19
	bl	_bnx2x_get_gpio
	cbz	x0, LBB0_9
; %bb.7:
	ldp	w3, w1, [sp, #8]
Lloh17:
	adrp	x8, _MISC_REGISTERS_GPIO_INT_OUTPUT_SET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_INT_OUTPUT_SET@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bnx2x_set_gpio_int
Lloh20:
	adrp	x8, _ETH_PHY_NOT_PRESENT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ETH_PHY_NOT_PRESENT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_8:
	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
	add	sp, sp, #64
	ret
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	bl	_bnx2x_set_mdio_emac_per_phy
	mov	x0, x21
	mov	x1, x20
	bl	_bnx2x_set_aer_mmd
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_bnx2x_power_sfp_module
	ldp	w3, w1, [sp, #8]
Lloh23:
	adrp	x8, _MISC_REGISTERS_GPIO_INT_OUTPUT_CLR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_INT_OUTPUT_CLR@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bnx2x_set_gpio_int
	mov	x0, x20
	mov	x1, x21
	bl	_bnx2x_wait_for_sfp_module_initialized
	cbz	x0, LBB0_11
; %bb.10:
Lloh26:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_11:
	mov	x0, x20
	mov	x1, x21
	bl	_bnx2x_sfp_module_detection
	mov	x0, x19
	bl	_CHIP_IS_E3
	cbz	x0, LBB0_8
; %bb.12:
Lloh31:
	adrp	x8, _MDIO_WC_DEVAD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MDIO_WC_DEVAD@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
Lloh34:
	adrp	x8, _MDIO_WC_REG_DIGITAL5_MISC6@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MDIO_WC_REG_DIGITAL5_MISC6@GOTPAGEOFF]
Lloh36:
	ldr	w3, [x8]
	add	x4, sp, #4
	mov	x0, x19
	mov	x1, x20
	bl	_bnx2x_cl45_read
	ldr	w8, [sp, #4]
	cbnz	w8, LBB0_8
; %bb.13:
	ldr	w8, [x21]
Lloh37:
	adrp	x9, _PHY_INITIALIZED@GOTPAGE
Lloh38:
	ldr	x9, [x9, _PHY_INITIALIZED@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.14:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_bnx2x_warpcore_reset_lane
	mov	x0, x20
	mov	x1, x21
	bl	_bnx2x_warpcore_config_sfi
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_bnx2x_warpcore_reset_lane
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_PHY,8,3                    ; @INT_PHY
	.comm	_EXT_PHY1,8,3                   ; @EXT_PHY1
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get MOD_ABS interrupt config\n"

	.comm	_MISC_REGISTERS_GPIO_HIGH,4,2   ; @MISC_REGISTERS_GPIO_HIGH
	.comm	_MISC_REGISTERS_GPIO_INT_OUTPUT_CLR,4,2 ; @MISC_REGISTERS_GPIO_INT_OUTPUT_CLR
	.comm	_MDIO_WC_DEVAD,4,2              ; @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_DIGITAL5_MISC6,4,2 ; @MDIO_WC_REG_DIGITAL5_MISC6
	.comm	_PHY_INITIALIZED,4,2            ; @PHY_INITIALIZED
l_.str.1:                               ; @.str.1
	.asciz	"SFP+ module is not initialized\n"

	.comm	_MISC_REGISTERS_GPIO_INT_OUTPUT_SET,4,2 ; @MISC_REGISTERS_GPIO_INT_OUTPUT_SET
	.comm	_ETH_PHY_NOT_PRESENT,4,2        ; @ETH_PHY_NOT_PRESENT
.subsections_via_symbols
