	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_add_hostkey                ## -- Begin function ssh_add_hostkey
	.p2align	4, 0x90
_ssh_add_hostkey:                       ## @ssh_add_hostkey
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, -32(%rbp)
	movq	8(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_sshkey_from_private
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movl	$8, %edi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r14, (%rax)
	leaq	4(%rbx), %rdi
	movq	_next@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rax, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	-32(%rbp), %rax
	movq	%rax, (%r15)
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	jmp	LBB0_9
LBB0_6:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%r14, (%rax)
	movq	_next@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movq	%rax, %rsi
LBB0_9:
	callq	_TAILQ_INSERT_TAIL
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_4:
	movq	%r15, %rdi
	callq	_free
	movq	-32(%rbp), %rdi
	callq	_sshkey_free
LBB0_7:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_next,4,2                       ## @next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_add_hostkey                ; -- Begin function ssh_add_hostkey
	.p2align	2
_ssh_add_hostkey:                       ; @ssh_add_hostkey
	.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
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
	add	x1, sp, #8
	mov	x0, x20
	bl	_sshkey_from_private
	cbnz	w0, LBB0_10
; %bb.2:
	mov	w0, #8
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_8
; %bb.3:
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.4:
	mov	x1, x0
	str	x20, [x0]
	add	x0, x19, #4
Lloh0:
	adrp	x20, _next@GOTPAGE
Lloh1:
	ldr	x20, [x20, _next@GOTPAGEOFF]
	ldr	w2, [x20]
	bl	_TAILQ_INSERT_TAIL
	ldr	x8, [sp, #8]
	str	x8, [x21]
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, x21
	b	LBB0_7
LBB0_5:
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.6:
	mov	x1, x0
	str	x20, [x0]
Lloh2:
	adrp	x8, _next@GOTPAGE
Lloh3:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
LBB0_7:
	bl	_TAILQ_INSERT_TAIL
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	x0, x21
	bl	_free
	ldr	x0, [sp, #8]
	bl	_sshkey_free
LBB0_9:
Lloh5:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_next,4,2                       ; @next
.subsections_via_symbols
