	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_commit_updates_for_stream   ## -- Begin function dc_commit_updates_for_stream
	.p2align	4, 0x90
_dc_commit_updates_for_stream:          ## @dc_commit_updates_for_stream
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	callq	_dc_stream_get_status
	movq	8(%r12), %r14
	movq	%r12, %rdi
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rcx
	movq	%rax, %r8
	callq	_dc_check_update_surfaces_for_stream
	movl	%eax, %r15d
	movq	_update_surface_trace_level@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jb	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_update_surface_trace
LBB0_2:
	movq	_UPDATE_TYPE_FULL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	movq	%r14, %r13
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jae	LBB0_3
LBB0_19:
	movq	%r13, %rbx
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_22
## %bb.20:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movq	%r13, %rsi
	callq	_copy_surface_update_to_plane
	addq	$8, %r13
	decq	%r15
	jne	LBB0_21
LBB0_22:
	movq	%r12, %rdi
	movq	%rbx, %r13
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_copy_stream_update_to_stream
	movq	%r13, (%rsp)
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r14, %rcx
	movq	%rbx, %r8
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %r9d
	callq	_commit_planes_for_stream
	movq	8(%r12), %rdi
	cmpq	%r13, %rdi
	movq	_UPDATE_TYPE_FULL@GOTPCREL(%rip), %r15
	je	LBB0_38
## %bb.23:
	movq	%r13, 8(%r12)
	callq	_dc_release_state
	movq	(%r12), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_38
## %bb.24:
	movq	(%r13), %r8
	cmpl	$1, %ecx
	jne	LBB0_26
## %bb.25:
	xorl	%edx, %edx
LBB0_34:
	testb	$1, %cl
	je	LBB0_38
## %bb.35:
	shlq	$4, %rdx
	movq	(%r8,%rdx), %rax
	testq	%rax, %rax
	je	LBB0_38
## %bb.36:
	cmpq	%r14, 8(%r8,%rdx)
	je	LBB0_37
LBB0_38:
	cmpl	(%r15), %ebx
	jae	LBB0_41
LBB0_39:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r12, %rdi
	callq	_dc_create_state
	testq	%rax, %rax
	je	LBB0_40
## %bb.4:
	movq	%rax, %r13
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	callq	_dc_resource_state_copy_construct
	movq	(%r12), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_19
## %bb.5:
	movq	(%r13), %rcx
	cmpl	$1, %r8d
	jne	LBB0_7
## %bb.6:
	xorl	%edx, %edx
LBB0_15:
	testb	$1, %r8b
	je	LBB0_19
## %bb.16:
	shlq	$4, %rdx
	movq	(%rcx,%rdx), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	8(%r12), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx,%rdx), %rax
	je	LBB0_19
## %bb.18:
	movl	$1, (%rax)
	jmp	LBB0_19
LBB0_40:
	leaq	L_.str(%rip), %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DC_ERROR                       ## TAILCALL
LBB0_26:
	movl	%ecx, %esi
	andl	$-2, %esi
	leaq	24(%r8), %rdi
	xorl	%edx, %edx
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_27 Depth=1
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%rdx, %rsi
	je	LBB0_34
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	-24(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	cmpq	%r14, -16(%rdi)
	jne	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	$0, (%rax)
LBB0_30:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	-8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_27 Depth=1
	cmpq	%r14, (%rdi)
	jne	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	$0, (%rax)
	jmp	LBB0_33
LBB0_7:
	movl	%r8d, %esi
	andl	$-2, %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%rdx, %rsi
	je	LBB0_15
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r12), %rbx
	movq	(%rbx), %rbx
	cmpq	(%rbx,%rdi), %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, (%rax)
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	16(%rcx,%rdi), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r12), %rbx
	movq	(%rbx), %rbx
	cmpq	16(%rbx,%rdi), %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, (%rax)
	jmp	LBB0_14
LBB0_37:
	movl	$0, (%rax)
	cmpl	(%r15), %ebx
	jb	LBB0_39
LBB0_41:
	movq	%r12, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dc_post_update_surfaces_to_stream ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_update_surface_trace_level,4,2 ## @update_surface_trace_level
	.comm	_UPDATE_TYPE_FULL,4,2           ## @UPDATE_TYPE_FULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate new validate context!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_commit_updates_for_stream   ; -- Begin function dc_commit_updates_for_stream
	.p2align	2
_dc_commit_updates_for_stream:          ; @dc_commit_updates_for_stream
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x26, x5
	mov	x23, x4
	mov	x20, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	mov	x0, x3
	bl	_dc_stream_get_status
	mov	x4, x0
	ldr	x22, [x19, #8]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	bl	_dc_check_update_surfaces_for_stream
	mov	x21, x0
Lloh0:
	adrp	x8, _update_surface_trace_level@GOTPAGE
Lloh1:
	ldr	x8, [x8, _update_surface_trace_level@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.lo	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	bl	_update_surface_trace
LBB0_2:
Lloh3:
	adrp	x27, _UPDATE_TYPE_FULL@GOTPAGE
Lloh4:
	ldr	x27, [x27, _UPDATE_TYPE_FULL@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w21, w8
	b.hs	LBB0_15
LBB0_3:
	cmp	w24, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w26, w24
	mov	x1, x25
	mov	x28, x25
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x28], #8
	bl	_copy_surface_update_to_plane
	mov	x1, x28
	subs	x26, x26, #1
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	mov	x3, x23
	bl	_copy_stream_update_to_stream
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	mov	x3, x20
	mov	x4, x23
	mov	x5, x21
	mov	x6, x22
	bl	_commit_planes_for_stream
	ldr	x0, [x19, #8]
	cmp	x0, x22
	b.eq	LBB0_13
; %bb.7:
	str	x22, [x19, #8]
	bl	_dc_release_state
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.8:
	ldr	x9, [x22]
	add	x9, x9, #8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.eq	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldur	x10, [x9, #-8]
	cbz	x10, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x11, [x9]
	cmp	x11, x20
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	str	wzr, [x10]
	b	LBB0_9
LBB0_13:
	ldr	w8, [x27]
	cmp	w21, w8
	b.hs	LBB0_22
; %bb.14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x19
	bl	_dc_create_state
	cbz	x0, LBB0_23
; %bb.16:
	mov	x22, x0
	mov	x0, x26
	mov	x1, x22
	bl	_dc_resource_state_copy_construct
	ldr	x8, [x19]
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.17:
	mov	x8, #0
	ldr	x9, [x22]
	lsl	x10, x10, #4
	mov	w11, #1
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x8, x8, #16
	cmp	x10, x8
	b.eq	LBB0_3
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9, x8]
	cbz	x12, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x13, [x19, #8]
	ldr	x13, [x13]
	ldr	x13, [x13, x8]
	cmp	x12, x13
	b.eq	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	str	w11, [x12]
	b	LBB0_18
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dc_post_update_surfaces_to_stream
LBB0_23:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_DC_ERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_update_surface_trace_level,4,2 ; @update_surface_trace_level
	.comm	_UPDATE_TYPE_FULL,4,2           ; @UPDATE_TYPE_FULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate new validate context!\n"

.subsections_via_symbols
