	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_select                  ## -- Begin function crypto_select
	.p2align	4, 0x90
_crypto_select:                         ## @crypto_select
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -40(%rbp)
	movq	_HX509_SELECT_DIGEST@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	8(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	8(%rbx), %rdx
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	cmpq	$0, (%rbx)
	jne	LBB0_10
	jmp	LBB0_9
LBB0_2:
	movl	(%r15), %r14d
	cmpq	$0, (%rbx)
	jne	LBB0_10
	jmp	LBB0_9
LBB0_4:
	movq	_HX509_SELECT_PUBLIC_SIG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_8:
	cmpq	$0, (%rbx)
	je	LBB0_9
LBB0_10:
	movq	_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_peer_strings
	movq	-40(%rbp), %rcx
	jmp	LBB0_11
LBB0_6:
	movq	_HX509_SELECT_SECRET_ENC@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpq	$0, (%rbx)
	jne	LBB0_10
LBB0_9:
	xorl	%ecx, %ecx
LBB0_11:
	movq	_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-32(%rbp), %r8
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_hx509_crypto_select
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_13:
	leaq	-32(%rbp), %rbx
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$46, %esi
	callq	_der_print_heim_oid
	movq	-48(%rbp), %rsi
	leaq	L_.str.5(%rip), %rdi
	callq	_printf
	movq	-48(%rbp), %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free_AlgorithmIdentifier
	movq	-40(%rbp), %rdi
	callq	_hx509_peer_info_free
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HX509_SELECT_DIGEST,4,2        ## @HX509_SELECT_DIGEST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"digest"

L_.str.1:                               ## @.str.1
	.asciz	"public-sig"

	.comm	_HX509_SELECT_PUBLIC_SIG,4,2    ## @HX509_SELECT_PUBLIC_SIG
L_.str.2:                               ## @.str.2
	.asciz	"secret"

	.comm	_HX509_SELECT_SECRET_ENC,4,2    ## @HX509_SELECT_SECRET_ENC
L_.str.3:                               ## @.str.3
	.asciz	"unknown type: %s"

	.comm	_context,4,2                    ## @context
L_.str.4:                               ## @.str.4
	.asciz	"hx509_crypto_available"

L_.str.5:                               ## @.str.5
	.asciz	"%s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_select                  ; -- Begin function crypto_select
	.p2align	2
_crypto_select:                         ; @crypto_select
	.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	x20, x0
	str	xzr, [sp, #24]
Lloh0:
	adrp	x21, _HX509_SELECT_DIGEST@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HX509_SELECT_DIGEST@GOTPAGEOFF]
	ldr	w19, [x21]
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_9
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x20, #8]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x0, [x20, #8]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.4:
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
	b	LBB0_9
LBB0_5:
	ldr	w19, [x21]
	b	LBB0_9
LBB0_6:
Lloh10:
	adrp	x8, _HX509_SELECT_PUBLIC_SIG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HX509_SELECT_PUBLIC_SIG@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _HX509_SELECT_SECRET_ENC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HX509_SELECT_SECRET_ENC@GOTPAGEOFF]
LBB0_8:
	ldr	w19, [x8]
LBB0_9:
	ldr	x8, [x20]
Lloh14:
	adrp	x21, _context@GOTPAGE
Lloh15:
	ldr	x21, [x21, _context@GOTPAGEOFF]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w0, [x21]
	add	x1, sp, #24
	mov	x2, x20
	bl	_peer_strings
	ldr	x3, [sp, #24]
	b	LBB0_12
LBB0_11:
	mov	x3, #0
LBB0_12:
	ldr	w0, [x21]
	add	x4, sp, #16
	mov	x1, x19
	mov	x2, #0
	bl	_hx509_crypto_select
	cbz	w0, LBB0_14
; %bb.13:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_14:
	add	x0, sp, #16
	add	x2, sp, #8
	mov	w1, #46
	bl	_der_print_heim_oid
	ldr	x1, [sp, #8]
Lloh18:
	adrp	x0, l_.str.5@PAGE
Lloh19:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	ldr	x0, [sp, #8]
	bl	_free
	add	x0, sp, #16
	bl	_free_AlgorithmIdentifier
	ldr	x0, [sp, #24]
	bl	_hx509_peer_info_free
	mov	w0, #0
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_HX509_SELECT_DIGEST,4,2        ; @HX509_SELECT_DIGEST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"digest"

l_.str.1:                               ; @.str.1
	.asciz	"public-sig"

	.comm	_HX509_SELECT_PUBLIC_SIG,4,2    ; @HX509_SELECT_PUBLIC_SIG
l_.str.2:                               ; @.str.2
	.asciz	"secret"

	.comm	_HX509_SELECT_SECRET_ENC,4,2    ; @HX509_SELECT_SECRET_ENC
l_.str.3:                               ; @.str.3
	.asciz	"unknown type: %s"

	.comm	_context,4,2                    ; @context
l_.str.4:                               ; @.str.4
	.asciz	"hx509_crypto_available"

l_.str.5:                               ; @.str.5
	.asciz	"%s\n"

.subsections_via_symbols
