	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_load_private            ## -- Begin function sshkey_load_private
	.p2align	4, 0x90
_sshkey_load_private:                   ## @sshkey_load_private
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r13)
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movq	$0, (%rbx)
LBB0_4:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	%eax, %r12d
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_sshkey_perm_ok
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	_SSH_ERR_KEY_BAD_PERMISSIONS@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_5:
	movq	_SSH_ERR_SYSTEM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_20
LBB0_9:
	xorl	%eax, %eax
	callq	_sshbuf_new
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_sshkey_load_file
	testl	%eax, %eax
	jne	LBB0_12
## %bb.13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movq	%rbx, %rcx
	callq	_sshkey_parse_private_fileblob
	testl	%eax, %eax
	je	LBB0_14
LBB0_12:
	movl	%eax, %r15d
LBB0_18:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movl	%r12d, %edi
	callq	_close
	movq	%rbx, %rdi
	callq	_sshbuf_free
LBB0_20:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_14:
	testq	%r13, %r13
	je	LBB0_17
## %bb.15:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	movq	%r14, %rsi
	callq	_sshkey_set_filename
	testl	%eax, %eax
	jne	LBB0_12
LBB0_17:
	xorl	%r15d, %r15d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_SSH_ERR_SYSTEM_ERROR,4,2       ## @SSH_ERR_SYSTEM_ERROR
	.comm	_SSH_ERR_KEY_BAD_PERMISSIONS,4,2 ## @SSH_ERR_KEY_BAD_PERMISSIONS
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_load_private            ; -- Begin function sshkey_load_private
	.p2align	2
_sshkey_load_private:                   ; @sshkey_load_private
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x22, x2
	mov	x24, x1
	mov	x21, x0
	cbz	x2, LBB0_2
; %bb.1:
	str	xzr, [x22]
LBB0_2:
	cbz	x23, LBB0_4
; %bb.3:
	str	xzr, [x23]
LBB0_4:
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_open
	tbnz	w0, #31, LBB0_8
; %bb.5:
	mov	x19, x0
	mov	x1, x21
	bl	_sshkey_perm_ok
	cbz	x0, LBB0_9
; %bb.6:
	mov	x20, #0
Lloh3:
	adrp	x8, _SSH_ERR_KEY_BAD_PERMISSIONS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_ERR_KEY_BAD_PERMISSIONS@GOTPAGEOFF]
LBB0_7:
	ldr	w25, [x8]
	b	LBB0_13
LBB0_8:
Lloh5:
	adrp	x8, _SSH_ERR_SYSTEM_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSH_ERR_SYSTEM_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w25, [x8]
	b	LBB0_14
LBB0_9:
	bl	_sshbuf_new
	mov	x20, x0
	cbz	x0, LBB0_15
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	bl	_sshkey_load_file
	cbnz	w0, LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, x24
	mov	x2, x22
	mov	x3, x23
	bl	_sshkey_parse_private_fileblob
	cbz	w0, LBB0_16
LBB0_12:
	mov	x25, x0
LBB0_13:
	mov	x0, x19
	bl	_close
	mov	x0, x20
	bl	_sshbuf_free
LBB0_14:
	mov	x0, x25
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh8:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_7
LBB0_16:
	cbz	x22, LBB0_19
; %bb.17:
	ldr	x0, [x22]
	cbz	x0, LBB0_19
; %bb.18:
	mov	x1, x21
	bl	_sshkey_set_filename
	cbnz	w0, LBB0_12
LBB0_19:
	mov	w25, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_SSH_ERR_SYSTEM_ERROR,4,2       ; @SSH_ERR_SYSTEM_ERROR
	.comm	_SSH_ERR_KEY_BAD_PERMISSIONS,4,2 ; @SSH_ERR_KEY_BAD_PERMISSIONS
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols
