	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cherryview_setup_pctx
_cherryview_setup_pctx:                 ## @cherryview_setup_pctx
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_VLV_PCBR@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_I915_READ
	movq	_VLV_PCBR_ADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	$-32767, %ebx                   ## imm = 0x8001
	addl	(%r14), %ebx
	movq	_U32_MAX@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	setg	%dil
	callq	_GEM_BUG_ON
	andl	$-4096, %ebx                    ## imm = 0xF000
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_2:
	movl	(%r15), %edi
	callq	_I915_READ
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_DRIVER               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VLV_PCBR,4,2                   ## @VLV_PCBR
	.comm	_VLV_PCBR_ADDR_SHIFT,4,2        ## @VLV_PCBR_ADDR_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BIOS didn't set up PCBR, fixing up\n"

	.comm	_U32_MAX,4,2                    ## @U32_MAX
L_.str.1:                               ## @.str.1
	.asciz	"PCBR: 0x%08x\n"

	.no_dead_strip	_cherryview_setup_pctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cherryview_setup_pctx
_cherryview_setup_pctx:                 ; @cherryview_setup_pctx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _VLV_PCBR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _VLV_PCBR@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_I915_READ
Lloh2:
	adrp	x8, _VLV_PCBR_ADDR_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VLV_PCBR_ADDR_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	asr	w8, w0, w8
	cbnz	w8, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w8, [x19]
	mov	w9, #-32767
Lloh7:
	adrp	x10, _U32_MAX@GOTPAGE
Lloh8:
	ldr	x10, [x10, _U32_MAX@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	add	w19, w8, w9
	cmp	w19, w10
	cset	w0, gt
	bl	_GEM_BUG_ON
	and	w1, w19, #0xfffff000
	ldr	w0, [x20]
	bl	_I915_WRITE
LBB0_2:
	ldr	w0, [x20]
	bl	_I915_READ
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VLV_PCBR,4,2                   ; @VLV_PCBR
	.comm	_VLV_PCBR_ADDR_SHIFT,4,2        ; @VLV_PCBR_ADDR_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BIOS didn't set up PCBR, fixing up\n"

	.comm	_U32_MAX,4,2                    ; @U32_MAX
l_.str.1:                               ; @.str.1
	.asciz	"PCBR: 0x%08x\n"

	.no_dead_strip	_cherryview_setup_pctx
.subsections_via_symbols
