	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pk_write_ec_pubkey
_pk_write_ec_pubkey:                    ## @pk_write_ec_pubkey
	.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	%rdx, %r13
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	%rsp, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	_MBEDTLS_ECP_MAX_PT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	leaq	4(%r13), %rdi
	movq	_MBEDTLS_ECP_PF_UNCOMPRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	movq	%r13, %rsi
	movq	%r12, %r8
	movl	%ebx, %r9d
	callq	_mbedtls_ecp_point_write_binary
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	(%r15), %rdi
	movq	%rdi, %rax
	subq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	jb	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_4
LBB0_3:
	movq	_MBEDTLS_ERR_ASN1_BUF_TOO_SMALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_4:
	subq	%rdx, %rdi
	movq	%rdi, (%r15)
	movq	%r12, %rsi
	callq	_memcpy
	movl	-56(%rbp), %eax
LBB0_5:
	movq	%r14, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ECP_MAX_PT_LEN,4,2     ## @MBEDTLS_ECP_MAX_PT_LEN
	.comm	_MBEDTLS_ECP_PF_UNCOMPRESSED,4,2 ## @MBEDTLS_ECP_PF_UNCOMPRESSED
	.comm	_MBEDTLS_ERR_ASN1_BUF_TOO_SMALL,4,2 ## @MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
	.no_dead_strip	_pk_write_ec_pubkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pk_write_ec_pubkey
_pk_write_ec_pubkey:                    ; @pk_write_ec_pubkey
	.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
	sub	sp, sp, #16
	mov	x8, x2
	mov	x20, x1
	mov	x19, x0
	mov	x22, sp
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-40]
	stur	xzr, [x29, #-48]
Lloh3:
	adrp	x9, _MBEDTLS_ECP_MAX_PT_LEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MBEDTLS_ECP_MAX_PT_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x9]
	mov	x9, x5
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x5, #15
	and	x10, x10, #0x1fffffff0
	sub	x21, x9, x10
	mov	sp, x21
	add	x0, x2, #4
Lloh8:
	adrp	x9, _MBEDTLS_ECP_PF_UNCOMPRESSED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MBEDTLS_ECP_PF_UNCOMPRESSED@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x9]
	sub	x3, x29, #48
	mov	x1, x8
	mov	x4, x21
                                        ; kill: def $w5 killed $w5 killed $x5
	bl	_mbedtls_ecp_point_write_binary
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19]
	subs	x9, x8, x20
	b.lo	LBB0_3
; %bb.2:
	ldur	x2, [x29, #-48]
	cmp	x9, x2
	b.hs	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _MBEDTLS_ERR_ASN1_BUF_TOO_SMALL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MBEDTLS_ERR_ASN1_BUF_TOO_SMALL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	sub	x0, x8, x2
	str	x0, [x19]
	mov	x1, x21
	bl	_memcpy
	ldur	w0, [x29, #-48]
LBB0_5:
	mov	sp, x22
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #32
	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_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ECP_MAX_PT_LEN,4,2     ; @MBEDTLS_ECP_MAX_PT_LEN
	.comm	_MBEDTLS_ECP_PF_UNCOMPRESSED,4,2 ; @MBEDTLS_ECP_PF_UNCOMPRESSED
	.comm	_MBEDTLS_ERR_ASN1_BUF_TOO_SMALL,4,2 ; @MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
	.no_dead_strip	_pk_write_ec_pubkey
.subsections_via_symbols
