	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntpd_request
_ntpd_request:                          ## @ntpd_request
	.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
	movq	%rdx, %r14
	movl	%esi, %r13d
	movl	%edi, %r12d
	movq	_NTPC_MAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%rbx), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_NTPC_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	movq	_NTPC_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
	movl	%r12d, 4(%r15)
	movq	_seqno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movl	$1, %edx
	cmovneq	%rcx, %rdx
	movq	%rdx, (%rax)
	movq	%rdx, %rax
	shrq	$8, %rax
	movl	%eax, 8(%r15)
	movl	%edx, 12(%r15)
	movl	%r13d, %eax
	sarl	$8, %eax
	movl	%eax, 24(%r15)
	movl	%r13d, 28(%r15)
	testq	%r14, %r14
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_strlen
	movq	%rax, %rbx
	movq	_NTPC_DMAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jbe	LBB0_5
## %bb.4:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_14
LBB0_1:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_15
LBB0_6:
	leaq	48(%r15), %rax
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rax
	shrq	$8, %rax
	movl	%eax, 40(%r15)
	leaq	48(%r15), %rdi
	movl	%ebx, 44(%r15)
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	leaq	(%r15,%rbx,4), %rax
	addq	$48, %rax
LBB0_7:
	movq	%rax, %rbx
	subq	%r15, %rbx
	testb	$12, %bl
	je	LBB0_10
## %bb.8:
	movq	%rax, %rbx
	subq	%r15, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rax)
	addq	$4, %rax
	addq	$4, %rbx
	testb	$12, %bl
	jne	LBB0_9
LBB0_10:
	sarq	$2, %rbx
	movq	_ntp_debug@GOTPCREL(%rip), %rax
	movq	_DBG_DUMP_PKTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_syslog
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dump_packet
LBB0_12:
	movq	_ntpd_sock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_send
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.13:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
LBB0_14:
	movq	%r15, %rdi
	callq	_free
LBB0_15:
	movl	$-1, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NTPC_MAX,4,2                   ## @NTPC_MAX
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%m"

	.comm	_NTPC_VERSION,4,2               ## @NTPC_VERSION
	.comm	_NTPC_MODE,4,2                  ## @NTPC_MODE
	.comm	_seqno,8,3                      ## @seqno
	.comm	_NTPC_DMAX,8,3                  ## @NTPC_DMAX
L_.str.1:                               ## @.str.1
	.asciz	"NTP request too long (%zu)"

	.comm	_ntp_debug,4,2                  ## @ntp_debug
	.comm	_DBG_DUMP_PKTS,4,2              ## @DBG_DUMP_PKTS
	.comm	_LOG_INFO,4,2                   ## @LOG_INFO
L_.str.2:                               ## @.str.2
	.asciz	"sending %zd bytes"

	.comm	_ntpd_sock,4,2                  ## @ntpd_sock
L_.str.3:                               ## @.str.3
	.asciz	"cannot send to ntpd: %m"

	.no_dead_strip	_ntpd_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntpd_request
_ntpd_request:                          ; @ntpd_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _NTPC_MAX@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NTPC_MAX@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_malloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w2, [x23]
	mov	w1, #0
	bl	_memset
Lloh2:
	adrp	x8, _NTPC_VERSION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NTPC_VERSION@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _NTPC_MODE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NTPC_MODE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8, lsl #3
	stp	w8, w22, [x19]
Lloh8:
	adrp	x8, _seqno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _seqno@GOTPAGEOFF]
	ldr	x9, [x8]
	adds	x9, x9, #1
	csinc	x9, x9, xzr, lo
	str	x9, [x8]
	lsr	x8, x9, #8
	stp	w8, w9, [x19, #8]
	asr	w8, w21, #8
	stp	w8, w21, [x19, #24]
	cbz	x20, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_strlen
	mov	x21, x0
Lloh10:
	adrp	x8, _NTPC_DMAX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NTPC_DMAX@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ls	LBB0_6
; %bb.3:
Lloh13:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_4:
Lloh18:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_syslog
	b	LBB0_15
LBB0_5:
	add	x9, x19, #48
	sub	x8, x9, x19
	b	LBB0_8
LBB0_6:
	lsr	x8, x21, #8
	add	x22, x19, #48
	stp	w8, w21, [x19, #40]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	add	x9, x22, x21, lsl #2
	sub	x8, x9, x19
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	str	wzr, [x9], #4
	add	x8, x8, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	tst	x8, #0xc
	b.ne	LBB0_7
; %bb.9:
Lloh23:
	adrp	x9, _ntp_debug@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ntp_debug@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _DBG_DUMP_PKTS@GOTPAGE
Lloh27:
	ldr	x10, [x10, _DBG_DUMP_PKTS@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.10:
	asr	x9, x8, #2
	lsr	x20, x8, #2
Lloh29:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	str	x9, [sp]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_syslog
	mov	x0, x19
	mov	x1, x20
	bl	_dump_packet
	mov	x2, x20
	b	LBB0_12
LBB0_11:
	lsr	x2, x8, #2
LBB0_12:
Lloh34:
	adrp	x8, _ntpd_sock@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ntpd_sock@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w3, #0
	bl	_send
	mov	x8, x0
	mov	w0, #0
	cmn	w8, #1
	b.ne	LBB0_16
; %bb.13:
Lloh37:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	bl	_syslog
	mov	x0, x19
	bl	_free
LBB0_15:
	mov	w0, #-1
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_NTPC_MAX,4,2                   ; @NTPC_MAX
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%m"

	.comm	_NTPC_VERSION,4,2               ; @NTPC_VERSION
	.comm	_NTPC_MODE,4,2                  ; @NTPC_MODE
	.comm	_seqno,8,3                      ; @seqno
	.comm	_NTPC_DMAX,8,3                  ; @NTPC_DMAX
l_.str.1:                               ; @.str.1
	.asciz	"NTP request too long (%zu)"

	.comm	_ntp_debug,4,2                  ; @ntp_debug
	.comm	_DBG_DUMP_PKTS,4,2              ; @DBG_DUMP_PKTS
	.comm	_LOG_INFO,4,2                   ; @LOG_INFO
l_.str.2:                               ; @.str.2
	.asciz	"sending %zd bytes"

	.comm	_ntpd_sock,4,2                  ; @ntpd_sock
l_.str.3:                               ; @.str.3
	.asciz	"cannot send to ntpd: %m"

	.no_dead_strip	_ntpd_request
.subsections_via_symbols
