	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_x509_crt_verify_with_profile ## -- Begin function mbedtls_x509_crt_verify_with_profile
	.p2align	4, 0x90
_mbedtls_x509_crt_verify_with_profile:  ## @mbedtls_x509_crt_verify_with_profile
	.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	%rsi, -64(%rbp)                 ## 8-byte Spill
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movl	$0, (%r9)
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	testq	%r8, %r8
	je	LBB0_22
## %bb.3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_strlen
	movq	%rax, %r12
	movq	_MBEDTLS_X509_EXT_SUBJECT_ALT_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.13:
	leaq	24(%r15), %rbx
	leaq	L_.str(%rip), %r14
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_21
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	leaq	8(%rbx), %r13
	movq	8(%rbx), %rax
	cmpq	%r12, %rax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	16(%rbx), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_x509_memcasecmp
	testq	%rax, %rax
	je	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r13), %rax
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	cmpq	$3, %rax
	jb	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	16(%rbx), %rdi
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_x509_check_wildcard
	testq	%rax, %rax
	jne	LBB0_20
	jmp	LBB0_22
LBB0_1:
	movq	_MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_39
LBB0_4:
	leaq	48(%r15), %rbx
	movq	_MBEDTLS_OID_AT_CN@GOTPCREL(%rip), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_21
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	leaq	24(%rbx), %rsi
	callq	_MBEDTLS_OID_CMP
	testq	%rax, %rax
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	8(%rbx), %r14
	movq	8(%rbx), %rax
	cmpq	%r12, %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_x509_memcasecmp
	testq	%rax, %rax
	je	LBB0_22
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %rax
	jb	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	$2, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_x509_check_wildcard
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_22
LBB0_21:
	movq	_MBEDTLS_X509_BADCERT_CN_MISMATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
LBB0_22:
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_mbedtls_pk_get_type
	movl	%eax, %r12d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_x509_profile_check_pk_alg
	testq	%rax, %rax
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_24
## %bb.23:
	movq	_MBEDTLS_X509_BADCERT_BAD_PK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_24:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_x509_profile_check_key
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	_MBEDTLS_X509_BADCERT_BAD_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_26:
	movq	24(%rbp), %r12
	movq	16(%rbp), %r14
	movq	%r15, %rbx
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_31
## %bb.27:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_x509_crt_check_parent
	testq	%rax, %rax
	je	LBB0_41
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_28
## %bb.30:
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_x509_crt_check_parent
	testq	%rax, %rax
	jne	LBB0_31
## %bb.33:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	%r14
	pushq	%r13
	pushq	$0
	callq	_x509_crt_verify_child
	jmp	LBB0_36
LBB0_34:
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_35
LBB0_41:
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%rbx, %rsi
LBB0_35:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	%r14
	pushq	%r13
	callq	_x509_crt_verify_top
LBB0_36:
	addq	$32, %rsp
	testl	%eax, %eax
	jne	LBB0_40
## %bb.37:
	movl	(%r13), %eax
	testl	%eax, %eax
	je	LBB0_40
## %bb.38:
	movq	_MBEDTLS_ERR_X509_CERT_VERIFY_FAILED@GOTPCREL(%rip), %rax
LBB0_39:
	movl	(%rax), %eax
LBB0_40:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_X509_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_X509_BAD_INPUT_DATA
	.comm	_MBEDTLS_X509_EXT_SUBJECT_ALT_NAME,4,2 ## @MBEDTLS_X509_EXT_SUBJECT_ALT_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"*."

	.comm	_MBEDTLS_X509_BADCERT_CN_MISMATCH,4,2 ## @MBEDTLS_X509_BADCERT_CN_MISMATCH
	.comm	_MBEDTLS_OID_AT_CN,4,2          ## @MBEDTLS_OID_AT_CN
	.comm	_MBEDTLS_X509_BADCERT_BAD_PK,4,2 ## @MBEDTLS_X509_BADCERT_BAD_PK
	.comm	_MBEDTLS_X509_BADCERT_BAD_KEY,4,2 ## @MBEDTLS_X509_BADCERT_BAD_KEY
	.comm	_MBEDTLS_ERR_X509_CERT_VERIFY_FAILED,4,2 ## @MBEDTLS_ERR_X509_CERT_VERIFY_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_x509_crt_verify_with_profile ; -- Begin function mbedtls_x509_crt_verify_with_profile
	.p2align	2
