	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iommu_poll_ppr_log
_iommu_poll_ppr_log:                    ## @iommu_poll_ppr_log
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$0, 8(%rdi)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	movq	_MMIO_PPR_HEAD_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_MMIO_PPR_TAIL_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	cmpl	%eax, %ebx
	jne	LBB0_2
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_LOOP_TIMEOUT@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14,%rbx,4), %rax
	movq	%rax, -64(%rbp)
	movq	8(%r14,%rbx,4), %rax
	movq	%rax, -56(%rbp)
	movq	$0, 8(%r14,%rbx,4)
	movq	$0, (%r14,%rbx,4)
	movq	_PPR_ENTRY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	cltd
	movq	_PPR_LOG_SIZE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movl	%edx, %edi
	movq	_MMIO_PPR_HEAD_OFFSET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%r15), %rsi
	callq	_writel
	movq	%r15, %rdi
	leaq	-64(%rbp), %rsi
	callq	_iommu_handle_ppr_entry
	movq	(%rbx), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_MMIO_PPR_TAIL_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	cmpl	%eax, %ebx
	je	LBB0_8
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	8(%r15), %r14
	movslq	%ebx, %rbx
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14,%rbx,4), %rdi
	callq	_PPR_REQ_TYPE
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	$1, %edi
	callq	_udelay
	incl	%r12d
	cmpl	(%r13), %r12d
	jl	LBB0_5
	jmp	LBB0_7
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MMIO_PPR_HEAD_OFFSET,8,3       ## @MMIO_PPR_HEAD_OFFSET
	.comm	_MMIO_PPR_TAIL_OFFSET,8,3       ## @MMIO_PPR_TAIL_OFFSET
	.comm	_LOOP_TIMEOUT,4,2               ## @LOOP_TIMEOUT
	.comm	_PPR_ENTRY_SIZE,4,2             ## @PPR_ENTRY_SIZE
	.comm	_PPR_LOG_SIZE,4,2               ## @PPR_LOG_SIZE
	.no_dead_strip	_iommu_poll_ppr_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iommu_poll_ppr_log
_iommu_poll_ppr_log:                    ; @iommu_poll_ppr_log
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh3:
	adrp	x21, _MMIO_PPR_HEAD_OFFSET@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MMIO_PPR_HEAD_OFFSET@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	ldr	x8, [x19]
Lloh5:
	adrp	x22, _MMIO_PPR_TAIL_OFFSET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MMIO_PPR_TAIL_OFFSET@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	cmp	w20, w0
	b.ne	LBB0_4
LBB0_2:
	ldr	x8, [sp, #24]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
Lloh10:
	adrp	x23, _LOOP_TIMEOUT@GOTPAGE
Lloh11:
	ldr	x23, [x23, _LOOP_TIMEOUT@GOTPAGEOFF]
Lloh12:
	adrp	x24, _PPR_ENTRY_SIZE@GOTPAGE
Lloh13:
	ldr	x24, [x24, _PPR_ENTRY_SIZE@GOTPAGEOFF]
Lloh14:
	adrp	x25, _PPR_LOG_SIZE@GOTPAGE
Lloh15:
	ldr	x25, [x25, _PPR_LOG_SIZE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	str	x8, [sp, #8]
	ldr	x8, [x26, #8]
	str	x8, [sp, #16]
	str	xzr, [x26, #8]
	str	xzr, [x26]
	ldr	w8, [x24]
	add	w8, w8, w20
	ldr	w9, [x25]
	sdiv	w10, w8, w9
	msub	w0, w10, w9, w8
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	add	x1, sp, #8
	mov	x0, x19
	bl	_iommu_handle_ppr_entry
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	cmp	w20, w0
	b.eq	LBB0_2
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x19, #8]
	add	x26, x8, w20, sxtw #2
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w27, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x26]
	bl	_PPR_REQ_TYPE
	cbnz	x0, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	w0, #1
	bl	_udelay
	add	w27, w27, #1
	ldr	w8, [x23]
	cmp	w27, w8
	b.lt	LBB0_8
	b	LBB0_5
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MMIO_PPR_HEAD_OFFSET,8,3       ; @MMIO_PPR_HEAD_OFFSET
	.comm	_MMIO_PPR_TAIL_OFFSET,8,3       ; @MMIO_PPR_TAIL_OFFSET
	.comm	_LOOP_TIMEOUT,4,2               ; @LOOP_TIMEOUT
	.comm	_PPR_ENTRY_SIZE,4,2             ; @PPR_ENTRY_SIZE
	.comm	_PPR_LOG_SIZE,4,2               ; @PPR_LOG_SIZE
	.no_dead_strip	_iommu_poll_ppr_log
.subsections_via_symbols
