	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NET_IPSocket                   ## -- Begin function NET_IPSocket
	.p2align	4, 0x90
_NET_IPSocket:                          ## @NET_IPSocket
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	$1, -48(%rbp)
	movl	$1, -44(%rbp)
	movl	$0, (%rdx)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_Com_Printf
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
LBB0_3:
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	movl	%eax, %r12d
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_5
## %bb.4:
	movq	_socketError@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
	jmp	LBB0_20
LBB0_5:
	movq	_FIONBIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movl	%r12d, %edi
	callq	_ioctlsocket
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_18
LBB0_7:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r12d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	cmpq	(%r13), %rax
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
LBB0_9:
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	cmpb	$0, (%rbx)
	je	LBB0_11
## %bb.12:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_Sys_StringToSockaddr
	testl	%eax, %eax
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %rbx
	jne	LBB0_13
	jmp	LBB0_19
LBB0_11:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %rbx
LBB0_13:
	movq	_PORT_ANY@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_15:
	movswl	%r15w, %edi
	callq	_htons
LBB0_16:
	movq	%rax, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movl	%r12d, %edi
	movl	$16, %edx
	callq	_bind
	cmpq	(%rbx), %rax
	jne	LBB0_20
## %bb.17:
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.5(%rip), %rdi
LBB0_18:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
	movq	_socketError@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_19:
	movl	%r12d, %edi
	callq	_closesocket
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_20:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Opening IP socket: %s:%i\n"

L_.str.1:                               ## @.str.1
	.asciz	"Opening IP socket: 0.0.0.0:%i\n"

	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
	.comm	_INVALID_SOCKET,4,2             ## @INVALID_SOCKET
	.comm	_socketError,4,2                ## @socketError
L_.str.2:                               ## @.str.2
	.asciz	"WARNING: NET_IPSocket: socket: %s\n"

	.comm	_FIONBIO,4,2                    ## @FIONBIO
	.comm	_SOCKET_ERROR,8,3               ## @SOCKET_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"WARNING: NET_IPSocket: ioctl FIONBIO: %s\n"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_BROADCAST,4,2               ## @SO_BROADCAST
L_.str.4:                               ## @.str.4
	.asciz	"WARNING: NET_IPSocket: setsockopt SO_BROADCAST: %s\n"

	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_PORT_ANY,4,2                   ## @PORT_ANY
L_.str.5:                               ## @.str.5
	.asciz	"WARNING: NET_IPSocket: bind: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NET_IPSocket                   ; -- Begin function NET_IPSocket
	.p2align	2
_NET_IPSocket:                          ; @NET_IPSocket
	.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	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	w8, #1
	stp	w8, w8, [sp, #24]
	str	wzr, [x2]
	cbz	x0, LBB0_2
; %bb.1:
	stp	x22, x21, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:
	mov	x8, x21
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_3:
	bl	_Com_Printf
Lloh4:
	adrp	x8, _PF_INET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _IPPROTO_UDP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IPPROTO_UDP@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_socket
	mov	x20, x0
Lloh13:
	adrp	x23, _INVALID_SOCKET@GOTPAGE
Lloh14:
	ldr	x23, [x23, _INVALID_SOCKET@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _socketError@GOTPAGE
Lloh16:
	ldr	x8, [x8, _socketError@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19]
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Com_Printf
	b	LBB0_20
LBB0_5:
Lloh20:
	adrp	x8, _FIONBIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FIONBIO@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, sp, #28
	mov	x0, x20
	bl	_ioctlsocket
Lloh23:
	adrp	x24, _SOCKET_ERROR@GOTPAGE
Lloh24:
	ldr	x24, [x24, _SOCKET_ERROR@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_7:
Lloh27:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _SO_BROADCAST@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SO_BROADCAST@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	add	x3, sp, #24
	mov	x0, x20
	mov	w4, #4
	bl	_setsockopt
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Com_Printf
LBB0_9:
	cbz	x22, LBB0_12
; %bb.10:
	ldrb	w8, [x22]
	cbz	w8, LBB0_12
; %bb.11:
Lloh35:
	adrp	x8, _AF_INET@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh37:
	ldr	w3, [x8]
	add	x1, sp, #32
	mov	x0, x22
	mov	w2, #16
	bl	_Sys_StringToSockaddr
	cbnz	w0, LBB0_13
	b	LBB0_19
LBB0_12:
Lloh38:
	adrp	x8, _AF_INET@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _INADDR_ANY@GOTPAGE
Lloh42:
	ldr	x9, [x9, _INADDR_ANY@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #40]
LBB0_13:
Lloh44:
	adrp	x8, _PORT_ANY@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PORT_ANY@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_15
; %bb.14:
	mov	x0, #0
	b	LBB0_16
LBB0_15:
	sxth	w0, w21
	bl	_htons
LBB0_16:
	str	x0, [sp, #32]
	add	x1, sp, #32
	mov	x0, x20
	mov	w2, #16
	bl	_bind
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_20
; %bb.17:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh47:
	adrp	x0, l_.str.5@PAGE
Lloh48:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_18:
	bl	_Com_Printf
Lloh49:
	adrp	x8, _socketError@GOTPAGE
Lloh50:
	ldr	x8, [x8, _socketError@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_19:
	mov	x0, x20
	bl	_closesocket
	ldr	w20, [x23]
LBB0_20:
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Opening IP socket: %s:%i\n"

l_.str.1:                               ; @.str.1
	.asciz	"Opening IP socket: 0.0.0.0:%i\n"

	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
	.comm	_INVALID_SOCKET,4,2             ; @INVALID_SOCKET
	.comm	_socketError,4,2                ; @socketError
l_.str.2:                               ; @.str.2
	.asciz	"WARNING: NET_IPSocket: socket: %s\n"

	.comm	_FIONBIO,4,2                    ; @FIONBIO
	.comm	_SOCKET_ERROR,8,3               ; @SOCKET_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"WARNING: NET_IPSocket: ioctl FIONBIO: %s\n"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_BROADCAST,4,2               ; @SO_BROADCAST
l_.str.4:                               ; @.str.4
	.asciz	"WARNING: NET_IPSocket: setsockopt SO_BROADCAST: %s\n"

	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_PORT_ANY,4,2                   ; @PORT_ANY
l_.str.5:                               ; @.str.5
	.asciz	"WARNING: NET_IPSocket: bind: %s\n"

.subsections_via_symbols
