	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_mpi_write_binary       ## -- Begin function mbedtls_mpi_write_binary
	.p2align	4, 0x90
_mbedtls_mpi_write_binary:              ## @mbedtls_mpi_write_binary
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_mbedtls_mpi_size
	cmpq	%r15, %rax
	jbe	LBB0_2
## %bb.1:
	movq	_MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_9
LBB0_2:
	movq	%rax, %r12
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_memset
	testq	%r12, %r12
	je	LBB0_9
## %bb.3:
	leaq	(%r15,%rbx), %rdi
	decq	%rdi
	xorl	%esi, %esi
	movq	_ciL@GOTPCREL(%rip), %r8
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rsi, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rcx
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx,%rax,8), %rax
	shll	$3, %ecx
                                        ## kill: def $cl killed $cl killed $rcx
	shrq	%cl, %rax
	movb	%al, (%rdi)
	incq	%rsi
	decq	%rdi
	cmpq	%rsi, %r12
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rbx
	movq	(%r8), %rcx
	movq	%rsi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_7
LBB0_8:
	xorl	%r13d, %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL,4,2 ## @MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL
	.comm	_ciL,8,3                        ## @ciL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_mpi_write_binary       ; -- Begin function mbedtls_mpi_write_binary
	.p2align	2
_mbedtls_mpi_write_binary:              ; @mbedtls_mpi_write_binary
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_mbedtls_mpi_size
	cmp	x0, x21
	b.ls	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_2:
	mov	x20, x0
	mov	x0, x22
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	cbz	x20, LBB0_5
; %bb.3:
	mov	x8, #0
	add	x9, x21, x22
	sub	x9, x9, #1
Lloh3:
	adrp	x10, _ciL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ciL@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x19]
	ldr	x12, [x10]
	udiv	x13, x8, x12
	ldr	x11, [x11, x13, lsl #3]
	msub	x12, x13, x12, x8
	lsl	x12, x12, #3
	lsr	x11, x11, x12
	strb	w11, [x9], #-1
	add	x8, x8, #1
	cmp	x20, x8
	b.ne	LBB0_4
LBB0_5:
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL,4,2 ; @MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL
	.comm	_ciL,8,3                        ; @ciL
.subsections_via_symbols
