	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compute_weight
_compute_weight:                        ## @compute_weight
	.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
                                        ## kill: def $edx killed $edx def $rdx
	testl	%edx, %edx
	js	LBB0_17
## %bb.1:
	movq	%rdi, %r14
	movl	%edx, %r15d
	incq	%r15
	movl	%r15d, %r8d
	andl	$3, %r8d
	cmpl	$3, %edx
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_3:
	movl	%r15d, %edi
	andl	$-4, %edi
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rcx,8), %rbx
	movq	8(%r14,%rcx,8), %rax
	addl	(%rbx), %r12d
	addl	(%rax), %r12d
	movq	16(%r14,%rcx,8), %rax
	addl	(%rax), %r12d
	movq	24(%r14,%rcx,8), %rax
	addl	(%rax), %r12d
	addq	$4, %rcx
	cmpq	%rcx, %rdi
	jne	LBB0_4
LBB0_5:
	testq	%r8, %r8
	je	LBB0_8
## %bb.6:
	leaq	(%r14,%rcx,8), %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rax
	addl	(%rax), %r12d
	incq	%rdi
	cmpq	%rdi, %r8
	jne	LBB0_7
LBB0_8:
	testl	%r12d, %r12d
	je	LBB0_17
## %bb.9:
	subl	%esi, %edx
	leal	4(,%rdx,4), %edi
	callq	_malloc
	movq	%rax, %r13
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %eax
	cmpq	%rbx, %rax
	je	LBB0_15
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	xorl	%eax, %eax
	callq	_random
	movl	%eax, %ecx
	movq	(%r14,%rbx,8), %rdi
	imull	$100, (%rdi), %eax
	cltd
	idivl	%r12d
	movl	%eax, %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%edx, (%r13,%rbx,4)
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_14
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	(%r13,%rax,4), %edx
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	incq	%rax
	cmpq	%rax, %rbx
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rax
	jmp	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%edx, 4(%rdi)
	incq	%rbx
	cmpq	%r15, %rbx
	jne	LBB0_10
## %bb.16:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_compute_weight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_weight
_compute_weight:                        ; @compute_weight
	.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
	tbnz	w2, #31, LBB0_17
; %bb.1:
	mov	x19, x0
	add	w21, w2, #1
	cmp	w2, #3
	b.hs	LBB0_3
; %bb.2:
	mov	x8, #0
	mov	w22, #0
	b	LBB0_6
LBB0_3:
	mov	w11, #0
	mov	w12, #0
	mov	w10, #0
	mov	w9, #0
	and	x8, x21, #0xfffffffc
	add	x13, x19, #16
	mov	x14, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x15, x16, [x13, #-16]
	ldp	x17, x0, [x13], #32
	ldr	w15, [x15]
	ldr	w16, [x16]
	ldr	w17, [x17]
	add	w11, w15, w11
	add	w12, w16, w12
	ldr	w15, [x0]
	add	w10, w17, w10
	add	w9, w15, w9
	subs	x14, x14, #4
	b.ne	LBB0_4
; %bb.5:
	add	w11, w12, w11
	add	w10, w10, w11
	add	w22, w9, w10
	cmp	x8, x21
	b.eq	LBB0_8
LBB0_6:
	add	x9, x19, x8, lsl #3
	sub	x8, x21, x8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	ldr	w10, [x10]
	add	w22, w10, w22
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
	cbz	w22, LBB0_17
; %bb.9:
	sub	w8, w2, w1
	lsl	w8, w8, #2
	add	w0, w8, #4
	bl	_malloc
	mov	x20, x0
	mov	x23, #0
	mov	w24, #100
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	x23, w10, uxtw
	b.eq	LBB0_15
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	bl	_random
	ldr	x8, [x19, x23, lsl #3]
	ldr	w9, [x8]
	mul	w9, w9, w24
	sdiv	w9, w9, w22
	sdiv	w10, w0, w9
	msub	w9, w10, w9, w0
	str	w9, [x20, x23, lsl #2]
	mov	x10, #0
	cbz	x23, LBB0_10
LBB0_12:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x20, x10, lsl #2]
	cmp	w9, w11
	b.eq	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	add	x10, x10, #1
	cmp	x23, x10
	b.ne	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x10, x23
	b	LBB0_10
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	str	w9, [x8, #4]
	add	x23, x23, #1
	cmp	x23, x21
	b.ne	LBB0_11
; %bb.16:
	mov	x0, x20
	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
	b	_free
LBB0_17:
	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	_compute_weight
.subsections_via_symbols
