	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_entropy_func           ## -- Begin function mbedtls_entropy_func
	.p2align	4, 0x90
_mbedtls_entropy_func:                  ## @mbedtls_entropy_func
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MBEDTLS_ENTROPY_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movl	%ebx, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	cmpq	%r14, %rbx
	jae	LBB0_1
LBB0_3:
	movq	_MBEDTLS_ERR_ENTROPY_SOURCE_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_23
LBB0_1:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	testl	%edx, %edx
	jne	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	_ENTROPY_MAX_LOOP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jg	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_entropy_gather_internal
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r13), %r9d
	testl	%r9d, %r9d
	jle	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %r8
	cmpl	$1, %r9d
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edx
	xorl	%esi, %esi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r9d, %edi
	andl	$-2, %edi
	leaq	24(%r8), %rcx
	movl	$1, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-24(%rcx), %rax
	movq	-8(%rcx), %rbx
	cmpq	-16(%rcx), %rax
	cmovll	%r14d, %edx
	cmpq	(%rcx), %rbx
	cmovll	%r14d, %edx
	addq	$2, %rsi
	addq	$32, %rcx
	cmpq	%rsi, %rdi
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %r9b
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	shlq	$4, %rsi
	movq	(%r8,%rsi), %rax
	cmpq	8(%r8,%rsi), %rax
	cmovll	%r14d, %edx
	jmp	LBB0_13
LBB0_14:
	movq	_MBEDTLS_ENTROPY_BLOCK_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_sha256_finish
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mbedtls_sha256_starts
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_sha256_update
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_mbedtls_sha256
	movl	4(%r13), %ecx
	testl	%ecx, %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jle	LBB0_22
## %bb.15:
	movq	16(%r13), %r8
	leaq	-1(%rcx), %rsi
	movl	%ecx, %ebx
	andl	$3, %ebx
	cmpq	$3, %rsi
	jae	LBB0_17
## %bb.16:
	xorl	%esi, %esi
	jmp	LBB0_19
LBB0_5:
	movl	%eax, %r15d
	jmp	LBB0_23
LBB0_17:
	andl	$-4, %ecx
	leaq	48(%r8), %rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, -48(%rax)
	movq	$0, -32(%rax)
	movq	$0, -16(%rax)
	movq	$0, (%rax)
	addq	$4, %rsi
	addq	$64, %rax
	cmpq	%rsi, %rcx
	jne	LBB0_18
LBB0_19:
	testq	%rbx, %rbx
	je	LBB0_22
## %bb.20:
	shlq	$4, %rsi
	addq	%rsi, %r8
	shlq	$4, %rbx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, (%r8,%rcx)
	addq	$16, %rcx
	cmpq	%rcx, %rbx
	jne	LBB0_21
LBB0_22:
	movq	%r12, %rsi
	callq	_memcpy
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ENTROPY_BLOCK_SIZE,4,2 ## @MBEDTLS_ENTROPY_BLOCK_SIZE
	.comm	_MBEDTLS_ERR_ENTROPY_SOURCE_FAILED,4,2 ## @MBEDTLS_ERR_ENTROPY_SOURCE_FAILED
	.comm	_ENTROPY_MAX_LOOP,4,2           ## @ENTROPY_MAX_LOOP
	.comm	_MBEDTLS_ERR_THREADING_MUTEX_ERROR,4,2 ## @MBEDTLS_ERR_THREADING_MUTEX_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_entropy_func           ; -- Begin function mbedtls_entropy_func
	.p2align	2
_mbedtls_entropy_func:                  ; @mbedtls_entropy_func
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	sub	sp, sp, #16
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x24, _MBEDTLS_ENTROPY_BLOCK_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MBEDTLS_ENTROPY_BLOCK_SIZE@GOTPAGEOFF]
	ldrsw	x12, [x24]
	and	x8, x12, #0xffffffff
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	cmp	x12, x2
	b.hs	LBB0_2
LBB0_1:
Lloh7:
	adrp	x8, _MBEDTLS_ERR_ENTROPY_SOURCE_FAILED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MBEDTLS_ERR_ENTROPY_SOURCE_FAILED@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_23
LBB0_2:
	mov	w23, #0
Lloh10:
	adrp	x25, _ENTROPY_MAX_LOOP@GOTPAGE
