	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$1, -44(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_Com_Printf
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
LBB0_3:
	movq	_AF_INET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	movl	%eax, %ebx
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_WSAGetLastError
	movq	_WSAEAFNOSUPPORT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_21
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_7:
	movq	_FIONBIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movl	%ebx, %edi
	callq	_ioctlsocket
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_9
## %bb.8:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_6
LBB0_9:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.4(%rip), %rdi
LBB0_6:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	testq	%r15, %r15
	je	LBB0_14
## %bb.12:
	cmpb	$0, (%r15)
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_Q_stricmp
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	callq	_Sys_StringToSockaddr
	jmp	LBB0_16
LBB0_14:
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
LBB0_16:
	movq	_PORT_ANY@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_18
## %bb.17:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_18:
	movswl	%r14w, %edi
	callq	_htons
LBB0_19:
	movq	%rax, -64(%rbp)
	movl	(%r12), %eax
	movl	%eax, -72(%rbp)
	leaq	-72(%rbp), %rsi
	movl	%ebx, %edi
	movl	$24, %edx
	callq	_bind
	cmpq	(%r13), %rax
	jne	LBB0_21
## %bb.20:
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
	movl	%ebx, %edi
	callq	_closesocket
	xorl	%ebx, %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_qtrue,4,2                      ## @qtrue
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Opening IP socket: %s:%i\n"

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

	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
	.comm	_INVALID_SOCKET,4,2             ## @INVALID_SOCKET
	.comm	_WSAEAFNOSUPPORT,4,2            ## @WSAEAFNOSUPPORT
L_.str.2:                               ## @.str.2
	.asciz	"WARNING: UDP_OpenSocket: socket: %s\n"

	.comm	_FIONBIO,4,2                    ## @FIONBIO
	.comm	_SOCKET_ERROR,8,3               ## @SOCKET_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"WARNING: UDP_OpenSocket: 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: UDP_OpenSocket: setsockopt SO_BROADCAST: %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"localhost"

	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_PORT_ANY,4,2                   ## @PORT_ANY
L_.str.6:                               ## @.str.6
	.asciz	"WARNING: UDP_OpenSocket: 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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _qtrue@GOTPAGE
Lloh1:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	mov	w8, #1
	stp	w8, w9, [sp, #16]
	cbz	x0, LBB0_2
; %bb.1:
	stp	x21, x20, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:
	mov	x8, x20
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_3:
	bl	_Com_Printf
Lloh7:
	adrp	x22, _AF_INET@GOTPAGE
Lloh8:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh9:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _IPPROTO_UDP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IPPROTO_UDP@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_socket
Lloh15:
	adrp	x8, _INVALID_SOCKET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INVALID_SOCKET@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.4:
	bl	_WSAGetLastError
Lloh18:
	adrp	x8, _WSAEAFNOSUPPORT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WSAEAFNOSUPPORT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_20
; %bb.5:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Com_Printf
	b	LBB0_20
LBB0_6:
	mov	x19, x0
Lloh23:
	adrp	x8, _FIONBIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FIONBIO@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	add	x2, sp, #20
	bl	_ioctlsocket
Lloh26:
	adrp	x23, _SOCKET_ERROR@GOTPAGE
Lloh27:
	ldr	x23, [x23, _SOCKET_ERROR@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Com_Printf
	b	LBB0_20
LBB0_8:
Lloh30:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _SO_BROADCAST@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SO_BROADCAST@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	add	x3, sp, #16
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh36:
	adrp	x0, l_.str.4@PAGE
Lloh37:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Com_Printf
	b	LBB0_20
LBB0_10:
	cbz	x21, LBB0_14
; %bb.11:
	ldrb	w8, [x21]
	cbz	w8, LBB0_14
; %bb.12:
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_Q_stricmp
	cbz	w0, LBB0_14
; %bb.13:
	add	x1, sp, #24
	mov	x0, x21
	bl	_Sys_StringToSockaddr
	b	LBB0_15
LBB0_14:
Lloh40:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh41:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	str	w8, [sp, #40]
LBB0_15:
Lloh43:
	adrp	x8, _PORT_ANY@GOTPAGE
Lloh44:
	ldr	x8, [x8, _PORT_ANY@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_17
; %bb.16:
	mov	x0, #0
	b	LBB0_18
LBB0_17:
	sxth	w0, w20
	bl	_htons
LBB0_18:
	str	x0, [sp, #32]
	ldr	w8, [x22]
	str	w8, [sp, #24]
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #24
	bl	_bind
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_21
; %bb.19:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh46:
	adrp	x0, l_.str.6@PAGE
Lloh47:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_Com_Printf
	mov	x0, x19
	bl	_closesocket
LBB0_20:
	mov	w19, #0
LBB0_21:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_qtrue,4,2                      ; @qtrue
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Opening IP socket: %s:%i\n"

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

	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
	.comm	_INVALID_SOCKET,4,2             ; @INVALID_SOCKET
	.comm	_WSAEAFNOSUPPORT,4,2            ; @WSAEAFNOSUPPORT
l_.str.2:                               ; @.str.2
	.asciz	"WARNING: UDP_OpenSocket: socket: %s\n"

	.comm	_FIONBIO,4,2                    ; @FIONBIO
	.comm	_SOCKET_ERROR,8,3               ; @SOCKET_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"WARNING: UDP_OpenSocket: 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: UDP_OpenSocket: setsockopt SO_BROADCAST: %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"localhost"

	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_PORT_ANY,4,2                   ; @PORT_ANY
l_.str.6:                               ; @.str.6
	.asciz	"WARNING: UDP_OpenSocket: bind: %s\n"

.subsections_via_symbols
