	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_x509write_csr_der      ## -- Begin function mbedtls_x509write_csr_der
	.p2align	4, 0x90
_mbedtls_x509write_csr_der:             ## @mbedtls_x509write_csr_der
	.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	$2216, %rsp                     ## imm = 0x8A8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -2216(%rbp)                ## 8-byte Spill
	movq	%rcx, -2224(%rbp)               ## 8-byte Spill
	movq	%rdx, -2200(%rbp)               ## 8-byte Spill
	movq	%rsi, -2208(%rbp)               ## 8-byte Spill
	movq	%rdi, %r14
	movq	%rsp, -2232(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -2192(%rbp)
	movq	_MBEDTLS_MPI_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -2176(%rbp)               ## 8-byte Spill
	leaq	-112(%rbp), %rax
	movq	%rax, -2168(%rbp)
	movl	12(%r14), %edx
	leaq	-2168(%rbp), %r15
	leaq	-2160(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_x509_write_extensions
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_mbedtls_asn1_write_len
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movq	_MBEDTLS_ASN1_CONSTRUCTED@GOTPCREL(%rip), %rbx
	movq	_MBEDTLS_ASN1_CONTEXT_SPECIFIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rbx), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_asn1_write_tag
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movl	4(%r14), %edi
	movl	-2168(%rbp), %edx
	subl	%r12d, %edx
	movq	%r12, %rsi
	callq	_mbedtls_pk_write_pubkey_der
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movl	8(%r14), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_x509_write_names
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_mbedtls_asn1_write_int
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_mbedtls_asn1_write_len
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movq	_MBEDTLS_ASN1_SEQUENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rbx), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_asn1_write_tag
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movl	(%r14), %edi
	callq	_mbedtls_md_info_from_type
	movq	-2168(%rbp), %rsi
	leaq	-112(%rbp), %rbx
	movl	%eax, %edi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_mbedtls_md
	movl	4(%r14), %edi
	callq	_mbedtls_pk_get_type
	movq	%rax, %r12
	movq	_MBEDTLS_PK_ECKEY@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_MBEDTLS_PK_ECDSA@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	(%r14), %esi
	movl	4(%r14), %edi
	leaq	-2240(%rbp), %r9
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	movq	-2176(%rbp), %r8                ## 8-byte Reload
	pushq	-2216(%rbp)                     ## 8-byte Folded Reload
	pushq	-2224(%rbp)                     ## 8-byte Folded Reload
	callq	_mbedtls_pk_sign
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	cmpq	%r13, %r12
	cmovneq	%r12, %r15
	movl	(%r14), %esi
	leaq	-2248(%rbp), %rdx
	leaq	-2192(%rbp), %rcx
	movq	%r15, %rdi
	callq	_mbedtls_oid_get_oid_by_sig_alg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	-2208(%rbp), %r15               ## 8-byte Reload
	movq	-2200(%rbp), %rax               ## 8-byte Reload
	addq	%r15, %rax
	movq	%rax, -2184(%rbp)
	movq	-2248(%rbp), %rdx
	movq	-2192(%rbp), %rcx
	movq	-2240(%rbp), %r9
	leaq	-2184(%rbp), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	-2176(%rbp), %r8                ## 8-byte Reload
	callq	_mbedtls_x509_write_sig
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movq	-2184(%rbp), %rdi
	movq	-2168(%rbp), %rsi
	xorl	%edx, %edx
	callq	_memcpy
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_mbedtls_asn1_write_len
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
	movq	_MBEDTLS_ASN1_SEQUENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MBEDTLS_ASN1_CONSTRUCTED@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mbedtls_asn1_write_tag
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_MBEDTLS_ASN1_CHK_ADD
LBB0_3:
	movq	-2232(%rbp), %rsp               ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_MPI_MAX_SIZE,4,2       ## @MBEDTLS_MPI_MAX_SIZE
	.comm	_MBEDTLS_ASN1_CONSTRUCTED,4,2   ## @MBEDTLS_ASN1_CONSTRUCTED
	.comm	_MBEDTLS_ASN1_SEQUENCE,4,2      ## @MBEDTLS_ASN1_SEQUENCE
	.comm	_MBEDTLS_ASN1_SET,4,2           ## @MBEDTLS_ASN1_SET
	.comm	_MBEDTLS_OID_PKCS9_CSR_EXT_REQ,4,2 ## @MBEDTLS_OID_PKCS9_CSR_EXT_REQ
	.comm	_MBEDTLS_ASN1_CONTEXT_SPECIFIC,4,2 ## @MBEDTLS_ASN1_CONTEXT_SPECIFIC
	.comm	_MBEDTLS_PK_ECKEY,8,3           ## @MBEDTLS_PK_ECKEY
	.comm	_MBEDTLS_PK_ECDSA,8,3           ## @MBEDTLS_PK_ECDSA
	.comm	_MBEDTLS_ERR_ASN1_BUF_TOO_SMALL,4,2 ## @MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_x509write_csr_der      ; -- Begin function mbedtls_x509write_csr_der
	.p2align	2
