	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_set_status_page
_i915_set_status_page:                  ## @i915_set_status_page
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	callq	_I915_NEED_GFX_HWS
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	testq	%r14, %r14
	je	LBB0_6
## %bb.7:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	%r14, %rdi
	callq	_LP_RING
	movq	%rax, %r12
	movslq	(%r15), %rdi
	movl	%edi, %eax
	andl	$536866816, %eax                ## imm = 0x1FFFF000
	movl	%eax, (%r12)
	addq	8(%r14), %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_ioremap_wc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset_io
	movq	_HWS_PGA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_I915_WRITE
	movl	(%r12), %esi
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movl	4(%r12), %esi
	leaq	L_.str.5(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	jmp	LBB0_12
LBB0_10:
	movq	%rbx, %rdi
	callq	_i915_dma_cleanup
	movl	$0, (%r12)
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"called with no initialization\n"

L_.str.1:                               ## @.str.1
	.asciz	"tried to set status page when mode setting active\n"

L_.str.2:                               ## @.str.2
	.asciz	"set status page addr 0x%08x\n"

L_.str.3:                               ## @.str.3
	.asciz	"can not ioremap virtual address for G33 hw status page\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_HWS_PGA,4,2                    ## @HWS_PGA
L_.str.4:                               ## @.str.4
	.asciz	"load hws HWS_PGA with gfx mem 0x%x\n"

L_.str.5:                               ## @.str.5
	.asciz	"load hws at %p\n"

	.no_dead_strip	_i915_set_status_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_set_status_page
_i915_set_status_page:                  ; @i915_set_status_page
	.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	x22, x1
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x21, _DRIVER_MODESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DRIVER_MODESET@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_drm_core_check_feature
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x0, x19
	bl	_I915_NEED_GFX_HWS
	cbz	w0, LBB0_7
; %bb.3:
	cbz	x20, LBB0_6
; %bb.4:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_drm_core_check_feature
	cbz	x0, LBB0_10
; %bb.5:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_WARN
	b	LBB0_12
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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_10:
	ldr	w1, [x22]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x20
	bl	_LP_RING
	mov	x21, x0
	ldrsw	x8, [x22]
	and	w9, w8, #0x1ffff000
	str	w9, [x0]
	ldr	x9, [x20, #8]
	add	x0, x9, x8
	mov	w1, #4096
	bl	_ioremap_wc
	str	x0, [x20]
	cbz	x0, LBB0_13
; %bb.11:
Lloh12:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset_io
Lloh15:
	adrp	x8, _HWS_PGA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HWS_PGA@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w1, [x21]
	bl	_I915_WRITE
	ldr	w1, [x21]
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w1, [x21, #4]
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
LBB0_12:
	mov	w0, #0
	b	LBB0_9
LBB0_13:
	mov	x0, x19
	bl	_i915_dma_cleanup
	str	wzr, [x21]
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"called with no initialization\n"

l_.str.1:                               ; @.str.1
	.asciz	"tried to set status page when mode setting active\n"

l_.str.2:                               ; @.str.2
	.asciz	"set status page addr 0x%08x\n"

l_.str.3:                               ; @.str.3
	.asciz	"can not ioremap virtual address for G33 hw status page\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_HWS_PGA,4,2                    ; @HWS_PGA
l_.str.4:                               ; @.str.4
	.asciz	"load hws HWS_PGA with gfx mem 0x%x\n"

l_.str.5:                               ; @.str.5
	.asciz	"load hws at %p\n"

	.no_dead_strip	_i915_set_status_page
.subsections_via_symbols
