	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ilk_find_best_result
_ilk_find_best_result:                  ## @ilk_find_best_result
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	callq	_ilk_wm_max_level
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movq	8(%r14), %rdx
	movq	8(%r15), %rcx
	movl	%eax, %r8d
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	movl	$1, %edi
	xorl	%esi, %esi
	jmp	LBB0_5
LBB0_3:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	xorl	%eax, %eax
	movl	$1, %edi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rdi,8)
	cmovnel	%edi, %esi
	cmpq	$0, (%rcx,%rdi,8)
	cmovnel	%edi, %eax
	leaq	1(%rdi), %rbx
	cmpq	$0, 8(%rdx,%rdi,8)
	cmovnel	%ebx, %esi
	cmpq	$0, 8(%rcx,%rdi,8)
	cmovnel	%ebx, %eax
	addq	$2, %rdi
	cmpq	%r9, %rbx
	jne	LBB0_4
LBB0_5:
	testb	$1, %r8b
	je	LBB0_7
## %bb.6:
	cmpq	$0, (%rdx,%rdi,8)
	cmovnel	%edi, %esi
	cmpq	$0, (%rcx,%rdi,8)
	cmovnel	%edi, %eax
LBB0_7:
	cmpl	%eax, %esi
	jne	LBB0_11
LBB0_8:
	cmpq	$0, (%r15)
	je	LBB0_12
## %bb.9:
	cmpq	$0, (%r14)
	je	LBB0_13
LBB0_12:
	movq	%r14, %r15
	jmp	LBB0_13
LBB0_11:
	cmovgq	%r14, %r15
LBB0_13:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ilk_find_best_result
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ilk_find_best_result
_ilk_find_best_result:                  ; @ilk_find_best_result
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x1
	bl	_ilk_wm_max_level
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w8, #0
	mov	w9, #0
	ldr	x10, [x19, #8]
	ldr	x11, [x20, #8]
	add	w12, w0, #1
	mov	w13, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x14, x13, #3
	ldr	x15, [x10, x14]
	cmp	x15, #0
	csel	w9, w9, w13, eq
	ldr	x14, [x11, x14]
	cmp	x14, #0
	csel	w8, w8, w13, eq
	add	x13, x13, #1
	cmp	x12, x13
	b.ne	LBB0_2
; %bb.3:
	cmp	w9, w8
	b.ne	LBB0_6
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x19]
	cmp	x8, #0
	csel	x19, x20, x19, eq
	b	LBB0_7
LBB0_6:
	csel	x19, x19, x20, gt
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ilk_find_best_result
.subsections_via_symbols
