	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function render_state_setup
_render_state_setup:                    ## @render_state_setup
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	32(%rdi), %r15
	movl	12(%rdi), %edi
	leaq	-72(%rbp), %rsi
	callq	_i915_gem_object_prepare_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.1:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	12(%r13), %edi
	xorl	%esi, %esi
	callq	_i915_gem_object_get_dirty_page
	movl	%eax, %edi
	callq	_kmap_atomic
	xorl	%esi, %esi
	movq	%rax, %r14
	cmpl	$0, (%r15)
	movl	$0, %ebx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %r8
	je	LBB0_11
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	jmp	LBB0_3
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r8                  ## 8-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	movl	%r14d, %r12d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	%r12d, (%r14,%r15,4)
	cmpl	(%r8), %ebx
	jae	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r15d
	movq	8(%r8), %rax
	movq	16(%r8), %rcx
	movl	(%rax,%r15,4), %r12d
	leal	(,%rbx,4), %eax
	movl	%esi, %edx
	cmpl	(%rcx,%rdx,4), %eax
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movq	24(%r13), %rax
	addl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_lower_32_bits
	movl	%eax, %r14d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_HAS_64BIT_RELOC
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %ebx
	jae	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rax), %rax
	movl	%ebx, %r13d
	cmpl	$0, (%rax,%r13,4)
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax,%r15,4)
	movl	%r12d, %edi
	callq	_upper_32_bits
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	%eax, %r14d
	movq	%r13, %r15
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_11:
	movq	16(%r8), %rax
	movl	%esi, %ecx
	cmpl	$-1, (%rax,%rcx,4)
	je	LBB0_14
## %bb.12:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_13:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kunmap_atomic
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_14:
	movq	24(%r13), %rdi
	movq	%r8, %r15
	callq	_i915_ggtt_offset
	movq	%rax, 16(%r13)
	movl	(%r15), %eax
	shll	$2, %eax
	movl	%eax, (%r13)
	movq	%r14, %r12
	movq	_CACHELINE_DWORDS@GOTPCREL(%rip), %r14
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%r14)
	testl	%edx, %edx
	je	LBB0_17
## %bb.15:
	movq	_MI_NOOP@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_OUT_BATCH
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%r14)
	testl	%edx, %edx
	jne	LBB0_16
LBB0_17:
	leal	(,%rbx,4), %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, 4(%rax)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_HAS_POOLED_EU
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	_GEN9_MEDIA_POOL_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_OUT_BATCH
	movq	_GEN9_MEDIA_POOL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_OUT_BATCH
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$7827456, %edx                  ## imm = 0x777000
	callq	_OUT_BATCH
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_OUT_BATCH
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_OUT_BATCH
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_OUT_BATCH
LBB0_19:
	movq	_MI_BATCH_BUFFER_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_OUT_BATCH
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %eax
	movl	%r13d, %edi
	subl	%eax, %edi
	movl	%edi, 8(%rbx)
	addl	16(%rbx), %eax
	movl	%eax, 4(%rbx)
	movl	$8, %esi
	callq	_ALIGN
	movl	%eax, 8(%rbx)
	cmpl	$0, -72(%rbp)
	je	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_drm_clflush_virt_range
LBB0_21:
	movq	%r12, %rdi
	callq	_kunmap_atomic
	xorl	%ebx, %ebx
LBB0_22:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %edi
	callq	_i915_gem_object_finish_access
