	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_current_to_regval
_ab8500_current_to_regval:              ## @ab8500_current_to_regval
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rdx
	movq	(%rdx), %rcx
	movl	(%rcx), %edi
	xorl	%eax, %eax
	cmpl	%esi, %edi
	jg	LBB0_8
## %bb.1:
	movl	8(%rdx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_7
## %bb.2:
	movl	$-1, %eax
	cmpl	%esi, %edi
	jg	LBB0_8
## %bb.3:
	leaq	-1(%r8), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, %rdi
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%rdx), %rax
	cmpl	%esi, 4(%rcx,%rdx,4)
	movq	%rax, %rdx
	jle	LBB0_4
## %bb.6:
	decl	%eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_7:
	movslq	%r8d, %rax
	decl	%r8d
	cmpl	%esi, -4(%rcx,%rax,4)
	movl	$-1, %eax
	cmovel	%r8d, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ab8500_current_to_regval
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_current_to_regval
_ab8500_current_to_regval:              ; @ab8500_current_to_regval
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0]
	ldr	x8, [x9]
	ldr	w10, [x8]
	cmp	w10, w1
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	ret
LBB0_2:
	ldr	w9, [x9, #8]
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.3:
	cmp	w10, w1
	b.le	LBB0_5
; %bb.4:
	mov	w0, #-1
	ret
LBB0_5:
	add	x10, x8, #4
	sub	x11, x9, #1
	mov	w0, #-1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x11, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w12, [x10], #4
	add	w0, w0, #1
	sub	x11, x11, #1
	cmp	w12, w1
	b.le	LBB0_6
; %bb.8:
	ret
LBB0_9:
	sub	w9, w9, #1
	ldr	w8, [x8, w9, sxtw #2]
	cmp	w8, w1
	csinv	w0, w9, wzr, eq
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ab8500_current_to_regval
.subsections_via_symbols
