	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ice_acquire_res                ## -- Begin function ice_acquire_res
	.p2align	4, 0x90
_ice_acquire_res:                       ## @ice_acquire_res
	.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
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	%rcx, -48(%rbp)
	leaq	-48(%rbp), %r8
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_ice_aq_req_res
	movl	%eax, %ebx
	movq	_ICE_ERR_AQ_NO_WORK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_14
## %bb.1:
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movq	_ICE_DBG_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_ice_debug
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.4:
	movq	-48(%rbp), %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.5:
	je	LBB0_10
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_mdelay
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	leaq	-48(%rbp), %r8
	xorl	%r9d, %r9d
	callq	_ice_aq_req_res
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_ICE_ERR_AQ_NO_WORK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$11, %r13
	leaq	-10(%r13), %r13
	movl	$0, %eax
	cmovlq	%rax, %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, -48(%rbp)
	jne	LBB0_6
LBB0_10:
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.12:
	movq	_ICE_ERR_AQ_NO_WORK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_14
## %bb.13:
	movq	_ICE_DBG_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ice_debug
	jmp	LBB0_14
LBB0_11:
	xorl	%ebx, %ebx
LBB0_14:
	movq	_ICE_ERR_AQ_NO_WORK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_16
## %bb.15:
	movq	_ICE_RES_WRITE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	movq	_ICE_DBG_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ice_debug
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_ERR_AQ_NO_WORK,4,2         ## @ICE_ERR_AQ_NO_WORK
	.comm	_ICE_DBG_RES,4,2                ## @ICE_DBG_RES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resource %d acquire type %d failed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"resource acquire timed out.\n"

	.comm	_ICE_RES_WRITE,4,2              ## @ICE_RES_WRITE
L_.str.2:                               ## @.str.2
	.asciz	"resource indicates no work to do.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Warning: ICE_ERR_AQ_NO_WORK not expected\n"

	.comm	_ICE_RES_POLLING_DELAY_MS,8,3   ## @ICE_RES_POLLING_DELAY_MS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ice_acquire_res                ; -- Begin function ice_acquire_res
	.p2align	2
_ice_acquire_res:                       ; @ice_acquire_res
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x22, x1
	mov	x19, x0
	str	x3, [sp, #24]
	add	x4, sp, #24
	mov	w3, #0
	mov	x5, #0
	bl	_ice_aq_req_res
	mov	x21, x0
Lloh0:
	adrp	x23, _ICE_ERR_AQ_NO_WORK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ICE_ERR_AQ_NO_WORK@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.1:
	cbz	w21, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _ICE_DBG_RES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ICE_DBG_RES@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	stp	x22, x20, [sp]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ice_debug
LBB0_3:
	cbz	w21, LBB0_10
; %bb.4:
	ldr	x24, [sp, #24]
	cbz	x24, LBB0_10
; %bb.5:
	cbz	x24, LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_mdelay
	add	x4, sp, #24
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	mov	w3, #0
	mov	x5, #0
	bl	_ice_aq_req_res
	mov	x21, x0
	cbz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	cmp	w21, w8
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	subs	x8, x24, #10
	csel	x24, x8, xzr, gt
	cbz	x24, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #24]
	cbnz	x8, LBB0_6
LBB0_10:
	cbz	w21, LBB0_13
; %bb.11:
	ldr	w8, [x23]
	cmp	w21, w8
	b.eq	LBB0_13
; %bb.12:
Lloh7:
	adrp	x8, _ICE_DBG_RES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ICE_DBG_RES@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ice_debug
LBB0_13:
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_15
; %bb.14:
Lloh12:
	adrp	x8, _ICE_RES_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ICE_RES_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _ICE_DBG_RES@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ICE_DBG_RES@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
Lloh18:
	adrp	x9, l_.str.3@PAGE
Lloh19:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh20:
	adrp	x10, l_.str.2@PAGE
Lloh21:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, w20
	csel	x2, x10, x9, eq
	mov	x0, x19
	bl	_ice_debug
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_ERR_AQ_NO_WORK,4,2         ; @ICE_ERR_AQ_NO_WORK
	.comm	_ICE_DBG_RES,4,2                ; @ICE_DBG_RES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resource %d acquire type %d failed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"resource acquire timed out.\n"

	.comm	_ICE_RES_WRITE,4,2              ; @ICE_RES_WRITE
l_.str.2:                               ; @.str.2
	.asciz	"resource indicates no work to do.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Warning: ICE_ERR_AQ_NO_WORK not expected\n"

	.comm	_ICE_RES_POLLING_DELAY_MS,8,3   ; @ICE_RES_POLLING_DELAY_MS
.subsections_via_symbols
