	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_set_gpio_int             ## -- Begin function bnx2x_set_gpio_int
	.p2align	4, 0x90
_bnx2x_set_gpio_int:                    ## @bnx2x_set_gpio_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_NIG_REG_PORT_SWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_REG_RD
	xorl	%ebx, %ebx
	movl	$0, %ecx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_NIG_REG_STRAP_OVERRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_RD
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
LBB0_2:
	cmpl	%r13d, %ecx
	je	LBB0_4
## %bb.3:
	movq	_MISC_REGISTERS_GPIO_PORT_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	addl	%r14d, %ebx
	movl	$1, %r12d
	movl	%ebx, %ecx
	shll	%cl, %r12d
	movq	_MISC_REGISTERS_GPIO_3@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jge	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_BNX2X_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_6:
	movq	_HW_LOCK_RESOURCE_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bnx2x_acquire_hw_lock
	movq	_MISC_REG_GPIO_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_RD
	movl	%eax, %r13d
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	$129, %eax
	je	LBB0_7
## %bb.8:
	cmpl	$128, %eax
	jne	LBB0_11
## %bb.9:
	movq	_MISC_REGISTERS_GPIO_INT_SET_POS@GOTPCREL(%rip), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_MISC_REGISTERS_GPIO_INT_CLR_POS@GOTPCREL(%rip), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_7:
	movq	_MISC_REGISTERS_GPIO_INT_CLR_POS@GOTPCREL(%rip), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_MISC_REGISTERS_GPIO_INT_SET_POS@GOTPCREL(%rip), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_DP
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movb	(%rax), %cl
	movl	%r12d, %eax
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	(%rax), %cl
	shll	%cl, %r12d
	orl	%r12d, %r13d
LBB0_11:
	movq	_MISC_REG_GPIO_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_REG_WR
	movq	_HW_LOCK_RESOURCE_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bnx2x_release_hw_lock
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIG_REG_PORT_SWAP,4,2          ## @NIG_REG_PORT_SWAP
	.comm	_NIG_REG_STRAP_OVERRIDE,4,2     ## @NIG_REG_STRAP_OVERRIDE
	.comm	_MISC_REGISTERS_GPIO_PORT_SHIFT,4,2 ## @MISC_REGISTERS_GPIO_PORT_SHIFT
	.comm	_MISC_REGISTERS_GPIO_3,4,2      ## @MISC_REGISTERS_GPIO_3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid GPIO %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HW_LOCK_RESOURCE_GPIO,4,2      ## @HW_LOCK_RESOURCE_GPIO
	.comm	_MISC_REG_GPIO_INT,4,2          ## @MISC_REG_GPIO_INT
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
L_.str.1:                               ## @.str.1
	.asciz	"Clear GPIO INT %d (shift %d) -> output low\n"

	.comm	_MISC_REGISTERS_GPIO_INT_SET_POS,4,2 ## @MISC_REGISTERS_GPIO_INT_SET_POS
	.comm	_MISC_REGISTERS_GPIO_INT_CLR_POS,4,2 ## @MISC_REGISTERS_GPIO_INT_CLR_POS
L_.str.2:                               ## @.str.2
	.asciz	"Set GPIO INT %d (shift %d) -> output high\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_set_gpio_int             ; -- Begin function bnx2x_set_gpio_int
	.p2align	2
_bnx2x_set_gpio_int:                    ; @bnx2x_set_gpio_int
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _NIG_REG_PORT_SWAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIG_REG_PORT_SWAP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_REG_RD
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _NIG_REG_STRAP_OVERRIDE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NIG_REG_STRAP_OVERRIDE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_RD
	cmp	w0, #0
	cset	w8, ne
	b	LBB0_3
LBB0_2:
	mov	w8, #0
LBB0_3:
Lloh6:
	adrp	x9, _MISC_REGISTERS_GPIO_PORT_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MISC_REGISTERS_GPIO_PORT_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w22
	csel	w25, wzr, w9, eq
Lloh9:
	adrp	x8, _MISC_REGISTERS_GPIO_3@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_3@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ge	LBB0_5
; %bb.4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_BNX2X_ERR
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_5:
Lloh17:
	adrp	x23, _HW_LOCK_RESOURCE_GPIO@GOTPAGE
Lloh18:
	ldr	x23, [x23, _HW_LOCK_RESOURCE_GPIO@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bnx2x_acquire_hw_lock
Lloh19:
	adrp	x24, _MISC_REG_GPIO_INT@GOTPAGE
Lloh20:
	ldr	x24, [x24, _MISC_REG_GPIO_INT@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_REG_RD
	mov	x22, x0
	cmp	w21, #129
	b.eq	LBB0_8
; %bb.6:
	cmp	w21, #128
	b.ne	LBB0_10
; %bb.7:
Lloh21:
	adrp	x21, _MISC_REGISTERS_GPIO_INT_SET_POS@GOTPAGE
Lloh22:
	ldr	x21, [x21, _MISC_REGISTERS_GPIO_INT_SET_POS@GOTPAGEOFF]
Lloh23:
	adrp	x26, _MISC_REGISTERS_GPIO_INT_CLR_POS@GOTPAGE
Lloh24:
	ldr	x26, [x26, _MISC_REGISTERS_GPIO_INT_CLR_POS@GOTPAGEOFF]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh27:
	adrp	x21, _MISC_REGISTERS_GPIO_INT_CLR_POS@GOTPAGE
Lloh28:
	ldr	x21, [x21, _MISC_REGISTERS_GPIO_INT_CLR_POS@GOTPAGEOFF]
Lloh29:
	adrp	x26, _MISC_REGISTERS_GPIO_INT_SET_POS@GOTPAGE
Lloh30:
	ldr	x26, [x26, _MISC_REGISTERS_GPIO_INT_SET_POS@GOTPAGEOFF]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	add	w3, w25, w20
	mov	w8, #1
	lsl	w25, w8, w3
Lloh33:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	mov	x2, x20
	bl	_DP
	ldr	w8, [x26]
	lsl	w8, w25, w8
	bic	w8, w22, w8
	ldr	w9, [x21]
	lsl	w9, w25, w9
	orr	w22, w8, w9
LBB0_10:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x22
	bl	_REG_WR
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bnx2x_release_hw_lock
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_NIG_REG_PORT_SWAP,4,2          ; @NIG_REG_PORT_SWAP
	.comm	_NIG_REG_STRAP_OVERRIDE,4,2     ; @NIG_REG_STRAP_OVERRIDE
	.comm	_MISC_REGISTERS_GPIO_PORT_SHIFT,4,2 ; @MISC_REGISTERS_GPIO_PORT_SHIFT
	.comm	_MISC_REGISTERS_GPIO_3,4,2      ; @MISC_REGISTERS_GPIO_3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid GPIO %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HW_LOCK_RESOURCE_GPIO,4,2      ; @HW_LOCK_RESOURCE_GPIO
	.comm	_MISC_REG_GPIO_INT,4,2          ; @MISC_REG_GPIO_INT
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
l_.str.1:                               ; @.str.1
	.asciz	"Clear GPIO INT %d (shift %d) -> output low\n"

	.comm	_MISC_REGISTERS_GPIO_INT_SET_POS,4,2 ; @MISC_REGISTERS_GPIO_INT_SET_POS
	.comm	_MISC_REGISTERS_GPIO_INT_CLR_POS,4,2 ; @MISC_REGISTERS_GPIO_INT_CLR_POS
l_.str.2:                               ; @.str.2
	.asciz	"Set GPIO INT %d (shift %d) -> output high\n"

.subsections_via_symbols
