	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_pcie_sem_lock           ## -- Begin function qlcnic_pcie_sem_lock
	.p2align	4, 0x90
_qlcnic_pcie_sem_lock:                  ## @qlcnic_pcie_sem_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	$0, -44(%rbp)
	xorl	%r15d, %r15d
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	callq	_PCIE_SEM_LOCK
	movl	%eax, %edi
	callq	_QLCNIC_PCIE_REG
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r12, %rdx
	callq	_QLCRD32
	cmpl	$1, %eax
	je	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	incl	%r15d
	movq	_QLCNIC_PCIE_SEM_TIMEOUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1200, %edi                     ## imm = 0x4B0
	callq	_udelay
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_10:
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:
	movl	(%r13), %edx
	movq	%r13, %rdi
	callq	_QLCWR32
	jmp	LBB0_12
LBB0_3:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.4:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_QLCRD32
	movq	8(%r13), %rdi
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_6:
	movq	8(%r13), %rdi
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QLCNIC_PCIE_SEM_TIMEOUT,4,2    ## @QLCNIC_PCIE_SEM_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to acquire sem=%d lock held by=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to acquire sem=%d lock"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_pcie_sem_lock           ; -- Begin function qlcnic_pcie_sem_lock
	.p2align	2
_qlcnic_pcie_sem_lock:                  ; @qlcnic_pcie_sem_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	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	w23, #0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x24, _QLCNIC_PCIE_SEM_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _QLCNIC_PCIE_SEM_TIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_PCIE_SEM_LOCK
	bl	_QLCNIC_PCIE_REG
	mov	x1, x0
	add	x2, sp, #12
	mov	x0, x20
	bl	_QLCRD32
	cmp	w0, #1
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w23, w23, #1
	ldr	w8, [x24]
	cmp	w23, w8
	b.ge	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x22, x0
	mov	w0, #1200
	bl	_udelay
	cbz	w22, LBB0_1
LBB0_4:
	cbz	x21, LBB0_6
; %bb.5:
	ldr	w2, [x20]
	mov	x0, x20
	mov	x1, x21
	bl	_QLCWR32
LBB0_6:
	mov	w0, #0
	b	LBB0_13
LBB0_7:
	cbz	x21, LBB0_10
; %bb.8:
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_QLCRD32
	mov	x8, x0
	ldr	x0, [x20, #8]
	cmn	w8, #1
	b.eq	LBB0_11
; %bb.9:
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_10:
	ldr	x0, [x20, #8]
LBB0_11:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_12:
	mov	x2, x19
	bl	_dev_err
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_QLCNIC_PCIE_SEM_TIMEOUT,4,2    ; @QLCNIC_PCIE_SEM_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to acquire sem=%d lock held by=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to acquire sem=%d lock"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
