	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function optimizecaptures
_optimizecaptures:                      ## @optimizecaptures
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_IEnd@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_1
LBB0_34:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r12
	leaq	-16(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	8(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	56(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%rdi, %r14
	xorl	%r13d, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dest
	movl	%eax, %r13d
	incl	%r13d
LBB0_33:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rbx
	movq	%rbx, %rdi
	shlq	$4, %rdi
	addq	%r12, %rdi
	callq	_sizei
	addl	%eax, %ebx
	movslq	%ebx, %rax
	shlq	$4, %rax
	leaq	(%r12,%rax), %r14
	movq	(%r12,%rax), %rax
	cmpq	(%r15), %rax
	je	LBB0_34
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
	movq	%r14, %rdi
	callq	_isjmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dest
	cmpl	%r13d, %eax
	jge	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r13d, %ebx
	jl	LBB0_33
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_ismovablecap
	testq	%rax, %rax
	je	LBB0_33
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	16(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_ischeck
	testq	%rax, %rax
	je	LBB0_33
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_getoff
	movl	%eax, %r14d
	cmpl	%r13d, %ebx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jle	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %r15
	movslq	%r13d, %r12
	movq	%r15, %r13
	shlq	$4, %r13
	addq	-88(%rbp), %r13                 ## 8-byte Folded Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=2
	addq	$-16, %r13
	cmpq	%r12, %r15
	jle	LBB0_16
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_ismovablecap
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	decq	%r15
	movq	%r13, %rdi
	callq	_getoff
	cmpl	%r14d, %eax
	jle	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	%r13, %rdi
	callq	_getoff
	movl	%eax, %r14d
	jmp	LBB0_15
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r15d
	jmp	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %r15d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	leaq	-48(%rbp), %rdx
	callq	_skipchecks
                                        ## kill: def $eax killed $eax def $rax
	movl	-48(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	(%rax,%rbx), %r14d
	movq	_MAXOFF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	setle	%cl
	cmpl	%r15d, %ebx
	setge	%dl
	testl	%eax, %eax
	setg	%al
	andb	%dl, %al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movl	%ebx, %r8d
	subl	%r15d, %r8d
	jge	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r15d, %r13
	incl	%ebx
	movl	%ebx, %edx
	jmp	LBB0_28
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r14d
	movq	_IEnd@GOTPCREL(%rip), %r15
	jmp	LBB0_32
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %eax
	shll	$4, %eax
	movslq	%r15d, %r13
	leal	1(%rbx), %edx
	movl	%edx, %edi
	subl	%r15d, %edi
	movq	%r13, %rsi
	andl	$3, %edi
	je	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rsi
	shlq	$4, %rsi
	addq	-80(%rbp), %rsi                 ## 8-byte Folded Reload
	negl	%edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	%eax, (%rsi)
	decq	%rcx
	addq	$16, %rsi
	cmpl	%ecx, %edi
	jne	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rsi
	subq	%rcx, %rsi
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, %r8d
	jb	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_2 Depth=1
	subl	%esi, %ebx
	incl	%ebx
	shlq	$4, %rsi
	addq	-72(%rbp), %rsi                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	%eax, -48(%rsi)
	addl	%eax, -32(%rsi)
	addl	%eax, -16(%rsi)
	addl	%eax, (%rsi)
	addq	$64, %rsi
	addl	$-4, %ebx
	jne	LBB0_27
LBB0_28:                                ##   in Loop: Header=BB0_2 Depth=1
	shlq	$4, %r13
	addq	%r12, %r13
	movl	%r14d, %esi
	subl	%r15d, %esi
	subl	%r15d, %edx
	movq	%r13, %rdi
	callq	_rotate
	movq	%r13, %rdi
	callq	_ischeck
	testq	%rax, %rax
	je	LBB0_29
## %bb.30:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r14d, %rdi
	shlq	$4, %rdi
	addq	%r12, %rdi
	callq	_iscapture
	testq	%rax, %rax
	setne	%al
	jmp	LBB0_31
LBB0_29:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
LBB0_31:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_IEnd@GOTPCREL(%rip), %r15
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movzbl	%al, %edi
	callq	_assert
LBB0_32:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %ebx
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_IEnd,8,3                       ## @IEnd
	.comm	_MAXOFF,4,2                     ## @MAXOFF
	.no_dead_strip	_optimizecaptures
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function optimizecaptures
_optimizecaptures:                      ; @optimizecaptures
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0]
Lloh0:
	adrp	x24, _IEnd@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IEnd@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
	mov	x19, x0
	mov	w20, #0
	mov	w26, #0
	sub	x25, x0, #16
	add	x9, x0, #40
	add	x8, x0, #8
	stp	x9, x8, [sp, #8]                ; 16-byte Folded Spill
	mov	x22, x0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_dest
	add	w26, w0, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, x19, w20, sxtw #4
	bl	_sizei
	add	w20, w20, w0
	add	x22, x19, w20, sxtw #4
	ldr	x8, [x22]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_27 Depth 2
	mov	x0, x22
	bl	_isjmp
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_dest
	cmp	w0, w26
	b.ge	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w20, w26
	b.lt	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_ismovablecap
	cbz	x0, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x22, #16
	mov	x0, x21
	bl	_ischeck
	cbz	x0, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_getoff
	mov	x22, x0
	cmp	w20, w26
	b.le	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x28, w20
	sxtw	x27, w26
	add	x23, x25, w20, sxtw #4
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	sub	x23, x23, #16
	cmp	x28, x27
	b.le	LBB0_18
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_ismovablecap
	cbz	x0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	sub	x28, x28, #1
	mov	x0, x23
	bl	_getoff
	cmp	w0, w22
	b.le	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	x0, x23
	bl	_getoff
	mov	x22, x0
	b	LBB0_12
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x20
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x28
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x26
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x2, sp, #28
	mov	x0, x21
	mov	x1, x22
	bl	_skipchecks
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_4
; %bb.20:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
Lloh2:
	adrp	x9, _MAXOFF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAXOFF@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w8, le
	cmp	w20, w23
	cset	w9, ge
	and	w8, w8, w9
	cmp	w0, #0
	cset	w9, gt
	and	w0, w8, w9
	bl	_assert
	subs	w12, w20, w23
	b.ge	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
	sxtw	x8, w8
	add	w9, w20, #1
	b	LBB0_28
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #28]
	lsl	w10, w8, #4
	sxtw	x8, w23
	add	w9, w20, #1
	mov	x11, x8
	cmp	w12, #3
	b.lo	LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x12, x12, #1
	and	x13, x12, #0x1fffffffc
	add	x11, x13, x8
	ldr	x14, [sp, #8]                   ; 8-byte Folded Reload
	add	x14, x14, x8, lsl #4
	mov	x15, x13
LBB0_24:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w16, [x14, #-32]
	ldur	w17, [x14, #-16]
	ldr	w0, [x14]
	ldr	w1, [x14, #16]
	add	w16, w16, w10
	add	w17, w17, w10
	add	w0, w0, w10
	add	w1, w1, w10
	stur	w16, [x14, #-32]
	stur	w17, [x14, #-16]
	str	w0, [x14]
	str	w1, [x14, #16]
	add	x14, x14, #64
	subs	x15, x15, #4
	b.ne	LBB0_24
; %bb.25:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	x12, x13
	b.eq	LBB0_28
LBB0_26:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x12, [sp, #16]                  ; 8-byte Folded Reload
	add	x12, x12, x11, lsl #4
	sub	w11, w20, w11
	add	w11, w11, #1
LBB0_27:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w13, [x12]
	add	w13, w13, w10
	str	w13, [x12], #16
	subs	w11, w11, #1
	b.ne	LBB0_27
LBB0_28:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w21, w20
	sub	w1, w20, w23
	sub	w2, w9, w23
	add	x21, x19, x8, lsl #4
	mov	x0, x21
	bl	_rotate
	mov	x0, x21
	bl	_ischeck
	cbz	x0, LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, x19, w20, sxtw #4
	bl	_iscapture
	cmp	x0, #0
	cset	w0, ne
LBB0_30:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_assert
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IEnd,8,3                       ; @IEnd
	.comm	_MAXOFF,4,2                     ; @MAXOFF
	.no_dead_strip	_optimizecaptures
.subsections_via_symbols
