	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ecp_tls_write_group    ## -- Begin function mbedtls_ecp_tls_write_group
	.p2align	4, 0x90
_mbedtls_ecp_tls_write_group:           ## @mbedtls_ecp_tls_write_group
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	(%rdi), %edi
	callq	_mbedtls_ecp_curve_info_from_grp_id
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	$3, (%rbx)
	cmpq	$2, %r15
	ja	LBB0_4
## %bb.3:
	movq	_MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_1:
	movq	_MBEDTLS_ERR_ECP_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_4:
	movq	_MBEDTLS_ECP_TLS_NAMED_CURVE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movb	%cl, (%r14)
	movb	1(%rax), %cl
	movb	%cl, 1(%r14)
	movb	(%rax), %al
	movb	%al, 2(%r14)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_ECP_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_ECP_BAD_INPUT_DATA
	.comm	_MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL,4,2 ## @MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL
	.comm	_MBEDTLS_ECP_TLS_NAMED_CURVE,4,2 ## @MBEDTLS_ECP_TLS_NAMED_CURVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ecp_tls_write_group    ; -- Begin function mbedtls_ecp_tls_write_group
	.p2align	2
_mbedtls_ecp_tls_write_group:           ; @mbedtls_ecp_tls_write_group
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	ldr	w0, [x0]
	bl	_mbedtls_ecp_curve_info_from_grp_id
	cbz	x0, LBB0_3
; %bb.1:
	mov	w9, #3
	str	x9, [x21]
	cmp	x20, #2
	b.hi	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _MBEDTLS_ERR_ECP_BAD_INPUT_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ERR_ECP_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	mov	x8, x0
	mov	w0, #0
Lloh6:
	adrp	x9, _MBEDTLS_ECP_TLS_NAMED_CURVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MBEDTLS_ECP_TLS_NAMED_CURVE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	strb	w9, [x19]
	ldr	w9, [x8]
	lsr	w9, w9, #8
	strb	w9, [x19, #1]
	ldr	w8, [x8]
	strb	w8, [x19, #2]
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_ECP_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_ECP_BAD_INPUT_DATA
	.comm	_MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL,4,2 ; @MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL
	.comm	_MBEDTLS_ECP_TLS_NAMED_CURVE,4,2 ; @MBEDTLS_ECP_TLS_NAMED_CURVE
.subsections_via_symbols
