	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function its_allocate_entry
_its_allocate_entry:                    ## @its_allocate_entry
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_its_queue_full
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movl	$-1000000, %ebx                 ## imm = 0xFFF0BDC0
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	$1, %edi
	callq	_udelay
	movq	%r14, %rdi
	callq	_its_queue_full
	testq	%rax, %rax
	jne	LBB0_2
LBB0_5:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%r14)
	movq	_ITS_CMD_QUEUE_NR_ENTRIES@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	addq	%rcx, %rsi
	cmpq	%rsi, %rdx
	cmoveq	%rcx, %rdx
	movq	%rdx, (%r14)
	movq	(%rax), %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rcx)
	movups	%xmm0, (%rcx)
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err_ratelimited
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ITS queue not draining\n"

	.comm	_ITS_CMD_QUEUE_NR_ENTRIES,8,3   ## @ITS_CMD_QUEUE_NR_ENTRIES
	.no_dead_strip	_its_allocate_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function its_allocate_entry
_its_allocate_entry:                    ; @its_allocate_entry
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_its_queue_full
	cbz	x0, LBB0_4
; %bb.1:
	mov	w20, #48576
	movk	w20, #65520, lsl #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	adds	w20, w20, #1
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_cpu_relax
	mov	w0, #1
	bl	_udelay
	mov	x0, x19
	bl	_its_queue_full
	cbnz	x0, LBB0_2
LBB0_4:
	ldp	x0, x8, [x19]
	add	x9, x0, #1
	str	x9, [x19]
Lloh0:
	adrp	x10, _ITS_CMD_QUEUE_NR_ENTRIES@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ITS_CMD_QUEUE_NR_ENTRIES@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x10, x10, x8
	cmp	x9, x10
	csinc	x8, x8, x0, eq
	str	x8, [x19]
	ldr	x8, [x0]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x8]
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err_ratelimited
	mov	x0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ITS queue not draining\n"

	.comm	_ITS_CMD_QUEUE_NR_ENTRIES,8,3   ; @ITS_CMD_QUEUE_NR_ENTRIES
	.no_dead_strip	_its_allocate_entry
.subsections_via_symbols
