	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_verify_hostname          ## -- Begin function hx509_verify_hostname
	.p2align	4, 0x90
_hx509_verify_hostname:                 ## @hx509_verify_hostname
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rsi, %r12
	testq	%r9, %r9
	je	LBB0_4
## %bb.1:
	cmpl	$0, 16(%rbp)
	jg	LBB0_4
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	jmp	LBB0_35
LBB0_4:
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	leaq	-96(%rbp), %r14
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	$0, -56(%rbp)
	movq	(%r12), %rdi
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdx
	callq	_find_extension_subject_alt_name
	movq	_HX509_EXTENSION_NOT_FOUND@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
LBB0_5:
	movq	(%r12), %r14
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_31
## %bb.6:
	movq	%rcx, %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_30
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	decq	%rcx
	movq	%rcx, -56(%rbp)
	movq	8(%r14), %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	shlq	$4, %rcx
	cmpq	$0, (%rax,%rcx)
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$8, %r13d
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	-4(%rbx,%r13), %edi
	movq	%r15, %rsi
	callq	_strcasecmp
	testl	%eax, %eax
	je	LBB0_34
LBB0_11:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	_HX509_NAME_CONSTRAINT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_31
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=2
	incq	%r12
	movq	-56(%rbp), %rcx
	movq	8(%r14), %rax
	movq	%rcx, %rdx
	shlq	$4, %rdx
	addq	$20, %r13
	cmpq	(%rax,%rdx), %r12
	jae	LBB0_7
LBB0_13:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rbx
	leaq	(%rbx,%r13), %rdi
	addq	$8, %rdi
	movq	_asn1_oid_id_at_commonName@GOTPCREL(%rip), %rsi
	callq	_der_heim_oid_cmp
	testq	%rax, %rax
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	-8(%rbx,%r13), %eax
	cmpl	$129, %eax
	je	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpl	$131, %eax
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r15, %rdi
	callq	_rk_UNCONST
	movq	%rax, -64(%rbp)
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, -72(%rbp)
	leaq	(%rbx,%r13), %rdi
	addq	$4, %rdi
	leaq	-72(%rbp), %rsi
	callq	_der_printable_string_cmp
	testl	%eax, %eax
	jne	LBB0_11
	jmp	LBB0_34
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	%r15, %rdi
	callq	_rk_UNCONST
	movq	%rax, -64(%rbp)
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, -72(%rbp)
	addq	%r13, %rbx
	movq	%rbx, %rdi
	leaq	-72(%rbp), %rsi
	callq	_der_ia5_string_cmp
	testl	%eax, %eax
	jne	LBB0_11
	jmp	LBB0_34
LBB0_20:
	leaq	-72(%rbp), %r14
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_22 Depth=1
	leaq	-96(%rbp), %r13
	movq	%r13, %rdi
	callq	_free_GeneralNames
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rdi
	leaq	-56(%rbp), %rsi
	movq	%r13, %rdx
	callq	_find_extension_subject_alt_name
	movq	_HX509_EXTENSION_NOT_FOUND@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
