	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_atomic_helper_damage_iter_init ## -- Begin function drm_atomic_helper_damage_iter_init
	.p2align	4, 0x90
_drm_atomic_helper_damage_iter_init:    ## @drm_atomic_helper_damage_iter_init
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	cmpl	$0, 24(%rbx)
	je	LBB0_7
## %bb.2:
	cmpl	$0, 20(%rbx)
	je	LBB0_7
## %bb.3:
	cmpl	$0, 16(%rbx)
	je	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_drm_helper_get_plane_damage_clips
	movq	%rax, 16(%r15)
	movq	%rbx, %rdi
	callq	_drm_plane_get_damage_clips_count
	movq	%rax, 8(%r15)
	movswl	2(%rbx), %eax
	movl	%eax, 24(%r15)
	movswl	6(%rbx), %eax
	movl	%eax, 28(%r15)
	movl	8(%rbx), %eax
	movl	%eax, %ecx
	sarl	$16, %ecx
	cmpw	$1, %ax
	sbbl	$-1, %ecx
	movl	%ecx, 32(%r15)
	movl	12(%rbx), %eax
	movl	%eax, %ecx
	sarl	$16, %ecx
	cmpw	$1, %ax
	sbbl	$-1, %ecx
	movl	%ecx, 36(%r15)
	cmpq	$0, 16(%r15)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_drm_rect_equals
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	leaq	8(%r15), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	$1, (%r15)
LBB0_7:
	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_init ; -- Begin function drm_atomic_helper_damage_iter_init
	.p2align	2
_drm_atomic_helper_damage_iter_init:    ; @drm_atomic_helper_damage_iter_init
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	cbz	x21, LBB0_7
; %bb.1:
	ldr	w8, [x21, #24]
	cbz	w8, LBB0_7
; %bb.2:
	ldr	w8, [x21, #20]
	cbz	w8, LBB0_7
; %bb.3:
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_7
; %bb.4:
	mov	x0, x21
	bl	_drm_helper_get_plane_damage_clips
	str	x0, [x19, #16]
	mov	x0, x21
	bl	_drm_plane_get_damage_clips_count
	mov	x22, x19
	str	x0, [x22, #8]!
	ldr	d0, [x21]
	sshr.2s	v0, v0, #16
	str	d0, [x22, #16]
	ldr	d0, [x21, #8]
	sshr.2s	v1, v0, #16
	movi	d2, #0x00ffff0000ffff
	cmtst.2s	v0, v0, v2
	sub.2s	v0, v1, v0
	str	d0, [x22, #24]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	bl	_drm_rect_equals
	cbnz	w0, LBB0_7
LBB0_6:
	stp	xzr, xzr, [x22]
	mov	w8, #1
	str	w8, [x19]
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
