	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_value_bit_index                ## -- Begin function value_bit_index
	.p2align	4, 0x90
_value_bit_index:                       ## @value_bit_index
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	xorl	%esi, %esi
	callq	_TYPE_FIELD_TYPE
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rax, %rdi
	callq	_get_discrete_bounds
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	-32(%rbp), %ecx
	movl	$-1, %eax
	cmpl	%ebx, %ecx
	jg	LBB0_5
## %bb.3:
	cmpl	%ebx, -28(%rbp)
	jl	LBB0_5
## %bb.4:
	subl	%ecx, %ebx
	movq	_builtin_type_unsigned_char@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TARGET_CHAR_BIT@GOTPCREL(%rip), %r15
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%r15)
                                        ## kill: def $eax killed $eax def $rax
	addq	%rax, %r14
	movq	%r14, %rsi
	callq	_unpack_long
	movl	%eax, %ecx
	movl	(%r15), %esi
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%esi
	movq	_BITS_BIG_ENDIAN@GOTPCREL(%rip), %rax
	movl	%edx, %edi
	notl	%edi
	addl	%esi, %edi
	cmpq	$0, (%rax)
	cmovel	%edx, %edi
	xorl	%eax, %eax
	btl	%edi, %ecx
	setb	%al
	jmp	LBB0_5
LBB0_1:
	movl	$-2, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_builtin_type_unsigned_char,4,2 ## @builtin_type_unsigned_char
	.comm	_TARGET_CHAR_BIT,4,2            ## @TARGET_CHAR_BIT
	.comm	_BITS_BIG_ENDIAN,8,3            ## @BITS_BIG_ENDIAN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_value_bit_index                ; -- Begin function value_bit_index
	.p2align	2
_value_bit_index:                       ; @value_bit_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x19, x1
	mov	w1, #0
	bl	_TYPE_FIELD_TYPE
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_get_discrete_bounds
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldp	w9, w8, [sp, #8]
	cmp	w8, w20
	ccmp	w9, w20, #8, le
	b.ge	LBB0_4
; %bb.2:
	mov	w0, #-1
	b	LBB0_5
LBB0_3:
	mov	w0, #-2
	b	LBB0_5
LBB0_4:
	sub	w20, w20, w8
Lloh0:
	adrp	x8, _builtin_type_unsigned_char@GOTPAGE
Lloh1:
	ldr	x8, [x8, _builtin_type_unsigned_char@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x21, _TARGET_CHAR_BIT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _TARGET_CHAR_BIT@GOTPAGEOFF]
	ldr	w8, [x21]
	udiv	w8, w20, w8
	add	x1, x19, x8
	bl	_unpack_long
	ldr	w8, [x21]
	udiv	w9, w20, w8
	msub	w9, w9, w8, w20
Lloh5:
	adrp	x10, _BITS_BIG_ENDIAN@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BITS_BIG_ENDIAN@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	mvn	w11, w9
	add	w8, w8, w11
	cmp	x10, #0
	csel	w8, w9, w8, eq
	lsr	w8, w0, w8
	and	w0, w8, #0x1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_builtin_type_unsigned_char,4,2 ; @builtin_type_unsigned_char
	.comm	_TARGET_CHAR_BIT,4,2            ; @TARGET_CHAR_BIT
	.comm	_BITS_BIG_ENDIAN,8,3            ; @BITS_BIG_ENDIAN
.subsections_via_symbols
