	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_engine_emit_ctx_wa       ## -- Begin function intel_engine_emit_ctx_wa
	.p2align	4, 0x90
_intel_engine_emit_ctx_wa:              ## @intel_engine_emit_ctx_wa
	.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), %r13
	cmpl	$0, 8(%r13)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movq	_EMIT_BARRIER@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	*(%r13)
	testl	%eax, %eax
	jne	LBB0_2
## %bb.4:
	movl	8(%r13), %eax
	leal	(%rax,%rax), %esi
	addl	$2, %esi
	movq	%r14, %rdi
	callq	_intel_ring_begin
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.10:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	8(%r13), %edi
	callq	_MI_LOAD_REGISTER_IMM
	movq	%r15, %rbx
	addq	$4, %rbx
	movl	%eax, (%r15)
	cmpl	$0, 8(%r13)
	je	LBB0_9
## %bb.6:
	movq	16(%r13), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15,%r12,8), %edi
	callq	_i915_mmio_reg_offset
	movl	%eax, (%rbx)
	movl	(%r15,%r12,8), %eax
	movl	%eax, 4(%rbx)
	addq	$8, %rbx
	incq	%r12
	cmpl	8(%r13), %r12d
	jb	LBB0_7
## %bb.8:
	movq	_EMIT_BARRIER@GOTPCREL(%rip), %r12
LBB0_9:
	movq	_MI_NOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	addq	$4, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_intel_ring_advance
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	(%r12), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EMIT_BARRIER,4,2               ## @EMIT_BARRIER
	.comm	_MI_NOOP,4,2                    ## @MI_NOOP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_engine_emit_ctx_wa       ; -- Begin function intel_engine_emit_ctx_wa
	.p2align	2
_intel_engine_emit_ctx_wa:              ; @intel_engine_emit_ctx_wa
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x0]
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x8, [x22]
Lloh0:
	adrp	x21, _EMIT_BARRIER@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EMIT_BARRIER@GOTPAGEOFF]
	ldr	w1, [x21]
	blr	x8
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w8, [x22, #8]
	lsl	w8, w8, #1
	add	w1, w8, #2
	mov	x0, x19
	bl	_intel_ring_begin
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x22, #8]
	bl	_MI_LOAD_REGISTER_IMM
	str	w0, [x20], #4
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_10
; %bb.7:
	mov	w23, #0
	ldr	x8, [x22, #16]
	add	x24, x8, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_i915_mmio_reg_offset
	str	w0, [x20]
	ldur	w9, [x24, #-4]
	add	x8, x20, #8
	str	w9, [x20, #4]
	add	w23, w23, #1
	ldr	w9, [x22, #8]
	add	x24, x24, #8
	mov	x20, x8
	cmp	w23, w9
	b.lo	LBB0_8
; %bb.9:
	mov	x20, x8
LBB0_10:
Lloh2:
	adrp	x8, _MI_NOOP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MI_NOOP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20], #4
	mov	x0, x19
	mov	x1, x20
	bl	_intel_ring_advance
	ldr	x8, [x19]
	ldr	x2, [x8]
	ldr	w1, [x21]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EMIT_BARRIER,4,2               ; @EMIT_BARRIER
	.comm	_MI_NOOP,4,2                    ; @MI_NOOP
.subsections_via_symbols
