	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_pkt                   ## -- Begin function generate_pkt
	.p2align	4, 0x90
_generate_pkt:                          ## @generate_pkt
	.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	%rcx, %r15
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	_LEN_PKT_NOMAC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rdi), %rax
	movq	%rax, 16(%rsp)
	movups	(%rdi), %xmm0
	movups	%xmm0, (%rsp)
	callq	_ZERO
	leaq	-48(%rbp), %r12
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_TVTOTS
	leaq	20(%rbx), %rsi
	movq	%r12, %rdi
	callq	_HTONL_FP
	movq	_STRATUM_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STRATUM_TO_PKT
	movl	%eax, 16(%rbx)
	movl	$8, (%rbx)
	movq	_LEAP_NOTINSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ntpver@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$3, %ecx
	callq	_set_li_vn_mode
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_printf
LBB0_2:
	testq	%r15, %r15
	je	LBB0_3
## %bb.4:
	movl	%r14d, %edi
	callq	_htonl
	movq	8(%rbx), %r8
	movl	%eax, (%r8)
	movq	_MAX_MDG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addq	$4, %r8
	movq	%rbx, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movq	%r15, %rcx
	callq	_make_mac
	testl	%eax, %eax
	jle	LBB0_6
## %bb.5:
	movq	_KEY_MAC_LEN@GOTPCREL(%rip), %rcx
	addl	%ebx, %eax
	addl	(%rcx), %eax
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_3:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_6:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LEN_PKT_NOMAC,4,2              ## @LEN_PKT_NOMAC
	.comm	_STRATUM_UNSPEC,4,2             ## @STRATUM_UNSPEC
	.comm	_LEAP_NOTINSYNC,4,2             ## @LEAP_NOTINSYNC
	.comm	_ntpver,4,2                     ## @ntpver
	.comm	_debug,8,3                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"generate_pkt: key_id %d, key pointer %p\n"

	.comm	_MAX_MDG_LEN,4,2                ## @MAX_MDG_LEN
	.comm	_KEY_MAC_LEN,8,3                ## @KEY_MAC_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_pkt                   ; -- Begin function generate_pkt
	.p2align	2
_generate_pkt:                          ; @generate_pkt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _LEN_PKT_NOMAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LEN_PKT_NOMAC@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	q0, [x0]
	str	q0, [sp, #16]
	ldr	x8, [x0, #16]
	str	x8, [sp, #32]
	add	x0, sp, #16
	bl	_ZERO
	add	x1, sp, #16
	mov	x0, x23
	bl	_TVTOTS
	add	x1, x21, #20
	add	x0, sp, #16
	bl	_HTONL_FP
Lloh3:
	adrp	x8, _STRATUM_UNSPEC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STRATUM_UNSPEC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_STRATUM_TO_PKT
	str	w0, [x21, #16]
	mov	w8, #8
	str	w8, [x21]
Lloh6:
	adrp	x8, _LEAP_NOTINSYNC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LEAP_NOTINSYNC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _ntpver@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ntpver@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w3, #3
	bl	_set_li_vn_mode
Lloh12:
	adrp	x8, _debug@GOTPAGE
Lloh13:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	str	x20, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_printf
LBB0_2:
	cbz	x20, LBB0_5
; %bb.3:
	mov	x0, x22
	bl	_htonl
	ldr	x4, [x21, #8]
	str	w0, [x4], #4
Lloh17:
	adrp	x8, _MAX_MDG_LEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAX_MDG_LEN@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x19
	mov	x3, x20
	bl	_make_mac
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.4:
Lloh20:
	adrp	x8, _KEY_MAC_LEN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KEY_MAC_LEN@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	add	w9, w0, w19
	add	w19, w9, w8
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_LEN_PKT_NOMAC,4,2              ; @LEN_PKT_NOMAC
	.comm	_STRATUM_UNSPEC,4,2             ; @STRATUM_UNSPEC
	.comm	_LEAP_NOTINSYNC,4,2             ; @LEAP_NOTINSYNC
	.comm	_ntpver,4,2                     ; @ntpver
	.comm	_debug,8,3                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"generate_pkt: key_id %d, key pointer %p\n"

	.comm	_MAX_MDG_LEN,4,2                ; @MAX_MDG_LEN
	.comm	_KEY_MAC_LEN,8,3                ; @KEY_MAC_LEN
.subsections_via_symbols
