	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl3_check_cert_and_algorithm  ## -- Begin function ssl3_check_cert_and_algorithm
	.p2align	4, 0x90
_ssl3_check_cert_and_algorithm:         ## @ssl3_check_cert_and_algorithm
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	8(%rax), %rbx
	movq	_SSL_aCERT@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	testq	%rbx, (%rcx)
	je	LBB0_13
## %bb.1:
	movq	%rdi, %r13
	movq	(%rax), %r12
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	callq	_X509_get0_pubkey
	leaq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_ssl_cert_lookup_by_pkey
	movq	_SSL_R_MISSING_SIGNING_CERT@GOTPCREL(%rip), %rcx
	movq	_SSL_AD_HANDSHAKE_FAILURE@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	(%rax), %rax
	testq	%rbx, %rax
	je	LBB0_12
## %bb.3:
	movq	_SSL_aECDSA@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	testq	%rcx, %rax
	je	LBB0_6
## %bb.4:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_ssl_check_srvr_ecc_cert_and_alg
	testq	%rax, %rax
	jne	LBB0_13
## %bb.5:
	movq	_SSL_R_BAD_ECC_CERT@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_6:
	movq	_SSL_kRSA@GOTPCREL(%rip), %rax
	movq	_SSL_kRSAPSK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	(%rax), %rcx
	testq	%r12, %rcx
	je	LBB0_9
## %bb.7:
	movq	-48(%rbp), %rax
	movq	_SSL_PKEY_RSA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_9:
	movq	_SSL_kDHE@GOTPCREL(%rip), %rax
	testq	%r12, (%rax)
	je	LBB0_13
## %bb.10:
	cmpq	$0, (%r13)
	jne	LBB0_13
## %bb.11:
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %r15
	jmp	LBB0_12
LBB0_8:
	movq	_SSL_R_MISSING_RSA_ENCRYPTING_CERT@GOTPCREL(%rip), %rcx
LBB0_12:
	movl	(%r15), %esi
	movq	_SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	callq	_SSLfatal
	xorl	%r14d, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_aCERT,8,3                  ## @SSL_aCERT
	.comm	_SSL_AD_HANDSHAKE_FAILURE,4,2   ## @SSL_AD_HANDSHAKE_FAILURE
	.comm	_SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,4,2 ## @SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM
	.comm	_SSL_R_MISSING_SIGNING_CERT,4,2 ## @SSL_R_MISSING_SIGNING_CERT
	.comm	_SSL_aECDSA,4,2                 ## @SSL_aECDSA
	.comm	_SSL_R_BAD_ECC_CERT,4,2         ## @SSL_R_BAD_ECC_CERT
	.comm	_SSL_kRSA,8,3                   ## @SSL_kRSA
	.comm	_SSL_kRSAPSK,8,3                ## @SSL_kRSAPSK
	.comm	_SSL_PKEY_RSA,8,3               ## @SSL_PKEY_RSA
	.comm	_SSL_R_MISSING_RSA_ENCRYPTING_CERT,4,2 ## @SSL_R_MISSING_RSA_ENCRYPTING_CERT
	.comm	_SSL_kDHE,8,3                   ## @SSL_kDHE
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ## @SSL_AD_INTERNAL_ERROR
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl3_check_cert_and_algorithm  ; -- Begin function ssl3_check_cert_and_algorithm
	.p2align	2
_ssl3_check_cert_and_algorithm:         ; @ssl3_check_cert_and_algorithm
	.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
	ldr	x8, [x0, #8]
	ldr	x21, [x8, #8]
Lloh0:
	adrp	x9, _SSL_aCERT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SSL_aCERT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	tst	x9, x21
	b.eq	LBB0_13
; %bb.1:
	mov	x19, x0
	ldr	x20, [x8]
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
	bl	_X509_get0_pubkey
	add	x1, sp, #8
	bl	_ssl_cert_lookup_by_pkey
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x0]
	tst	x8, x21
	b.eq	LBB0_6
; %bb.3:
Lloh3:
	adrp	x9, _SSL_aECDSA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SSL_aECDSA@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	tst	x8, x9
	b.eq	LBB0_9
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_ssl_check_srvr_ecc_cert_and_alg
	cbnz	x0, LBB0_13
; %bb.5:
Lloh6:
	adrp	x8, _SSL_R_BAD_ECC_CERT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSL_R_BAD_ECC_CERT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _SSL_R_MISSING_SIGNING_CERT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSL_R_MISSING_SIGNING_CERT@GOTPAGEOFF]
LBB0_7:
Lloh10:
	adrp	x9, _SSL_AD_HANDSHAKE_FAILURE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SSL_AD_HANDSHAKE_FAILURE@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x9]
Lloh12:
	adrp	x9, _SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x9]
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
	mov	w0, #0
	b	LBB0_14
LBB0_9:
Lloh15:
	adrp	x8, _SSL_kRSA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SSL_kRSA@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _SSL_kRSAPSK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SSL_kRSAPSK@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	orr	x8, x9, x8
	tst	x8, x20
	b.eq	LBB0_11
; %bb.10:
	ldr	x8, [sp, #8]
Lloh21:
	adrp	x9, _SSL_PKEY_RSA@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SSL_PKEY_RSA@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
LBB0_11:
Lloh24:
	adrp	x8, _SSL_kDHE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SSL_kDHE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	tst	x8, x20
	b.eq	LBB0_13
; %bb.12:
	ldr	x8, [x19]
	cbz	x8, LBB0_16
LBB0_13:
	mov	w0, #1
LBB0_14:
	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_15:
Lloh27:
	adrp	x8, _SSL_R_MISSING_RSA_ENCRYPTING_CERT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SSL_R_MISSING_RSA_ENCRYPTING_CERT@GOTPAGEOFF]
	b	LBB0_7
LBB0_16:
Lloh29:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
Lloh31:
	adrp	x9, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh32:
	ldr	x9, [x9, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_aCERT,8,3                  ; @SSL_aCERT
	.comm	_SSL_AD_HANDSHAKE_FAILURE,4,2   ; @SSL_AD_HANDSHAKE_FAILURE
	.comm	_SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,4,2 ; @SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM
	.comm	_SSL_R_MISSING_SIGNING_CERT,4,2 ; @SSL_R_MISSING_SIGNING_CERT
	.comm	_SSL_aECDSA,4,2                 ; @SSL_aECDSA
	.comm	_SSL_R_BAD_ECC_CERT,4,2         ; @SSL_R_BAD_ECC_CERT
	.comm	_SSL_kRSA,8,3                   ; @SSL_kRSA
	.comm	_SSL_kRSAPSK,8,3                ; @SSL_kRSAPSK
	.comm	_SSL_PKEY_RSA,8,3               ; @SSL_PKEY_RSA
	.comm	_SSL_R_MISSING_RSA_ENCRYPTING_CERT,4,2 ; @SSL_R_MISSING_RSA_ENCRYPTING_CERT
	.comm	_SSL_kDHE,8,3                   ; @SSL_kDHE
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ; @SSL_AD_INTERNAL_ERROR
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
.subsections_via_symbols
