	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ada_array_length               ## -- Begin function ada_array_length
	.p2align	4, 0x90
_ada_array_length:                      ## @ada_array_length
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_VALUE_TYPE
	movl	%eax, %edi
	callq	_check_typedef
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ada_is_packed_array_type
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_decode_packed_array
	movq	%rax, %r15
	movq	%rax, %rdi
	jmp	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	callq	_ada_is_simple_array
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_ada_array_bound_from_type
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ada_array_bound_from_type
	subq	%rax, %r15
	incq	%r15
	movq	-40(%rbp), %rdi
	movq	%r15, %rsi
	callq	_value_from_longest
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_builtin_type_ada_int@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r15, %rdi
	callq	_desc_bounds
	movl	%eax, %edi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_desc_one_bound
	movl	%eax, %edi
	callq	_value_as_long
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_desc_bounds
	movl	%eax, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_desc_one_bound
	movl	%eax, %edi
	callq	_value_as_long
	subq	%rax, %rbx
	incq	%rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_value_from_longest             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_builtin_type_ada_int,8,3       ## @builtin_type_ada_int
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ada_array_length               ; -- Begin function ada_array_length
	.p2align	2
_ada_array_length:                      ; @ada_array_length
	.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	x19, x1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x0
	bl	_VALUE_TYPE
	bl	_check_typedef
	mov	x21, x0
	bl	_ada_is_packed_array_type
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_decode_packed_array
	b	LBB0_1
LBB0_3:
	mov	x0, x21
	bl	_ada_is_simple_array
	cbz	x0, LBB0_5
; %bb.4:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x19
	mov	w2, #1
	bl	_ada_array_bound_from_type
	mov	x20, x0
	mov	x0, x21
	mov	x1, x19
	mov	w2, #0
	mov	x3, #0
	bl	_ada_array_bound_from_type
	sub	x8, x20, x0
	add	x1, x8, #1
	ldr	x0, [sp, #8]
	bl	_value_from_longest
	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
LBB0_5:
Lloh0:
	adrp	x8, _builtin_type_ada_int@GOTPAGE
Lloh1:
	ldr	x8, [x8, _builtin_type_ada_int@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	mov	x0, x20
	bl	_desc_bounds
	mov	x1, x19
	mov	w2, #1
	bl	_desc_one_bound
	bl	_value_as_long
	mov	x22, x0
	mov	x0, x20
	bl	_desc_bounds
	mov	x1, x19
	mov	w2, #0
	bl	_desc_one_bound
	bl	_value_as_long
	sub	x8, x22, x0
	add	x1, x8, #1
	mov	x0, x21
	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
	b	_value_from_longest
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_builtin_type_ada_int,8,3       ; @builtin_type_ada_int
.subsections_via_symbols
