	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_trylock_hw_lock
_bnx2x_trylock_hw_lock:                 ## @bnx2x_trylock_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	%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	%esi, %r14d
	movq	%rdi, %r15
	movl	$1, %r12d
	movl	%r14d, %ecx
	shll	%cl, %r12d
	callq	_BP_FUNC
	movl	%eax, %ebx
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	movq	_NETIF_MSG_IFUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_DP
	movq	_HW_LOCK_MAX_RESOURCE_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%r14d, %ecx
	jge	LBB0_2
## %bb.1:
	movq	_NETIF_MSG_IFUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_DP
	jmp	LBB0_7
LBB0_2:
	cmpl	$5, %ebx
	jg	LBB0_4
## %bb.3:
	movq	_MISC_REG_DRIVER_CONTROL_1@GOTPCREL(%rip), %rax
	shll	$3, %ebx
	addl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movq	_MISC_REG_DRIVER_CONTROL_7@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rbx,8), %ebx
	addl	$-48, %ebx
LBB0_5:
	leal	4(%rbx), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_REG_WR
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_REG_RD
	movl	$1, %r13d
	testl	%r12d, %eax
	jne	LBB0_7
## %bb.6:
	movq	_NETIF_MSG_IFUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_DP
LBB0_7:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETIF_MSG_HW,4,2               ## @NETIF_MSG_HW
	.comm	_NETIF_MSG_IFUP,4,2             ## @NETIF_MSG_IFUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trying to take a lock on resource %d\n"

	.comm	_HW_LOCK_MAX_RESOURCE_VALUE,4,2 ## @HW_LOCK_MAX_RESOURCE_VALUE
L_.str.1:                               ## @.str.1
	.asciz	"resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALUE(0x%x)\n"

	.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.2:                               ## @.str.2
	.asciz	"Failed to get a lock on resource %d\n"

	.no_dead_strip	_bnx2x_trylock_hw_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_trylock_hw_lock
_bnx2x_trylock_hw_lock:                 ; @bnx2x_trylock_hw_lock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_BP_FUNC
	mov	x22, x0
Lloh0:
	adrp	x23, _NETIF_MSG_HW@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NETIF_MSG_HW@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _NETIF_MSG_IFUP@GOTPAGE
Lloh3:
	ldr	x24, [x24, _NETIF_MSG_IFUP@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w0, w9, w8
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_DP
Lloh6:
	adrp	x8, _HW_LOCK_MAX_RESOURCE_VALUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HW_LOCK_MAX_RESOURCE_VALUE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ge	LBB0_2
; %bb.1:
	ldr	w9, [x23]
	ldr	w10, [x24]
	orr	w0, w10, w9
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_2:
	mov	w8, #1
	lsl	w21, w8, w19
	cmp	w22, #5
	b.gt	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _MISC_REG_DRIVER_CONTROL_1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MISC_REG_DRIVER_CONTROL_1@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	add	w22, w8, w22, lsl #3
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _MISC_REG_DRIVER_CONTROL_7@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MISC_REG_DRIVER_CONTROL_7@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	add	w8, w8, w22, lsl #3
	sub	w22, w8, #48
LBB0_5:
	add	w1, w22, #4
	mov	x0, x20
	mov	x2, x21
	bl	_REG_WR
	mov	x0, x20
	mov	x1, x22
	bl	_REG_RD
	tst	w0, w21
	b.eq	LBB0_7
; %bb.6:
	mov	w0, #1
	b	LBB0_9
LBB0_7:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w0, w9, w8
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	mov	x2, x19
	bl	_DP
	mov	w0, #0
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NETIF_MSG_HW,4,2               ; @NETIF_MSG_HW
	.comm	_NETIF_MSG_IFUP,4,2             ; @NETIF_MSG_IFUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to take a lock on resource %d\n"

	.comm	_HW_LOCK_MAX_RESOURCE_VALUE,4,2 ; @HW_LOCK_MAX_RESOURCE_VALUE
l_.str.1:                               ; @.str.1
	.asciz	"resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALUE(0x%x)\n"

	.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.2:                               ; @.str.2
	.asciz	"Failed to get a lock on resource %d\n"

	.no_dead_strip	_bnx2x_trylock_hw_lock
.subsections_via_symbols
