	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_read                    ## -- Begin function sshkey_read
	.p2align	4, 0x90
_sshkey_read:                           ## @sshkey_read
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, -52(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movl	$-130, %eax
	addl	(%rdi), %eax
	cmpl	$9, %eax
	jae	LBB0_1
## %bb.3:
	movq	%rsi, %r14
	movq	(%rsi), %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcspn
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_strlen
	cmpq	%rax, %r13
	je	LBB0_4
## %bb.5:
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_peek_type_nid
	cmpl	$130, %eax
	je	LBB0_4
## %bb.6:
	movl	%eax, %r12d
	addq	%r13, %rbx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_40:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	cmpb	$9, %al
	je	LBB0_40
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpb	$32, %al
	je	LBB0_40
## %bb.9:
	testb	%al, %al
	jne	LBB0_10
LBB0_4:
	movq	_SSH_ERR_INVALID_FORMAT@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_1:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_38:
	movl	(%rax), %r13d
LBB0_39:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%r15), %eax
	cmpl	$130, %eax
	je	LBB0_13
## %bb.11:
	cmpl	%r12d, %eax
	je	LBB0_13
## %bb.12:
	movq	_SSH_ERR_KEY_TYPE_MISMATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_13:
	xorl	%eax, %eax
	callq	_sshbuf_new
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%rax, %r13
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcspn
	movq	%rbx, %rdi
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_strndup
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_sshbuf_b64tod
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %r13d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	testl	%r13d, %r13d
	je	LBB0_19
## %bb.18:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshbuf_free
	jmp	LBB0_39
LBB0_14:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_16:
	movq	%r13, %rdi
	callq	_sshbuf_free
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_19:
	leaq	-48(%rbp), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshkey_fromb
	movl	%eax, %r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshbuf_free
	testl	%r13d, %r13d
	jne	LBB0_39
## %bb.20:
	addq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	jmp	LBB0_21
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	incq	%rbx
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	cmpb	$32, %al
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	cmpb	$9, %al
	je	LBB0_23
## %bb.24:
	movq	-48(%rbp), %rdi
	cmpl	%r12d, (%rdi)
	jne	LBB0_25
## %bb.26:
	movl	%r12d, %edi
	callq	_sshkey_type_plain
	cmpl	$136, %eax
	jne	LBB0_29
## %bb.27:
	movl	-52(%rbp), %eax
	movq	-48(%rbp), %rdi
	cmpl	4(%rdi), %eax
	jne	LBB0_28
LBB0_29:
	movl	%r12d, (%r15)
	movq	%r15, %rdi
	callq	_sshkey_is_cert
	testq	%rax, %rax
	je	LBB0_35
## %bb.30:
	movq	-48(%rbp), %rdi
	callq	_sshkey_is_cert
	testq	%rax, %rax
	je	LBB0_31
