	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function damage_array
_damage_array:                          ## @damage_array
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$3, %edi
	callq	_secp256k1_rand_bits
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.4:
	movq	(%r14), %rdi
	cmpq	$2047, %rdi                     ## imm = 0x7FF
	jbe	LBB0_5
	jmp	LBB0_7
LBB0_1:
	movq	(%r14), %rdi
	cmpq	$4, %rdi
	jb	LBB0_5
## %bb.2:
	callq	_secp256k1_rand_int
	movslq	%eax, %rdx
	leaq	(%r15,%rdx), %rsi
	incq	%rsi
	addq	%rdx, %r15
	notq	%rdx
	addq	(%r14), %rdx
	movq	%r15, %rdi
	callq	_memmove
	decq	(%r14)
	jmp	LBB0_9
LBB0_5:
	incq	%rdi
	callq	_secp256k1_rand_int
	movslq	%eax, %rbx
	leaq	(%r15,%rbx), %rsi
	leaq	(%r15,%rbx), %rdi
	incq	%rdi
	movq	(%r14), %rdx
	subq	%rbx, %rdx
	callq	_memmove
	movl	$8, %edi
	callq	_secp256k1_rand_bits
	movb	%al, (%r15,%rbx)
	incq	(%r14)
	jmp	LBB0_9
LBB0_6:
	cmpl	$3, %eax
	ja	LBB0_8
LBB0_7:
	movl	$255, %edi
	callq	_secp256k1_rand_int
	movq	%rax, %rbx
	movq	(%r14), %rdi
	callq	_secp256k1_rand_int
	addb	(%r15,%rax), %bl
	incb	%bl
	movb	%bl, (%r15,%rax)
	jmp	LBB0_9
LBB0_8:
	movl	$3, %edi
	callq	_secp256k1_rand_bits
	movl	$1, %ebx
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	(%r14), %rdi
	callq	_secp256k1_rand_int
	xorb	%bl, (%r15,%rax)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_damage_array
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function damage_array
_damage_array:                          ; @damage_array
	.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, x1
	mov	x20, x0
	mov	w0, #3
	bl	_secp256k1_rand_bits
	cmp	w0, #0
	b.le	LBB0_3
; %bb.1:
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.2:
	ldr	x0, [x19]
	cmp	x0, #2047
	b.ls	LBB0_5
	b	LBB0_7
LBB0_3:
	ldr	x0, [x19]
	cmp	x0, #4
	b.lo	LBB0_5
; %bb.4:
	bl	_secp256k1_rand_int
	sxtw	x8, w0
	add	x0, x20, x8
	add	x1, x0, #1
	ldr	x9, [x19]
	mvn	x8, x8
	add	x2, x9, x8
	bl	_memmove
	ldr	x8, [x19]
	sub	x8, x8, #1
	str	x8, [x19]
	b	LBB0_10
LBB0_5:
	add	x0, x0, #1
	bl	_secp256k1_rand_int
	sxtw	x8, w0
	add	x20, x20, x8
	add	x0, x20, #1
	ldr	x9, [x19]
	sub	x2, x9, x8
	mov	x1, x20
	bl	_memmove
	mov	w0, #8
	bl	_secp256k1_rand_bits
	strb	w0, [x20]
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_10
LBB0_6:
	cmp	w0, #3
	b.hi	LBB0_8
LBB0_7:
	mov	w0, #255
	bl	_secp256k1_rand_int
	mov	x21, x0
	ldr	x0, [x19]
	bl	_secp256k1_rand_int
	ldrb	w8, [x20, x0]
	add	w8, w21, w8
	add	w8, w8, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #3
	bl	_secp256k1_rand_bits
	mov	w8, #1
	lsl	w21, w8, w0
	ldr	x0, [x19]
	bl	_secp256k1_rand_int
	ldrb	w8, [x20, x0]
	eor	w8, w8, w21
LBB0_9:
	strb	w8, [x20, x0]
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_damage_array
.subsections_via_symbols
