	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_waves
_add_waves:                             ## @add_waves
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %rcx
	movq	8(%rdi), %rax
	xorl	%r12d, %r12d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rcx
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r13d, (%rcx,%r12,4)
	incq	%r12
	cmpq	$4, %r12
	je	LBB0_8
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	(%rcx,%r12,4), %r13d
	cmpl	(%rax,%r12,4), %r13d
	jge	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r13d, %r13
	movq	16(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	leaq	(,%r13,4), %rdx
	addq	%r13, %rdx
	movl	(%rcx,%rdx,4), %esi
	cmpl	%r14d, %esi
	jg	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	1(%r13), %rdx
	shlq	$2, %r13
	leaq	(,%r13,4), %rbx
	addq	%r13, %rbx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rdx, %r13
	movl	16(%rcx,%rbx), %edx
	movl	12(%rcx,%rbx), %r8d
	movl	4(%rcx,%rbx), %eax
	movl	8(%rcx,%rbx), %r9d
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	movl	%r12d, %ecx
	callq	_add_wave
	movq	8(%r15), %rax
	movslq	(%rax,%r12,4), %rcx
	cmpq	%rcx, %r13
	jge	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	20(%rcx,%rbx), %esi
	leaq	1(%r13), %rdx
	addq	$20, %rbx
	cmpl	%r14d, %esi
	jle	LBB0_5
	jmp	LBB0_6
LBB0_8:
	movl	16(%rcx), %r12d
	cmpl	16(%rax), %r12d
	jge	LBB0_13
## %bb.9:
	movslq	%r12d, %r12
	leaq	(%r12,%r12,4), %rax
	leaq	16(,%rax,4), %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	32(%rax), %rax
	movl	-16(%rax,%rbx), %esi
	cmpl	%r14d, %esi
	jg	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rax,%rbx), %edx
	movl	-4(%rax,%rbx), %ecx
	movl	-12(%rax,%rbx), %r9d
	movl	-8(%rax,%rbx), %r8d
	movq	%r15, %rdi
	callq	_add_wave0
	incq	%r12
	movq	8(%r15), %rax
	movslq	16(%rax), %rax
	addq	$20, %rbx
	cmpq	%rax, %r12
	jl	LBB0_10
LBB0_12:
	movq	(%r15), %rcx
LBB0_13:
	movl	%r12d, 16(%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_add_waves
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_waves
_add_waves:                             ; @add_waves
	.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	x21, #0
	ldp	x9, x8, [x0]
	mov	w22, #20
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	w23, [x9, x21, lsl #2]
	add	x21, x21, #1
	cmp	x21, #4
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	lsl	x10, x21, #2
	ldr	w23, [x9, x10]
	ldr	w10, [x8, x10]
	cmp	w23, w10
	b.ge	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sxtw	x23, w23
	ldr	x9, [x19, #16]
	ldr	x9, [x9, x21, lsl #3]
	mul	x10, x23, x22
	ldr	w1, [x9, x10]
	cmp	w1, w20
	b.gt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x23, #1
	add	x8, x23, x23, lsl #2
	lsl	x24, x8, #2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x23, x10
	add	x8, x9, x24
	ldp	w4, w2, [x8, #12]
	ldp	w6, w5, [x8, #4]
	mov	x0, x19
	mov	x3, x21
	bl	_add_wave
	ldr	x8, [x19, #8]
	ldrsw	x9, [x8, x21, lsl #2]
	cmp	x23, x9
	b.ge	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x9, [x19, #16]
	ldr	x9, [x9, x21, lsl #3]
	add	x10, x9, x24
	ldr	w1, [x10, #20]
	add	x10, x23, #1
	add	x24, x24, #20
	cmp	w1, w20
	b.le	LBB0_6
	b	LBB0_1
LBB0_8:
	ldr	w21, [x9, #16]
	ldr	w8, [x8, #16]
	cmp	w21, w8
	b.ge	LBB0_13
; %bb.9:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	sxtw	x21, w21
	add	x8, x21, x21, lsl #2
	lsl	x22, x8, #2
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #32]
	ldr	w1, [x8, x22]
	cmp	w1, w20
	b.gt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x8, x22
	ldp	w3, w2, [x8, #12]
	ldp	w5, w4, [x8, #4]
	mov	x0, x19
	bl	_add_wave0
	add	x21, x21, #1
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8, #16]
	add	x22, x22, #20
	cmp	x21, x8
	b.lt	LBB0_10
LBB0_12:
	ldr	x9, [x19]
LBB0_13:
	str	w21, [x9, #16]
	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	_add_waves
.subsections_via_symbols
