	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dpu_plane_set_danger_lut
__dpu_plane_set_danger_lut:             ## @_dpu_plane_set_danger_lut
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_to_dpu_plane
	movq	%rax, %rbx
	cmpl	$0, 40(%rax)
	je	LBB0_1
## %bb.2:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_dpu_get_dpu_format_ext
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_DPU_FORMAT_IS_LINEAR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	32(%rbx), %rax
	movq	_DPU_QOS_LUT_USAGE_LINEAR@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movq	32(%rbx), %rax
	movq	_DPU_QOS_LUT_USAGE_NRT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(,%rcx,8), %rdx
	addq	8(%rax), %rdx
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_5:
	movq	32(%rbx), %rax
	movq	_DPU_QOS_LUT_USAGE_MACROTILE@GOTPCREL(%rip), %rcx
LBB0_6:
	movq	(%rcx), %rcx
	leaq	(,%rcx,8), %rdx
	addq	8(%rax), %rdx
LBB0_7:
	movq	(%rax), %rax
	movq	(%rax,%rcx,8), %r8
	movq	(%rdx), %rcx
	movq	%rcx, 8(%rbx)
	movq	%r8, (%rbx)
	movq	24(%rbx), %rdi
	movq	_SSPP_VIG0@GOTPCREL(%rip), %r12
	subq	(%r12), %rdi
	testq	%r14, %r14
	je	LBB0_8
## %bb.9:
	movl	(%r14), %edx
	movl	4(%r14), %esi
	jmp	LBB0_10
LBB0_8:
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_10:
	callq	_trace_dpu_perf_set_danger_luts
	movl	(%r15), %esi
	movq	24(%rbx), %rdx
	movq	(%r12), %rax
	testq	%r14, %r14
	je	LBB0_11
## %bb.12:
	movl	(%r14), %r8d
	addq	$4, %r14
	jmp	LBB0_13
LBB0_11:
	xorl	%r14d, %r14d
	movl	$-1, %r8d
LBB0_13:
	subq	%rax, %rdx
	movq	(%rbx), %rax
	movq	8(%rbx), %r9
	movq	%rax, (%rsp)
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rcx
	callq	_DPU_DEBUG
	movq	16(%rbx), %rdi
	movq	(%rdi), %rax
	movq	%rbx, %rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DPU_QOS_LUT_USAGE_NRT,8,3      ## @DPU_QOS_LUT_USAGE_NRT
	.comm	_DPU_QOS_LUT_USAGE_LINEAR,8,3   ## @DPU_QOS_LUT_USAGE_LINEAR
	.comm	_DPU_QOS_LUT_USAGE_MACROTILE,8,3 ## @DPU_QOS_LUT_USAGE_MACROTILE
	.comm	_SSPP_VIG0,8,3                  ## @SSPP_VIG0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"plane%u: pnum:%d fmt: %4.4s mode:%d luts[0x%x, 0x%x]\n"

	.no_dead_strip	__dpu_plane_set_danger_lut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dpu_plane_set_danger_lut
__dpu_plane_set_danger_lut:             ; @_dpu_plane_set_danger_lut
	.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	x21, x0
	bl	_to_dpu_plane
	mov	x19, x0
	ldr	w8, [x0, #40]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_dpu_get_dpu_format_ext
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_DPU_FORMAT_IS_LINEAR
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x19, #32]
	ldr	x10, [x8, #8]
Lloh0:
	adrp	x9, _DPU_QOS_LUT_USAGE_LINEAR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DPU_QOS_LUT_USAGE_LINEAR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	mov	x20, #0
	ldr	x8, [x19, #32]
	ldr	x10, [x8, #8]
Lloh2:
	adrp	x9, _DPU_QOS_LUT_USAGE_NRT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DPU_QOS_LUT_USAGE_NRT@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #32]
	ldr	x10, [x8, #8]
Lloh4:
	adrp	x9, _DPU_QOS_LUT_USAGE_MACROTILE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DPU_QOS_LUT_USAGE_MACROTILE@GOTPAGEOFF]
LBB0_6:
	ldr	x9, [x9]
	add	x10, x10, x9, lsl #3
	ldr	x8, [x8]
	ldr	x4, [x8, x9, lsl #3]
	ldr	x3, [x10]
	stp	x4, x3, [x19]
	ldr	x8, [x19, #24]
Lloh6:
	adrp	x22, _SSPP_VIG0@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SSPP_VIG0@GOTPAGEOFF]
	ldr	x9, [x22]
	sub	x0, x8, x9
	cbz	x20, LBB0_8
; %bb.7:
	ldp	w2, w1, [x20]
	b	LBB0_9
LBB0_8:
	mov	w1, #0
	mov	w2, #0
LBB0_9:
	bl	_trace_dpu_perf_set_danger_luts
	ldr	w1, [x21]
	ldr	x8, [x19, #24]
	ldr	x9, [x22]
	cbz	x20, LBB0_11
; %bb.10:
	ldr	w4, [x20], #4
	b	LBB0_12
LBB0_11:
	mov	w4, #-1
LBB0_12:
	sub	x2, x8, x9
	ldp	x6, x5, [x19]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x20
	bl	_DPU_DEBUG
	ldr	x0, [x19, #16]
	ldr	x2, [x0]
	mov	x1, x19
	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
	br	x2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DPU_QOS_LUT_USAGE_NRT,8,3      ; @DPU_QOS_LUT_USAGE_NRT
	.comm	_DPU_QOS_LUT_USAGE_LINEAR,8,3   ; @DPU_QOS_LUT_USAGE_LINEAR
	.comm	_DPU_QOS_LUT_USAGE_MACROTILE,8,3 ; @DPU_QOS_LUT_USAGE_MACROTILE
	.comm	_SSPP_VIG0,8,3                  ; @SSPP_VIG0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"plane%u: pnum:%d fmt: %4.4s mode:%d luts[0x%x, 0x%x]\n"

	.no_dead_strip	__dpu_plane_set_danger_lut
.subsections_via_symbols
