	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_cesa_select_engine
_mv_cesa_select_engine:                 ## @mv_cesa_select_engine
	.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
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	_cesa_dev@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_1
## %bb.2:
	movq	_U32_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rbx
	addq	%r14, %rbx
	movq	%rbx, %rdi
	callq	_atomic_read
	movq	_cesa_dev@GOTPCREL(%rip), %rcx
	cmpq	%r13, %rax
	cmovlq	%rbx, %r15
	cmovlq	%rax, %r13
	incq	%r12
	movq	(%rcx), %rax
	movq	8(%rax), %rcx
	movslq	(%rcx), %rcx
	addq	$4, %r14
	cmpq	%rcx, %r12
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r15d, %r15d
LBB0_4:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	callq	_atomic_add
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_U32_MAX,8,3                    ## @U32_MAX
	.comm	_cesa_dev,8,3                   ## @cesa_dev
	.no_dead_strip	_mv_cesa_select_engine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_cesa_select_engine
_mv_cesa_select_engine:                 ; @mv_cesa_select_engine
	.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, x0
Lloh0:
	adrp	x22, _cesa_dev@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cesa_dev@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	mov	x20, #0
Lloh2:
	adrp	x9, _U32_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _U32_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x25, [x9]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8]
	add	x21, x8, x23
	mov	x0, x21
	bl	_atomic_read
	cmp	x0, x25
	csel	x20, x21, x20, lt
	csel	x25, x0, x25, lt
	add	x24, x24, #1
	ldr	x8, [x22]
	ldr	x9, [x8, #8]
	ldrsw	x9, [x9]
	add	x23, x23, #4
	cmp	x24, x9
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x20, #0
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_atomic_add
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_U32_MAX,8,3                    ; @U32_MAX
	.comm	_cesa_dev,8,3                   ; @cesa_dev
	.no_dead_strip	_mv_cesa_select_engine
.subsections_via_symbols
