	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_release_hw_lock          ## -- Begin function bnx2x_release_hw_lock
	.p2align	4, 0x90
_bnx2x_release_hw_lock:                 ## @bnx2x_release_hw_lock
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	$1, %r15d
	movl	%ebx, %ecx
	shll	%cl, %r15d
	callq	_BP_FUNC
	movl	%eax, %r12d
	movq	_HW_LOCK_MAX_RESOURCE_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%ebx, %edx
	jge	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_BNX2X_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	cmpl	$5, %r12d
	jg	LBB0_5
## %bb.4:
	movq	_MISC_REG_DRIVER_CONTROL_1@GOTPCREL(%rip), %rax
	shll	$3, %r12d
	addl	(%rax), %r12d
	jmp	LBB0_6
LBB0_5:
	movq	_MISC_REG_DRIVER_CONTROL_7@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%r12,8), %r12d
	addl	$-48, %r12d
LBB0_6:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_REG_RD
	testl	%r15d, %eax
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_REG_WR
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_BNX2X_ERR
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_LOCK_MAX_RESOURCE_VALUE,4,2 ## @HW_LOCK_MAX_RESOURCE_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALUE(0x%x)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MISC_REG_DRIVER_CONTROL_1,4,2  ## @MISC_REG_DRIVER_CONTROL_1
	.comm	_MISC_REG_DRIVER_CONTROL_7,4,2  ## @MISC_REG_DRIVER_CONTROL_7
L_.str.1:                               ## @.str.1
	.asciz	"lock_status 0x%x resource_bit 0x%x. Unlock was called but lock wasn't taken!\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_release_hw_lock          ; -- Begin function bnx2x_release_hw_lock
	.p2align	2
_bnx2x_release_hw_lock:                 ; @bnx2x_release_hw_lock
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	bl	_BP_FUNC
Lloh0:
	adrp	x8, _HW_LOCK_MAX_RESOURCE_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HW_LOCK_MAX_RESOURCE_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	cmp	w2, w20
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_BNX2X_ERR
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	w8, #1
	lsl	w20, w8, w20
	cmp	w0, #5
	b.gt	LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _MISC_REG_DRIVER_CONTROL_1@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MISC_REG_DRIVER_CONTROL_1@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	add	w21, w8, w0, lsl #3
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _MISC_REG_DRIVER_CONTROL_7@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MISC_REG_DRIVER_CONTROL_7@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	add	w8, w8, w0, lsl #3
	sub	w21, w8, #48
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	bl	_REG_RD
	tst	w0, w20
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_REG_WR
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	x1, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_BNX2X_ERR
Lloh15:
	adrp	x8, _EFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_LOCK_MAX_RESOURCE_VALUE,4,2 ; @HW_LOCK_MAX_RESOURCE_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALUE(0x%x)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MISC_REG_DRIVER_CONTROL_1,4,2  ; @MISC_REG_DRIVER_CONTROL_1
	.comm	_MISC_REG_DRIVER_CONTROL_7,4,2  ; @MISC_REG_DRIVER_CONTROL_7
l_.str.1:                               ; @.str.1
	.asciz	"lock_status 0x%x resource_bit 0x%x. Unlock was called but lock wasn't taken!\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
