	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_rand_bits
_secp256k1_rand_bits:                   ## @secp256k1_rand_bits
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	movq	_secp256k1_test_rng_integer_bits_left@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	cmpl	%edi, %edx
	jge	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_secp256k1_rand32
	movl	(%r14), %edx
	movl	%edx, %ecx
	shll	%cl, %eax
	movq	_secp256k1_test_rng_integer@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	addl	$32, %edx
	jmp	LBB0_3
LBB0_1:
	movq	_secp256k1_test_rng_integer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	movl	%eax, %esi
	movl	%ebx, %ecx
	sarl	%cl, %esi
	movq	_secp256k1_test_rng_integer@GOTPCREL(%rip), %rcx
	movl	%esi, (%rcx)
	subl	%ebx, %edx
	movl	%edx, (%r14)
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_secp256k1_test_rng_integer_bits_left,4,2 ## @secp256k1_test_rng_integer_bits_left
	.comm	_secp256k1_test_rng_integer,4,2 ## @secp256k1_test_rng_integer
	.no_dead_strip	_secp256k1_rand_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_rand_bits
_secp256k1_rand_bits:                   ; @secp256k1_rand_bits
	.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	x19, x0
Lloh0:
	adrp	x20, _secp256k1_test_rng_integer_bits_left@GOTPAGE
Lloh1:
	ldr	x20, [x20, _secp256k1_test_rng_integer_bits_left@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x21, _secp256k1_test_rng_integer@GOTPAGE
Lloh3:
	ldr	x21, [x21, _secp256k1_test_rng_integer@GOTPAGEOFF]
	cmp	w8, w0
	b.ge	LBB0_2
; %bb.1:
	bl	_secp256k1_rand32
	ldr	w8, [x20]
	lsl	w9, w0, w8
	ldr	w10, [x21]
	orr	w0, w10, w9
	add	w8, w8, #32
	b	LBB0_3
LBB0_2:
	ldr	w0, [x21]
LBB0_3:
	asr	w9, w0, w19
	str	w9, [x21]
	sub	w8, w8, w19
	str	w8, [x20]
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_secp256k1_test_rng_integer_bits_left,4,2 ; @secp256k1_test_rng_integer_bits_left
	.comm	_secp256k1_test_rng_integer,4,2 ; @secp256k1_test_rng_integer
	.no_dead_strip	_secp256k1_rand_bits
.subsections_via_symbols
