	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_hmac_drbg_random_with_add ## -- Begin function mbedtls_hmac_drbg_random_with_add
	.p2align	4, 0x90
_mbedtls_hmac_drbg_random_with_add:     ## @mbedtls_hmac_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	$56, %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, %r14
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	28(%rdi), %edi
	callq	_mbedtls_md_get_size
	movq	_MBEDTLS_HMAC_DRBG_MAX_REQUEST@GOTPCREL(%rip), %rcx
	cmpq	%r12, (%rcx)
	jae	LBB0_2
## %bb.1:
	movq	_MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_2:
	movq	_MBEDTLS_HMAC_DRBG_MAX_INPUT@GOTPCREL(%rip), %rcx
	cmpq	%r13, (%rcx)
	jae	LBB0_4
## %bb.3:
	movq	_MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_4:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, 32(%r15)
	je	LBB0_9
## %bb.5:
	movq	(%r15), %rax
	movq	_MBEDTLS_HMAC_DRBG_PR_ON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	8(%r15), %rax
	cmpq	16(%r15), %rax
	jle	LBB0_9
LBB0_7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_mbedtls_hmac_drbg_reseed
	testl	%eax, %eax
	jne	LBB0_16
## %bb.8:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
LBB0_9:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	testq	%r14, %r14
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.10:
	testq	%r13, %r13
	je	LBB0_12
## %bb.11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_mbedtls_hmac_drbg_update
LBB0_12:
	testq	%r12, %r12
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_15
## %bb.13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$28, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	cmpq	%r13, %r12
	movq	%r13, %r14
	cmovbq	%r12, %r14
	movq	%r12, %rbx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_mbedtls_md_hmac_reset
	movl	24(%r15), %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_mbedtls_md_hmac_update
	movl	24(%r15), %esi
	movq	%r12, %rdi
	movq	%rbx, %r12
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	callq	_mbedtls_md_hmac_finish
	movl	24(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_memcpy
	addq	%r14, %rbx
	subq	%r14, %r12
	jne	LBB0_14
LBB0_15:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_mbedtls_hmac_drbg_update
	incq	8(%rbx)
	xorl	%eax, %eax
LBB0_16:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_HMAC_DRBG_MAX_REQUEST,8,3 ## @MBEDTLS_HMAC_DRBG_MAX_REQUEST
	.comm	_MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG,4,2 ## @MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG
	.comm	_MBEDTLS_HMAC_DRBG_MAX_INPUT,8,3 ## @MBEDTLS_HMAC_DRBG_MAX_INPUT
	.comm	_MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG,4,2 ## @MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG
	.comm	_MBEDTLS_HMAC_DRBG_PR_ON,8,3    ## @MBEDTLS_HMAC_DRBG_PR_ON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_hmac_drbg_random_with_add ; -- Begin function mbedtls_hmac_drbg_random_with_add
	.p2align	2
_mbedtls_hmac_drbg_random_with_add:     ; @mbedtls_hmac_drbg_random_with_add
	.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
	mov	x24, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x23, x0
	ldr	w0, [x23, #28]!
	bl	_mbedtls_md_get_size
Lloh0:
	adrp	x8, _MBEDTLS_HMAC_DRBG_MAX_REQUEST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_HMAC_DRBG_MAX_REQUEST@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_2:
Lloh6:
	adrp	x8, _MBEDTLS_HMAC_DRBG_MAX_INPUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBEDTLS_HMAC_DRBG_MAX_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x24
	b.hs	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_4:
	mov	x25, x0
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _MBEDTLS_HMAC_DRBG_PR_ON@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MBEDTLS_HMAC_DRBG_PR_ON@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.le	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	bl	_mbedtls_hmac_drbg_reseed
	cbnz	w0, LBB0_15
; %bb.8:
	mov	x24, #0
	b	LBB0_12
LBB0_9:
	cbz	x20, LBB0_12
; %bb.10:
	cbz	x24, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	bl	_mbedtls_hmac_drbg_update
LBB0_12:
	cbz	x21, LBB0_14
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cmp	x21, x25
	csel	x26, x21, x25, lo
	mov	x0, x23
	bl	_mbedtls_md_hmac_reset
	ldr	w1, [x19, #24]
	mov	x0, x23
	mov	x2, x25
	bl	_mbedtls_md_hmac_update
	ldr	w1, [x19, #24]
	mov	x0, x23
	bl	_mbedtls_md_hmac_finish
	ldr	w1, [x19, #24]
	mov	x0, x22
	mov	x2, x26
	bl	_memcpy
	add	x22, x22, x26
	subs	x21, x21, x26
	b.ne	LBB0_13
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	bl	_mbedtls_hmac_drbg_update
	mov	w0, #0
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_HMAC_DRBG_MAX_REQUEST,8,3 ; @MBEDTLS_HMAC_DRBG_MAX_REQUEST
	.comm	_MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG,4,2 ; @MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG
	.comm	_MBEDTLS_HMAC_DRBG_MAX_INPUT,8,3 ; @MBEDTLS_HMAC_DRBG_MAX_INPUT
	.comm	_MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG,4,2 ; @MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG
	.comm	_MBEDTLS_HMAC_DRBG_PR_ON,8,3    ; @MBEDTLS_HMAC_DRBG_PR_ON
.subsections_via_symbols
