	.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
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movl	4(%rsi), %edi
	callq	_i915_gem_object_get_stride
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_i915_vma_is_map_and_fenceable
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movq	_I830_FENCE_START_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	andl	8(%rbx), %edi
	callq	_GEM_BUG_ON
	movl	(%rbx), %edi
	callq	_is_power_of_2
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	shrl	$7, %r15d
	movl	%r15d, %edi
	callq	_is_power_of_2
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movl	(%rbx), %esi
	movl	8(%rbx), %edi
	callq	_IS_ALIGNED
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movl	4(%rbx), %edi
	movl	8(%rbx), %r13d
	callq	_i915_gem_object_get_tiling
	movq	_I915_TILING_Y@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_I830_FENCE_TILING_Y_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r13d
LBB0_4:
	movl	(%rbx), %edi
	callq	_I830_FENCE_SIZE_BITS
	movl	%eax, %r12d
	orl	%r13d, %r12d
	movl	%r15d, %edi
	callq	_ilog2
	movl	%eax, %ebx
	movq	_I830_FENCE_PITCH_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r12d, %ebx
	movq	_I830_FENCE_REG_VALID@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movq	_pipelined@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	8(%r14), %r15
	movl	(%r14), %edi
	callq	_FENCE_REG
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_intel_uncore_write_fw
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_uncore_posting_read_fw   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I830_FENCE_START_MASK,4,2      ## @I830_FENCE_START_MASK
	.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	_pipelined,4,2                  ## @pipelined
	.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	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	x20, x1
	mov	x19, x0
	cbz	x1, LBB0_4
; %bb.1:
	ldr	w0, [x20, #4]
	bl	_i915_gem_object_get_stride
	mov	x21, x0
	mov	x0, x20
	bl	_i915_vma_is_map_and_fenceable
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	w8, [x20, #8]
Lloh0:
	adrp	x9, _I830_FENCE_START_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I830_FENCE_START_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bic	w0, w8, w9
	bl	_GEM_BUG_ON
	ldr	w0, [x20]
	bl	_is_power_of_2
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	lsr	w21, w21, #7
	mov	x0, x21
	bl	_is_power_of_2
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	w0, [x20, #8]
	ldr	w1, [x20]
	bl	_IS_ALIGNED
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldp	w0, w22, [x20, #4]
	bl	_i915_gem_object_get_tiling
Lloh3:
	adrp	x8, _I915_TILING_Y@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_TILING_Y@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _I830_FENCE_TILING_Y_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I830_FENCE_TILING_Y_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_BIT
	orr	w22, w0, w22
LBB0_3:
	ldr	w0, [x20]
	bl	_I830_FENCE_SIZE_BITS
	orr	w20, w0, w22
	mov	x0, x21
	bl	_ilog2
Lloh9:
	adrp	x8, _I830_FENCE_PITCH_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I830_FENCE_PITCH_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w8, w20, w8
Lloh12:
	adrp	x9, _I830_FENCE_REG_VALID@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I830_FENCE_REG_VALID@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w20, w8, w9
LBB0_4:
Lloh15:
	adrp	x8, _pipelined@GOTPAGE
Lloh16:
	ldr	x8, [x8, _pipelined@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.5:
	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_6:
	ldr	x21, [x19, #8]
	ldr	w0, [x19]
	bl	_FENCE_REG
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_intel_uncore_write_fw
	mov	x0, x21
	mov	x1, x19
	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
	b	_intel_uncore_posting_read_fw
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I830_FENCE_START_MASK,4,2      ; @I830_FENCE_START_MASK
	.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	_pipelined,4,2                  ; @pipelined
	.no_dead_strip	_i830_write_fence_reg
.subsections_via_symbols
