	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	js	LBB0_3
## %bb.1:
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%rbx, %rsi
	jmp	LBB0_2
LBB0_3:
	movl	%esi, %r14d
	xorl	%edi, %edi
	callq	_seteuid
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_fatal
LBB0_5:
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_6
## %bb.10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %r14d
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_socket_set_reuseaddr
	movq	_data_source@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r12d
	movq	_ctrl_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_socket_get_address
	movl	%eax, %r13d
	movl	(%rbx), %edi
	callq	_socket_get_port
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_socket_set_address_and_port
	movl	(%rbx), %r12d
	movl	%r12d, %edi
	callq	_socket_sockaddr_size
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_15
## %bb.11:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_EADDRINUSE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ebx
	cmpl	(%r13), %ebx
	jne	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$10, %r14d
	ja	LBB0_7
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%r14d, %edi
	callq	_sleep
	incl	%r14d
	movq	_data_source@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_socket_sockaddr_size
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_12
LBB0_15:
	movq	_pw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	callq	_seteuid
	testq	%rax, %rax
	jns	LBB0_17
## %bb.16:
	leaq	L_.str(%rip), %rdi
	callq	_fatal
LBB0_17:
	movl	%r15d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fdopen                         ## TAILCALL
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	movq	_pw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	callq	_seteuid
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	callq	_fatal
LBB0_9:
	movl	%r15d, %edi
	callq	_close
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_data,8,3                       ## @data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to seteuid"

	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_data_source,4,2                ## @data_source
	.comm	_ctrl_addr,4,2                  ## @ctrl_addr
	.comm	_errno,4,2                      ## @errno
	.comm	_EADDRINUSE,4,2                 ## @EADDRINUSE
	.comm	_pw,8,3                         ## @pw
	.comm	_IPTOS_THROUGHPUT,4,2           ## @IPTOS_THROUGHPUT
	.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:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
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
	b	LBB0_12
LBB0_2:
	mov	x20, x1
	mov	x0, #0
	bl	_seteuid
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_4:
Lloh5:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	tbnz	w0, #31, LBB0_13
; %bb.5:
	mov	x0, x20
	mov	w1, #1
	bl	_socket_set_reuseaddr
Lloh8:
	adrp	x23, _data_source@GOTPAGE
Lloh9:
	ldr	x23, [x23, _data_source@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh10:
	adrp	x8, _ctrl_addr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ctrl_addr@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_socket_get_address
	mov	x22, x0
	ldr	w0, [x23]
	bl	_socket_get_port
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_socket_set_address_and_port
	ldr	w21, [x23]
	mov	x0, x21
	bl	_socket_sockaddr_size
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_bind
	tbz	x0, #63, LBB0_9
; %bb.6:
	mov	w21, #1
Lloh13:
	adrp	x24, _errno@GOTPAGE
Lloh14:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
Lloh15:
	adrp	x25, _EADDRINUSE@GOTPAGE
Lloh16:
	ldr	x25, [x25, _EADDRINUSE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x24]
	ldr	w8, [x25]
	cmp	w22, w8
	ccmp	w21, #10, #2, eq
	b.hi	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_sleep
	add	w21, w21, #1
	ldr	w22, [x23]
	mov	x0, x22
	bl	_socket_sockaddr_size
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_bind
	tbnz	x0, #63, LBB0_7
LBB0_9:
Lloh17:
	adrp	x8, _pw@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pw@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	x0, [x8]
	bl	_seteuid
	tbz	x0, #63, LBB0_11
; %bb.10:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_11:
	mov	x0, x20
LBB0_12:
	mov	x1, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_fdopen
LBB0_13:
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
LBB0_14:
Lloh25:
	adrp	x8, _pw@GOTPAGE
Lloh26:
	ldr	x8, [x8, _pw@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	ldr	x0, [x8]
	bl	_seteuid
	tbz	x0, #63, LBB0_16
; %bb.15:
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_16:
	mov	x0, x20
	bl	_close
Lloh30:
	adrp	x8, _errno@GOTPAGE
Lloh31:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh32:
	str	w22, [x8]
	mov	x0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_data,8,3                       ; @data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to seteuid"

	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_data_source,4,2                ; @data_source
	.comm	_ctrl_addr,4,2                  ; @ctrl_addr
	.comm	_errno,4,2                      ; @errno
	.comm	_EADDRINUSE,4,2                 ; @EADDRINUSE
	.comm	_pw,8,3                         ; @pw
	.comm	_IPTOS_THROUGHPUT,4,2           ; @IPTOS_THROUGHPUT
	.no_dead_strip	_getdatasock
.subsections_via_symbols
