	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_basic_constraints
_check_basic_constraints:               ## @check_basic_constraints
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movl	%edi, %r12d
	movq	$0, -64(%rbp)
	movq	%rsi, %rdi
	callq	__hx509_cert_get_version
	xorl	%r13d, %r13d
	cmpl	$3, %eax
	jl	LBB0_19
## %bb.1:
	movq	_asn1_oid_id_x509_ce_basicConstraints@GOTPCREL(%rip), %rsi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_find_extension
	testq	%rax, %rax
	je	LBB0_2
LBB0_5:
	movl	(%rax), %esi
	movl	4(%rax), %edi
	leaq	-56(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	callq	_decode_BasicConstraints
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.6:
	xorl	%r13d, %r13d
	cmpl	$130, %r15d
	je	LBB0_11
## %bb.7:
	cmpl	$128, %r15d
	jne	LBB0_18
## %bb.8:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	je	LBB0_18
## %bb.10:
	movq	_HX509_PARENT_IS_CA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_2:
	leal	-128(%r15), %ecx
	cmpl	$2, %ecx
	jb	LBB0_19
## %bb.3:
	cmpl	$130, %r15d
	jne	LBB0_5
## %bb.4:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	__hx509_unparse_Name
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	_HX509_EXTENSION_NOT_FOUND@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	-56(%rbp), %r8
	leaq	L_.str(%rip), %rcx
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_hx509_set_error_string
	movq	-56(%rbp), %rdi
	callq	_free
	movl	(%rbx), %r13d
	jmp	LBB0_19
LBB0_11:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	cmpl	$0, (%rax)
	je	LBB0_13
## %bb.14:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	decq	%r14
	xorl	%r13d, %r13d
	cmpq	(%rax), %r14
	jbe	LBB0_18
## %bb.16:
	movq	_HX509_CA_PATH_TOO_DEEP@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_13:
	movq	_HX509_PARENT_NOT_CA@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %r13d
LBB0_18:
	leaq	-56(%rbp), %rdi
	callq	_free_BasicConstraints
LBB0_19:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_asn1_oid_id_x509_ce_basicConstraints,4,2 ## @asn1_oid_id_x509_ce_basicConstraints
	.comm	_HX509_EXTENSION_NOT_FOUND,4,2  ## @HX509_EXTENSION_NOT_FOUND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"basicConstraints missing from CA certifiacte %s"

	.comm	_HX509_PARENT_IS_CA,4,2         ## @HX509_PARENT_IS_CA
	.comm	_HX509_PARENT_NOT_CA,4,2        ## @HX509_PARENT_NOT_CA
	.comm	_HX509_CA_PATH_TOO_DEEP,4,2     ## @HX509_CA_PATH_TOO_DEEP
	.no_dead_strip	_check_basic_constraints
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_basic_constraints
_check_basic_constraints:               ; @check_basic_constraints
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	str	xzr, [sp]
	mov	x0, x1
	bl	__hx509_cert_get_version
	cmp	w0, #3
	b.ge	LBB0_2
LBB0_1:
	mov	w21, #0
	b	LBB0_18
LBB0_2:
Lloh0:
	adrp	x1, _asn1_oid_id_x509_ce_basicConstraints@GOTPAGE
Lloh1:
	ldr	x1, [x1, _asn1_oid_id_x509_ce_basicConstraints@GOTPAGEOFF]
	mov	x2, sp
	mov	x0, x22
	bl	_find_extension
	cbz	x0, LBB0_8
LBB0_3:
	ldp	w1, w8, [x0]
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x8
	bl	_decode_BasicConstraints
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.4:
	cmp	w20, #130
	b.eq	LBB0_11
; %bb.5:
	cmp	w20, #128
	b.ne	LBB0_15
; %bb.6:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_15
; %bb.7:
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _HX509_PARENT_IS_CA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HX509_PARENT_IS_CA@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w21, wzr, w9, eq
	b	LBB0_17
LBB0_8:
	sub	w8, w20, #128
	cmp	w8, #2
	b.lo	LBB0_1
; %bb.9:
	cmp	w20, #130
	b.ne	LBB0_3
; %bb.10:
	add	x1, sp, #16
	mov	x0, x22
	bl	__hx509_unparse_Name
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
Lloh5:
	adrp	x19, _HX509_EXTENSION_NOT_FOUND@GOTPAGE
Lloh6:
	ldr	x19, [x19, _HX509_EXTENSION_NOT_FOUND@GOTPAGEOFF]
	ldr	w2, [x19]
	ldr	x4, [sp, #16]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	bl	_hx509_set_error_string
	ldr	x0, [sp, #16]
	bl	_free
	ldr	w21, [x19]
	b	LBB0_18
LBB0_11:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_16
; %bb.12:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.13:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_15
; %bb.14:
	sub	x9, x19, #1
	ldr	x8, [x8]
Lloh9:
	adrp	x10, _HX509_CA_PATH_TOO_DEEP@GOTPAGE
Lloh10:
	ldr	x10, [x10, _HX509_CA_PATH_TOO_DEEP@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	x9, x8
	csel	w21, w10, wzr, hi
	b	LBB0_17
LBB0_15:
	mov	w21, #0
	b	LBB0_17
LBB0_16:
Lloh12:
	adrp	x8, _HX509_PARENT_NOT_CA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HX509_PARENT_NOT_CA@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
LBB0_17:
	add	x0, sp, #16
	bl	_free_BasicConstraints
LBB0_18:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_asn1_oid_id_x509_ce_basicConstraints,4,2 ; @asn1_oid_id_x509_ce_basicConstraints
	.comm	_HX509_EXTENSION_NOT_FOUND,4,2  ; @HX509_EXTENSION_NOT_FOUND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"basicConstraints missing from CA certifiacte %s"

	.comm	_HX509_PARENT_IS_CA,4,2         ; @HX509_PARENT_IS_CA
	.comm	_HX509_PARENT_NOT_CA,4,2        ; @HX509_PARENT_NOT_CA
	.comm	_HX509_CA_PATH_TOO_DEEP,4,2     ; @HX509_CA_PATH_TOO_DEEP
	.no_dead_strip	_check_basic_constraints
.subsections_via_symbols
