	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_sched_lookup_priolist     ## -- Begin function i915_sched_lookup_priolist
	.p2align	4, 0x90
_i915_sched_lookup_priolist:            ## @i915_sched_lookup_priolist
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	callq	_lockdep_assert_held
	movq	%r15, %rdi
	callq	_assert_priolists
	movq	_I915_PRIORITY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_I915_PRIORITY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_I915_USER_PRIORITY_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	sarl	%cl, %r14d
	movl	8(%rbx), %edi
	callq	_unlikely
	testq	%rax, %rax
	movq	_I915_PRIORITY_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovnel	%eax, %r14d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %r12
	movq	%r15, %rbx
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r15d, %r15d
	cmpl	%eax, %r14d
	jne	LBB0_17
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=2
	leaq	8(%r15), %r12
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rcx, %r15
	movq	%rcx, %rdi
	callq	_to_priolist
	cmpl	(%rax), %r14d
	jg	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	jge	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_I915_PRIORITY_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	je	LBB0_11
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_global@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmem_cache_alloc
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_I915_PRIORITY_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, (%rbx)
	movl	%eax, %r14d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_1
LBB0_6:
	movq	%rax, %r13
LBB0_16:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	andl	%ecx, %eax
	notl	%eax
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	addl	%eax, %ebx
	movl	%ebx, %edi
	callq	_BIT
	orl	%eax, 16(%r13)
	movslq	%ebx, %rax
	shlq	$2, %rax
	addq	8(%r13), %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	addq	$24, %r13
LBB0_12:
	movl	%r14d, (%r13)
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_15
## %bb.13:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdi
	addq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	incq	%rbx
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_14
LBB0_15:
	leaq	20(%r13), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_rb_link_node
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_rb_insert_color_cached
	movl	$0, 16(%r13)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_PRIORITY_COUNT,4,2        ## @I915_PRIORITY_COUNT
	.comm	_I915_PRIORITY_MASK,4,2         ## @I915_PRIORITY_MASK
	.comm	_I915_USER_PRIORITY_SHIFT,4,2   ## @I915_USER_PRIORITY_SHIFT
	.comm	_I915_PRIORITY_NORMAL,4,2       ## @I915_PRIORITY_NORMAL
	.comm	_global,4,2                     ## @global
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_sched_lookup_priolist     ; -- Begin function i915_sched_lookup_priolist
	.p2align	2
_i915_sched_lookup_priolist:            ; @i915_sched_lookup_priolist
	.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	x19, x1
	mov	x22, x0
	add	x23, x0, #8
	bl	_lockdep_assert_held
	mov	x0, x23
	bl	_assert_priolists
Lloh0:
	adrp	x8, _I915_PRIORITY_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_PRIORITY_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
Lloh3:
	adrp	x8, _I915_PRIORITY_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_PRIORITY_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
Lloh6:
	adrp	x8, _I915_USER_PRIORITY_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I915_USER_PRIORITY_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	asr	w19, w19, w8
	ldr	w0, [x22, #8]
	bl	_unlikely
Lloh9:
	adrp	x28, _I915_PRIORITY_NORMAL@GOTPAGE
Lloh10:
	ldr	x28, [x28, _I915_PRIORITY_NORMAL@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	x0, #0
	csel	w27, w19, w8, eq
	add	x20, x22, #16
Lloh11:
	adrp	x19, _GFP_ATOMIC@GOTPAGE
Lloh12:
	ldr	x19, [x19, _GFP_ATOMIC@GOTPAGEOFF]
	mov	w21, #1
	ldr	x9, [x20]
	cbnz	x9, LBB0_3
LBB0_1:
	mov	x24, #0
	mov	x25, x20
	cmp	w27, w8
	b.ne	LBB0_7
	b	LBB0_11
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x24, #8
	ldr	x9, [x25]
	cbz	x9, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x24, x9
	mov	x0, x9
	bl	_to_priolist
	ldr	w8, [x0]
	cmp	w27, w8
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	b.ge	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w21, #0
	mov	x25, x24
	ldr	x9, [x25]
	cbnz	x9, LBB0_3
LBB0_6:
	ldr	w8, [x28]
	cmp	w27, w8
	b.eq	LBB0_11
LBB0_7:
Lloh13:
	adrp	x8, _global@GOTPAGE
Lloh14:
	ldr	x8, [x8, _global@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_kmem_cache_alloc
	mov	x26, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.8:
	ldr	w8, [x28]
	mov	w9, #1
	str	w9, [x23]
	mov	x27, x8
	ldr	x9, [x20]
	cbnz	x9, LBB0_3
	b	LBB0_1
LBB0_9:
	mov	x26, x0
LBB0_10:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	and	w8, w9, w8
	mvn	w8, w8
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	add	w19, w9, w8
	mov	x0, x19
	bl	_BIT
	ldr	w8, [x26, #16]
	orr	w8, w8, w0
	str	w8, [x26, #16]
	ldr	x8, [x26, #8]
	add	x0, x8, w19, sxtw #2
	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
LBB0_11:
	add	x26, x22, #24
LBB0_12:
	str	w27, [x26]
	ldr	x0, [x26, #8]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x19, #0
	mov	x22, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26, #8]
	add	x0, x8, x19
	bl	_INIT_LIST_HEAD
	add	x22, x22, #1
	ldr	x0, [x26, #8]
	bl	_ARRAY_SIZE
	add	x19, x19, #4
	cmp	x22, w0, sxtw
	b.lt	LBB0_14
LBB0_15:
	add	x22, x26, #20
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	bl	_rb_link_node
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	bl	_rb_insert_color_cached
	str	wzr, [x26, #16]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_PRIORITY_COUNT,4,2        ; @I915_PRIORITY_COUNT
	.comm	_I915_PRIORITY_MASK,4,2         ; @I915_PRIORITY_MASK
	.comm	_I915_USER_PRIORITY_SHIFT,4,2   ; @I915_USER_PRIORITY_SHIFT
	.comm	_I915_PRIORITY_NORMAL,4,2       ; @I915_PRIORITY_NORMAL
	.comm	_global,4,2                     ; @global
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
.subsections_via_symbols
