	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getdatasock
_getdatasock:                           ## @getdatasock
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$1, -44(%rbp)
	movq	_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	js	LBB0_1
## %bb.13:
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%rbx, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fdopen                         ## TAILCALL
LBB0_1:
	movq	_data_dest@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_2
## %bb.4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r15d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	movq	_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_syslog
LBB0_6:
	movq	_ctrl_addr@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movq	_data_source@GOTPCREL(%rip), %r12
	movups	%xmm0, (%r12)
	movq	_dataport@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, 12(%r12)
	xorl	%edi, %edi
	callq	_seteuid
	movl	8(%r12), %edx
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_11
## %bb.7:
	movl	$1, %ebx
	movq	_EADDRINUSE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	cmpl	(%r14), %r13d
	jne	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$10, %ebx
	ja	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %edi
	callq	_sleep
	incl	%ebx
	movl	8(%r12), %edx
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_bind
	testq	%rax, %rax
	js	LBB0_8
LBB0_11:
	movq	_pw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_seteuid
	movl	%r15d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_fdopen
	jmp	LBB0_12
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_3:
	movq	_pw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_seteuid
	movl	%r15d, %edi
	callq	_close
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r13d, (%rax)
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_data,8,3                       ## @data
	.comm	_data_dest,4,2                  ## @data_dest
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_LOG_WARNING,4,2                ## @LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data setsockopt (SO_REUSEADDR): %m"

	.comm	_data_source,16,3               ## @data_source
	.comm	_ctrl_addr,16,3                 ## @ctrl_addr
	.comm	_dataport,4,2                   ## @dataport
	.comm	_errno,4,2                      ## @errno
	.comm	_EADDRINUSE,4,2                 ## @EADDRINUSE
	.comm	_pw,8,3                         ## @pw
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_IPTOS_THROUGHPUT,4,2           ## @IPTOS_THROUGHPUT
	.comm	_IP_TOS,4,2                     ## @IP_TOS
	.comm	_TCP_NOPUSH,4,2                 ## @TCP_NOPUSH
	.no_dead_strip	_getdatasock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getdatasock
_getdatasock:                           ; @getdatasock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp, #12]
Lloh0:
	adrp	x8, _data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _data@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	tbnz	x0, #63, LBB0_2
; %bb.1:
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_fdopen
LBB0_2:
Lloh3:
	adrp	x8, _data_dest@GOTPAGE
Lloh4:
	ldr	x8, [x8, _data_dest@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.3:
Lloh9:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x20
	mov	w4, #4
	bl	_setsockopt
	tbz	x0, #63, LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _LOG_WARNING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LOG_WARNING@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_syslog
LBB0_5:
Lloh20:
	adrp	x8, _ctrl_addr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ctrl_addr@GOTPAGEOFF]
Lloh22:
	ldr	q0, [x8]
Lloh23:
	adrp	x21, _data_source@GOTPAGE
Lloh24:
	ldr	x21, [x21, _data_source@GOTPAGEOFF]
	str	q0, [x21]
Lloh25:
	adrp	x8, _dataport@GOTPAGE
Lloh26:
	ldr	x8, [x8, _dataport@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [x21, #12]
	mov	w0, #0
	bl	_seteuid
	ldr	w2, [x21, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_bind
	tbz	x0, #63, LBB0_9
; %bb.6:
	mov	w22, #1
Lloh28:
	adrp	x23, _errno@GOTPAGE
Lloh29:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh30:
	adrp	x24, _EADDRINUSE@GOTPAGE
Lloh31:
	ldr	x24, [x24, _EADDRINUSE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x23]
	ldr	w8, [x24]
	cmp	w25, w8
	ccmp	w22, #10, #2, eq
	b.hi	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_sleep
	add	w22, w22, #1
	ldr	w2, [x21, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_bind
	tbnz	x0, #63, LBB0_7
LBB0_9:
Lloh32:
	adrp	x8, _pw@GOTPAGE
Lloh33:
	ldr	x8, [x8, _pw@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_seteuid
	mov	x0, x20
	mov	x1, x19
	bl	_fdopen
	b	LBB0_12
LBB0_10:
Lloh35:
	adrp	x8, _errno@GOTPAGE
Lloh36:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh37:
	ldr	w25, [x8]
LBB0_11:
Lloh38:
	adrp	x8, _pw@GOTPAGE
Lloh39:
	ldr	x8, [x8, _pw@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_seteuid
	mov	x0, x20
	bl	_close
	mov	x0, #0
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	str	w25, [x8]
LBB0_12:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_data,8,3                       ; @data
	.comm	_data_dest,4,2                  ; @data_dest
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_LOG_WARNING,4,2                ; @LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data setsockopt (SO_REUSEADDR): %m"

	.comm	_data_source,16,3               ; @data_source
	.comm	_ctrl_addr,16,3                 ; @ctrl_addr
	.comm	_dataport,4,2                   ; @dataport
	.comm	_errno,4,2                      ; @errno
	.comm	_EADDRINUSE,4,2                 ; @EADDRINUSE
	.comm	_pw,8,3                         ; @pw
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_IPTOS_THROUGHPUT,4,2           ; @IPTOS_THROUGHPUT
	.comm	_IP_TOS,4,2                     ; @IP_TOS
	.comm	_TCP_NOPUSH,4,2                 ; @TCP_NOPUSH
	.no_dead_strip	_getdatasock
.subsections_via_symbols