Lloh11:
	ldr	x25, [x25, _ENTROPY_MAX_LOOP@GOTPAGEOFF]
	movi.2s	v8, #1
	mov	x26, #4294967297
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, #1
	cbnz	w11, LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	ldr	w8, [x25]
	cmp	w23, w8
	b.gt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_entropy_gather_internal
	cbnz	w0, LBB0_23
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x22, #16]
	cmp	w8, #8
	b.hs	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x10, #0
	mov	w11, #1
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	x10, x8, #0xfffffff8
	add	x11, x9, #64
	movi.2s	v0, #1
	mov	x12, x10
	movi.2s	v3, #1
	movi.2s	v2, #1
	movi.2s	v1, #1
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	x13, x11, #64
	ld2.2d	{ v4, v5 }, [x13]
	sub	x13, x11, #32
	ld2.2d	{ v6, v7 }, [x13]
	mov	x13, x11
	ld2.2d	{ v16, v17 }, [x13], #32
	ld2.2d	{ v18, v19 }, [x13]
	cmgt.2d	v4, v5, v4
	xtn.2s	v4, v4
	cmgt.2d	v5, v7, v6
	xtn.2s	v5, v5
	cmgt.2d	v6, v17, v16
	xtn.2s	v6, v6
	cmgt.2d	v7, v19, v18
	xtn.2s	v7, v7
	bic.8b	v0, v0, v4
	bic.8b	v3, v3, v5
	bic.8b	v2, v2, v6
	bic.8b	v1, v1, v7
	add	x11, x11, #128
	subs	x12, x12, #8
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	cmeq.2s	v4, v0, v8
	bit.8b	v0, v3, v4
	cmeq.2s	v3, v0, v8
	bit.8b	v0, v2, v3
	cmeq.2s	v2, v0, v8
	bit.8b	v0, v1, v2
	fmov	x11, d0
	cmp	x11, x26
	cset	w11, eq
	cmp	x10, x8
	b.eq	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, x10, lsl #4
	add	x9, x9, #8
	sub	x8, x8, x10
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x10, x12, [x9, #-8]
	cmp	x10, x12
	csel	w11, wzr, w11, lt
	add	x9, x9, #16
	subs	x8, x8, #1
	b.ne	LBB0_13
	b	LBB0_3
LBB0_14:
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	add	x23, x22, #8
	mov	x0, x23
	mov	x1, x21
	bl	_mbedtls_sha256_finish
	mov	x0, x23
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x23
	mov	w1, #0
	bl	_mbedtls_sha256_starts
	ldr	w2, [x24]
	mov	x0, x23
	mov	x1, x21
	bl	_mbedtls_sha256_update
	ldr	w1, [x24]
	mov	x0, x21
	mov	x2, x21
	mov	w3, #0
	bl	_mbedtls_sha256
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.15:
	ldr	x9, [x22, #16]
	cmp	w8, #4
	b.hs	LBB0_17
; %bb.16:
	mov	x10, #0
	b	LBB0_20
LBB0_17:
	and	x10, x8, #0xfffffffc
	add	x11, x9, #32
	mov	x12, x10
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	stur	xzr, [x11, #-32]
	stur	xzr, [x11, #-16]
	str	xzr, [x11]
	str	xzr, [x11, #16]
	add	x11, x11, #64
	subs	x12, x12, #4
	b.ne	LBB0_18
; %bb.19:
	cmp	x10, x8
	b.eq	LBB0_22
LBB0_20:
	add	x9, x9, x10, lsl #4
	sub	x8, x8, x10
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	str	xzr, [x9], #16
	subs	x8, x8, #1
	b.ne	LBB0_21
LBB0_22:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	mov	w0, #0
LBB0_23:
	ldur	x8, [x29, #-88]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	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	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ENTROPY_BLOCK_SIZE,4,2 ; @MBEDTLS_ENTROPY_BLOCK_SIZE
	.comm	_MBEDTLS_ERR_ENTROPY_SOURCE_FAILED,4,2 ; @MBEDTLS_ERR_ENTROPY_SOURCE_FAILED
	.comm	_ENTROPY_MAX_LOOP,4,2           ; @ENTROPY_MAX_LOOP
	.comm	_MBEDTLS_ERR_THREADING_MUTEX_ERROR,4,2 ; @MBEDTLS_ERR_THREADING_MUTEX_ERROR
.subsections_via_symbols