_mbedtls_x509write_csr_der:             ; @mbedtls_x509write_csr_der
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #2192
	mov	x19, sp
	mov	x24, x4
	mov	x25, x3
	stp	x2, x1, [x19]                   ; 16-byte Folded Spill
	mov	x23, x0
	mov	x8, sp
	str	x8, [x19, #16]                  ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	str	xzr, [x19, #48]
Lloh3:
	adrp	x8, _MBEDTLS_MPI_MAX_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_MPI_MAX_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	add	x20, x19, #64
	add	x8, x20, #2048
	str	x8, [x19, #40]
	ldr	w2, [x0, #12]
	add	x0, x19, #40
	add	x1, x19, #64
	bl	_mbedtls_x509_write_extensions
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	add	x0, x19, #40
	add	x1, x19, #64
	mov	x2, #0
	bl	_mbedtls_asn1_write_len
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
Lloh8:
	adrp	x28, _MBEDTLS_ASN1_CONSTRUCTED@GOTPAGE
Lloh9:
	ldr	x28, [x28, _MBEDTLS_ASN1_CONSTRUCTED@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh10:
	adrp	x9, _MBEDTLS_ASN1_CONTEXT_SPECIFIC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MBEDTLS_ASN1_CONTEXT_SPECIFIC@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x0, x19, #40
	add	x1, x19, #64
	bl	_mbedtls_asn1_write_tag
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	ldr	w0, [x23, #4]
	ldr	w8, [x19, #40]
	sub	w2, w8, w20
	add	x1, x19, #64
	bl	_mbedtls_pk_write_pubkey_der
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	ldr	w2, [x23, #8]
	add	x0, x19, #40
	add	x1, x19, #64
	bl	_mbedtls_x509_write_names
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	add	x0, x19, #40
	add	x1, x19, #64
	mov	w2, #0
	bl	_mbedtls_asn1_write_int
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	add	x0, x19, #40
	add	x1, x19, #64
	mov	x2, #0
	bl	_mbedtls_asn1_write_len
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	ldr	w8, [x28]
Lloh13:
	adrp	x21, _MBEDTLS_ASN1_SEQUENCE@GOTPAGE
Lloh14:
	ldr	x21, [x21, _MBEDTLS_ASN1_SEQUENCE@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w2, w9, w8
	add	x0, x19, #40
	add	x1, x19, #64
	bl	_mbedtls_asn1_write_tag
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	ldr	w0, [x23]
	bl	_mbedtls_md_info_from_type
	ldr	x1, [x19, #40]
	sub	x3, x29, #160
	mov	x2, #0
	bl	_mbedtls_md
	ldr	w0, [x23, #4]
	bl	_mbedtls_pk_get_type
	mov	x26, x0
Lloh15:
	adrp	x8, _MBEDTLS_PK_ECKEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MBEDTLS_PK_ECKEY@GOTPAGEOFF]
Lloh17:
	ldr	x20, [x8]
Lloh18:
	adrp	x8, _MBEDTLS_PK_ECDSA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MBEDTLS_PK_ECDSA@GOTPAGEOFF]
Lloh20:
	ldr	x27, [x8]
	ldp	w1, w0, [x23]
	sub	x2, x29, #160
	add	x5, x19, #24
	mov	w3, #0
	mov	x4, x22
	mov	x6, x25
	mov	x7, x24
	bl	_mbedtls_pk_sign
	cbnz	w0, LBB0_3
; %bb.1:
	cmp	x26, x20
	csel	x0, x27, x26, eq
	ldr	w1, [x23]
	add	x2, x19, #56
	add	x3, x19, #48
	bl	_mbedtls_oid_get_oid_by_sig_alg
	cbnz	w0, LBB0_3
; %bb.2:
	ldp	x8, x20, [x19]                  ; 16-byte Folded Reload
	add	x8, x20, x8
	str	x8, [x19, #32]
	ldp	x3, x2, [x19, #48]
	ldr	x5, [x19, #24]
	add	x0, x19, #32
	mov	x1, x20
	mov	x4, x22
	bl	_mbedtls_x509_write_sig
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	ldp	x0, x1, [x19, #32]
	mov	x2, #0
	bl	_memcpy
	add	x0, x19, #32
	mov	x1, x20
	mov	x2, #0
	bl	_mbedtls_asn1_write_len
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	ldr	w8, [x28]
	ldr	w9, [x21]
	orr	w2, w9, w8
	add	x0, x19, #32
	mov	x1, x20
	bl	_mbedtls_asn1_write_tag
	mov	x1, x0
	mov	x0, #0
	bl	_MBEDTLS_ASN1_CHK_ADD
	mov	w0, #0
LBB0_3:
	ldr	x8, [x19, #16]                  ; 8-byte Folded Reload
	mov	sp, x8
	ldur	x8, [x29, #-96]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_MPI_MAX_SIZE,4,2       ; @MBEDTLS_MPI_MAX_SIZE
	.comm	_MBEDTLS_ASN1_CONSTRUCTED,4,2   ; @MBEDTLS_ASN1_CONSTRUCTED
	.comm	_MBEDTLS_ASN1_SEQUENCE,4,2      ; @MBEDTLS_ASN1_SEQUENCE
	.comm	_MBEDTLS_ASN1_SET,4,2           ; @MBEDTLS_ASN1_SET
	.comm	_MBEDTLS_OID_PKCS9_CSR_EXT_REQ,4,2 ; @MBEDTLS_OID_PKCS9_CSR_EXT_REQ
	.comm	_MBEDTLS_ASN1_CONTEXT_SPECIFIC,4,2 ; @MBEDTLS_ASN1_CONTEXT_SPECIFIC
	.comm	_MBEDTLS_PK_ECKEY,8,3           ; @MBEDTLS_PK_ECKEY
	.comm	_MBEDTLS_PK_ECDSA,8,3           ; @MBEDTLS_PK_ECDSA
	.comm	_MBEDTLS_ERR_ASN1_BUF_TOO_SMALL,4,2 ; @MBEDTLS_ERR_ASN1_BUF_TOO_SMALL
.subsections_via_symbols
