	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function its_wait_for_range_completion
_its_wait_for_range_completion:         ## @its_wait_for_range_completion
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	%rdx, %rsi
	callq	_its_cmd_ptr_to_offset
	xorl	%r12d, %r12d
	movl	$0, %ebx
	movl	$0, %r15d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	cmpq	%r13, %rax
	jge	LBB0_2
## %bb.1:
	movq	_ITS_CMD_QUEUE_SZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
LBB0_2:
	addq	%rax, %r15
	movq	_GITS_CREADR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addq	(%r14), %rdi
	callq	_readl_relaxed
	movq	%rax, %r13
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	jge	LBB0_4
## %bb.3:
	movq	_ITS_CMD_QUEUE_SZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_4:
	addq	%r13, %rbx
	cmpq	%r15, %rbx
	jge	LBB0_12
## %bb.5:
	movl	$-1000000, %r14d                ## imm = 0xFFF0BDC0
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_ITS_CMD_QUEUE_SZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	subq	%r13, %rbx
	addq	%rax, %rbx
	addq	%rcx, %rbx
	movq	%rax, %r13
	cmpq	%r15, %rbx
	jge	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r14d
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	$1, %edi
	callq	_udelay
	movq	_GITS_CREADR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rdi
	callq	_readl_relaxed
	cmpq	%r13, %rax
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_pr_err_ratelimited
	movl	$-1, %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ITS_CMD_QUEUE_SZ,8,3           ## @ITS_CMD_QUEUE_SZ
	.comm	_GITS_CREADR,8,3                ## @GITS_CREADR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ITS queue timeout (%llu %llu)\n"

	.no_dead_strip	_its_wait_for_range_completion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function its_wait_for_range_completion
_its_wait_for_range_completion:         ; @its_wait_for_range_completion
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	mov	x1, x2
	bl	_its_cmd_ptr_to_offset
Lloh0:
	adrp	x23, _ITS_CMD_QUEUE_SZ@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ITS_CMD_QUEUE_SZ@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x21
	csel	x8, x8, xzr, lt
	add	x20, x8, x0
	ldr	x8, [x19]
Lloh2:
	adrp	x24, _GITS_CREADR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GITS_CREADR@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	x8, [x23]
	cmp	x0, x21
	csel	x8, x8, xzr, lt
	add	x21, x0, x8
	cmp	x21, x20
	b.ge	LBB0_4
; %bb.1:
	mov	x22, x0
	mov	w25, #48576
	movk	w25, #65520, lsl #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	adds	w25, w25, #1
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_cpu_relax
	mov	w0, #1
	bl	_udelay
	ldr	x8, [x19]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	x8, [x23]
	cmp	x0, x22
	csel	x8, x8, xzr, lt
	sub	x9, x21, x22
	add	x9, x9, x0
	add	x21, x9, x8
	cmp	x21, x20
	mov	x22, x0
	b.lt	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_pr_err_ratelimited
	mov	w0, #-1
LBB0_6:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ITS_CMD_QUEUE_SZ,8,3           ; @ITS_CMD_QUEUE_SZ
	.comm	_GITS_CREADR,8,3                ; @GITS_CREADR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ITS queue timeout (%llu %llu)\n"

	.no_dead_strip	_its_wait_for_range_completion
.subsections_via_symbols
