	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_pk_write_key_pem       ## -- Begin function mbedtls_pk_write_key_pem
	.p2align	4, 0x90
_mbedtls_pk_write_key_pem:              ## @mbedtls_pk_write_key_pem
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_PRV_DER_MAX_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_mbedtls_pk_write_key_der
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	leaq	-16(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PRV_DER_MAX_BYTES,4,2          ## @PRV_DER_MAX_BYTES
	.comm	_MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE,4,2 ## @MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE
	.comm	_MBEDTLS_PK_ECKEY,8,3           ## @MBEDTLS_PK_ECKEY
	.comm	_MBEDTLS_PK_RSA,8,3             ## @MBEDTLS_PK_RSA
	.comm	_PEM_BEGIN_PRIVATE_KEY_EC,8,3   ## @PEM_BEGIN_PRIVATE_KEY_EC
	.comm	_PEM_BEGIN_PRIVATE_KEY_RSA,8,3  ## @PEM_BEGIN_PRIVATE_KEY_RSA
	.comm	_PEM_END_PRIVATE_KEY_EC,8,3     ## @PEM_END_PRIVATE_KEY_EC
	.comm	_PEM_END_PRIVATE_KEY_RSA,8,3    ## @PEM_END_PRIVATE_KEY_RSA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_pk_write_key_pem       ; -- Begin function mbedtls_pk_write_key_pem
	.p2align	2
_mbedtls_pk_write_key_pem:              ; @mbedtls_pk_write_key_pem
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
Lloh3:
	adrp	x8, _PRV_DER_MAX_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRV_DER_MAX_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x1, x8, x9
	mov	sp, x1
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_mbedtls_pk_write_key_der
Lloh8:
	adrp	x8, _MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w0, w0, w8, lt
	ldur	x8, [x29, #-8]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	sp, x29
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PRV_DER_MAX_BYTES,4,2          ; @PRV_DER_MAX_BYTES
	.comm	_MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE,4,2 ; @MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE
	.comm	_MBEDTLS_PK_ECKEY,8,3           ; @MBEDTLS_PK_ECKEY
	.comm	_MBEDTLS_PK_RSA,8,3             ; @MBEDTLS_PK_RSA
	.comm	_PEM_BEGIN_PRIVATE_KEY_EC,8,3   ; @PEM_BEGIN_PRIVATE_KEY_EC
	.comm	_PEM_BEGIN_PRIVATE_KEY_RSA,8,3  ; @PEM_BEGIN_PRIVATE_KEY_RSA
	.comm	_PEM_END_PRIVATE_KEY_EC,8,3     ; @PEM_END_PRIVATE_KEY_EC
	.comm	_PEM_END_PRIVATE_KEY_RSA,8,3    ; @PEM_END_PRIVATE_KEY_RSA
.subsections_via_symbols
