	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -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, -32(%rbp)
	movl	$1, -28(%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	_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
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.6:
	movl	%eax, %ebx
	movq	_FIONBIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movl	%ebx, %edi
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	testq	%r15, %r15
	je	LBB0_13
## %bb.11:
	cmpb	$0, (%r15)
	je	LBB0_13
## %bb.12:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_Q_stricmp
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_Sys_StringToSockaddr
	jmp	LBB0_15
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_5
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_5
LBB0_13:
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
LBB0_15:
	movq	_PORT_ANY@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_17
## %bb.16:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.4(%rip), %rdi
LBB0_5:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
LBB0_20:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movswl	%r14w, %edi
	callq	_htons
LBB0_18:
	movq	%rax, -48(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	movl	$24, %edx
	callq	_bind
	cmpl	$-1, %eax
	jne	LBB0_20
## %bb.19:
	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	_close
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.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	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
L_.str.2:                               ## @.str.2
	.asciz	"ERROR: UDP_OpenSocket: socket: %s"

	.comm	_FIONBIO,4,2                    ## @FIONBIO
L_.str.3:                               ## @.str.3
	.asciz	"ERROR: 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	"ERROR: 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
	.comm	_AF_INET,4,2                    ## @AF_INET
L_.str.6:                               ## @.str.6
	.asciz	"ERROR: 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, #96
	.cfi_def_cfa_offset 96
	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
	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	x8, _PF_INET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _IPPROTO_UDP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IPPROTO_UDP@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:
	mov	x19, x0
Lloh16:
	adrp	x8, _FIONBIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FIONBIO@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #20
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.5:
Lloh19:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _SO_BROADCAST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SO_BROADCAST@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	add	x3, sp, #16
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.6:
	cbz	x21, LBB0_12
; %bb.7:
	ldrb	w8, [x21]
	cbz	w8, LBB0_12
; %bb.8:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_Q_stricmp
	cbz	w0, LBB0_12
; %bb.9:
	add	x1, sp, #24
	mov	x0, x21
	bl	_Sys_StringToSockaddr
	b	LBB0_13
LBB0_10:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Com_Printf
	b	LBB0_19
LBB0_11:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Com_Printf
	b	LBB0_19
LBB0_12:
Lloh31:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh32:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [sp, #40]
LBB0_13:
Lloh34:
	adrp	x8, _PORT_ANY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _PORT_ANY@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_16
; %bb.14:
	mov	x0, #0
	b	LBB0_17
LBB0_15:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh37:
	adrp	x0, l_.str.4@PAGE
Lloh38:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Com_Printf
	b	LBB0_19
LBB0_16:
	sxth	w0, w20
	bl	_htons
LBB0_17:
	str	x0, [sp, #32]
Lloh39:
	adrp	x8, _AF_INET@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #24
	bl	_bind
	cmn	w0, #1
	b.ne	LBB0_20
; %bb.18:
	bl	_NET_ErrorString
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh42:
	adrp	x0, l_.str.6@PAGE
Lloh43:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_Com_Printf
	mov	x0, x19
	bl	_close
LBB0_19:
	mov	w19, #0
LBB0_20:
	mov	x0, 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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.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	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
l_.str.2:                               ; @.str.2
	.asciz	"ERROR: UDP_OpenSocket: socket: %s"

	.comm	_FIONBIO,4,2                    ; @FIONBIO
l_.str.3:                               ; @.str.3
	.asciz	"ERROR: 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	"ERROR: 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
	.comm	_AF_INET,4,2                    ; @AF_INET
l_.str.6:                               ; @.str.6
	.asciz	"ERROR: UDP_OpenSocket: bind: %s\n"

.subsections_via_symbols
