	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dane_tlsa_add
_dane_tlsa_add:                         ## @dane_tlsa_add
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_4
## %bb.1:
	movq	%r9, %r13
	movq	%r9, %rax
	shrq	$31, %rax
	jne	LBB0_6
## %bb.2:
	movq	%rsi, %r14
	movq	_DANETLS_USAGE_LAST@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jge	LBB0_7
## %bb.3:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_NOT_ENABLED@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	callq	_SSLerr
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_6:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_BAD_DATA_LENGTH@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	%rdx, %rbx
	movq	_DANETLS_SELECTOR_LAST@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jge	LBB0_11
## %bb.8:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_BAD_SELECTOR@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	callq	_SSLerr
	xorl	%eax, %eax
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r8, %r15
	movq	%rdi, %r12
	movq	_DANETLS_MATCHING_FULL@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	je	LBB0_14
## %bb.12:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%rcx, %rbx
	movq	%rcx, %rsi
	callq	_tlsa_md_get
	testq	%rax, %rax
	je	LBB0_30
## %bb.13:
	movq	%rax, %rdi
	callq	_EVP_MD_size
	cmpq	%r13, %rax
	movq	%rbx, %rcx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_31
LBB0_14:
	testq	%r15, %r15
	je	LBB0_29
## %bb.15:
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	$48, %edi
	callq	_OPENSSL_zalloc
	testq	%rax, %rax
	je	LBB0_56
## %bb.16:
	movq	%r14, (%rax)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, 8(%rax)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 16(%rax)
	movq	%r13, %rdi
	movq	%rax, %rbx
	callq	_OPENSSL_malloc
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_32
## %bb.17:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, 24(%rbx)
	movq	_DANETLS_MATCHING_FULL@GOTPCREL(%rip), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_42
