	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ctr_drbg_random_with_add ## -- Begin function mbedtls_ctr_drbg_random_with_add
	.p2align	4, 0x90
_mbedtls_ctr_drbg_random_with_add:      ## @mbedtls_ctr_drbg_random_with_add
	.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	%r8, %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MBEDTLS_CTR_DRBG_SEEDLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_MBEDTLS_CTR_DRBG_BLOCKSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	_MBEDTLS_CTR_DRBG_MAX_REQUEST@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_2:
	movq	_MBEDTLS_CTR_DRBG_MAX_INPUT@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jae	LBB0_4
## %bb.3:
	movq	_MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_4:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movq	(%r14), %rax
	cmpq	8(%r14), %rax
	jg	LBB0_6
## %bb.5:
	cmpq	$0, 32(%r14)
	je	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_mbedtls_ctr_drbg_reseed
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_9
LBB0_7:
	testq	%r13, %r13
	je	LBB0_9
## %bb.8:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_block_cipher_df
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ctr_drbg_update_internal
LBB0_9:
	testq	%rbx, %rbx
	movq	_MBEDTLS_CTR_DRBG_BLOCKSIZE@GOTPCREL(%rip), %r13
	je	LBB0_15
## %bb.10:
	leaq	24(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	_MBEDTLS_AES_ENCRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_mbedtls_aes_crypt_ecb
	movq	_MBEDTLS_CTR_DRBG_BLOCKSIZE@GOTPCREL(%rip), %r13
	movslq	(%r13), %r14
	cmpq	%r14, %rbx
	cmovbq	%rbx, %r14
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	addq	%r14, %r15
	subq	%r14, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_15
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movl	(%r13), %eax
	movq	16(%r14), %rdx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%eax, %eax
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	incq	-8(%rdx,%rax,8)
	leaq	-1(%rax), %rax
	je	LBB0_12
	jmp	LBB0_14
LBB0_15:
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_ctr_drbg_update_internal
	incq	(%r14)
	xorl	%eax, %eax
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_18
## %bb.17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_CTR_DRBG_SEEDLEN,4,2   ## @MBEDTLS_CTR_DRBG_SEEDLEN
	.comm	_MBEDTLS_CTR_DRBG_BLOCKSIZE,4,2 ## @MBEDTLS_CTR_DRBG_BLOCKSIZE
	.comm	_MBEDTLS_CTR_DRBG_MAX_REQUEST,8,3 ## @MBEDTLS_CTR_DRBG_MAX_REQUEST
	.comm	_MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG,4,2 ## @MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG
	.comm	_MBEDTLS_CTR_DRBG_MAX_INPUT,8,3 ## @MBEDTLS_CTR_DRBG_MAX_INPUT
	.comm	_MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG,4,2 ## @MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG
	.comm	_MBEDTLS_AES_ENCRYPT,4,2        ## @MBEDTLS_AES_ENCRYPT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ctr_drbg_random_with_add ; -- Begin function mbedtls_ctr_drbg_random_with_add
	.p2align	2
_mbedtls_ctr_drbg_random_with_add:      ; @mbedtls_ctr_drbg_random_with_add
	.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, #16
	mov	x24, x4
	mov	x25, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, 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	x8, _MBEDTLS_CTR_DRBG_SEEDLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_CTR_DRBG_SEEDLEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
Lloh8:
	adrp	x26, _MBEDTLS_CTR_DRBG_BLOCKSIZE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _MBEDTLS_CTR_DRBG_BLOCKSIZE@GOTPAGEOFF]
	ldr	w8, [x26]
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x23, x9, x8
	mov	sp, x23
Lloh12:
	adrp	x8, _MBEDTLS_CTR_DRBG_MAX_REQUEST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_CTR_DRBG_MAX_REQUEST@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x8, x20
	b.hs	LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_2:
Lloh18:
	adrp	x8, _MBEDTLS_CTR_DRBG_MAX_INPUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MBEDTLS_CTR_DRBG_MAX_INPUT@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x8, x24
	b.hs	LBB0_4
; %bb.3:
Lloh21:
	adrp	x8, _MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_4:
	mov	x0, x22
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.gt	LBB0_6
; %bb.5:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_7
LBB0_6:
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	bl	_mbedtls_ctr_drbg_reseed
	cbnz	w0, LBB0_16
	b	LBB0_9
LBB0_7:
	cbz	x24, LBB0_9
; %bb.8:
	mov	x0, x22
	mov	x1, x25
	mov	x2, x24
	bl	_block_cipher_df
	mov	x0, x19
	mov	x1, x22
	bl	_ctr_drbg_update_internal
LBB0_9:
	cbz	x20, LBB0_15
; %bb.10:
	add	x24, x19, #24
Lloh24:
	adrp	x27, _MBEDTLS_AES_ENCRYPT@GOTPAGE
Lloh25:
	ldr	x27, [x27, _MBEDTLS_AES_ENCRYPT@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x27]
	mov	x0, x24
	mov	x3, x23
	bl	_mbedtls_aes_crypt_ecb
	ldrsw	x8, [x26]
	cmp	x20, x8
	csel	x25, x20, x8, lo
	mov	x0, x21
	mov	x1, x23
	mov	x2, x25
	bl	_memcpy
	add	x21, x21, x25
	subs	x20, x20, x25
	b.eq	LBB0_15
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	w8, [x26]
	ldr	x2, [x19, #16]
LBB0_13:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	add	x9, x2, x8, lsl #3
	sub	x8, x8, #1
	ldur	x10, [x9, #-8]
	adds	x10, x10, #1
	stur	x10, [x9, #-8]
	b.hs	LBB0_13
	b	LBB0_11
LBB0_15:
	mov	x0, x19
	mov	x1, x22
	bl	_ctr_drbg_update_internal
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	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_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_CTR_DRBG_SEEDLEN,4,2   ; @MBEDTLS_CTR_DRBG_SEEDLEN
	.comm	_MBEDTLS_CTR_DRBG_BLOCKSIZE,4,2 ; @MBEDTLS_CTR_DRBG_BLOCKSIZE
	.comm	_MBEDTLS_CTR_DRBG_MAX_REQUEST,8,3 ; @MBEDTLS_CTR_DRBG_MAX_REQUEST
	.comm	_MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG,4,2 ; @MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG
	.comm	_MBEDTLS_CTR_DRBG_MAX_INPUT,8,3 ; @MBEDTLS_CTR_DRBG_MAX_INPUT
	.comm	_MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG,4,2 ; @MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG
	.comm	_MBEDTLS_AES_ENCRYPT,4,2        ; @MBEDTLS_AES_ENCRYPT
.subsections_via_symbols
