	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function change_active
_change_active:                         ## @change_active
	.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	_mboot@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_NDOSPART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.1:
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	$-1, %r12d
	movq	_ACTIVE@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%eax, %rcx
	movq	%r15, %rbx
	cmpq	%rcx, %r15
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %ecx
	leaq	1(%rbx), %r15
	testl	%ecx, (%r13,%rbx,4)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_printf
	cmpl	$-1, %r12d
	cmovnel	%r12d, %ebx
	movq	_NDOSPART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %r12d
	jmp	LBB0_4
LBB0_5:
	movq	_a_flag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	setne	%cl
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	cmpl	$-1, %edi
	setne	%al
	andb	%cl, %al
	cmpl	$-1, %r12d
	jne	LBB0_7
	jmp	LBB0_6
LBB0_18:
	movq	_a_flag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	setne	%cl
	cmpl	$-1, %edi
	setne	%al
	andb	%cl, %al
LBB0_6:
	movl	$1, %r12d
LBB0_7:
	testb	%al, %al
	cmovnel	%edi, %r12d
	leaq	L_.str.1(%rip), %rdi
	callq	_ok
	testl	%eax, %eax
	je	LBB0_17
## %bb.8:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	leal	-5(%r12), %r13d
	leaq	L_.str.2(%rip), %rbx
	leaq	L_str(%rip), %r14
	leaq	L_.str.4(%rip), %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	callq	_puts
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%ecx, %ecx
	callq	_Decimal
	cmpl	$-5, %r13d
	jbe	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	callq	_ok
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	movq	_NDOSPART@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	testl	%eax, %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_15
## %bb.13:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rdx,%rcx,4)
	incq	%rcx
	movslq	(%rsi), %rax
	cmpq	%rax, %rcx
	jl	LBB0_14
LBB0_15:
	cmpl	%eax, %r12d
	jg	LBB0_17
## %bb.16:
	movq	_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%r12d
	movl	%eax, (%rdx,%r12,4)
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mboot,8,3                      ## @mboot
	.comm	_NDOSPART,4,2                   ## @NDOSPART
	.comm	_ACTIVE,4,2                     ## @ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Partition %d is marked active\n"

	.comm	_a_flag,8,3                     ## @a_flag
L_.str.1:                               ## @.str.1
	.asciz	"Do you want to change the active partition?"

L_.str.2:                               ## @.str.2
	.asciz	"active partition"

L_.str.4:                               ## @.str.4
	.asciz	"Are you happy with this choice"

L_str:                                  ## @str
	.asciz	"Active partition number must be in range 1-4.  Try again."

	.no_dead_strip	_change_active
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function change_active
_change_active:                         ; @change_active
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _mboot@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mboot@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x24, _NDOSPART@GOTPAGE
Lloh4:
	ldr	x24, [x24, _NDOSPART@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, #0
	mov	w21, #-1
Lloh5:
	adrp	x25, _ACTIVE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ACTIVE@GOTPAGEOFF]
Lloh7:
	adrp	x20, l_.str@PAGE
Lloh8:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x22, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x23, x22, lsl #2]
	ldr	w10, [x25]
	add	x22, x22, #1
	tst	w10, w9
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x22, [sp]
	mov	x0, x20
	bl	_printf
	cmn	w21, #1
	csel	w21, w22, w21, eq
	ldr	w8, [x24]
	b	LBB0_2
LBB0_5:
Lloh9:
	adrp	x8, _a_flag@GOTPAGE
Lloh10:
	ldr	x8, [x8, _a_flag@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmn	w19, #1
	ccmp	x8, #0, #4, ne
	cset	w8, ne
	cmn	w21, #1
	b.ne	LBB0_8
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _a_flag@GOTPAGE
Lloh13:
	ldr	x8, [x8, _a_flag@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmn	w19, #1
	ccmp	x8, #0, #4, ne
	cset	w8, ne
LBB0_7:
	mov	w21, #1
LBB0_8:
	cmp	w8, #0
	csel	w19, w19, w21, ne
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ok
	cbz	w0, LBB0_18
; %bb.9:
	sub	w25, w19, #5
Lloh17:
	adrp	x20, l_.str.2@PAGE
Lloh18:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh19:
	adrp	x21, l_str@PAGE
Lloh20:
	add	x21, x21, l_str@PAGEOFF
Lloh21:
	adrp	x22, l_.str.4@PAGE
Lloh22:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	bl	_puts
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	bl	_Decimal
	cmn	w25, #5
	b.ls	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_ok
	cbz	w0, LBB0_11
; %bb.13:
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x9, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	str	wzr, [x23, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x8, [x24]
	cmp	x9, x8
	b.lt	LBB0_15
LBB0_16:
	cmp	w19, w8
	b.gt	LBB0_18
; %bb.17:
Lloh23:
	adrp	x8, _ACTIVE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ACTIVE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	sub	w9, w19, #1
	str	w8, [x23, w9, uxtw #2]
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_mboot,8,3                      ; @mboot
	.comm	_NDOSPART,4,2                   ; @NDOSPART
	.comm	_ACTIVE,4,2                     ; @ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Partition %d is marked active\n"

	.comm	_a_flag,8,3                     ; @a_flag
l_.str.1:                               ; @.str.1
	.asciz	"Do you want to change the active partition?"

l_.str.2:                               ; @.str.2
	.asciz	"active partition"

l_.str.4:                               ; @.str.4
	.asciz	"Are you happy with this choice"

l_str:                                  ; @str
	.asciz	"Active partition number must be in range 1-4.  Try again."

	.no_dead_strip	_change_active
.subsections_via_symbols
