	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce110_apply_ctx_for_surface
_dce110_apply_ctx_for_surface:          ## @dce110_apply_ctx_for_surface
	.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
	testl	%edx, %edx
	je	LBB0_25
## %bb.1:
	movq	%rcx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	(%rdi), %rax
	callq	*(%rax)
LBB0_3:
	movq	32(%r13), %rax
	cmpl	$0, (%rax)
	jle	LBB0_24
## %bb.4:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_5
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	%rbx, %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	*8(%r13)
	movq	32(%r13), %rax
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	movslq	(%rax), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r14
	jge	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	cmpq	%r12, 16(%rsi,%rbx)
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, 8(%rsi,%rbx)
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%rsi,%rbx)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r13), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rcx,%rbx)
	jne	LBB0_9
	jmp	LBB0_10
LBB0_11:
	testl	%ecx, %ecx
	jle	LBB0_24
## %bb.12:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r14
	movslq	(%rax), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r14
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %r13
	cmpq	%r12, 16(%r13,%rbx)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	24(%r13,%rbx), %rdi
	addq	%rbx, %r13
	movq	(%rdi), %r9
	movl	4(%r12), %edx
	movl	8(%r12), %esi
	movslq	(%r12), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$34, %rcx
	addl	%eax, %ecx
	movl	8(%r15), %r8d
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	*(%r9)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_dce110_program_front_end_for_pipe
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	*16(%r15)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_program_surface_visibility
	movq	32(%r15), %rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_16:
	testl	%ecx, %ecx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_24
## %bb.17:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_18
LBB0_22:                                ##   in Loop: Header=BB0_18 Depth=1
	addq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	*8(%r13)
	movq	32(%r13), %rax
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%r14
	movslq	(%rax), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r14
	jge	LBB0_24
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	cmpq	%r12, 16(%rsi,%rbx)
	jne	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$0, 8(%rsi,%rbx)
	jne	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpq	$0, (%rsi,%rbx)
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	24(%r13), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rcx,%rbx)
	jne	LBB0_22
	jmp	LBB0_23
LBB0_24:
	cmpq	$0, (%r13)
	je	LBB0_25
## %bb.26:
	movq	%r13, %rdi
	movq	%r15, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_enable_fbc                     ## TAILCALL
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dce110_apply_ctx_for_surface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dce110_apply_ctx_for_surface
_dce110_apply_ctx_for_surface:          ; @dce110_apply_ctx_for_surface
	.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
	cbz	w2, LBB0_26
; %bb.1:
	mov	x19, x3
	mov	x21, x1
	mov	x20, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x0]
	ldr	x8, [x8]
	blr	x8
LBB0_3:
	ldr	x8, [x20, #32]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_24
; %bb.4:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #8]
	mov	x0, x20
	mov	w2, #1
	blr	x8
	ldr	x8, [x20, #32]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldrsw	x9, [x8]
	add	x22, x22, #32
	cmp	x23, x9
	b.ge	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	add	x1, x9, x22
	ldr	x10, [x1, #16]
	cmp	x10, x21
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w10, [x1, #8]
	cbnz	w10, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x9, x22]
	cbnz	x9, LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x20, #24]
	ldr	x9, [x9]
	ldr	x9, [x9, x22]
	cbnz	x9, LBB0_5
	b	LBB0_6
LBB0_11:
	cmp	w9, #1
	b.lt	LBB0_24
; %bb.12:
	mov	x23, #0
	mov	x24, #0
	mov	w25, #26215
	movk	w25, #26214, lsl #16
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x24, x24, #1
	ldrsw	x9, [x8]
	add	x23, x23, #32
	cmp	x24, x9
	b.ge	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	add	x22, x9, x23
	ldr	x9, [x22, #16]
	cmp	x9, x21
	b.ne	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x22, #24]
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldp	w2, w1, [x21, #4]
	ldrsw	x9, [x21]
	mul	x9, x9, x25
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w3, w9, w10, asr #2
	ldr	w4, [x19, #8]
	blr	x8
	mov	x0, x20
	mov	x1, x22
	bl	_dce110_program_front_end_for_pipe
	ldr	x8, [x20, #16]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	mov	x0, x20
	mov	x1, x22
	bl	_program_surface_visibility
	ldr	x8, [x20, #32]
	b	LBB0_13
LBB0_16:
	cmp	w9, #1
	b.lt	LBB0_24
; %bb.17:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x20, #8]
	mov	x0, x20
	mov	w2, #0
	blr	x8
	ldr	x8, [x20, #32]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x23, x23, #1
	ldrsw	x9, [x8]
	add	x22, x22, #32
	cmp	x23, x9
	b.ge	LBB0_24
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	add	x1, x9, x22
	ldr	x10, [x1, #16]
	cmp	x10, x21
	b.ne	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w10, [x1, #8]
	cbnz	w10, LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x9, [x9, x22]
	cbnz	x9, LBB0_18
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x9, [x20, #24]
	ldr	x9, [x9]
	ldr	x9, [x9, x22]
	cbnz	x9, LBB0_18
	b	LBB0_19
LBB0_24:
	ldr	x8, [x20]
	cbz	x8, LBB0_26
; %bb.25:
	mov	x0, x20
	mov	x1, x19
	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
	b	_enable_fbc
LBB0_26:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dce110_apply_ctx_for_surface
.subsections_via_symbols
