	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __read_slice_count
___read_slice_count:                    ## @__read_slice_count
	.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	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %rdx
	movq	%rsi, %rdi
	movq	%r12, %rsi
	callq	_emit_rpcs_query
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	%rax, %rbx
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	testq	%r13, %r13
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_igt_spinner_end
LBB0_5:
	movq	-48(%rbp), %rdi
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_i915_request_wait
	movq	%rax, %rbx
	movq	-48(%rbp), %rdi
	callq	_i915_request_put
	testq	%rbx, %rbx
	js	LBB0_2
## %bb.6:
	movq	_I915_MAP_WB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i915_gem_object_pin_map
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	jmp	LBB0_1
LBB0_8:
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_INTEL_GEN
	cmpl	$11, %eax
	movq	_GEN8_RPCS_S_CNT_MASK@GOTPCREL(%rip), %rax
	cmovgeq	_GEN11_RPCS_S_CNT_MASK@GOTPCREL(%rip), %rax
	movq	_GEN8_RPCS_S_CNT_SHIFT@GOTPCREL(%rip), %rcx
	cmovgeq	_GEN11_RPCS_S_CNT_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rbx), %edx
	movl	(%rax), %ebx
	andl	%edx, %ebx
	movb	(%rcx), %cl
	shrl	%cl, %ebx
	movl	%edx, (%r14)
	movq	%r15, %rdi
	callq	_i915_gem_object_unpin_map
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
	.comm	_I915_MAP_WB,4,2                ## @I915_MAP_WB
	.comm	_GEN11_RPCS_S_CNT_MASK,4,2      ## @GEN11_RPCS_S_CNT_MASK
	.comm	_GEN11_RPCS_S_CNT_SHIFT,4,2     ## @GEN11_RPCS_S_CNT_SHIFT
	.comm	_GEN8_RPCS_S_CNT_MASK,4,2       ## @GEN8_RPCS_S_CNT_MASK
	.comm	_GEN8_RPCS_S_CNT_SHIFT,4,2      ## @GEN8_RPCS_S_CNT_SHIFT
	.no_dead_strip	___read_slice_count
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __read_slice_count
___read_slice_count:                    ; @__read_slice_count
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	str	xzr, [sp, #8]
	add	x2, sp, #8
	mov	x0, x1
	mov	x1, x21
	bl	_emit_rpcs_query
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
LBB0_2:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
	cbz	x23, LBB0_5
; %bb.4:
	mov	x0, x23
	bl	_igt_spinner_end
LBB0_5:
	ldr	x0, [sp, #8]
Lloh0:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_i915_request_wait
	mov	x22, x0
	ldr	x0, [sp, #8]
	bl	_i915_request_put
	tbnz	x22, #63, LBB0_8
; %bb.6:
Lloh3:
	adrp	x8, _I915_MAP_WB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_MAP_WB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i915_gem_object_pin_map
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_2
LBB0_8:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_2
LBB0_9:
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_INTEL_GEN
Lloh6:
	adrp	x8, _GEN11_RPCS_S_CNT_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GEN11_RPCS_S_CNT_MASK@GOTPAGEOFF]
Lloh8:
	adrp	x9, _GEN8_RPCS_S_CNT_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GEN8_RPCS_S_CNT_MASK@GOTPAGEOFF]
	cmp	w0, #10
	csel	x8, x8, x9, gt
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _GEN11_RPCS_S_CNT_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GEN11_RPCS_S_CNT_SHIFT@GOTPAGEOFF]
Lloh12:
	adrp	x10, _GEN8_RPCS_S_CNT_SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _GEN8_RPCS_S_CNT_SHIFT@GOTPAGEOFF]
	ldr	w11, [x22]
	and	w8, w11, w8
	csel	x9, x9, x10, gt
	ldr	w9, [x9]
	lsr	w22, w8, w9
	str	w11, [x20]
	mov	x0, x19
	bl	_i915_gem_object_unpin_map
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
	.comm	_I915_MAP_WB,4,2                ; @I915_MAP_WB
	.comm	_GEN11_RPCS_S_CNT_MASK,4,2      ; @GEN11_RPCS_S_CNT_MASK
	.comm	_GEN11_RPCS_S_CNT_SHIFT,4,2     ; @GEN11_RPCS_S_CNT_SHIFT
	.comm	_GEN8_RPCS_S_CNT_MASK,4,2       ; @GEN8_RPCS_S_CNT_MASK
	.comm	_GEN8_RPCS_S_CNT_SHIFT,4,2      ; @GEN8_RPCS_S_CNT_SHIFT
	.no_dead_strip	___read_slice_count
.subsections_via_symbols
