	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_handler_pipe_control
_cmd_handler_pipe_control:              ## @cmd_handler_pipe_control
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	8(%rax), %rax
	movl	(%rax), %r12d
	movl	$1, %esi
	callq	_cmd_val
	movl	%eax, %ebx
	movq	_PIPE_CONTROL_POST_SYNC_OP_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_cmd_val
	movq	_PIPE_CONTROL_MMIO_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_cmd_reg
	movl	%eax, %esi
LBB0_2:
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_cmd_reg_handler
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_15
LBB0_3:
	cmpl	$16384, %ebx                    ## imm = 0x4000
	jb	LBB0_15
## %bb.4:
	sarl	$14, %ebx
	cmpl	$1, %ebx
	je	LBB0_9
## %bb.5:
	cmpl	$2, %ebx
	je	LBB0_6
## %bb.7:
	cmpl	$3, %ebx
	jne	LBB0_15
## %bb.8:
	movl	$9048, %esi                     ## imm = 0x2358
	jmp	LBB0_2
LBB0_9:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_cmd_val
	movq	_PIPE_CONTROL_GLOBAL_GTT_IVB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.10:
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_cmd_val
	movl	%eax, %ebx
	movl	$31, %edi
	movl	$3, %esi
	callq	_GENMASK
	andl	%ebx, %eax
	movslq	%eax, %r14
	cmpl	$8, %r12d
	jne	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_cmd_gma_hi
LBB0_12:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_cmd_val
	movl	%eax, %r12d
	movl	%eax, %ecx
	shrl	$21, %ecx
	andl	$1, %ecx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_cmd_address_audit
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.13:
	testl	$2097152, %r12d                 ## imm = 0x200000
	je	LBB0_15
## %bb.14:
	movq	(%r15), %rax
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	addq	(%rcx,%rax,8), %r14
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_cmd_ptr
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_patch_value
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_cmd_val
	andl	$-2097153, %eax                 ## imm = 0xFFDFFFFF
	movslq	%eax, %rbx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_cmd_ptr
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_patch_value
LBB0_15:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_cmd_val
	movq	_PIPE_CONTROL_NOTIFY@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.16:
	movq	_cmd_interrupt_events@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	movl	(%rax,%rcx,4), %edi
	movl	(%rdx), %esi
	callq	_set_bit
LBB0_17:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	$9040, %esi                     ## imm = 0x2350
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPE_CONTROL_POST_SYNC_OP_MASK,4,2 ## @PIPE_CONTROL_POST_SYNC_OP_MASK
	.comm	_PIPE_CONTROL_MMIO_WRITE,4,2    ## @PIPE_CONTROL_MMIO_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pipe_ctrl"

	.comm	_PIPE_CONTROL_GLOBAL_GTT_IVB,4,2 ## @PIPE_CONTROL_GLOBAL_GTT_IVB
	.comm	_PIPE_CONTROL_NOTIFY,4,2        ## @PIPE_CONTROL_NOTIFY
	.comm	_cmd_interrupt_events,8,3       ## @cmd_interrupt_events
	.no_dead_strip	_cmd_handler_pipe_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_handler_pipe_control
_cmd_handler_pipe_control:              ; @cmd_handler_pipe_control
	.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	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8, #8]
	ldr	w21, [x8]
	mov	w1, #1
	bl	_cmd_val
	mov	x20, x0
Lloh0:
	adrp	x8, _PIPE_CONTROL_POST_SYNC_OP_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIPE_CONTROL_POST_SYNC_OP_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_cmd_val
Lloh3:
	adrp	x8, _PIPE_CONTROL_MMIO_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIPE_CONTROL_MMIO_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #2
	bl	_cmd_reg
	mov	x1, x0
LBB0_2:
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_cmd_reg_handler
	cbnz	w0, LBB0_17
	b	LBB0_14
LBB0_3:
	and	w8, w22, w20
	cmp	w8, #4, lsl #12                 ; =16384
	b.lo	LBB0_14
; %bb.4:
	asr	w8, w8, #14
	cmp	w8, #1
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #2
	b.eq	LBB0_18
; %bb.6:
	cmp	w8, #3
	b.ne	LBB0_14
; %bb.7:
	mov	w1, #9048
	b	LBB0_2
LBB0_8:
	mov	x0, x19
	mov	w1, #1
	bl	_cmd_val
Lloh8:
	adrp	x8, _PIPE_CONTROL_GLOBAL_GTT_IVB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PIPE_CONTROL_GLOBAL_GTT_IVB@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.9:
	mov	x0, x19
	mov	w1, #2
	bl	_cmd_val
	mov	x20, x0
	mov	w0, #31
	mov	w1, #3
	bl	_GENMASK
	and	w8, w0, w20
	sxtw	x20, w8
	cmp	w21, #8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	mov	w1, #3
	bl	_cmd_gma_hi
LBB0_11:
	mov	x0, x19
	mov	w1, #1
	bl	_cmd_val
	mov	x21, x0
	ubfx	w3, w0, #21, #1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #4
	bl	_cmd_address_audit
	cbnz	w0, LBB0_17
; %bb.12:
	tbz	w21, #21, LBB0_14
; %bb.13:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	add	x20, x8, x20
	mov	x0, x19
	mov	w1, #2
	bl	_cmd_ptr
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_patch_value
	mov	x0, x19
	mov	w1, #1
	bl	_cmd_val
	and	w8, w0, #0xffdfffff
	sxtw	x20, w8
	mov	x0, x19
	mov	w1, #1
	bl	_cmd_ptr
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_patch_value
LBB0_14:
	mov	x0, x19
	mov	w1, #1
	bl	_cmd_val
Lloh11:
	adrp	x8, _PIPE_CONTROL_NOTIFY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PIPE_CONTROL_NOTIFY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.15:
Lloh14:
	adrp	x8, _cmd_interrupt_events@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cmd_interrupt_events@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldp	x9, x10, [x19]
	ldr	w0, [x8, x9, lsl #2]
	ldr	w1, [x10]
	bl	_set_bit
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
LBB0_18:
	mov	w1, #9040
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPE_CONTROL_POST_SYNC_OP_MASK,4,2 ; @PIPE_CONTROL_POST_SYNC_OP_MASK
	.comm	_PIPE_CONTROL_MMIO_WRITE,4,2    ; @PIPE_CONTROL_MMIO_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pipe_ctrl"

	.comm	_PIPE_CONTROL_GLOBAL_GTT_IVB,4,2 ; @PIPE_CONTROL_GLOBAL_GTT_IVB
	.comm	_PIPE_CONTROL_NOTIFY,4,2        ; @PIPE_CONTROL_NOTIFY
	.comm	_cmd_interrupt_events,8,3       ; @cmd_interrupt_events
	.no_dead_strip	_cmd_handler_pipe_control
.subsections_via_symbols
