	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_key
_gen_key:                               ## @gen_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
	movl	%r8d, %r12d
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r13
	callq	_mbedtls_pk_init
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_MBEDTLS_PK_RSA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mbedtls_pk_info_from_type
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mbedtls_pk_setup
	movl	(%r13), %edi
	callq	_mbedtls_pk_rsa
	movq	__urandom@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	callq	_mbedtls_rsa_gen_key
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_MBEDTLS_PK_ECKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mbedtls_pk_info_from_type
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mbedtls_pk_setup
	movl	(%r13), %edi
	callq	_mbedtls_pk_ec
	movq	__urandom@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r12d, %edi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	callq	_mbedtls_ecp_gen_key
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Generating RSA private key, %i bit long modulus\n"

	.comm	_MBEDTLS_PK_RSA,4,2             ## @MBEDTLS_PK_RSA
	.comm	__urandom,4,2                   ## @_urandom
L_.str.1:                               ## @.str.1
	.asciz	"Generating EC private key\n"

	.comm	_MBEDTLS_PK_ECKEY,4,2           ## @MBEDTLS_PK_ECKEY
L_.str.2:                               ## @.str.2
	.asciz	"error: key generation failed\n"

	.no_dead_strip	_gen_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_key
_gen_key:                               ; @gen_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	bl	_mbedtls_pk_init
Lloh0:
	adrp	x24, _stderr@GOTPAGE
Lloh1:
	ldr	x24, [x24, _stderr@GOTPAGEOFF]
	ldr	w0, [x24]
	cbz	w23, LBB0_3
; %bb.1:
	str	x21, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh4:
	adrp	x8, _MBEDTLS_PK_RSA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MBEDTLS_PK_RSA@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_mbedtls_pk_info_from_type
	mov	x1, x0
	mov	x0, x19
	bl	_mbedtls_pk_setup
	ldr	w0, [x19]
	bl	_mbedtls_pk_rsa
Lloh7:
	adrp	x8, __urandom@GOTPAGE
Lloh8:
	ldr	x8, [x8, __urandom@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, #0
	mov	x3, x21
	mov	x4, x20
	bl	_mbedtls_rsa_gen_key
	cbnz	w0, LBB0_4
LBB0_2:
	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
	add	sp, sp, #80
	ret
LBB0_3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
Lloh12:
	adrp	x8, _MBEDTLS_PK_ECKEY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_PK_ECKEY@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_mbedtls_pk_info_from_type
	mov	x1, x0
	mov	x0, x19
	bl	_mbedtls_pk_setup
	ldr	w0, [x19]
	bl	_mbedtls_pk_ec
	mov	x1, x0
Lloh15:
	adrp	x8, __urandom@GOTPAGE
Lloh16:
	ldr	x8, [x8, __urandom@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x3, #0
	bl	_mbedtls_ecp_gen_key
	cbz	w0, LBB0_2
LBB0_4:
	ldr	w0, [x24]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Generating RSA private key, %i bit long modulus\n"

	.comm	_MBEDTLS_PK_RSA,4,2             ; @MBEDTLS_PK_RSA
	.comm	__urandom,4,2                   ; @_urandom
l_.str.1:                               ; @.str.1
	.asciz	"Generating EC private key\n"

	.comm	_MBEDTLS_PK_ECKEY,4,2           ; @MBEDTLS_PK_ECKEY
l_.str.2:                               ; @.str.2
	.asciz	"error: key generation failed\n"

	.no_dead_strip	_gen_key
.subsections_via_symbols
