	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_set_spio
_bnx2x_set_spio:                        ## @bnx2x_set_spio
	.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	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_MISC_SPIO_SPIO4@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_MISC_SPIO_SPIO5@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_BNX2X_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_3:
	movq	_HW_LOCK_RESOURCE_SPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bnx2x_acquire_hw_lock
	movq	_MISC_REG_SPIO@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_REG_RD
	movl	%eax, %r15d
	movq	_MISC_SPIO_FLOAT@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	cmpl	$130, %r12d
	je	LBB0_8
## %bb.4:
	cmpl	$129, %r12d
	je	LBB0_7
## %bb.5:
	cmpl	$128, %r12d
	jne	LBB0_10
## %bb.6:
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_DP
	movq	_MISC_SPIO_FLOAT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %r15d
	movq	_MISC_SPIO_CLR_POS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	callq	_DP
	movq	_MISC_SPIO_FLOAT_POS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	callq	_DP
	movq	_MISC_SPIO_FLOAT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %r15d
	movq	_MISC_SPIO_SET_POS@GOTPCREL(%rip), %rax
LBB0_9:
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%ebx, %r15d
LBB0_10:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_REG_WR
	movq	_HW_LOCK_RESOURCE_SPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bnx2x_release_hw_lock
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MISC_SPIO_SPIO4,4,2            ## @MISC_SPIO_SPIO4
	.comm	_MISC_SPIO_SPIO5,4,2            ## @MISC_SPIO_SPIO5
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid SPIO 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HW_LOCK_RESOURCE_SPIO,4,2      ## @HW_LOCK_RESOURCE_SPIO
	.comm	_MISC_REG_SPIO,4,2              ## @MISC_REG_SPIO
	.comm	_MISC_SPIO_FLOAT,4,2            ## @MISC_SPIO_FLOAT
	.comm	_NETIF_MSG_HW,4,2               ## @NETIF_MSG_HW
L_.str.1:                               ## @.str.1
	.asciz	"Set SPIO 0x%x -> output low\n"

	.comm	_MISC_SPIO_FLOAT_POS,4,2        ## @MISC_SPIO_FLOAT_POS
	.comm	_MISC_SPIO_CLR_POS,4,2          ## @MISC_SPIO_CLR_POS
L_.str.2:                               ## @.str.2
	.asciz	"Set SPIO 0x%x -> output high\n"

	.comm	_MISC_SPIO_SET_POS,4,2          ## @MISC_SPIO_SET_POS
L_.str.3:                               ## @.str.3
	.asciz	"Set SPIO 0x%x -> input\n"

	.no_dead_strip	_bnx2x_set_spio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_set_spio
_bnx2x_set_spio:                        ; @bnx2x_set_spio
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
Lloh0:
	adrp	x8, _MISC_SPIO_SPIO4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MISC_SPIO_SPIO4@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MISC_SPIO_SPIO5@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MISC_SPIO_SPIO5@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_5
; %bb.1:
	mov	x22, x2
	mov	x19, x0
Lloh6:
	adrp	x23, _HW_LOCK_RESOURCE_SPIO@GOTPAGE
Lloh7:
	ldr	x23, [x23, _HW_LOCK_RESOURCE_SPIO@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_bnx2x_acquire_hw_lock
Lloh8:
	adrp	x24, _MISC_REG_SPIO@GOTPAGE
Lloh9:
	ldr	x24, [x24, _MISC_REG_SPIO@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_REG_RD
Lloh10:
	adrp	x8, _MISC_SPIO_FLOAT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MISC_SPIO_FLOAT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w21, w8, w0
	cmp	w22, #130
	b.eq	LBB0_6
; %bb.2:
	cmp	w22, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w22, #128
	b.ne	LBB0_9
; %bb.4:
Lloh13:
	adrp	x8, _NETIF_MSG_HW@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NETIF_MSG_HW@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_DP
Lloh18:
	adrp	x8, _MISC_SPIO_FLOAT_POS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MISC_SPIO_FLOAT_POS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	lsl	w8, w20, w8
	bic	w8, w21, w8
Lloh21:
	adrp	x9, _MISC_SPIO_CLR_POS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MISC_SPIO_CLR_POS@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_BNX2X_ERR
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
Lloh28:
	adrp	x8, _NETIF_MSG_HW@GOTPAGE
Lloh29:
	ldr	x8, [x8, _NETIF_MSG_HW@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_DP
Lloh33:
	adrp	x8, _MISC_SPIO_FLOAT_POS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MISC_SPIO_FLOAT_POS@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	lsl	w8, w20, w8
	orr	w21, w8, w21
	b	LBB0_9
LBB0_7:
Lloh36:
	adrp	x8, _NETIF_MSG_HW@GOTPAGE
Lloh37:
	ldr	x8, [x8, _NETIF_MSG_HW@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_DP
Lloh41:
	adrp	x8, _MISC_SPIO_FLOAT_POS@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MISC_SPIO_FLOAT_POS@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	lsl	w8, w20, w8
	bic	w8, w21, w8
Lloh44:
	adrp	x9, _MISC_SPIO_SET_POS@GOTPAGE
Lloh45:
	ldr	x9, [x9, _MISC_SPIO_SET_POS@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w21, w8, w9
LBB0_9:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_REG_WR
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bnx2x_release_hw_lock
	mov	w0, #0
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MISC_SPIO_SPIO4,4,2            ; @MISC_SPIO_SPIO4
	.comm	_MISC_SPIO_SPIO5,4,2            ; @MISC_SPIO_SPIO5
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid SPIO 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HW_LOCK_RESOURCE_SPIO,4,2      ; @HW_LOCK_RESOURCE_SPIO
	.comm	_MISC_REG_SPIO,4,2              ; @MISC_REG_SPIO
	.comm	_MISC_SPIO_FLOAT,4,2            ; @MISC_SPIO_FLOAT
	.comm	_NETIF_MSG_HW,4,2               ; @NETIF_MSG_HW
l_.str.1:                               ; @.str.1
	.asciz	"Set SPIO 0x%x -> output low\n"

	.comm	_MISC_SPIO_FLOAT_POS,4,2        ; @MISC_SPIO_FLOAT_POS
	.comm	_MISC_SPIO_CLR_POS,4,2          ; @MISC_SPIO_CLR_POS
l_.str.2:                               ; @.str.2
	.asciz	"Set SPIO 0x%x -> output high\n"

	.comm	_MISC_SPIO_SET_POS,4,2          ; @MISC_SPIO_SET_POS
l_.str.3:                               ; @.str.3
	.asciz	"Set SPIO 0x%x -> input\n"

	.no_dead_strip	_bnx2x_set_spio
.subsections_via_symbols
