	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2Init                        ## -- Begin function Cs2Init
	.p2align	4, 0x90
_Cs2Init:                               ## @Cs2Init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movl	%esi, %r13d
	movl	%edi, %r14d
	movl	$24, %edi
	callq	_malloc
	movq	_Cs2Area@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	(%r15), %rax
	movl	%r14d, (%rax)
	movq	%rbx, 8(%rax)
	movq	$0, 16(%rax)
	movl	%r13d, %edi
	movq	%r12, %rsi
	callq	_Cs2ChangeCDCore
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	xorl	%eax, %eax
	callq	_Cs2Reset
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	_CART_NETLINK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_NetlinkInit
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_8
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_5:
	movq	_CART_JAPMODEM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_JapModemInit
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	movl	$4, %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %rcx
	movq	_cdip@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	xorl	%eax, %eax
	cmpq	$1, %rcx
	sbbl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Cs2Area,8,3                    ## @Cs2Area
	.comm	_CART_NETLINK,4,2               ## @CART_NETLINK
	.comm	_CART_JAPMODEM,4,2              ## @CART_JAPMODEM
	.comm	_cdip,8,3                       ## @cdip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2Init                        ; -- Begin function Cs2Init
	.p2align	2
_Cs2Init:                               ; @Cs2Init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x20, x4
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	mov	w0, #24
	bl	_malloc
Lloh0:
	adrp	x25, _Cs2Area@GOTPAGE
Lloh1:
	ldr	x25, [x25, _Cs2Area@GOTPAGEOFF]
	str	x0, [x25]
	cbz	x0, LBB0_4
; %bb.1:
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x8, [x25]
	str	w24, [x8]
	stp	x23, xzr, [x8, #8]
	mov	x0, x22
	mov	x1, x21
	bl	_Cs2ChangeCDCore
	cbnz	w0, LBB0_8
; %bb.2:
	bl	_Cs2Reset
	ldr	x8, [x25]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _CART_NETLINK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CART_NETLINK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	_NetlinkInit
	cbnz	w0, LBB0_8
	b	LBB0_7
LBB0_4:
	mov	w0, #-1
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x9, _CART_JAPMODEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CART_JAPMODEM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	bl	_JapModemInit
	cbnz	w0, LBB0_8
LBB0_7:
	mov	w0, #4
	mov	w1, #1
	bl	_calloc
Lloh8:
	adrp	x8, _cdip@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cdip@GOTPAGEOFF]
Lloh10:
	str	x0, [x8]
	cmp	x0, #0
	csetm	w0, eq
LBB0_8:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_Cs2Area,8,3                    ; @Cs2Area
	.comm	_CART_NETLINK,4,2               ; @CART_NETLINK
	.comm	_CART_JAPMODEM,4,2              ; @CART_JAPMODEM
	.comm	_cdip,8,3                       ; @cdip
.subsections_via_symbols
