	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function show_cfgpage
_show_cfgpage:                          ## @show_cfgpage
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movl	%edi, %ebx
	movq	_mps_unit@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mps_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	xorl	%r12d, %r12d
	cmpl	$2, %ebx
	je	LBB0_3
## %bb.4:
	cmpl	$3, %ebx
	je	LBB0_7
## %bb.5:
	cmpl	$4, %ebx
	jne	LBB0_16
## %bb.6:
	movq	24(%r13), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movslq	%eax, %r12
LBB0_7:
	movq	16(%r13), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_15
LBB0_3:
	xorl	%ebx, %ebx
LBB0_8:
	movq	8(%r13), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	cmpl	$15, %eax
	jle	LBB0_11
## %bb.9:
	leaq	-48(%rbp), %r9
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movq	%r12, %r8
	callq	_mps_read_extended_config_page
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%rax, %r12
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rax), %ebx
	movl	8(%rax), %r15d
	jmp	LBB0_14
LBB0_11:
	leaq	-48(%rbp), %r8
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_mps_read_config_page
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r12
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rax), %r15d
	movl	%r15d, %ebx
	andl	$15, %ebx
LBB0_14:
	movl	(%r12), %r13d
	shll	$2, %r13d
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, %r14d
	sarl	$4, %r14d
	movl	%ebx, %edi
	callq	_get_page_name
	cmpl	$2, %r14d
	leaq	L_.str.5(%rip), %rcx
	leaq	L_.str.6(%rip), %rdx
	cmoveq	%rcx, %rdx
	cmpl	$1, %r14d
	leaq	L_.str.4(%rip), %rcx
	cmovneq	%rdx, %rcx
	cmpl	$16, %r15d
	leaq	L_.str.3(%rip), %r8
	cmovaeq	%rcx, %r8
	leaq	L_.str.7(%rip), %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_printf
	movq	_HD_REVERSED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	$4, %ecx
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_hexdump
	movq	%r12, %rdi
	callq	_free
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	jmp	LBB0_15
LBB0_12:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-48(%rbp), %edi
	callq	_mps_ioc_status
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_15
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	movl	(%rbx), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mps_unit,4,2                   ## @mps_unit
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mps_open"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"cfgpage: not enough arguments"

L_.str.2:                               ## @.str.2
	.asciz	"Error retrieving cfg page: %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"Read-only"

L_.str.4:                               ## @.str.4
	.asciz	"Read-Write"

L_.str.5:                               ## @.str.5
	.asciz	"Read-Write Persistent"

L_.str.6:                               ## @.str.6
	.asciz	"Unknown Page Attribute"

L_.str.7:                               ## @.str.7
	.asciz	"Page 0x%x: %s %d, %s\n"

	.comm	_HD_REVERSED,4,2                ## @HD_REVERSED
	.no_dead_strip	_show_cfgpage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function show_cfgpage
_show_cfgpage:                          ; @show_cfgpage
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _mps_unit@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mps_unit@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_mps_open
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	cmp	w20, #2
	b.eq	LBB0_7
; %bb.2:
	cmp	w20, #3
	b.eq	LBB0_5
; %bb.3:
	cmp	w20, #4
	b.ne	LBB0_15
; %bb.4:
	ldr	x0, [x22, #24]
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x21, w0
LBB0_5:
	ldr	x0, [x22, #16]
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
	mov	x20, x0
	b	LBB0_8
LBB0_6:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_16
LBB0_7:
	mov	w20, #0
LBB0_8:
	ldr	x0, [x22, #8]
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
	mov	x1, x0
	cmp	w0, #15
	b.le	LBB0_11
; %bb.9:
	add	x5, sp, #12
	mov	x0, x19
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	bl	_mps_read_extended_config_page
	cbz	x0, LBB0_14
; %bb.10:
	mov	x21, x0
	ldp	w22, w24, [x0, #4]
	b	LBB0_13
LBB0_11:
	add	x4, sp, #12
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_mps_read_config_page
	cbz	x0, LBB0_14
; %bb.12:
	mov	x21, x0
	ldr	w24, [x0, #4]
	and	w22, w24, #0xf
LBB0_13:
	ldr	w8, [x21]
	lsl	w23, w8, #2
	asr	w25, w24, #4
	mov	x0, x22
	bl	_get_page_name
	mov	x2, x0
Lloh8:
	adrp	x8, l_.str.6@PAGE
Lloh9:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh10:
	adrp	x9, l_.str.5@PAGE
Lloh11:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	w25, #2
	csel	x8, x9, x8, eq
Lloh12:
	adrp	x9, l_.str.4@PAGE
Lloh13:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	w25, #1
	csel	x8, x9, x8, eq
Lloh14:
	adrp	x9, l_.str.3@PAGE
Lloh15:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w24, #16
	csel	x4, x9, x8, lo
Lloh16:
	adrp	x0, l_.str.7@PAGE
Lloh17:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x22
	mov	x3, x20
	bl	_printf
Lloh18:
	adrp	x8, _HD_REVERSED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HD_REVERSED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w3, w8, #0x4
	mov	x0, x21
	mov	x1, x23
	mov	x2, #0
	bl	_hexdump
	mov	x0, x21
	bl	_free
	mov	x0, x19
	bl	_close
	mov	w19, #0
	b	LBB0_16
LBB0_14:
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	ldr	w19, [x8]
	ldr	w0, [sp, #12]
	bl	_mps_ioc_status
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	b	LBB0_16
LBB0_15:
Lloh26:
	adrp	x19, _EINVAL@GOTPAGE
Lloh27:
	ldr	x19, [x19, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x19]
Lloh28:
	adrp	x9, _errno@GOTPAGE
Lloh29:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh30:
	str	w8, [x9]
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	ldr	w19, [x19]
LBB0_16:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_mps_unit,4,2                   ; @mps_unit
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mps_open"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"cfgpage: not enough arguments"

l_.str.2:                               ; @.str.2
	.asciz	"Error retrieving cfg page: %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"Read-only"

l_.str.4:                               ; @.str.4
	.asciz	"Read-Write"

l_.str.5:                               ; @.str.5
	.asciz	"Read-Write Persistent"

l_.str.6:                               ; @.str.6
	.asciz	"Unknown Page Attribute"

l_.str.7:                               ; @.str.7
	.asciz	"Page 0x%x: %s %d, %s\n"

	.comm	_HD_REVERSED,4,2                ; @HD_REVERSED
	.no_dead_strip	_show_cfgpage
.subsections_via_symbols
