	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ChapOutput
_ChapOutput:                            ## @ChapOutput
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r15d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	leal	24(%r15), %ebx
	movq	%rsi, -80(%rbp)
	movq	%rdx, -72(%rbp)
	movl	%ebx, %edi
	callq	_htons
	movl	%eax, -64(%rbp)
	movq	_MB_CHAPOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_m_get
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_MBUF_CTOP
	leaq	-80(%rbp), %rsi
	movq	%rax, %rdi
	movl	$24, %edx
	callq	_memcpy
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_MBUF_CTOP
	leaq	24(%rax), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
LBB0_2:
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	callq	_log_DumpBp
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_chapcodes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r12,4), %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
LBB0_5:
	movq	8(%r14), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_LINK_QUEUES
	leaq	-1(%rax), %rcx
	movq	_PROTO_CHAP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_link_PushPacket
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_CHAPOUT,4,2                 ## @MB_CHAPOUT
	.comm	_LogDEBUG,4,2                   ## @LogDEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ChapOutput"

	.comm	_LogPHASE,4,2                   ## @LogPHASE
L_.str.1:                               ## @.str.1
	.asciz	"Chap Output: %s\n"

	.comm	_chapcodes,8,3                  ## @chapcodes
L_.str.2:                               ## @.str.2
	.asciz	"Chap Output: %s (%s)\n"

	.comm	_PROTO_CHAP,4,2                 ## @PROTO_CHAP
	.no_dead_strip	_ChapOutput
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ChapOutput
_ChapOutput:                            ; @ChapOutput
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x5
	mov	x23, x4
	mov	x24, x3
	mov	x22, x1
	mov	x19, x0
	add	w20, w4, #24
	stp	x1, x2, [sp, #8]
	mov	x0, x20
	bl	_htons
	str	w0, [sp, #24]
Lloh0:
	adrp	x8, _MB_CHAPOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MB_CHAPOUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_m_get
	mov	x20, x0
	bl	_MBUF_CTOP
	add	x1, sp, #8
	mov	w2, #24
	bl	_memcpy
	cbz	w23, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_MBUF_CTOP
	add	x0, x0, #24
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
LBB0_2:
Lloh3:
	adrp	x8, _LogDEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LogDEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_log_DumpBp
Lloh8:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _chapcodes@GOTPAGE
Lloh12:
	ldr	x8, [x8, _chapcodes@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	w2, [x8, x22, lsl #2]
	cbz	x21, LBB0_4
; %bb.3:
	str	x21, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	bl	_log_Printf
	ldr	x8, [x19, #8]
	ldr	w21, [x8]
	mov	x0, x19
	bl	_LINK_QUEUES
	sub	x3, x0, #1
Lloh18:
	adrp	x8, _PROTO_CHAP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PROTO_CHAP@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_link_PushPacket
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_CHAPOUT,4,2                 ; @MB_CHAPOUT
	.comm	_LogDEBUG,4,2                   ; @LogDEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ChapOutput"

	.comm	_LogPHASE,4,2                   ; @LogPHASE
l_.str.1:                               ; @.str.1
	.asciz	"Chap Output: %s\n"

	.comm	_chapcodes,8,3                  ; @chapcodes
l_.str.2:                               ; @.str.2
	.asciz	"Chap Output: %s (%s)\n"

	.comm	_PROTO_CHAP,4,2                 ; @PROTO_CHAP
	.no_dead_strip	_ChapOutput
.subsections_via_symbols