## %bb.32:
	movq	72(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_34
## %bb.33:
	callq	_cert_free
LBB0_34:
	movq	-48(%rbp), %rax
	movq	72(%rax), %rcx
	movq	%rcx, 72(%r15)
	movq	$0, 72(%rax)
LBB0_35:
	movl	(%r15), %edi
	callq	_sshkey_type_plain
	cmpl	$134, %eax
	jne	LBB0_37
## %bb.36:
	movq	40(%r15), %rdi
	movq	_ED25519_PK_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_freezero
	movq	-48(%rbp), %rdi
	movq	40(%rdi), %rax
	movq	%rax, 40(%r15)
	movq	$0, 40(%rdi)
	callq	_sshkey_free
	movq	%rbx, (%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_39
LBB0_25:
	callq	_sshkey_free
	movq	_SSH_ERR_KEY_TYPE_MISMATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_37:
	movq	-48(%rbp), %rdi
	callq	_sshkey_free
	movq	_SSH_ERR_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_28:
	callq	_sshkey_free
	movq	_SSH_ERR_EC_CURVE_MISMATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_31:
	movq	-48(%rbp), %rdi
	callq	_sshkey_free
	movq	_SSH_ERR_EXPECTED_CERT@GOTPCREL(%rip), %rax
	jmp	LBB0_38
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" \t"

	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ## @SSH_ERR_INVALID_FORMAT
	.comm	_SSH_ERR_KEY_TYPE_MISMATCH,4,2  ## @SSH_ERR_KEY_TYPE_MISMATCH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_EC_CURVE_MISMATCH,4,2  ## @SSH_ERR_EC_CURVE_MISMATCH
	.comm	_SSH_ERR_EXPECTED_CERT,4,2      ## @SSH_ERR_EXPECTED_CERT
	.comm	_ED25519_PK_SZ,4,2              ## @ED25519_PK_SZ
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.comm	_stderr,4,2                     ## @stderr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_read                    ; -- Begin function sshkey_read
	.p2align	2
_sshkey_read:                           ; @sshkey_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	w8, #-1
	str	w8, [sp, #4]
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	sub	w8, w8, #130
	cmp	w8, #9
	b.hs	LBB0_10
; %bb.2:
	mov	x19, x1
	ldr	x22, [x1]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strcspn
	mov	x23, x0
	mov	x0, x22
	bl	_strlen
	cmp	x23, x0
	b.eq	LBB0_9
; %bb.3:
	add	x2, sp, #4
	mov	x0, x22
	mov	x1, x23
	bl	_peek_type_nid
	cmp	w0, #130
	b.eq	LBB0_9
; %bb.4:
	mov	x21, x0
	add	x22, x22, x23
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x22]
	cmp	w8, #9
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #32
	b.eq	LBB0_5
; %bb.8:
	cbnz	w8, LBB0_13
LBB0_9:
Lloh2:
	adrp	x8, _SSH_ERR_INVALID_FORMAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSH_ERR_INVALID_FORMAT@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
LBB0_11:
	ldr	w23, [x8]
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	ldr	w8, [x20]
	cmp	w8, #130
	ccmp	w8, w21, #4, ne
	b.ne	LBB0_35
; %bb.14:
	bl	_sshbuf_new
	cbz	x0, LBB0_19
; %bb.15:
	mov	x24, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strcspn
	mov	x25, x0
	mov	x0, x22
	mov	x1, x25
	bl	_strndup
	cbz	x0, LBB0_18
; %bb.16:
	mov	x26, x0
	mov	x0, x24
	mov	x1, x26
	bl	_sshbuf_b64tod
	mov	x23, x0
	mov	x0, x26
	bl	_free
	cbz	w23, LBB0_20
; %bb.17:
	mov	x0, x24
	bl	_sshbuf_free
	b	LBB0_12
LBB0_18:
	mov	x0, x24
	bl	_sshbuf_free
LBB0_19:
Lloh8:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_11
LBB0_20:
	add	x1, sp, #8
	mov	x0, x24
	bl	_sshkey_fromb
	mov	x23, x0
	mov	x0, x24
	bl	_sshbuf_free
	cbnz	w23, LBB0_12
; %bb.21:
	add	x22, x22, x25
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x22]
	cmp	w8, #32
	ccmp	w8, #9, #4, ne
	b.ne	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x22, x22, #1
	b	LBB0_22
LBB0_24:
	ldr	x0, [sp, #8]
	ldr	w8, [x0]
	cmp	w8, w21
	b.ne	LBB0_34
; %bb.25:
	mov	x0, x21
	bl	_sshkey_type_plain
	cmp	w0, #136
	b.ne	LBB0_27
; %bb.26:
	ldr	w8, [sp, #4]
	ldr	x0, [sp, #8]
	ldr	w9, [x0, #4]
	cmp	w8, w9
	b.ne	LBB0_37
LBB0_27:
	str	w21, [x20]
	mov	x0, x20
	bl	_sshkey_is_cert
	cbz	x0, LBB0_32
; %bb.28:
	ldr	x0, [sp, #8]
	bl	_sshkey_is_cert
	cbz	x0, LBB0_38
; %bb.29:
	ldr	x0, [x20, #72]
	cbz	x0, LBB0_31
; %bb.30:
	bl	_cert_free
LBB0_31:
	ldr	x8, [sp, #8]
	ldr	x9, [x8, #72]
	str	x9, [x20, #72]
	str	xzr, [x8, #72]
LBB0_32:
	ldr	w0, [x20]
	bl	_sshkey_type_plain
	cmp	w0, #134
	b.ne	LBB0_36
; %bb.33:
	ldr	x0, [x20, #40]
Lloh10:
	adrp	x8, _ED25519_PK_SZ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ED25519_PK_SZ@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_freezero
	ldr	x0, [sp, #8]
	ldr	x8, [x0, #40]
	str	x8, [x20, #40]
	str	xzr, [x0, #40]
	bl	_sshkey_free
	mov	w23, #0
	str	x22, [x19]
	b	LBB0_12
LBB0_34:
	bl	_sshkey_free
LBB0_35:
Lloh13:
	adrp	x8, _SSH_ERR_KEY_TYPE_MISMATCH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SSH_ERR_KEY_TYPE_MISMATCH@GOTPAGEOFF]
	b	LBB0_11
LBB0_36:
	ldr	x0, [sp, #8]
	bl	_sshkey_free
Lloh15:
	adrp	x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_11
LBB0_37:
	bl	_sshkey_free
Lloh17:
	adrp	x8, _SSH_ERR_EC_CURVE_MISMATCH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SSH_ERR_EC_CURVE_MISMATCH@GOTPAGEOFF]
	b	LBB0_11
LBB0_38:
	ldr	x0, [sp, #8]
	bl	_sshkey_free
Lloh19:
	adrp	x8, _SSH_ERR_EXPECTED_CERT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SSH_ERR_EXPECTED_CERT@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" \t"

	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ; @SSH_ERR_INVALID_FORMAT
	.comm	_SSH_ERR_KEY_TYPE_MISMATCH,4,2  ; @SSH_ERR_KEY_TYPE_MISMATCH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_EC_CURVE_MISMATCH,4,2  ; @SSH_ERR_EC_CURVE_MISMATCH
	.comm	_SSH_ERR_EXPECTED_CERT,4,2      ; @SSH_ERR_EXPECTED_CERT
	.comm	_ED25519_PK_SZ,4,2              ; @ED25519_PK_SZ
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.comm	_stderr,4,2                     ; @stderr
.subsections_via_symbols
