	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NET_IPXSocket                  ## -- Begin function NET_IPXSocket
	.p2align	4, 0x90
_NET_IPXSocket:                         ## @NET_IPXSocket
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movl	$1, -36(%rbp)
	movq	_AF_IPX@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NSPROTO_IPX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	movl	%eax, %ebx
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_WSAGetLastError
	movq	_WSAEAFNOSUPPORT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_4:
	movq	_FIONBIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movl	%ebx, %edi
	callq	_ioctlsocket
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_6:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
	cmpq	(%r12), %rax
	jne	LBB0_8
## %bb.7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.2(%rip), %rdi
LBB0_3:
	movl	%eax, %esi
	callq	_Com_Printf
LBB0_12:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r15), %eax
	movl	%eax, -48(%rbp)
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	xorl	%esi, %esi
	movl	$6, %edx
	callq	_memset
	movq	_PORT_ANY@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_10
## %bb.9:
	movswl	%r14w, %edi
	callq	_htons
	movq	%rax, %r15
LBB0_10:
	movq	%r15, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movl	%ebx, %edi
	movl	$24, %edx
	callq	_bind
	cmpq	(%r12), %rax
	jne	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_NET_ErrorString
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_Com_Printf
	movl	%ebx, %edi
	callq	_closesocket
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_IPX,4,2                     ## @AF_IPX
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_NSPROTO_IPX,4,2                ## @NSPROTO_IPX
	.comm	_INVALID_SOCKET,4,2             ## @INVALID_SOCKET
	.comm	_WSAEAFNOSUPPORT,4,2            ## @WSAEAFNOSUPPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: IPX_Socket: socket: %s\n"

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

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

	.comm	_PORT_ANY,4,2                   ## @PORT_ANY
L_.str.3:                               ## @.str.3
	.asciz	"WARNING: IPX_Socket: bind: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NET_IPXSocket                  ; -- Begin function NET_IPXSocket
	.p2align	2
_NET_IPXSocket:                         ; @NET_IPXSocket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x0
	mov	w8, #1
	str	w8, [sp, #4]
Lloh0:
	adrp	x22, _AF_IPX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AF_IPX@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _NSPROTO_IPX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NSPROTO_IPX@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_socket
Lloh8:
	adrp	x8, _INVALID_SOCKET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INVALID_SOCKET@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	bl	_WSAGetLastError
Lloh11:
	adrp	x8, _WSAEAFNOSUPPORT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WSAEAFNOSUPPORT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_12
; %bb.2:
	bl	_NET_ErrorString
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Com_Printf
	b	LBB0_12
LBB0_3:
	mov	x19, x0
Lloh16:
	adrp	x8, _FIONBIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FIONBIO@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #4
	bl	_ioctlsocket
Lloh19:
	adrp	x21, _SOCKET_ERROR@GOTPAGE
Lloh20:
	ldr	x21, [x21, _SOCKET_ERROR@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	bl	_NET_ErrorString
	mov	x1, x0
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Com_Printf
	b	LBB0_12
LBB0_5:
Lloh23:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _SO_BROADCAST@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SO_BROADCAST@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	add	x3, sp, #4
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	bl	_NET_ErrorString
	mov	x1, x0
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Com_Printf
	b	LBB0_12
LBB0_7:
	ldr	w8, [x22]
	str	w8, [sp, #24]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	w1, #0
	mov	w2, #6
	bl	_memset
Lloh31:
	adrp	x8, _PORT_ANY@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PORT_ANY@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_9
; %bb.8:
	mov	x0, #0
	b	LBB0_10
LBB0_9:
	sxth	w0, w20
	bl	_htons
LBB0_10:
	str	x0, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #24
	bl	_bind
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.11:
	bl	_NET_ErrorString
	mov	x1, x0
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Com_Printf
	mov	x0, x19
	bl	_closesocket
LBB0_12:
	mov	w19, #0
LBB0_13:
	mov	x0, 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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_IPX,4,2                     ; @AF_IPX
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_NSPROTO_IPX,4,2                ; @NSPROTO_IPX
	.comm	_INVALID_SOCKET,4,2             ; @INVALID_SOCKET
	.comm	_WSAEAFNOSUPPORT,4,2            ; @WSAEAFNOSUPPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: IPX_Socket: socket: %s\n"

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

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

	.comm	_PORT_ANY,4,2                   ; @PORT_ANY
l_.str.3:                               ; @.str.3
	.asciz	"WARNING: IPX_Socket: bind: %s\n"

.subsections_via_symbols
