	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choose_hostkeyalg
_choose_hostkeyalg:                     ## @choose_hostkeyalg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	xorl	%edx, %edx
	callq	_match_list
	movq	%rax, (%rbx)
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rsi
	cmovneq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_debug
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	callq	_sshkey_type_from_name
	movq	%rax, 8(%rbx)
	movq	_KEY_UNSPEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_SSH_ERR_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_1:
	movq	_SSH_ERR_NO_HOSTKEY_ALG_MATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_4:
	movq	(%rbx), %rdi
	callq	_sshkey_ecdsa_nid_from_name
	movl	%eax, 16(%rbx)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kex: host key algorithm: %s"

L_.str.1:                               ## @.str.1
	.asciz	"(no match)"

	.comm	_SSH_ERR_NO_HOSTKEY_ALG_MATCH,4,2 ## @SSH_ERR_NO_HOSTKEY_ALG_MATCH
	.comm	_KEY_UNSPEC,8,3                 ## @KEY_UNSPEC
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.no_dead_strip	_choose_hostkeyalg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_hostkeyalg
_choose_hostkeyalg:                     ; @choose_hostkeyalg
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x0, x1
	mov	x1, x2
	mov	x2, #0
	bl	_match_list
	str	x0, [x19]
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x1, x8, x0, eq
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
	ldr	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_sshkey_type_from_name
	str	x0, [x19, #8]
Lloh4:
	adrp	x8, _KEY_UNSPEC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KEY_UNSPEC@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
Lloh7:
	adrp	x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x8, _SSH_ERR_NO_HOSTKEY_ALG_MATCH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SSH_ERR_NO_HOSTKEY_ALG_MATCH@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	ldr	x0, [x19]
	bl	_sshkey_ecdsa_nid_from_name
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #16]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kex: host key algorithm: %s"

l_.str.1:                               ; @.str.1
	.asciz	"(no match)"

	.comm	_SSH_ERR_NO_HOSTKEY_ALG_MATCH,4,2 ; @SSH_ERR_NO_HOSTKEY_ALG_MATCH
	.comm	_KEY_UNSPEC,8,3                 ; @KEY_UNSPEC
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.no_dead_strip	_choose_hostkeyalg
.subsections_via_symbols