LBB0_22:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_26 Depth 2
	testl	%eax, %eax
	jne	LBB0_29
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	-96(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	$4, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_26 Depth=2
	incq	%r12
	addq	$8, %r13
	cmpq	%rax, %r12
	jae	LBB0_21
LBB0_26:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-88(%rbp), %rcx
	cmpl	$128, (%rcx,%r12,8)
	jne	LBB0_25
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	%r15, %rdi
	callq	_rk_UNCONST
	movq	%rax, -64(%rbp)
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, -72(%rbp)
	movq	-88(%rbp), %rdi
	addq	%r13, %rdi
	movq	%r14, %rsi
	callq	_der_printable_string_cmp
	testl	%eax, %eax
	je	LBB0_33
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	-96(%rbp), %rax
	jmp	LBB0_25
LBB0_33:
	leaq	-96(%rbp), %rdi
	callq	_free_GeneralNames
LBB0_34:
	xorl	%ebx, %ebx
	jmp	LBB0_35
LBB0_29:
	movq	_HX509_PARSING_NAME_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_30:
	xorl	%ebx, %ebx
LBB0_31:
	movq	_HX509_VHN_F_ALLOW_NO_MATCH@GOTPCREL(%rip), %rax
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	jne	LBB0_35
## %bb.32:
	movq	_HX509_NAME_CONSTRAINT_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_35:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HX509_EXTENSION_NOT_FOUND,4,2  ## @HX509_EXTENSION_NOT_FOUND
	.comm	_HX509_PARSING_NAME_FAILED,4,2  ## @HX509_PARSING_NAME_FAILED
	.comm	_asn1_oid_id_at_commonName,4,2  ## @asn1_oid_id_at_commonName
	.comm	_HX509_NAME_CONSTRAINT_ERROR,4,2 ## @HX509_NAME_CONSTRAINT_ERROR
	.comm	_HX509_VHN_F_ALLOW_NO_MATCH,4,2 ## @HX509_VHN_F_ALLOW_NO_MATCH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_verify_hostname          ; -- Begin function hx509_verify_hostname
	.p2align	2
_hx509_verify_hostname:                 ; @hx509_verify_hostname
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x20, x4
	mov	x19, x2
	mov	x21, x1
	cbz	x5, LBB0_3
; %bb.1:
	cmp	w6, #0
	b.gt	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_30
LBB0_3:
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	xzr, [sp, #24]
	ldr	x0, [x21]
	add	x1, sp, #24
	add	x2, sp, #32
	bl	_find_extension_subject_alt_name
Lloh3:
	adrp	x22, _HX509_EXTENSION_NOT_FOUND@GOTPAGE
Lloh4:
	ldr	x22, [x22, _HX509_EXTENSION_NOT_FOUND@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #32
	bl	_free_GeneralNames
	ldr	x0, [x21]
	add	x1, sp, #24
	add	x2, sp, #32
	bl	_find_extension_subject_alt_name
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cbnz	w0, LBB0_31
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, #0
	mov	x24, #0
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [sp, #32]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x24, x24, #1
	add	x23, x23, #8
	cmp	x24, x8
	b.hs	LBB0_4
LBB0_11:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [sp, #40]
	ldr	w9, [x9, x23]
	cmp	w9, #128
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x20
	bl	_rk_UNCONST
	str	x0, [sp, #16]
	mov	x0, x20
	bl	_strlen
	str	x0, [sp, #8]
	ldr	x8, [sp, #40]
	add	x8, x8, x23
	add	x0, x8, #4
	add	x1, sp, #8
	bl	_der_printable_string_cmp
	cbnz	w0, LBB0_9
; %bb.13:
	add	x0, sp, #32
	bl	_free_GeneralNames
	mov	w0, #0
	b	LBB0_30
LBB0_14:
	ldr	x23, [x21]
	ldr	x24, [x23]
Lloh5:
	adrp	x22, _HX509_NAME_CONSTRAINT_ERROR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _HX509_NAME_CONSTRAINT_ERROR@GOTPAGEOFF]
	cbz	x24, LBB0_28
; %bb.15:
Lloh7:
	adrp	x21, _asn1_oid_id_at_commonName@GOTPAGE
Lloh8:
	ldr	x21, [x21, _asn1_oid_id_at_commonName@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	cbz	x24, LBB0_28
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_22 Depth 2
	sub	x24, x24, #1
	str	x24, [sp, #24]
	ldr	x8, [x23, #8]
	lsl	x9, x24, #4
	ldr	x9, [x8, x9]
	cbz	x9, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x25, #0
	mov	x26, #0
	mov	x9, x24
	b	LBB0_22
LBB0_19:                                ;   in Loop: Header=BB0_22 Depth=2
	add	x8, x27, x25
	ldr	w0, [x8, #4]
	mov	x1, x20
	bl	_strcasecmp
	cbz	w0, LBB0_30
LBB0_20:                                ;   in Loop: Header=BB0_22 Depth=2
	ldr	w8, [x22]
	cbnz	w8, LBB0_29
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=2
	add	x26, x26, #1
	ldr	x9, [sp, #24]
	ldr	x8, [x23, #8]
	lsl	x10, x9, #4
	ldr	x10, [x8, x10]
	add	x25, x25, #20
	cmp	x26, x10
	b.hs	LBB0_16
LBB0_22:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x8, x9, lsl #4
	ldr	x27, [x8, #8]
	add	x8, x27, x25
	add	x0, x8, #16
	mov	x1, x21
	bl	_der_heim_oid_cmp
	cbnz	x0, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=2
	ldr	w8, [x27, x25]
	cmp	w8, #129
	b.eq	LBB0_19
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=2
	cmp	w8, #131
	b.eq	LBB0_27
; %bb.25:                               ;   in Loop: Header=BB0_22 Depth=2
	cmp	w8, #130
	b.ne	LBB0_20
; %bb.26:                               ;   in Loop: Header=BB0_22 Depth=2
	mov	x0, x20
	bl	_rk_UNCONST
	str	x0, [sp, #16]
	mov	x0, x20
	bl	_strlen
	str	x0, [sp, #8]
	add	x8, x27, x25
	add	x0, x8, #12
	add	x1, sp, #8
	bl	_der_printable_string_cmp
	cbnz	w0, LBB0_20
	b	LBB0_30
LBB0_27:                                ;   in Loop: Header=BB0_22 Depth=2
	mov	x0, x20
	bl	_rk_UNCONST
	str	x0, [sp, #16]
	mov	x0, x20
	bl	_strlen
	str	x0, [sp, #8]
	add	x8, x27, x25
	add	x0, x8, #8
	add	x1, sp, #8
	bl	_der_ia5_string_cmp
	cbnz	w0, LBB0_20
	b	LBB0_30
LBB0_28:
	mov	w8, #0
LBB0_29:
Lloh9:
	adrp	x9, _HX509_VHN_F_ALLOW_NO_MATCH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HX509_VHN_F_ALLOW_NO_MATCH@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	w10, [x22]
	tst	w9, w19
	csel	w0, w10, w8, eq
LBB0_30:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_31:
Lloh12:
	adrp	x8, _HX509_PARSING_NAME_FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HX509_PARSING_NAME_FAILED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_30
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HX509_EXTENSION_NOT_FOUND,4,2  ; @HX509_EXTENSION_NOT_FOUND
	.comm	_HX509_PARSING_NAME_FAILED,4,2  ; @HX509_PARSING_NAME_FAILED
	.comm	_asn1_oid_id_at_commonName,4,2  ; @asn1_oid_id_at_commonName
	.comm	_HX509_NAME_CONSTRAINT_ERROR,4,2 ; @HX509_NAME_CONSTRAINT_ERROR
	.comm	_HX509_VHN_F_ALLOW_NO_MATCH,4,2 ; @HX509_VHN_F_ALLOW_NO_MATCH
.subsections_via_symbols
