	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_shadow_wa_ctx
_prepare_shadow_wa_ctx:                 ## @prepare_shadow_wa_ctx
	.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
	movslq	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	addq	24(%rdi), %rbx
	movl	16(%rdi), %edi
	movq	_CACHELINE_BYTES@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_i915_gem_object_ggtt_pin
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	callq	_i915_ggtt_offset
	movl	%eax, 12(%r14)
	movl	4(%rbx), %eax
	movl	%eax, (%r14)
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	%r14, %rdi
	callq	_update_wa_ctx_2_shadow_ctx
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CACHELINE_BYTES,4,2            ## @CACHELINE_BYTES
	.no_dead_strip	_prepare_shadow_wa_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_shadow_wa_ctx
_prepare_shadow_wa_ctx:                 ; @prepare_shadow_wa_ctx
	.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
	ldrsw	x21, [x0, #8]
	cbz	w21, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x23, [x0, #24]
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x22, _CACHELINE_BYTES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CACHELINE_BYTES@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x1, #0
	mov	w2, #0
	mov	w4, #0
	bl	_i915_gem_object_ggtt_pin
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	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_3:
	add	x21, x23, x21
	mov	x0, x20
	bl	_i915_ggtt_offset
	str	w0, [x19, #12]
	ldr	w8, [x21, #4]
	str	w8, [x19]
	ldr	w2, [x22]
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	mov	x0, x19
	bl	_update_wa_ctx_2_shadow_ctx
LBB0_4:
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CACHELINE_BYTES,4,2            ; @CACHELINE_BYTES
	.no_dead_strip	_prepare_shadow_wa_ctx
.subsections_via_symbols
