	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i830_write_fence_reg
_i830_write_fence_reg:                  ## @i830_write_fence_reg
	.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
	movl	%esi, %r14d
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	16(%rdx), %rax
	movl	(%rax), %r15d
	movl	(%rdx), %edx
	movq	_I830_FENCE_START_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%edx, %eax
	leal	-1(%r15), %ecx
	movl	%r15d, %esi
	andl	%ecx, %esi
	orl	%eax, %esi
	andl	%edx, %ecx
	xorl	%edi, %edi
	orl	%esi, %ecx
	setne	%dil
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
	callq	_WARN
	movl	4(%rbx), %eax
	leal	127(%rax), %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %eax
	movl	(%rbx), %r12d
	sarl	$7, %eax
	bsfl	%eax, %eax
	cmpl	$255, %ecx
	movl	$-1, %r13d
	cmovael	%eax, %r13d
	movq	8(%rbx), %rax
	movq	_I915_TILING_Y@GOTPCREL(%rip), %rdx
	movq	_I830_FENCE_TILING_Y_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %esi
	shll	%cl, %esi
	xorl	%ebx, %ebx
	cmpq	(%rdx), %rax
	cmovel	%esi, %ebx
	movl	%r15d, %edi
	callq	_I830_FENCE_SIZE_BITS
	movq	_I830_FENCE_PITCH_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r13d
	movl	%eax, %esi
	movq	_I830_FENCE_REG_VALID@GOTPCREL(%rip), %rax
	orl	%r12d, %esi
	orl	%ebx, %esi
	orl	%r13d, %esi
	orl	(%rax), %esi
	jmp	LBB0_3
LBB0_1:
	xorl	%esi, %esi
LBB0_3:
	movq	_FENCE_REG_830_0@GOTPCREL(%rip), %r15
	shll	$2, %r14d
	movslq	%r14d, %rbx
	movq	(%r15), %rdi
	addq	%rbx, %rdi
	callq	_I915_WRITE
	addq	(%r15), %rbx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_POSTING_READ                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I830_FENCE_START_MASK,4,2      ## @I830_FENCE_START_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"object 0x%08x not 512K or pot-size 0x%08x aligned\n"

	.comm	_I915_TILING_Y,8,3              ## @I915_TILING_Y
	.comm	_I830_FENCE_TILING_Y_SHIFT,4,2  ## @I830_FENCE_TILING_Y_SHIFT
	.comm	_I830_FENCE_PITCH_SHIFT,4,2     ## @I830_FENCE_PITCH_SHIFT
	.comm	_I830_FENCE_REG_VALID,4,2       ## @I830_FENCE_REG_VALID
	.comm	_FENCE_REG_830_0,8,3            ## @FENCE_REG_830_0
	.no_dead_strip	_i830_write_fence_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i830_write_fence_reg
_i830_write_fence_reg:                  ; @i830_write_fence_reg
	.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
	mov	x19, x1
	cbz	x2, LBB0_2
; %bb.1:
	mov	x20, x2
	ldr	x8, [x2, #16]
	ldr	w21, [x8]
	ldr	w2, [x2]
Lloh0:
	adrp	x8, _I830_FENCE_START_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I830_FENCE_START_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w8, w2, w8
	sub	w9, w21, #1
	and	w10, w21, w9
	orr	w8, w10, w8
	and	w9, w2, w9
	orr	w8, w8, w9
	cmp	w8, #0
	cset	w0, ne
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_WARN
	ldp	w22, w8, [x20]
	add	w9, w8, #127
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #7
	rbit	w8, w8
	clz	w8, w8
	cmp	w9, #255
	csinv	w23, w8, wzr, hs
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _I915_TILING_Y@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I915_TILING_Y@GOTPAGEOFF]
Lloh7:
	adrp	x10, _I830_FENCE_TILING_Y_SHIFT@GOTPAGE
Lloh8:
	ldr	x10, [x10, _I830_FENCE_TILING_Y_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	ldr	w10, [x10]
	mov	w11, #1
	lsl	w10, w11, w10
	cmp	x8, x9
	csel	w20, w10, wzr, eq
	mov	x0, x21
	bl	_I830_FENCE_SIZE_BITS
Lloh11:
	adrp	x8, _I830_FENCE_PITCH_SHIFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I830_FENCE_PITCH_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _I830_FENCE_REG_VALID@GOTPAGE
Lloh15:
	ldr	x9, [x9, _I830_FENCE_REG_VALID@GOTPAGEOFF]
	lsl	w8, w23, w8
Lloh16:
	ldr	w9, [x9]
	orr	w10, w0, w22
	orr	w10, w10, w20
	orr	w8, w10, w8
	orr	w1, w8, w9
	b	LBB0_3
LBB0_2:
	mov	w1, #0
LBB0_3:
Lloh17:
	adrp	x20, _FENCE_REG_830_0@GOTPAGE
Lloh18:
	ldr	x20, [x20, _FENCE_REG_830_0@GOTPAGEOFF]
	ldr	x8, [x20]
	lsl	w9, w19, #2
	sxtw	x19, w9
	add	x0, x8, x19
	bl	_I915_WRITE
	ldr	x8, [x20]
	add	x0, x8, 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
	b	_POSTING_READ
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_I830_FENCE_START_MASK,4,2      ; @I830_FENCE_START_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"object 0x%08x not 512K or pot-size 0x%08x aligned\n"

	.comm	_I915_TILING_Y,8,3              ; @I915_TILING_Y
	.comm	_I830_FENCE_TILING_Y_SHIFT,4,2  ; @I830_FENCE_TILING_Y_SHIFT
	.comm	_I830_FENCE_PITCH_SHIFT,4,2     ; @I830_FENCE_PITCH_SHIFT
	.comm	_I830_FENCE_REG_VALID,4,2       ; @I830_FENCE_REG_VALID
	.comm	_FENCE_REG_830_0,8,3            ; @FENCE_REG_830_0
	.no_dead_strip	_i830_write_fence_reg
.subsections_via_symbols
