	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ensure_socket_initialization
_ensure_socket_initialization:          ## @ensure_socket_initialization
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	cmpb	$0, _ensure_socket_initialization.initialized(%rip)
	jne	LBB0_4
## %bb.1:
	movl	$2, %edi
	movl	$2, %esi
	callq	_MAKEWORD
	leaq	-4(%rbp), %rsi
	movl	%eax, %edi
	callq	_WSAStartup
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_WSAGetLastError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_die
LBB0_3:
	movq	_WSACleanup@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_atexit
	movb	$1, _ensure_socket_initialization.initialized(%rip)
LBB0_4:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ensure_socket_initialization.initialized,1,2 ## @ensure_socket_initialization.initialized
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to initialize winsock subsystem, error %d"

	.comm	_WSACleanup,8,3                 ## @WSACleanup
	.no_dead_strip	_ensure_socket_initialization
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ensure_socket_initialization
_ensure_socket_initialization:          ; @ensure_socket_initialization
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	adrp	x19, _ensure_socket_initialization.initialized@PAGE
	ldrb	w8, [x19, _ensure_socket_initialization.initialized@PAGEOFF]
	tbnz	w8, #0, LBB0_4
; %bb.1:
	mov	w0, #2
	mov	w1, #2
	bl	_MAKEWORD
	add	x1, sp, #12
	bl	_WSAStartup
	cbz	x0, LBB0_3
; %bb.2:
	bl	_WSAGetLastError
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die
LBB0_3:
Lloh2:
	adrp	x8, _WSACleanup@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WSACleanup@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	bl	_atexit
	mov	w8, #1
	strb	w8, [x19, _ensure_socket_initialization.initialized@PAGEOFF]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ensure_socket_initialization.initialized,1,2 ; @ensure_socket_initialization.initialized
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to initialize winsock subsystem, error %d"

	.comm	_WSACleanup,8,3                 ; @WSACleanup
	.no_dead_strip	_ensure_socket_initialization
.subsections_via_symbols
