	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_chap
_handle_chap:                           ## @handle_chap
	.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
	testl	%edx, %edx
	jle	LBB0_1
## %bb.3:
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	callq	_ND_TCHECK
	movslq	(%r14), %r13
	cmpl	$3, %r12d
	jbe	LBB0_2
## %bb.4:
	movq	_chapcode_values@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r13d, %edx
	callq	_tok2str
	movq	%r13, %rdi
	callq	_ND_PRINT
	movl	4(%r14), %edi
	callq	_ND_TCHECK
	movslq	4(%r14), %rdi
	callq	_ND_PRINT
	leaq	8(%r14), %r15
	movl	8(%r14), %edi
	movl	$2, %esi
	callq	_ND_TCHECK2
	movq	%r15, %rdi
	callq	_EXTRACT_16BITS
	addl	$-128, %r13d
	cmpl	$3, %r13d
	ja	LBB0_16
## %bb.5:
	movl	%eax, %r15d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r13,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_13:
	leal	-4(%r15), %ebx
	leaq	L_.str.8(%rip), %rdi
	callq	_ND_PRINT
	testl	%ebx, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_16
## %bb.14:
	movl	%r15d, %r15d
	movl	$4, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edi
	callq	_ND_TCHECK
	movl	(%r14,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_safeputchar
	incq	%rbx
	cmpl	%ebx, %r15d
	jne	LBB0_15
	jmp	LBB0_16
LBB0_1:
	leaq	L_.str(%rip), %r13
LBB0_2:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ND_PRINT                       ## TAILCALL
LBB0_6:
	cmpl	$5, %r12d
	jb	LBB0_16
## %bb.7:
	movl	%r12d, %ebx
	movl	16(%r14), %edi
	callq	_ND_TCHECK
	movslq	16(%r14), %r12
	addq	$-5, %rbx
	cmpq	%r12, %rbx
	jl	LBB0_16
## %bb.8:
	leaq	20(%r14), %r13
	leaq	L_.str.5(%rip), %rdi
	callq	_ND_PRINT
	testl	%r12d, %r12d
	jle	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_ND_TCHECK
	movslq	(%r13), %rdi
	addq	$4, %r13
	callq	_ND_PRINT
	decl	%r12d
	jne	LBB0_9
LBB0_10:
	movq	%r13, %rax
	subq	%r14, %rax
	shrq	$2, %rax
	subl	%eax, %r15d
	leaq	L_.str.7(%rip), %rdi
	callq	_ND_PRINT
	testl	%r15d, %r15d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_16
## %bb.11:
	movl	%r15d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %edi
	callq	_ND_TCHECK
	movl	(%r13,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_safeputchar
	incq	%rbx
	cmpl	%ebx, %r14d
	jne	LBB0_12
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_6
	.long	L0_0_set_13
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[|chap]"

	.comm	_chapcode_values,4,2            ## @chapcode_values
L_.str.3:                               ## @.str.3
	.asciz	"unknown"

L_.str.5:                               ## @.str.5
	.asciz	", Value "

L_.str.7:                               ## @.str.7
	.asciz	", Name "

L_.str.8:                               ## @.str.8
	.asciz	", Msg "

	.no_dead_strip	_handle_chap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_chap
_handle_chap:                           ; @handle_chap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cmp	w2, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1]
	bl	_ND_TCHECK
	ldrsw	x23, [x20]
	cmp	w22, #3
	b.ls	LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _chapcode_values@GOTPAGE
Lloh1:
	ldr	x8, [x8, _chapcode_values@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.3@PAGE
Lloh4:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x23
	bl	_tok2str
	mov	x0, x23
	bl	_ND_PRINT
	ldr	w0, [x20, #4]
	bl	_ND_TCHECK
	ldrsw	x0, [x20, #4]
	bl	_ND_PRINT
	mov	x24, x20
	ldr	w0, [x24, #8]!
	mov	w1, #2
	bl	_ND_TCHECK2
	mov	x0, x24
	bl	_EXTRACT_16BITS
	sub	w8, w23, #128
	cmp	w8, #3
	b.hi	LBB0_14
; %bb.3:
	mov	x21, x0
	add	x23, x24, #8
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	sub	w20, w21, #4
Lloh7:
	adrp	x0, l_.str.8@PAGE
Lloh8:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_ND_PRINT
	cmp	w20, #1
	b.lt	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_ND_TCHECK
	ldr	w1, [x23], #4
	mov	x0, x19
	bl	_safeputchar
	subs	w20, w20, #1
	b.ne	LBB0_5
	b	LBB0_14
LBB0_6:
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ND_PRINT
LBB0_8:
	cmp	w22, #5
	b.lo	LBB0_14
; %bb.9:
	mov	w22, w22
	ldr	w0, [x23]
	bl	_ND_TCHECK
	ldrsw	x23, [x23]
	sub	x8, x22, #5
	cmp	x8, x23
	b.lt	LBB0_14
; %bb.10:
	add	x22, x20, #20
Lloh11:
	adrp	x0, l_.str.5@PAGE
Lloh12:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_ND_PRINT
	cmp	w23, #1
	b.lt	LBB0_12
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_ND_TCHECK
	ldrsw	x0, [x22], #4
	bl	_ND_PRINT
	subs	w23, w23, #1
	b.ne	LBB0_11
LBB0_12:
	sub	x8, x22, x20
	lsr	x8, x8, #2
	sub	w20, w21, w8
Lloh13:
	adrp	x0, l_.str.7@PAGE
Lloh14:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_ND_PRINT
	cmp	w20, #1
	b.lt	LBB0_14
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_ND_TCHECK
	ldr	w1, [x22], #4
	mov	x0, x19
	bl	_safeputchar
	subs	w20, w20, #1
	b.ne	LBB0_13
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[|chap]"

	.comm	_chapcode_values,4,2            ; @chapcode_values
l_.str.3:                               ; @.str.3
	.asciz	"unknown"

l_.str.5:                               ; @.str.5
	.asciz	", Value "

l_.str.7:                               ; @.str.7
	.asciz	", Name "

l_.str.8:                               ; @.str.8
	.asciz	", Msg "

	.no_dead_strip	_handle_chap
.subsections_via_symbols
