	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_handler_mi_display_flip
_cmd_handler_mi_display_flip:           ## @cmd_handler_mi_display_flip
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_cmd_length
	movl	%eax, %r14d
	movl	$1, %edi
	callq	_CMD_LEN
	movl	%eax, %r12d
	movl	$2, %edi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_DWORD_FIELD
	xorl	%ebx, %ebx
	cmpl	$2, %eax
	sete	%bl
	addl	%r12d, %ebx
	movq	%r15, %rdi
	callq	_cmd_length
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_gvt_check_valid_cmd_length
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_decode_mi_display_flip
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	callq	_gvt_vgpu_err
	jmp	LBB0_11
LBB0_4:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_check_mi_display_flip
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	callq	_gvt_vgpu_err
	jmp	LBB0_11
LBB0_6:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_update_plane_mmio_from_mi_display_flip
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rdi
	callq	_gvt_vgpu_err
	jmp	LBB0_11
LBB0_8:
	xorl	%r12d, %r12d
	testl	%r14d, %r14d
	jle	LBB0_11
## %bb.9:
	movq	_MI_NOOP@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_cmd_ptr
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_patch_value
	incl	%ebx
	cmpl	%ebx, %r14d
	jne	LBB0_10
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fail to decode MI display flip command\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid MI display flip command\n"

L_.str.2:                               ## @.str.2
	.asciz	"fail to update plane mmio\n"

	.comm	_MI_NOOP,4,2                    ## @MI_NOOP
	.no_dead_strip	_cmd_handler_mi_display_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_handler_mi_display_flip
_cmd_handler_mi_display_flip:           ; @cmd_handler_mi_display_flip
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	bl	_cmd_length
	mov	x20, x0
	mov	w0, #1
	bl	_CMD_LEN
	mov	x21, x0
	mov	w0, #2
	mov	w1, #1
	mov	w2, #0
	bl	_DWORD_FIELD
	cmp	w0, #2
	cinc	w21, w21, eq
	mov	x0, x19
	bl	_cmd_length
	mov	x1, x21
	bl	_gvt_check_valid_cmd_length
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_decode_mi_display_flip
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gvt_vgpu_err
	b	LBB0_11
LBB0_3:
	add	x1, sp, #8
	mov	x0, x19
	bl	_check_mi_display_flip
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_gvt_vgpu_err
	b	LBB0_11
LBB0_5:
	add	x1, sp, #8
	mov	x0, x19
	bl	_update_plane_mmio_from_mi_display_flip
	cbz	w0, LBB0_7
; %bb.6:
	mov	x21, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_gvt_vgpu_err
	b	LBB0_11
LBB0_7:
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w22, #0
Lloh6:
	adrp	x23, _MI_NOOP@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MI_NOOP@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_cmd_ptr
	mov	x1, x0
	ldr	w2, [x23]
	mov	x0, x19
	bl	_patch_value
	mov	w21, #0
	add	w22, w22, #1
	cmp	w20, w22
	b.ne	LBB0_9
	b	LBB0_11
LBB0_10:
	mov	w21, #0
LBB0_11:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fail to decode MI display flip command\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid MI display flip command\n"

l_.str.2:                               ; @.str.2
	.asciz	"fail to update plane mmio\n"

	.comm	_MI_NOOP,4,2                    ; @MI_NOOP
	.no_dead_strip	_cmd_handler_mi_display_flip
.subsections_via_symbols
