	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ilk_compute_wm_level
_ilk_compute_wm_level:                  ## @ilk_compute_wm_level
	.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	%r9, %r14
	movq	%rcx, %r15
	movq	24(%rbp), %rsi
	movslq	%edx, %rcx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rdx
	movl	(%rax,%rcx,4), %eax
	movl	(%rdx,%rcx,4), %edx
	testl	%ecx, %ecx
	leal	(%rax,%rax,4), %ebx
	cmovlel	%eax, %ebx
	leal	(%rdx,%rdx,4), %r12d
	cmovlel	%edx, %r12d
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movq	%r8, %r13
	testl	%ecx, %ecx
	movq	(%rdi), %rax
	movl	(%rax,%rcx,4), %eax
	leal	(%rax,%rax,4), %edx
	cmovlel	%eax, %edx
	movq	%r15, %rdi
	movq	%r8, %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_ilk_compute_pri_wm
	movq	24(%rbp), %rcx
	movl	%eax, 12(%rcx)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_ilk_compute_fbc_wm
	movq	24(%rbp), %rsi
	movl	%eax, 16(%rsi)
LBB0_2:
	movq	16(%rbp), %r13
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_ilk_compute_spr_wm
	movq	24(%rbp), %rsi
	movl	%eax, 8(%rsi)
LBB0_4:
	testq	%r13, %r13
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_ilk_compute_cur_wm
	movq	24(%rbp), %rsi
	movl	%eax, 4(%rsi)
LBB0_6:
	movl	$1, (%rsi)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ilk_compute_wm_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ilk_compute_wm_level
_ilk_compute_wm_level:                  ; @ilk_compute_wm_level
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x7
	mov	x20, x6
	mov	x22, x5
	mov	x21, x3
	mov	x3, x2
	sbfiz	x8, x3, #2, #32
	ldp	x9, x10, [x0, #8]
	ldr	w9, [x9, x8]
	ldr	w8, [x10, x8]
	add	w10, w9, w9, lsl #2
	add	w11, w8, w8, lsl #2
	cmp	w2, #0
	csel	w24, w10, w9, gt
	csel	w23, w11, w8, gt
	cbz	x4, LBB0_2
; %bb.1:
	mov	x25, x4
	sxtw	x8, w3
	ldr	x9, [x0]
	ldr	w8, [x9, x8, lsl #2]
	add	w9, w8, w8, lsl #2
	cmp	w3, #0
	csel	w2, w9, w8, gt
	mov	x0, x21
	mov	x1, x4
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_ilk_compute_pri_wm
	mov	x2, x0
	str	w0, [x19, #12]
	mov	x0, x21
	mov	x1, x25
	bl	_ilk_compute_fbc_wm
	str	w0, [x19, #16]
LBB0_2:
	cbz	x22, LBB0_4
; %bb.3:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	bl	_ilk_compute_spr_wm
	str	w0, [x19, #8]
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_ilk_compute_cur_wm
	str	w0, [x19, #4]
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ilk_compute_wm_level
.subsections_via_symbols
