	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_resource_wait              ## -- Begin function nfp_resource_wait
	.p2align	4, 0x90
_nfp_resource_wait:                     ## @nfp_resource_wait
	.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, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_NFP_MUTEX_WAIT_FIRST_WARN@GOTPCREL(%rip), %rcx
	movq	_HZ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	(%rcx), %ebx
	imull	%edx, %ebx
	addl	%eax, %ebx
	imull	%edx, %r15d
	addl	%eax, %r15d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_msleep_interruptible
	testq	%rax, %rax
	jne	LBB0_9
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nfp_resource_acquire
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_PTR_ERR
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_time_is_before_eq_jiffies
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_time_is_before_eq_jiffies
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_NFP_MUTEX_WAIT_NEXT_WARN@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	movq	_jiffies@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	callq	_nfp_info
	jmp	LBB0_8
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_nfp_err
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	%r13, %rdi
	callq	_nfp_resource_release
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_12:
	movq	%r13, %rdi
	callq	_PTR_ERR
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_nfp_err
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_nfp_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_NFP_MUTEX_WAIT_FIRST_WARN,4,2  ## @NFP_MUTEX_WAIT_FIRST_WARN
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error waiting for resource %s: %ld\n"

L_.str.1:                               ## @.str.1
	.asciz	"timeout waiting for resource %s\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_NFP_MUTEX_WAIT_NEXT_WARN,4,2   ## @NFP_MUTEX_WAIT_NEXT_WARN
L_.str.2:                               ## @.str.2
	.asciz	"waiting for NFP resource %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"wait for resource %s interrupted\n"

	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_resource_wait              ; -- Begin function nfp_resource_wait
	.p2align	2
_nfp_resource_wait:                     ; @nfp_resource_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x25, _jiffies@GOTPAGE
Lloh1:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x9, _NFP_MUTEX_WAIT_FIRST_WARN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NFP_MUTEX_WAIT_FIRST_WARN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x26, _HZ@GOTPAGE
Lloh6:
	ldr	x26, [x26, _HZ@GOTPAGEOFF]
	ldr	w10, [x26]
	madd	w22, w10, w9, w8
	madd	w21, w10, w2, w8
Lloh7:
	adrp	x27, _ENOENT@GOTPAGE
Lloh8:
	ldr	x27, [x27, _ENOENT@GOTPAGEOFF]
Lloh9:
	adrp	x28, _NFP_MUTEX_WAIT_NEXT_WARN@GOTPAGE
Lloh10:
	ldr	x28, [x28, _NFP_MUTEX_WAIT_NEXT_WARN@GOTPAGEOFF]
Lloh11:
	adrp	x23, l_.str.2@PAGE
Lloh12:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #10
	bl	_msleep_interruptible
	cbnz	x0, LBB0_7
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_nfp_resource_acquire
	mov	x24, x0
	bl	_IS_ERR
	cbz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_PTR_ERR
	ldr	w8, [x27]
	cmn	w0, w8
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_time_is_before_eq_jiffies
	cbnz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_time_is_before_eq_jiffies
	cbz	x0, LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	ldr	w9, [x28]
	ldr	w10, [x26]
	madd	w22, w10, w9, w8
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_nfp_info
	b	LBB0_1
LBB0_7:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_nfp_err
Lloh15:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	mov	x0, x24
	bl	_nfp_resource_release
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	mov	x0, x24
	bl	_PTR_ERR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_nfp_err
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_PTR_ERR
LBB0_10:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_nfp_err
Lloh21:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_NFP_MUTEX_WAIT_FIRST_WARN,4,2  ; @NFP_MUTEX_WAIT_FIRST_WARN
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error waiting for resource %s: %ld\n"

l_.str.1:                               ; @.str.1
	.asciz	"timeout waiting for resource %s\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_NFP_MUTEX_WAIT_NEXT_WARN,4,2   ; @NFP_MUTEX_WAIT_NEXT_WARN
l_.str.2:                               ; @.str.2
	.asciz	"waiting for NFP resource %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"wait for resource %s interrupted\n"

	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
.subsections_via_symbols
