	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsa_generate_private_key
_rsa_generate_private_key:              ## @rsa_generate_private_key
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movl	%edi, %r13d
	movq	_SSH_RSA_MINIMUM_MODULUS_SIZE@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jg	LBB0_4
## %bb.3:
	movq	_SSHBUF_MAX_BIGNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	cmpl	%r13d, %eax
	jge	LBB0_5
LBB0_4:
	movq	_SSH_ERR_KEY_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_1:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_5:
	movq	%rsi, %r15
	movq	$0, (%rsi)
	xorl	%eax, %eax
	callq	_RSA_new
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_BN_new
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	_RSA_F4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_BN_set_word
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_RSA_generate_key_ex
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%r14, (%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_7:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_12
LBB0_10:
	movq	_SSH_ERR_LIBCRYPTO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_RSA_free
	movq	%r12, %rdi
	callq	_BN_free
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_RSA_MINIMUM_MODULUS_SIZE,4,2 ## @SSH_RSA_MINIMUM_MODULUS_SIZE
	.comm	_SSHBUF_MAX_BIGNUM,4,2          ## @SSHBUF_MAX_BIGNUM
	.comm	_SSH_ERR_KEY_LENGTH,4,2         ## @SSH_ERR_KEY_LENGTH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_RSA_F4,4,2                     ## @RSA_F4
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ## @SSH_ERR_LIBCRYPTO_ERROR
	.no_dead_strip	_rsa_generate_private_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsa_generate_private_key
_rsa_generate_private_key:              ; @rsa_generate_private_key
	.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
	cbz	x1, LBB0_4
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x8, _SSH_RSA_MINIMUM_MODULUS_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_RSA_MINIMUM_MODULUS_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.gt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _SSHBUF_MAX_BIGNUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSHBUF_MAX_BIGNUM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w22, w8, lsl #3
	b.le	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _SSH_ERR_KEY_LENGTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSH_ERR_KEY_LENGTH@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	b	LBB0_14
LBB0_4:
Lloh9:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	b	LBB0_14
LBB0_5:
	mov	x21, x1
	str	xzr, [x1]
	bl	_RSA_new
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.6:
	bl	_BN_new
	cbz	x0, LBB0_10
; %bb.7:
	mov	x19, x0
Lloh12:
	adrp	x8, _RSA_F4@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RSA_F4@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_BN_set_word
	cbz	w0, LBB0_11
; %bb.8:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	mov	x3, #0
	bl	_RSA_generate_key_ex
	cbz	w0, LBB0_11
; %bb.9:
	mov	w22, #0
	str	x20, [x21]
	mov	x20, #0
	b	LBB0_13
LBB0_10:
	mov	x19, #0
Lloh15:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh17:
	adrp	x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGEOFF]
LBB0_12:
	ldr	w22, [x8]
LBB0_13:
	mov	x0, x20
	bl	_RSA_free
	mov	x0, x19
	bl	_BN_free
LBB0_14:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_RSA_MINIMUM_MODULUS_SIZE,4,2 ; @SSH_RSA_MINIMUM_MODULUS_SIZE
	.comm	_SSHBUF_MAX_BIGNUM,4,2          ; @SSHBUF_MAX_BIGNUM
	.comm	_SSH_ERR_KEY_LENGTH,4,2         ; @SSH_ERR_KEY_LENGTH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_RSA_F4,4,2                     ; @RSA_F4
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ; @SSH_ERR_LIBCRYPTO_ERROR
	.no_dead_strip	_rsa_generate_private_key
.subsections_via_symbols
