	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_socket
_open_socket:                           ## @open_socket
	.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
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	_ntp_host@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_ntp_port@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_LOG_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movslq	(%r14), %r14
	movl	(%r15), %r15d
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rdx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_12
LBB0_2:
	movq	_ntpd_sock@GOTPCREL(%rip), %r14
	movl	$-1, (%r14)
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	-48(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.3:
	leaq	L_.str.1(%rip), %r13
	leaq	L_.str.2(%rip), %r15
	leaq	L_.str.3(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rbx), %rbx
	movq	%rdx, %r13
	testq	%rbx, %rbx
	je	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%rbx), %edi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_socket
	movl	%eax, (%r14)
	movq	%r15, %rdx
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movl	%eax, %edi
	callq	_connect
	movl	(%r14), %edi
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_close
	movl	$-1, (%r14)
	movq	%r12, %rdx
	jmp	LBB0_4
LBB0_8:
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_11
LBB0_9:
	movq	%r13, %rdx
	cmpl	$-1, %edi
	je	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rdi
	callq	_freeaddrinfo
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
LBB0_12:
	movl	$-1, %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_ntp_host,4,2                   ## @ntp_host
	.comm	_ntp_port,4,2                   ## @ntp_port
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s(%s): %s"

	.comm	_ntpd_sock,4,2                  ## @ntpd_sock
L_.str.1:                               ## @.str.1
	.asciz	"no address"

	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"socket"

L_.str.3:                               ## @.str.3
	.asciz	"connect"

L_.str.4:                               ## @.str.4
	.asciz	"%s: %m"

	.no_dead_strip	_open_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_socket
_open_socket:                           ; @open_socket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SOCK_DGRAM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SOCK_DGRAM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #44]
Lloh6:
	adrp	x20, _ntp_host@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ntp_host@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh8:
	adrp	x21, _ntp_port@GOTPAGE
Lloh9:
	ldr	x21, [x21, _ntp_port@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #32
	add	x3, sp, #24
	bl	_getaddrinfo
	cbz	w0, LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
	ldrsw	x20, [x20]
	ldr	w21, [x21]
	bl	_gai_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	b	LBB0_13
LBB0_2:
Lloh15:
	adrp	x20, _ntpd_sock@GOTPAGE
Lloh16:
	ldr	x20, [x20, _ntpd_sock@GOTPAGEOFF]
	mov	w21, #-1
Lloh17:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
	str	w21, [x20]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _errno@GOTPAGE
Lloh21:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
	ldr	x22, [sp, #24]
	cbz	x22, LBB0_9
; %bb.3:
Lloh23:
	adrp	x19, l_.str.1@PAGE
Lloh24:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh25:
	adrp	x23, l_.str.2@PAGE
Lloh26:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh27:
	adrp	x24, l_.str.3@PAGE
Lloh28:
	add	x24, x24, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x19, x23
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x22, [x22, #24]
	cbz	x22, LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x22, #12]
	ldr	w2, [x22, #8]
	bl	_socket
	str	w0, [x20]
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w2, w1, [x22]
	bl	_connect
	mov	x8, x0
	ldr	w0, [x20]
	cmn	w8, #1
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_close
	str	w21, [x20]
	mov	x19, x24
	b	LBB0_5
LBB0_9:
Lloh29:
	adrp	x19, l_.str.1@PAGE
Lloh30:
	add	x19, x19, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_10:
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.11:
	ldr	x0, [sp, #24]
	bl	_freeaddrinfo
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh31:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x19
LBB0_13:
	bl	_syslog
	mov	w0, #-1
LBB0_14:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_ntp_host,4,2                   ; @ntp_host
	.comm	_ntp_port,4,2                   ; @ntp_port
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s(%s): %s"

	.comm	_ntpd_sock,4,2                  ; @ntpd_sock
l_.str.1:                               ; @.str.1
	.asciz	"no address"

	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"socket"

l_.str.3:                               ; @.str.3
	.asciz	"connect"

l_.str.4:                               ; @.str.4
	.asciz	"%s: %m"

	.no_dead_strip	_open_socket
.subsections_via_symbols