LBB0_23:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"only %d relocs resolved\n"

	.comm	_CACHELINE_DWORDS,4,2           ## @CACHELINE_DWORDS
	.comm	_MI_NOOP,4,2                    ## @MI_NOOP
	.comm	_GEN9_MEDIA_POOL_STATE,4,2      ## @GEN9_MEDIA_POOL_STATE
	.comm	_GEN9_MEDIA_POOL_ENABLE,4,2     ## @GEN9_MEDIA_POOL_ENABLE
	.comm	_MI_BATCH_BUFFER_END,4,2        ## @MI_BATCH_BUFFER_END
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_render_state_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function render_state_setup
_render_state_setup:                    ; @render_state_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x19, x0
	ldr	x26, [x0, #32]
	ldr	w0, [x0, #12]
	add	x1, sp, #12
	bl	_i915_gem_object_prepare_write
	mov	x20, x0
	cbnz	w0, LBB0_23
; %bb.1:
	ldr	w0, [x19, #12]
	mov	w1, #0
	bl	_i915_gem_object_get_dirty_page
	bl	_kmap_atomic
	mov	x20, x0
	ldr	w8, [x26]
	cbz	w8, LBB0_10
; %bb.2:
	mov	w21, #0
	mov	w23, #0
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w24, [x20, x27, lsl #2]
	mov	x0, x25
	bl	_upper_32_bits
	mov	x24, x0
	mov	x27, x21
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w23, w23, #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	str	w24, [x20, x27, lsl #2]
	ldr	w8, [x26]
	cmp	w21, w8
	b.hs	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w27, w21
	ldp	x8, x9, [x26, #8]
	ldr	w24, [x8, w21, uxtw #2]
	ldr	w8, [x9, w23, uxtw #2]
	cmp	w8, w21, lsl #2
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	add	w25, w8, w24
	mov	x0, x25
	bl	_lower_32_bits
	mov	x24, x0
	mov	x0, x22
	bl	_HAS_64BIT_RELOC
	cbz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	ldr	w8, [x26]
	cmp	w21, w8
	b.hs	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26, #8]
	ldr	w8, [x8, w21, uxtw #2]
	cbz	w8, LBB0_3
	b	LBB0_13
LBB0_10:
	mov	w23, #0
	mov	w21, #0
LBB0_11:
	ldr	x8, [x26, #16]
	ldr	w8, [x8, w23, uxtw #2]
	cmn	w8, #1
	b.eq	LBB0_14
; %bb.12:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_DRM_ERROR
LBB0_13:
	mov	x0, x20
	bl	_kunmap_atomic
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_22
LBB0_14:
	ldr	x0, [x19, #24]
	bl	_i915_ggtt_offset
	str	x0, [x19, #16]
	ldr	w8, [x26]
	lsl	w8, w8, #2
	str	w8, [x19]
Lloh5:
	adrp	x23, _CACHELINE_DWORDS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _CACHELINE_DWORDS@GOTPAGEOFF]
	ldr	w8, [x23]
	udiv	w9, w21, w8
	msub	w8, w9, w8, w21
	cbz	w8, LBB0_17
; %bb.15:
Lloh7:
	adrp	x24, _MI_NOOP@GOTPAGE
Lloh8:
	ldr	x24, [x24, _MI_NOOP@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x21
	bl	_OUT_BATCH
	ldr	w8, [x23]
	udiv	w9, w21, w8
	msub	w8, w9, w8, w21
	cbnz	w8, LBB0_16
LBB0_17:
	lsl	w23, w21, #2
	str	w23, [x19, #4]
	mov	x0, x22
	bl	_HAS_POOLED_EU
	cbz	x0, LBB0_19
; %bb.18:
Lloh9:
	adrp	x8, _GEN9_MEDIA_POOL_STATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GEN9_MEDIA_POOL_STATE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_OUT_BATCH
Lloh12:
	adrp	x8, _GEN9_MEDIA_POOL_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GEN9_MEDIA_POOL_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_OUT_BATCH
	mov	x0, x20
	mov	x1, x21
	mov	w2, #28672
	movk	w2, #119, lsl #16
	bl	_OUT_BATCH
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_OUT_BATCH
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_OUT_BATCH
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_OUT_BATCH
LBB0_19:
Lloh15:
	adrp	x8, _MI_BATCH_BUFFER_END@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MI_BATCH_BUFFER_END@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_OUT_BATCH
	ldr	w8, [x19, #4]
	sub	w0, w23, w8
	ldr	w9, [x19, #16]
	add	w8, w8, w9
	stp	w8, w0, [x19, #4]
	mov	w1, #8
	bl	_ALIGN
	str	w0, [x19, #8]
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_21
; %bb.20:
	mov	x0, x20
	mov	x1, x23
	bl	_drm_clflush_virt_range
LBB0_21:
	mov	x0, x20
	bl	_kunmap_atomic
	mov	w20, #0
LBB0_22:
	ldr	w0, [x19, #12]
	bl	_i915_gem_object_finish_access
LBB0_23:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"only %d relocs resolved\n"

	.comm	_CACHELINE_DWORDS,4,2           ; @CACHELINE_DWORDS
	.comm	_MI_NOOP,4,2                    ; @MI_NOOP
	.comm	_GEN9_MEDIA_POOL_STATE,4,2      ; @GEN9_MEDIA_POOL_STATE
	.comm	_GEN9_MEDIA_POOL_ENABLE,4,2     ; @GEN9_MEDIA_POOL_ENABLE
	.comm	_MI_BATCH_BUFFER_END,4,2        ; @MI_BATCH_BUFFER_END
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_render_state_setup
.subsections_via_symbols