## %bb.18:
	movq	%r15, -72(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -88(%rbp)
	cmpq	$128, %rax
	je	LBB0_33
## %bb.19:
	cmpq	$129, %rax
	jne	LBB0_42
## %bb.20:
	leaq	-56(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	movl	%r13d, %edx
	callq	_d2i_X509
	testl	%eax, %eax
	je	LBB0_38
## %bb.21:
	movq	-72(%rbp), %rax
	subq	%r15, %rax
	jb	LBB0_38
## %bb.22:
	cmpq	%r13, %rax
	jne	LBB0_38
## %bb.23:
	movq	-56(%rbp), %rdi
	callq	_X509_get0_pubkey
	testq	%rax, %rax
	je	LBB0_38
## %bb.24:
	movq	%r14, %rdi
	callq	_DANETLS_USAGE_BIT
	movq	_DANETLS_TA_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_41
## %bb.25:
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	jne	LBB0_27
## %bb.26:
	xorl	%eax, %eax
	callq	_sk_X509_new_null
	movq	%rax, %rdi
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_28
LBB0_27:
	movq	-56(%rbp), %rsi
	callq	_sk_X509_push
	testl	%eax, %eax
	jne	LBB0_42
LBB0_28:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SSLerr
	movq	-56(%rbp), %rdi
	callq	_X509_free
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_tlsa_free
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_29:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_NULL_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_30:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_BAD_MATCHING_TYPE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_31:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_32:
	movq	%rbx, %rdi
	jmp	LBB0_55
LBB0_33:
	leaq	-88(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	movl	%r13d, %edx
	callq	_d2i_PUBKEY
	testl	%eax, %eax
	je	LBB0_39
## %bb.34:
	movq	-72(%rbp), %rax
	subq	%r15, %rax
	jb	LBB0_39
## %bb.35:
	cmpq	%r13, %rax
	jne	LBB0_39
## %bb.36:
	movq	_DANETLS_USAGE_DANE_TA@GOTPCREL(%rip), %rax
	movq	-88(%rbp), %rdi
	cmpq	%r14, (%rax)
	jne	LBB0_40
## %bb.37:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rdi, 32(%rax)
	jmp	LBB0_42
LBB0_38:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_tlsa_free
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_BAD_CERTIFICATE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_39:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_tlsa_free
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_DANE_TLSA_BAD_PUBLIC_KEY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_40:
	callq	_EVP_PKEY_free
	jmp	LBB0_42
LBB0_41:
	movq	-56(%rbp), %rdi
	callq	_X509_free
LBB0_42:
	movq	8(%r12), %rdi
	callq	_sk_danetls_record_num
	testl	%eax, %eax
	jle	LBB0_50
## %bb.43:
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_45
LBB0_44:                                ##   in Loop: Header=BB0_45 Depth=1
	incl	%ebx
	cmpl	%ebx, %r15d
	je	LBB0_51
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	movl	%ebx, %esi
	callq	_sk_danetls_record_value
	cmpq	%r14, (%rax)
	jg	LBB0_44
## %bb.46:                              ##   in Loop: Header=BB0_45 Depth=1
	jl	LBB0_52
## %bb.47:                              ##   in Loop: Header=BB0_45 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, 8(%rax)
	jg	LBB0_44
## %bb.48:                              ##   in Loop: Header=BB0_45 Depth=1
	jl	LBB0_52
## %bb.49:                              ##   in Loop: Header=BB0_45 Depth=1
	movq	16(%r12), %rcx
	movq	(%rcx), %rcx
	movq	16(%rax), %rax
	movq	(%rcx,%rax,8), %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	cmpq	(%rcx,%rdx,8), %rax
	jg	LBB0_44
	jmp	LBB0_52
LBB0_50:
	xorl	%ebx, %ebx
	jmp	LBB0_52
LBB0_51:
	movl	%r15d, %ebx
LBB0_52:
	movq	8(%r12), %rdi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_sk_danetls_record_insert
	testl	%eax, %eax
	je	LBB0_54
## %bb.53:
	movq	%r14, %rdi
	callq	_DANETLS_USAGE_BIT
	orl	%eax, (%r12)
	movl	$1, %eax
	jmp	LBB0_10
LBB0_54:
	movq	%r15, %rdi
LBB0_55:
	callq	_tlsa_free
LBB0_56:
	movq	_SSL_F_DANE_TLSA_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_F_DANE_TLSA_ADD,4,2        ## @SSL_F_DANE_TLSA_ADD
	.comm	_SSL_R_DANE_NOT_ENABLED,4,2     ## @SSL_R_DANE_NOT_ENABLED
	.comm	_SSL_R_DANE_TLSA_BAD_DATA_LENGTH,4,2 ## @SSL_R_DANE_TLSA_BAD_DATA_LENGTH
	.comm	_DANETLS_USAGE_LAST,8,3         ## @DANETLS_USAGE_LAST
	.comm	_SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE,4,2 ## @SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE
	.comm	_DANETLS_SELECTOR_LAST,8,3      ## @DANETLS_SELECTOR_LAST
	.comm	_SSL_R_DANE_TLSA_BAD_SELECTOR,4,2 ## @SSL_R_DANE_TLSA_BAD_SELECTOR
	.comm	_DANETLS_MATCHING_FULL,8,3      ## @DANETLS_MATCHING_FULL
	.comm	_SSL_R_DANE_TLSA_BAD_MATCHING_TYPE,4,2 ## @SSL_R_DANE_TLSA_BAD_MATCHING_TYPE
	.comm	_SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH,4,2 ## @SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH
	.comm	_SSL_R_DANE_TLSA_NULL_DATA,4,2  ## @SSL_R_DANE_TLSA_NULL_DATA
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_SSL_R_DANE_TLSA_BAD_CERTIFICATE,4,2 ## @SSL_R_DANE_TLSA_BAD_CERTIFICATE
	.comm	_DANETLS_TA_MASK,4,2            ## @DANETLS_TA_MASK
	.comm	_SSL_R_DANE_TLSA_BAD_PUBLIC_KEY,4,2 ## @SSL_R_DANE_TLSA_BAD_PUBLIC_KEY
	.comm	_DANETLS_USAGE_DANE_TA,8,3      ## @DANETLS_USAGE_DANE_TA
	.no_dead_strip	_dane_tlsa_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dane_tlsa_add
_dane_tlsa_add:                         ; @dane_tlsa_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x24, x5
	lsr	x8, x5, #31
	cbnz	x8, LBB0_6
; %bb.2:
	mov	x20, x1
Lloh0:
	adrp	x8, _DANETLS_USAGE_LAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DANETLS_USAGE_LAST@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ge	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
Lloh8:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _SSL_R_DANE_NOT_ENABLED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSL_R_DANE_NOT_ENABLED@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
	bl	_SSLerr
	mov	w0, #-1
	b	LBB0_10
LBB0_6:
Lloh13:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _SSL_R_DANE_TLSA_BAD_DATA_LENGTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_BAD_DATA_LENGTH@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	x22, x2
Lloh18:
	adrp	x8, _DANETLS_SELECTOR_LAST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DANETLS_SELECTOR_LAST@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ge	LBB0_11
; %bb.8:
Lloh21:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x8, _SSL_R_DANE_TLSA_BAD_SELECTOR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_BAD_SELECTOR@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	bl	_SSLerr
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	mov	x25, x4
	mov	x21, x3
	mov	x19, x0
Lloh26:
	adrp	x26, _DANETLS_MATCHING_FULL@GOTPAGE
Lloh27:
	ldr	x26, [x26, _DANETLS_MATCHING_FULL@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x8, x3
	b.eq	LBB0_14
; %bb.12:
	mov	x0, x19
	mov	x1, x21
	bl	_tlsa_md_get
	cbz	x0, LBB0_30
; %bb.13:
	bl	_EVP_MD_size
	cmp	x0, x24
	b.ne	LBB0_31
LBB0_14:
	cbz	x25, LBB0_29
; %bb.15:
	mov	w0, #48
	bl	_OPENSSL_zalloc
	cbz	x0, LBB0_54
; %bb.16:
	mov	x23, x0
	stp	x20, x22, [x0]
	str	x21, [x0, #16]
	mov	x0, x24
	bl	_OPENSSL_malloc
	str	x0, [x23, #40]
	cbz	x0, LBB0_53
; %bb.17:
	mov	x1, x25
	mov	x2, x24
	bl	_memcpy
	str	x24, [x23, #24]
	ldr	x8, [x26]
	cmp	x8, x21
	b.ne	LBB0_41
; %bb.18:
	stp	xzr, x25, [sp, #16]
	str	xzr, [sp, #8]
	cmp	x22, #128
	b.eq	LBB0_32
; %bb.19:
	cmp	x22, #129
	b.ne	LBB0_41
; %bb.20:
	add	x0, sp, #16
	add	x1, sp, #24
	mov	x2, x24
	bl	_d2i_X509
	cbz	w0, LBB0_37
; %bb.21:
	ldr	x8, [sp, #24]
	subs	x8, x8, x25
	b.lo	LBB0_37
; %bb.22:
	cmp	x8, x24
	b.ne	LBB0_37
; %bb.23:
	ldr	x0, [sp, #16]
	bl	_X509_get0_pubkey
	cbz	x0, LBB0_37
; %bb.24:
	mov	x0, x20
	bl	_DANETLS_USAGE_BIT
Lloh28:
	adrp	x8, _DANETLS_TA_MASK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DANETLS_TA_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_40
; %bb.25:
	ldr	x0, [x19, #24]
	cbnz	x0, LBB0_27
; %bb.26:
	bl	_sk_X509_new_null
	str	x0, [x19, #24]
	cbz	x0, LBB0_28
LBB0_27:
	ldr	x1, [sp, #16]
	bl	_sk_X509_push
	cbnz	w0, LBB0_41
LBB0_28:
Lloh31:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_SSLerr
	ldr	x0, [sp, #16]
	bl	_X509_free
	mov	x0, x23
	bl	_tlsa_free
	mov	w0, #-1
	b	LBB0_10
LBB0_29:
Lloh37:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
Lloh40:
	adrp	x8, _SSL_R_DANE_TLSA_NULL_DATA@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_NULL_DATA@GOTPAGEOFF]
	b	LBB0_9
LBB0_30:
Lloh42:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
Lloh45:
	adrp	x8, _SSL_R_DANE_TLSA_BAD_MATCHING_TYPE@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_BAD_MATCHING_TYPE@GOTPAGEOFF]
	b	LBB0_9
LBB0_31:
Lloh47:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
Lloh50:
	adrp	x8, _SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH@GOTPAGE
Lloh51:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH@GOTPAGEOFF]
	b	LBB0_9
LBB0_32:
	add	x0, sp, #8
	add	x1, sp, #24
	mov	x2, x24
	bl	_d2i_PUBKEY
	cbz	w0, LBB0_38
; %bb.33:
	ldr	x8, [sp, #24]
	subs	x8, x8, x25
	b.lo	LBB0_38
; %bb.34:
	cmp	x8, x24
	b.ne	LBB0_38
; %bb.35:
Lloh52:
	adrp	x8, _DANETLS_USAGE_DANE_TA@GOTPAGE
Lloh53:
	ldr	x8, [x8, _DANETLS_USAGE_DANE_TA@GOTPAGEOFF]
Lloh54:
	ldr	x8, [x8]
	ldr	x0, [sp, #8]
	cmp	x8, x20
	b.ne	LBB0_39
; %bb.36:
	str	x0, [x23, #32]
	b	LBB0_41
LBB0_37:
	mov	x0, x23
	bl	_tlsa_free
Lloh55:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh56:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh57:
	ldr	w0, [x8]
Lloh58:
	adrp	x8, _SSL_R_DANE_TLSA_BAD_CERTIFICATE@GOTPAGE
Lloh59:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_BAD_CERTIFICATE@GOTPAGEOFF]
	b	LBB0_9
LBB0_38:
	mov	x0, x23
	bl	_tlsa_free
Lloh60:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh61:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh62:
	ldr	w0, [x8]
Lloh63:
	adrp	x8, _SSL_R_DANE_TLSA_BAD_PUBLIC_KEY@GOTPAGE
Lloh64:
	ldr	x8, [x8, _SSL_R_DANE_TLSA_BAD_PUBLIC_KEY@GOTPAGEOFF]
	b	LBB0_9
LBB0_39:
	bl	_EVP_PKEY_free
	b	LBB0_41
LBB0_40:
	ldr	x0, [sp, #16]
	bl	_X509_free
LBB0_41:
	ldr	x0, [x19, #8]
	bl	_sk_danetls_record_num
	cmp	w0, #1
	b.lt	LBB0_49
; %bb.42:
	mov	x25, x0
	mov	w24, #0
	b	LBB0_44
LBB0_43:                                ;   in Loop: Header=BB0_44 Depth=1
	add	w24, w24, #1
	cmp	w25, w24
	b.eq	LBB0_50
LBB0_44:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	mov	x1, x24
	bl	_sk_danetls_record_value
	ldr	x8, [x0]
	cmp	x8, x20
	b.gt	LBB0_43
; %bb.45:                               ;   in Loop: Header=BB0_44 Depth=1
	b.lt	LBB0_51
; %bb.46:                               ;   in Loop: Header=BB0_44 Depth=1
	ldr	x8, [x0, #8]
	cmp	x8, x22
	b.gt	LBB0_43
; %bb.47:                               ;   in Loop: Header=BB0_44 Depth=1
	b.lt	LBB0_51
; %bb.48:                               ;   in Loop: Header=BB0_44 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x9, [x0, #16]
	ldr	x9, [x8, x9, lsl #3]
	ldr	x8, [x8, x21, lsl #3]
	cmp	x9, x8
	b.gt	LBB0_43
	b	LBB0_51
LBB0_49:
	mov	w24, #0
	b	LBB0_51
LBB0_50:
	mov	x24, x25
LBB0_51:
	ldr	x0, [x19, #8]
	mov	x1, x23
	mov	x2, x24
	bl	_sk_danetls_record_insert
	cbz	w0, LBB0_53
; %bb.52:
	mov	x0, x20
	bl	_DANETLS_USAGE_BIT
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_10
LBB0_53:
	mov	x0, x23
	bl	_tlsa_free
LBB0_54:
Lloh65:
	adrp	x8, _SSL_F_DANE_TLSA_ADD@GOTPAGE
Lloh66:
	ldr	x8, [x8, _SSL_F_DANE_TLSA_ADD@GOTPAGEOFF]
Lloh67:
	ldr	w0, [x8]
Lloh68:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh69:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_F_DANE_TLSA_ADD,4,2        ; @SSL_F_DANE_TLSA_ADD
	.comm	_SSL_R_DANE_NOT_ENABLED,4,2     ; @SSL_R_DANE_NOT_ENABLED
	.comm	_SSL_R_DANE_TLSA_BAD_DATA_LENGTH,4,2 ; @SSL_R_DANE_TLSA_BAD_DATA_LENGTH
	.comm	_DANETLS_USAGE_LAST,8,3         ; @DANETLS_USAGE_LAST
	.comm	_SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE,4,2 ; @SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE
	.comm	_DANETLS_SELECTOR_LAST,8,3      ; @DANETLS_SELECTOR_LAST
	.comm	_SSL_R_DANE_TLSA_BAD_SELECTOR,4,2 ; @SSL_R_DANE_TLSA_BAD_SELECTOR
	.comm	_DANETLS_MATCHING_FULL,8,3      ; @DANETLS_MATCHING_FULL
	.comm	_SSL_R_DANE_TLSA_BAD_MATCHING_TYPE,4,2 ; @SSL_R_DANE_TLSA_BAD_MATCHING_TYPE
	.comm	_SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH,4,2 ; @SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH
	.comm	_SSL_R_DANE_TLSA_NULL_DATA,4,2  ; @SSL_R_DANE_TLSA_NULL_DATA
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_SSL_R_DANE_TLSA_BAD_CERTIFICATE,4,2 ; @SSL_R_DANE_TLSA_BAD_CERTIFICATE
	.comm	_DANETLS_TA_MASK,4,2            ; @DANETLS_TA_MASK
	.comm	_SSL_R_DANE_TLSA_BAD_PUBLIC_KEY,4,2 ; @SSL_R_DANE_TLSA_BAD_PUBLIC_KEY
	.comm	_DANETLS_USAGE_DANE_TA,8,3      ; @DANETLS_USAGE_DANE_TA
	.no_dead_strip	_dane_tlsa_add
.subsections_via_symbols