_mbedtls_x509_crt_verify_with_profile:  ; @mbedtls_x509_crt_verify_with_profile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x3, LBB0_11
; %bb.1:
	mov	x24, x7
	mov	x19, x5
	mov	x26, x4
	mov	x21, x3
	mov	x25, x1
	mov	x23, x0
	stp	x2, x6, [sp, #16]               ; 16-byte Folded Spill
	str	wzr, [x5]
	cbz	x4, LBB0_22
; %bb.2:
	mov	x0, x26
	bl	_strlen
	mov	x27, x0
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _MBEDTLS_X509_EXT_SUBJECT_ALT_NAME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBEDTLS_X509_EXT_SUBJECT_ALT_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.3:
	add	x22, x23, #24
Lloh3:
	adrp	x28, l_.str@PAGE
Lloh4:
	add	x28, x28, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x22, [x22]
	cbz	x22, LBB0_21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x22
	ldr	x8, [x20, #8]!
	cmp	x8, x27
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x22, #16]
	mov	x0, x26
	mov	x2, x27
	bl	_x509_memcasecmp
	cbz	x0, LBB0_22
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	x8, #3
	b.lo	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x22, #16]
	mov	x1, x28
	mov	w2, #2
	bl	_memcmp
	cbnz	x0, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x26
	mov	x1, x20
	bl	_x509_check_wildcard
	cbnz	x0, LBB0_4
	b	LBB0_22
LBB0_11:
Lloh5:
	adrp	x8, _MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_38
LBB0_12:
	add	x20, x23, #48
Lloh8:
	adrp	x22, _MBEDTLS_OID_AT_CN@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MBEDTLS_OID_AT_CN@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x20, [x20]
	cbz	x20, LBB0_21
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	add	x1, x20, #24
	bl	_MBEDTLS_OID_CMP
	cbnz	x0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x28, x20
	ldr	x8, [x28, #8]!
	cmp	x8, x27
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x20, #16]
	mov	x1, x26
	mov	x2, x27
	bl	_x509_memcasecmp
	cbz	x0, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x28]
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=1
	cmp	x8, #3
	b.lo	LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x20, #16]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #2
	bl	_memcmp
	cbnz	x0, LBB0_13
; %bb.20:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x26
	mov	x1, x28
	bl	_x509_check_wildcard
	cbnz	x0, LBB0_13
	b	LBB0_22
LBB0_21:
Lloh12:
	adrp	x8, _MBEDTLS_X509_BADCERT_CN_MISMATCH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_X509_BADCERT_CN_MISMATCH@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_22:
	add	x20, x23, #16
	mov	x0, x20
	bl	_mbedtls_pk_get_type
	mov	x26, x0
	mov	x0, x21
	mov	x1, x26
	bl	_x509_profile_check_pk_alg
	cbz	x0, LBB0_24
; %bb.23:
Lloh15:
	adrp	x8, _MBEDTLS_X509_BADCERT_BAD_PK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MBEDTLS_X509_BADCERT_BAD_PK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_24:
	mov	x0, x21
	mov	x1, x26
	mov	x2, x20
	bl	_x509_profile_check_key
	cbz	x0, LBB0_26
; %bb.25:
Lloh18:
	adrp	x8, _MBEDTLS_X509_BADCERT_BAD_KEY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MBEDTLS_X509_BADCERT_BAD_KEY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_26:
	mov	x20, x23
	cbz	x25, LBB0_31
; %bb.27:
	mov	x20, x25
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x20
	mov	w2, #0
	mov	w3, #1
	bl	_x509_crt_check_parent
	cbz	x0, LBB0_35
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	x20, [x20, #8]
	cbnz	x20, LBB0_28
; %bb.30:
	mov	x20, x23
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x20, #8]
	cbz	x20, LBB0_34
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	mov	x0, x23
	mov	x1, x20
	mov	w2, #0
	mov	w3, #1
	bl	_x509_crt_check_parent
	cbnz	x0, LBB0_31
; %bb.33:
	ldp	x3, x8, [sp, #16]               ; 16-byte Folded Reload
	stp	x8, x24, [sp]
	mov	x0, x23
	mov	x1, x20
	mov	x2, x25
	mov	x4, x21
	mov	w5, #0
	mov	w6, #0
	mov	x7, x19
	bl	_x509_crt_verify_child
	cbnz	w0, LBB0_38
	b	LBB0_37
LBB0_34:
	str	x24, [sp]
	mov	x0, x23
	mov	x1, x25
	b	LBB0_36
LBB0_35:
	str	x24, [sp]
	mov	x0, x23
	mov	x1, x20
LBB0_36:
	ldp	x2, x7, [sp, #16]               ; 16-byte Folded Reload
	mov	x3, x21
	mov	w4, #0
	mov	w5, #0
	mov	x6, x19
	bl	_x509_crt_verify_top
	cbnz	w0, LBB0_38
LBB0_37:
	ldr	w8, [x19]
Lloh21:
	adrp	x9, _MBEDTLS_ERR_X509_CERT_VERIFY_FAILED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MBEDTLS_ERR_X509_CERT_VERIFY_FAILED@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w0, wzr, w9, eq
LBB0_38:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_X509_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_X509_BAD_INPUT_DATA
	.comm	_MBEDTLS_X509_EXT_SUBJECT_ALT_NAME,4,2 ; @MBEDTLS_X509_EXT_SUBJECT_ALT_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"*."

	.comm	_MBEDTLS_X509_BADCERT_CN_MISMATCH,4,2 ; @MBEDTLS_X509_BADCERT_CN_MISMATCH
	.comm	_MBEDTLS_OID_AT_CN,4,2          ; @MBEDTLS_OID_AT_CN
	.comm	_MBEDTLS_X509_BADCERT_BAD_PK,4,2 ; @MBEDTLS_X509_BADCERT_BAD_PK
	.comm	_MBEDTLS_X509_BADCERT_BAD_KEY,4,2 ; @MBEDTLS_X509_BADCERT_BAD_KEY
	.comm	_MBEDTLS_ERR_X509_CERT_VERIFY_FAILED,4,2 ; @MBEDTLS_ERR_X509_CERT_VERIFY_FAILED
.subsections_via_symbols
