	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_atomic_helper_damage_iter_next ## -- Begin function drm_atomic_helper_damage_iter_next
	.p2align	4, 0x90
_drm_atomic_helper_damage_iter_next:    ## @drm_atomic_helper_damage_iter_next
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.7:
	movl	24(%rbx), %eax
	movl	%eax, (%r14)
	movl	$0, (%rbx)
	jmp	LBB0_5
LBB0_1:
	leaq	24(%rbx), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	cmpq	16(%rbx), %rax
	jae	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rbx), %rcx
	movl	(%rcx,%rax,4), %ecx
	movl	%ecx, (%r14)
	incq	%rax
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_rect_intersect
	testq	%rax, %rax
	je	LBB0_2
LBB0_5:
	movl	$1, %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_atomic_helper_damage_iter_next ; -- Begin function drm_atomic_helper_damage_iter_next
	.p2align	2
_drm_atomic_helper_damage_iter_next:    ; @drm_atomic_helper_damage_iter_next
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x19, #24]
	str	w8, [x20]
	str	wzr, [x19]
	b	LBB0_5
LBB0_2:
	add	x21, x19, #24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.hs	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19, #32]
	ldr	w9, [x9, x8, lsl #2]
	str	w9, [x20]
	add	x8, x8, #1
	str	x8, [x19, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_drm_rect_intersect
	cbz	x0, LBB0_3
LBB0_5:
	mov	w0, #1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
