	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function newkeys_to_blob
_newkeys_to_blob:                       ## @newkeys_to_blob
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	movq	16(%rax), %rcx
	movslq	%edx, %rsi
	movq	(%rcx,%rsi,8), %r12
	testq	%r12, %r12
	je	LBB0_9
## %bb.1:
	movq	%rdi, %r15
	movq	_MODE_OUT@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpl	%edx, (%rcx)
	sete	%sil
	movq	(%rax,%rsi,8), %rdi
	movl	28(%r12), %edx
	movl	32(%r12), %esi
	callq	_cipher_get_keyiv
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	xorl	%eax, %eax
	callq	_sshbuf_new
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	%rax, %r14
	movl	52(%r12), %esi
	movq	%rax, %rdi
	callq	_sshbuf_put_cstring
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movl	48(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_u32
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	44(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_u32
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movl	36(%r12), %edx
	movl	40(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_string
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	28(%r12), %edx
	movl	32(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_string
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_13
LBB0_8:
	movq	%r14, %rdi
	callq	_sshbuf_free
	jmp	LBB0_11
LBB0_9:
	movq	_SSH_ERR_INTERNAL_ERROR@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_13:
	movl	24(%r12), %edi
	callq	_cipher_authlen
	testq	%rax, %rax
	je	LBB0_17
LBB0_14:
	movl	4(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_u32
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.15:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_cstring
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.16:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_sshbuf_put_stringb
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_17:
	movl	20(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_cstring
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.18:
	movl	16(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_u32
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.19:
	movl	8(%r12), %edx
	movl	12(%r12), %esi
	movq	%r14, %rdi
	callq	_sshbuf_put_string
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.comm	_MODE_OUT,4,2                   ## @MODE_OUT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.no_dead_strip	_newkeys_to_blob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function newkeys_to_blob
_newkeys_to_blob:                       ; @newkeys_to_blob
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x1]
	ldr	x9, [x8, #16]
	ldr	x22, [x9, w2, sxtw #3]
	cbz	x22, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, _MODE_OUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MODE_OUT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w2
	cset	w9, eq
	ldr	x0, [x8, w9, uxtw #3]
	ldp	w2, w1, [x22, #28]
	bl	_cipher_get_keyiv
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.2:
	bl	_sshbuf_new
	cbz	x0, LBB0_12
; %bb.3:
	mov	x20, x0
	ldr	w1, [x22, #52]
	bl	_sshbuf_put_cstring
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	w1, [x22, #48]
	mov	x0, x20
	bl	_sshbuf_put_u32
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w1, [x22, #44]
	mov	x0, x20
	bl	_sshbuf_put_u32
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.6:
	ldp	w2, w1, [x22, #36]
	mov	x0, x20
	bl	_sshbuf_put_string
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.7:
	ldp	w2, w1, [x22, #28]
	mov	x0, x20
	bl	_sshbuf_put_string
	mov	x21, x0
	cbz	w0, LBB0_13
LBB0_8:
	mov	x0, x20
	bl	_sshbuf_free
	b	LBB0_11
LBB0_9:
Lloh3:
	adrp	x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGEOFF]
LBB0_10:
	ldr	w21, [x8]
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh5:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_10
LBB0_13:
	ldr	w0, [x22, #24]
	bl	_cipher_authlen
	cbz	x0, LBB0_17
LBB0_14:
	ldr	w1, [x22, #4]
	mov	x0, x20
	bl	_sshbuf_put_u32
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.15:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_sshbuf_put_cstring
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	bl	_sshbuf_put_stringb
	mov	x21, x0
	b	LBB0_8
LBB0_17:
	ldr	w1, [x22, #20]
	mov	x0, x20
	bl	_sshbuf_put_cstring
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.18:
	ldr	w1, [x22, #16]
	mov	x0, x20
	bl	_sshbuf_put_u32
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.19:
	ldp	w2, w1, [x22, #8]
	mov	x0, x20
	bl	_sshbuf_put_string
	mov	x21, x0
	cbnz	w0, LBB0_8
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.comm	_MODE_OUT,4,2                   ; @MODE_OUT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.no_dead_strip	_newkeys_to_blob
.subsections_via_symbols
