	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_optimal_iv_set
_find_optimal_iv_set:                   ## @find_optimal_iv_set
	.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
	movq	%rdi, %r12
	callq	_get_initial_solution
	movq	%rax, %r14
	movq	_dump_file@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.5:
	movq	_dump_flags@GOTPCREL(%rip), %rax
	movq	_TDF_DETAILS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_iv_ca_dump
LBB0_7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_try_improve_iv_set
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	_dump_flags@GOTPCREL(%rip), %r13
	movq	_TDF_DETAILS@GOTPCREL(%rip), %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_try_improve_iv_set
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %eax
	testl	%eax, (%r13)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_iv_ca_dump
	jmp	LBB0_12
LBB0_13:
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.14:
	movq	_dump_flags@GOTPCREL(%rip), %rax
	movq	_TDF_DETAILS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_iv_ca_cost
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_16:
	movq	%r12, %rdi
	callq	_n_iv_uses
	testl	%eax, %eax
	je	LBB0_19
## %bb.17:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_iv_use
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_iv_ca_cand_for_use
	movl	(%rax), %eax
	movl	%eax, (%r15)
	incl	%ebx
	movq	%r12, %rdi
	callq	_n_iv_uses
	cmpl	%eax, %ebx
	jb	LBB0_18
	jmp	LBB0_19
LBB0_1:
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.2:
	movq	_dump_flags@GOTPCREL(%rip), %rax
	movq	_TDF_DETAILS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_19
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_19:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dump_file,8,3                  ## @dump_file
	.comm	_dump_flags,4,2                 ## @dump_flags
	.comm	_TDF_DETAILS,4,2                ## @TDF_DETAILS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to substitute for ivs, failed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Initial set of candidates:\n"

L_.str.2:                               ## @.str.2
	.asciz	"Improved to:\n"

L_.str.3:                               ## @.str.3
	.asciz	"Final cost %d\n\n"

	.no_dead_strip	_find_optimal_iv_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_optimal_iv_set
_find_optimal_iv_set:                   ; @find_optimal_iv_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	bl	_get_initial_solution
	mov	x19, x0
Lloh0:
	adrp	x22, _dump_file@GOTPAGE
Lloh1:
	ldr	x22, [x22, _dump_file@GOTPAGEOFF]
	ldr	x0, [x22]
	cbz	x19, LBB0_16
; %bb.1:
Lloh2:
	adrp	x23, _dump_flags@GOTPAGE
Lloh3:
	ldr	x23, [x23, _dump_flags@GOTPAGEOFF]
Lloh4:
	adrp	x24, _TDF_DETAILS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _TDF_DETAILS@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w8, [x23]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	x1, [x22]
	mov	x0, x20
	mov	x2, x19
	bl	_iv_ca_dump
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_try_improve_iv_set
	cbz	x0, LBB0_10
; %bb.5:
Lloh8:
	adrp	x21, l_.str.2@PAGE
Lloh9:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_try_improve_iv_set
	cbz	x0, LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x21
	bl	_fprintf
	ldr	x1, [x22]
	mov	x0, x20
	mov	x2, x19
	bl	_iv_ca_dump
	b	LBB0_6
LBB0_10:
	ldr	x21, [x22]
	cbz	x21, LBB0_13
; %bb.11:
	ldr	w8, [x23]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_iv_ca_cost
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_fprintf
LBB0_13:
	mov	x0, x20
	bl	_n_iv_uses
	cbz	w0, LBB0_19
; %bb.14:
	mov	w21, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_iv_use
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_iv_ca_cand_for_use
	ldr	w8, [x0]
	str	w8, [x22]
	add	w21, w21, #1
	mov	x0, x20
	bl	_n_iv_uses
	cmp	w21, w0
	b.lo	LBB0_15
	b	LBB0_19
LBB0_16:
	cbz	x0, LBB0_19
; %bb.17:
Lloh12:
	adrp	x8, _dump_flags@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dump_flags@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _TDF_DETAILS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TDF_DETAILS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_dump_file,8,3                  ; @dump_file
	.comm	_dump_flags,4,2                 ; @dump_flags
	.comm	_TDF_DETAILS,4,2                ; @TDF_DETAILS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to substitute for ivs, failed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Initial set of candidates:\n"

l_.str.2:                               ; @.str.2
	.asciz	"Improved to:\n"

l_.str.3:                               ; @.str.3
	.asciz	"Final cost %d\n\n"

	.no_dead_strip	_find_optimal_iv_set
.subsections_via_symbols
