	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pppol2tp_build_l2tp_header
_pppol2tp_build_l2tp_header:            ## @pppol2tp_build_l2tp_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_L2TP_HDR_VER@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_L2TP_HDRFLAG_S@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
LBB0_2:
	orl	(%rax), %edi
	callq	_htons
	movl	%eax, (%r14)
	movl	28(%rbx), %edi
	callq	_htons
	movl	%eax, 4(%r14)
	movl	24(%rbx), %edi
	callq	_htons
	movl	%eax, 8(%r14)
	cmpq	$0, 16(%rbx)
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edi
	callq	_htons
	movl	%eax, 12(%r14)
	movl	$0, 16(%r14)
	movl	(%rbx), %r9d
	movl	4(%rbx), %r8d
	incl	%r9d
	movl	%r9d, (%rbx)
	movl	8(%rbx), %edi
	movq	_PPPOL2TP_MSG_SEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PRINTK                         ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L2TP_HDR_VER,4,2               ## @L2TP_HDR_VER
	.comm	_L2TP_HDRFLAG_S,4,2             ## @L2TP_HDRFLAG_S
	.comm	_PPPOL2TP_MSG_SEQ,4,2           ## @PPPOL2TP_MSG_SEQ
	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: updated ns to %hu\n"

	.no_dead_strip	_pppol2tp_build_l2tp_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pppol2tp_build_l2tp_header
_pppol2tp_build_l2tp_header:            ; @pppol2tp_build_l2tp_header
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _L2TP_HDR_VER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _L2TP_HDR_VER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0, #16]
Lloh3:
	adrp	x10, _L2TP_HDRFLAG_S@GOTPAGE
Lloh4:
	ldr	x10, [x10, _L2TP_HDRFLAG_S@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	orr	w0, w9, w8
	bl	_htons
	str	w0, [x20]
	ldr	w0, [x19, #28]
	bl	_htons
	str	w0, [x20, #4]
	ldr	w0, [x19, #24]
	bl	_htons
	str	w0, [x20, #8]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_htons
	stp	w0, wzr, [x20, #12]
	ldp	w8, w4, [x19]
	add	w5, w8, #1
	str	w5, [x19]
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _PPPOL2TP_MSG_SEQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PPPOL2TP_MSG_SEQ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x3, l_.str@PAGE
Lloh13:
	add	x3, x3, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PRINTK
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_L2TP_HDR_VER,4,2               ; @L2TP_HDR_VER
	.comm	_L2TP_HDRFLAG_S,4,2             ; @L2TP_HDRFLAG_S
	.comm	_PPPOL2TP_MSG_SEQ,4,2           ; @PPPOL2TP_MSG_SEQ
	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: updated ns to %hu\n"

	.no_dead_strip	_pppol2tp_build_l2tp_header
.subsections_via_symbols
