	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_rand_bytes_test
_secp256k1_rand_bytes_test:             ## @secp256k1_rand_bytes_test
	.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	%rsi, %r13
	movq	%rdi, %r14
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_memset
	shlq	$3, %r13
	testq	%r13, %r13
	je	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r13, %rbx
	jae	LBB0_8
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	$6, %edi
	callq	_secp256k1_rand_bits
	movl	%eax, %r12d
	movl	$5, %edi
	callq	_secp256k1_rand_bits
	movl	%eax, %r15d
	imull	%r12d, %r15d
	movl	$1, %edi
	callq	_secp256k1_rand_bits
	cmpl	$-46, %r15d
	jl	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r13, %rbx
	jae	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %eax
	movl	%r15d, %ecx
	addl	$16, %ecx
	movslq	%ecx, %rcx
	imulq	$-2078209981, %rcx, %rcx        ## imm = 0x84210843
	shrq	$32, %rcx
	addl	%r15d, %ecx
	addl	$16, %ecx
	movl	%ecx, %edx
	sarl	$4, %edx
	shrl	$31, %ecx
	addl	%ecx, %edx
	incl	%edx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %ecx
	andb	$7, %cl
	movq	%rax, %rsi
	shlq	%cl, %rsi
	movq	%rbx, %rcx
	shrq	$3, %rcx
	orb	%sil, (%r14,%rcx)
	incq	%rbx
	cmpl	$2, %edx
	jb	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	decl	%edx
	cmpq	%r13, %rbx
	jb	LBB0_6
	jmp	LBB0_2
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_secp256k1_rand_bytes_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_rand_bytes_test
_secp256k1_rand_bytes_test:             ; @secp256k1_rand_bytes_test
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	lsl	x21, x20, #3
	cbz	x21, LBB0_7
; %bb.1:
	mov	x22, #0
	mov	w23, #2115
	movk	w23, #33825, lsl #16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x22, x21
	b.hs	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	w0, #6
	bl	_secp256k1_rand_bits
	mov	x20, x0
	mov	w0, #5
	bl	_secp256k1_rand_bits
	mul	w20, w0, w20
	mov	w0, #1
	bl	_secp256k1_rand_bits
	cmn	w20, #46
	ccmp	x22, x21, #2, ge
	b.hs	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, w0
	add	w9, w20, #16
	smull	x10, w9, w23
	lsr	x10, x10, #32
	add	w9, w10, w9
	asr	w10, w9, #4
	add	w9, w10, w9, lsr #31
	add	w9, w9, #1
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	x10, x22, #0x7
	lsr	x11, x22, #3
	ldrb	w12, [x19, x11]
	lsl	w10, w8, w10
	orr	w10, w12, w10
	strb	w10, [x19, x11]
	add	x22, x22, #1
	cmp	w9, #2
	b.lo	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	w9, w9, #1
	cmp	x22, x21
	b.lo	LBB0_5
	b	LBB0_2
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_secp256k1_rand_bytes_test
.subsections_via_symbols
