	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decide_unroll_runtime_iterations
_decide_unroll_runtime_iterations:      ## @decide_unroll_runtime_iterations
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_UAP_UNROLL@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_24
## %bb.1:
	movq	%rdi, %r14
	movq	_dump_file@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_3:
	movq	_PARAM_MAX_UNROLLED_INSNS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PARAM_VALUE
	xorl	%edx, %edx
	divl	(%r14)
	movl	%eax, %r15d
	movq	_PARAM_MAX_AVERAGE_UNROLLED_INSNS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PARAM_VALUE
	xorl	%edx, %edx
	divl	4(%r14)
	movl	%eax, %ebx
	cmpl	%eax, %r15d
	cmovbl	%r15d, %ebx
	movq	_PARAM_MAX_UNROLL_TIMES@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_PARAM_VALUE
	cmpl	%eax, %ebx
	jbe	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	callq	_PARAM_VALUE
	movl	%eax, %ebx
LBB0_5:
	cmpl	$1, %ebx
	ja	LBB0_9
## %bb.6:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_9:
	movq	%r14, %rdi
	callq	_get_simple_loop_desc
	cmpl	$0, 16(%rax)
	je	LBB0_11
## %bb.10:
	cmpq	$0, 8(%rax)
	je	LBB0_13
LBB0_11:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.12:
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
LBB0_13:
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.14:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.15:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_8
LBB0_16:
	movq	16(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.21:
	movq	%r14, %rdi
	callq	_expected_loop_iterations
	leal	(%rbx,%rbx), %ecx
	cmpl	%ecx, %eax
	jae	LBB0_17
## %bb.22:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_8
LBB0_17:
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edx
	leal	(%rdx,%rdx), %eax
	cmpl	%ebx, %eax
	jbe	LBB0_18
## %bb.19:
	movq	_LPT_UNROLL_RUNTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	decl	%edx
	movl	%edx, 8(%r14)
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.20:
	leaq	L_.str.5(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
LBB0_24:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UAP_UNROLL,4,2                 ## @UAP_UNROLL
	.comm	_dump_file,8,3                  ## @dump_file
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n;; Considering unrolling loop with runtime computable number of iterations\n"

	.comm	_PARAM_MAX_UNROLLED_INSNS,4,2   ## @PARAM_MAX_UNROLLED_INSNS
	.comm	_PARAM_MAX_AVERAGE_UNROLLED_INSNS,4,2 ## @PARAM_MAX_AVERAGE_UNROLLED_INSNS
	.comm	_PARAM_MAX_UNROLL_TIMES,4,2     ## @PARAM_MAX_UNROLL_TIMES
L_.str.1:                               ## @.str.1
	.asciz	";; Not considering loop, is too big\n"

L_.str.2:                               ## @.str.2
	.asciz	";; Unable to prove that the number of iterations can be counted in runtime\n"

L_.str.3:                               ## @.str.3
	.asciz	";; Loop iterates constant times\n"

L_.str.4:                               ## @.str.4
	.asciz	";; Not unrolling loop, doesn't roll\n"

	.comm	_LPT_UNROLL_RUNTIME,4,2         ## @LPT_UNROLL_RUNTIME
L_.str.5:                               ## @.str.5
	.asciz	";; Decided to unroll the runtime computable times rolling loop, %d times.\n"

	.no_dead_strip	_decide_unroll_runtime_iterations
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decide_unroll_runtime_iterations
_decide_unroll_runtime_iterations:      ; @decide_unroll_runtime_iterations
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _UAP_UNROLL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UAP_UNROLL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_24
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x21, _dump_file@GOTPAGE
Lloh4:
	ldr	x21, [x21, _dump_file@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_3:
Lloh7:
	adrp	x8, _PARAM_MAX_UNROLLED_INSNS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PARAM_MAX_UNROLLED_INSNS@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_PARAM_VALUE
	ldr	w9, [x19]
Lloh10:
	adrp	x8, _PARAM_MAX_AVERAGE_UNROLLED_INSNS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PARAM_MAX_AVERAGE_UNROLLED_INSNS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	udiv	w20, w0, w9
	mov	x0, x8
	bl	_PARAM_VALUE
	ldr	w8, [x19, #4]
	udiv	w8, w0, w8
	cmp	w20, w8
	csel	w20, w20, w8, lo
Lloh13:
	adrp	x22, _PARAM_MAX_UNROLL_TIMES@GOTPAGE
Lloh14:
	ldr	x22, [x22, _PARAM_MAX_UNROLL_TIMES@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_PARAM_VALUE
	cmp	w20, w0
	b.ls	LBB0_5
; %bb.4:
	ldr	w0, [x22]
	bl	_PARAM_VALUE
	mov	x20, x0
LBB0_5:
	cmp	w20, #1
	b.hi	LBB0_8
; %bb.6:
	ldr	x0, [x21]
	cbz	x0, LBB0_24
; %bb.7:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_8:
	mov	x0, x19
	bl	_get_simple_loop_desc
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_10
; %bb.9:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_13
LBB0_10:
	ldr	x0, [x21]
	cbz	x0, LBB0_24
; %bb.11:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	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
	add	sp, sp, #64
	b	_fprintf
LBB0_13:
	ldr	x8, [x0]
	cbz	x8, LBB0_16
; %bb.14:
	ldr	x0, [x21]
	cbz	x0, LBB0_24
; %bb.15:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_16:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.17:
	mov	x0, x19
	bl	_expected_loop_iterations
	cmp	w0, w20, lsl #1
	b.hs	LBB0_20
; %bb.18:
	ldr	x0, [x21]
	cbz	x0, LBB0_24
; %bb.19:
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_20:
	mov	w9, #1
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	lsl	w9, w9, #1
	cmp	w9, w20
	b.ls	LBB0_21
; %bb.22:
Lloh23:
	adrp	x9, _LPT_UNROLL_RUNTIME@GOTPAGE
Lloh24:
	ldr	x9, [x9, _LPT_UNROLL_RUNTIME@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	sub	w8, w8, #1
	stp	w8, w9, [x19, #8]
	ldr	x0, [x21]
	cbz	x0, LBB0_24
; %bb.23:
	str	x8, [sp]
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_24:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_UAP_UNROLL,4,2                 ; @UAP_UNROLL
	.comm	_dump_file,8,3                  ; @dump_file
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n;; Considering unrolling loop with runtime computable number of iterations\n"

	.comm	_PARAM_MAX_UNROLLED_INSNS,4,2   ; @PARAM_MAX_UNROLLED_INSNS
	.comm	_PARAM_MAX_AVERAGE_UNROLLED_INSNS,4,2 ; @PARAM_MAX_AVERAGE_UNROLLED_INSNS
	.comm	_PARAM_MAX_UNROLL_TIMES,4,2     ; @PARAM_MAX_UNROLL_TIMES
l_.str.1:                               ; @.str.1
	.asciz	";; Not considering loop, is too big\n"

l_.str.2:                               ; @.str.2
	.asciz	";; Unable to prove that the number of iterations can be counted in runtime\n"

l_.str.3:                               ; @.str.3
	.asciz	";; Loop iterates constant times\n"

l_.str.4:                               ; @.str.4
	.asciz	";; Not unrolling loop, doesn't roll\n"

	.comm	_LPT_UNROLL_RUNTIME,4,2         ; @LPT_UNROLL_RUNTIME
l_.str.5:                               ; @.str.5
	.asciz	";; Decided to unroll the runtime computable times rolling loop, %d times.\n"

	.no_dead_strip	_decide_unroll_runtime_iterations
.subsections_via_symbols
