	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_mpi_write_file         ## -- Begin function mbedtls_mpi_write_file
	.p2align	4, 0x90
_mbedtls_mpi_write_file:                ## @mbedtls_mpi_write_file
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MBEDTLS_MPI_RW_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	leal	-2(%rbx), %ecx
	leaq	-72(%rbp), %r8
	movq	%r13, %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_mbedtls_mpi_write_string
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	testq	%r15, %r15
	leaq	L_.str(%rip), %rbx
	cmovneq	%r15, %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_strlen
	movw	$2573, (%r14,%rax)              ## imm = 0xA0D
	testq	%r13, %r13
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	_fwrite
	cmpq	%r12, %rax
	jne	LBB0_3
## %bb.2:
	addq	$2, %r15
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movq	%r13, %rcx
	callq	_fwrite
	movq	%rax, %rcx
                                        ## implicit-def: $eax
	cmpq	%r15, %rcx
	je	LBB0_5
LBB0_3:
	movq	_MBEDTLS_ERR_MPI_FILE_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_mbedtls_printf
                                        ## implicit-def: $eax
LBB0_5:
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	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_MPI_RW_BUFFER_SIZE,4,2 ## @MBEDTLS_MPI_RW_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_MBEDTLS_ERR_MPI_FILE_IO_ERROR,4,2 ## @MBEDTLS_ERR_MPI_FILE_IO_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"%s%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_mpi_write_file         ; -- Begin function mbedtls_mpi_write_file
	.p2align	2
_mbedtls_mpi_write_file:                ; @mbedtls_mpi_write_file
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	x25, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _MBEDTLS_MPI_RW_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_MPI_RW_BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	mov	x9, x24
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x24, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	mov	x0, x20
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	sub	w3, w24, #2
	sub	x4, x29, #80
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_mbedtls_mpi_write_string
	bl	_MBEDTLS_MPI_CHK
Lloh8:
	adrp	x8, l_.str@PAGE
Lloh9:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x23, #0
	csel	x21, x8, x23, eq
	mov	x0, x21
	bl	_strlen
	mov	x22, x0
	mov	x0, x20
	bl	_strlen
	mov	w8, #2573
	strh	w8, [x20, x0]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x23, x0
	mov	x0, x21
	mov	w1, #1
	mov	x2, x22
	mov	x3, x19
	bl	_fwrite
	cmp	x0, x22
	b.ne	LBB0_3
; %bb.2:
	add	x21, x23, #2
	mov	x0, x20
	mov	w1, #1
	mov	x2, x21
	mov	x3, x19
	bl	_fwrite
	mov	x8, x0
                                        ; implicit-def: $w0
	cmp	x8, x21
	b.eq	LBB0_5
LBB0_3:
Lloh10:
	adrp	x8, _MBEDTLS_ERR_MPI_FILE_IO_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MBEDTLS_ERR_MPI_FILE_IO_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	bl	_mbedtls_printf
                                        ; implicit-def: $w0
LBB0_5:
	mov	sp, x25
	ldur	x8, [x29, #-72]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_MPI_RW_BUFFER_SIZE,4,2 ; @MBEDTLS_MPI_RW_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_MBEDTLS_ERR_MPI_FILE_IO_ERROR,4,2 ; @MBEDTLS_ERR_MPI_FILE_IO_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"%s%s"

.subsections_via_symbols
