	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_socket_init                    ## -- Begin function socket_init
	.p2align	4, 0x90
_socket_init:                           ## @socket_init
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movl	$0, -80(%rbp)
	xorl	%eax, %eax
	callq	_network_init
	movl	$-1, %r15d
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	cmpl	$130, %ebx
	je	LBB0_2
## %bb.3:
	cmpl	$128, %ebx
	jne	LBB0_6
## %bb.4:
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
LBB0_6:
	testq	%r13, %r13
	jne	LBB0_8
## %bb.7:
	movq	_AI_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
LBB0_8:
	movb	$0, -64(%rbp)
	movzwl	%r12w, %ecx
	leaq	L_.str(%rip), %rdx
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_snprintf
	leaq	-96(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	callq	_getaddrinfo_retro
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	8(%rax), %edi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	callq	_socket
	movl	%eax, %r15d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_AI_PASSIVE,4,2                 ## @AI_PASSIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%hu"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_socket_init                    ; -- Begin function socket_init
	.p2align	2
_socket_init:                           ; @socket_init
	.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	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	stp	xzr, xzr, [sp]
	str	wzr, [sp, #16]
	bl	_network_init
	cbz	w0, LBB0_9
; %bb.1:
	cmp	w22, #130
	b.eq	LBB0_4
; %bb.2:
	cmp	w22, #128
	b.ne	LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [sp, #4]
LBB0_6:
	cbnz	x20, LBB0_8
; %bb.7:
Lloh7:
	adrp	x8, _AI_PASSIVE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AI_PASSIVE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_8:
	strb	wzr, [sp, #24]
	and	w3, w21, #0xffff
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #24
	mov	w1, #16
	bl	_snprintf
	add	x1, sp, #24
	mov	x2, sp
	mov	x0, x20
	mov	x3, x19
	bl	_getaddrinfo_retro
	cbz	x0, LBB0_12
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldr	x8, [sp, #40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.11:
	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
LBB0_12:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.13:
	ldp	w1, w0, [x8, #4]
	ldr	w2, [x8]
	bl	_socket
	b	LBB0_10
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_AI_PASSIVE,4,2                 ; @AI_PASSIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%hu"

.subsections_via_symbols
