	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_set_gpio                 ## -- Begin function bnx2x_set_gpio
	.p2align	4, 0x90
_bnx2x_set_gpio:                        ## @bnx2x_set_gpio
	.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
	movl	%ecx, %r15d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r14
	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	%r14, %rdi
	callq	_REG_RD
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
LBB0_2:
	cmpl	%r15d, %ecx
	je	LBB0_4
## %bb.3:
	movq	_MISC_REGISTERS_GPIO_PORT_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	addl	%r12d, %ebx
	movl	$1, %r13d
	movl	%ebx, %ecx
	shll	%cl, %r13d
	movq	_MISC_REGISTERS_GPIO_3@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jge	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_BNX2X_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_6:
	movq	_HW_LOCK_RESOURCE_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bnx2x_acquire_hw_lock
	movq	_MISC_REG_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_REG_RD
	movl	%eax, %r15d
	movq	_MISC_REGISTERS_GPIO_FLOAT@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$130, %eax
	je	LBB0_11
## %bb.7:
	cmpl	$129, %eax
	je	LBB0_10
## %bb.8:
	cmpl	$128, %eax
	jne	LBB0_13
## %bb.9:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_DP
	movq	_MISC_REGISTERS_GPIO_FLOAT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r13d, %eax
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %r15d
	movq	_MISC_REGISTERS_GPIO_CLR_POS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_DP
	movq	_MISC_REGISTERS_GPIO_FLOAT_POS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_DP
	movq	_MISC_REGISTERS_GPIO_FLOAT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r13d, %eax
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %r15d
	movq	_MISC_REGISTERS_GPIO_SET_POS@GOTPCREL(%rip), %rax
LBB0_12:
	movb	(%rax), %cl
	shll	%cl, %r13d
	orl	%r13d, %r15d
LBB0_13:
	movq	_MISC_REG_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_REG_WR
	movq	_HW_LOCK_RESOURCE_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bnx2x_release_hw_lock
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %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,4,2              ## @MISC_REG_GPIO
	.comm	_MISC_REGISTERS_GPIO_FLOAT,4,2  ## @MISC_REGISTERS_GPIO_FLOAT
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
L_.str.1:                               ## @.str.1
	.asciz	"Set GPIO %d (shift %d) -> output low\n"

	.comm	_MISC_REGISTERS_GPIO_FLOAT_POS,4,2 ## @MISC_REGISTERS_GPIO_FLOAT_POS
	.comm	_MISC_REGISTERS_GPIO_CLR_POS,4,2 ## @MISC_REGISTERS_GPIO_CLR_POS
L_.str.2:                               ## @.str.2
	.asciz	"Set GPIO %d (shift %d) -> output high\n"

	.comm	_MISC_REGISTERS_GPIO_SET_POS,4,2 ## @MISC_REGISTERS_GPIO_SET_POS
L_.str.3:                               ## @.str.3
	.asciz	"Set GPIO %d (shift %d) -> input\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_set_gpio                 ; -- Begin function bnx2x_set_gpio
	.p2align	2
_bnx2x_set_gpio:                        ; @bnx2x_set_gpio
	.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	x21, x3
	mov	x22, 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, w21
	csel	w8, wzr, w9, eq
Lloh9:
	adrp	x9, _MISC_REGISTERS_GPIO_3@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MISC_REGISTERS_GPIO_3@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, 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_13
LBB0_5:
	add	w23, w8, w20
	mov	w8, #1
	lsl	w26, w8, w23
Lloh17:
	adrp	x24, _HW_LOCK_RESOURCE_GPIO@GOTPAGE
Lloh18:
	ldr	x24, [x24, _HW_LOCK_RESOURCE_GPIO@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_bnx2x_acquire_hw_lock
Lloh19:
	adrp	x25, _MISC_REG_GPIO@GOTPAGE
Lloh20:
	ldr	x25, [x25, _MISC_REG_GPIO@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_REG_RD
Lloh21:
	adrp	x8, _MISC_REGISTERS_GPIO_FLOAT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_FLOAT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	and	w21, w8, w0
	cmp	w22, #130
	b.eq	LBB0_9
; %bb.6:
	cmp	w22, #129
	b.eq	LBB0_10
; %bb.7:
	cmp	w22, #128
	b.ne	LBB0_12
; %bb.8:
Lloh24:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	bl	_DP
Lloh29:
	adrp	x8, _MISC_REGISTERS_GPIO_FLOAT_POS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_FLOAT_POS@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	lsl	w8, w26, w8
	bic	w8, w21, w8
Lloh32:
	adrp	x9, _MISC_REGISTERS_GPIO_CLR_POS@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MISC_REGISTERS_GPIO_CLR_POS@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh34:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	bl	_DP
Lloh39:
	adrp	x8, _MISC_REGISTERS_GPIO_FLOAT_POS@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_FLOAT_POS@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	lsl	w8, w26, w8
	orr	w21, w8, w21
	b	LBB0_12
LBB0_10:
Lloh42:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh43:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
Lloh45:
	adrp	x1, l_.str.2@PAGE
Lloh46:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	bl	_DP
Lloh47:
	adrp	x8, _MISC_REGISTERS_GPIO_FLOAT_POS@GOTPAGE
Lloh48:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_FLOAT_POS@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	lsl	w8, w26, w8
	bic	w8, w21, w8
Lloh50:
	adrp	x9, _MISC_REGISTERS_GPIO_SET_POS@GOTPAGE
Lloh51:
	ldr	x9, [x9, _MISC_REGISTERS_GPIO_SET_POS@GOTPAGEOFF]
LBB0_11:
	ldr	w9, [x9]
	lsl	w9, w26, w9
	orr	w21, w8, w9
LBB0_12:
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x21
	bl	_REG_WR
	ldr	w1, [x24]
	mov	x0, x19
	bl	_bnx2x_release_hw_lock
	mov	w0, #0
LBB0_13:
	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 AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.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,4,2              ; @MISC_REG_GPIO
	.comm	_MISC_REGISTERS_GPIO_FLOAT,4,2  ; @MISC_REGISTERS_GPIO_FLOAT
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
l_.str.1:                               ; @.str.1
	.asciz	"Set GPIO %d (shift %d) -> output low\n"

	.comm	_MISC_REGISTERS_GPIO_FLOAT_POS,4,2 ; @MISC_REGISTERS_GPIO_FLOAT_POS
	.comm	_MISC_REGISTERS_GPIO_CLR_POS,4,2 ; @MISC_REGISTERS_GPIO_CLR_POS
l_.str.2:                               ; @.str.2
	.asciz	"Set GPIO %d (shift %d) -> output high\n"

	.comm	_MISC_REGISTERS_GPIO_SET_POS,4,2 ; @MISC_REGISTERS_GPIO_SET_POS
l_.str.3:                               ; @.str.3
	.asciz	"Set GPIO %d (shift %d) -> input\n"

.subsections_via_symbols
