	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_instance
_setup_instance:                        ## @setup_instance
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_MISDN_MAX_IDLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	decq	%rsi
	movq	_nj_cnt@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	incl	%ecx
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	movq	_card_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_write_lock_irqsave
	leaq	60(%rbx), %rdi
	movq	_Cards@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_write_unlock_irqrestore
	movq	%rbx, %rdi
	callq	__set_debug
	movl	(%rbx), %eax
	leaq	16(%rbx), %r14
	movl	%eax, 40(%rbx)
	leaq	56(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_init
	movq	%r15, 32(%rbx)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mISDNisac_init
	movq	_ISDN_P_B_RAW@GOTPCREL(%rip), %rax
	movq	_ISDN_P_B_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %eax
	andl	%ecx, %eax
	movq	_ISDN_P_B_HDLC@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	btsl	%eax, %edx
	movl	%edx, 16(%rbx)
	movq	_nj_dctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	leaq	20(%rbx), %r15
	movq	48(%rbx), %rax
	movl	$1, (%rax)
	movl	24(%rbx), %esi
	movl	$1, %edi
	callq	_set_channelmap
	movq	48(%rbx), %rdi
	movq	_MAX_DATA_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NJ_DMA_RXSIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	sarl	%edx
	callq	_mISDN_initbchannel
	movq	48(%rbx), %rdi
	movq	%rbx, 8(%rdi)
	movq	_nj_l2l1B@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, 28(%rdi)
	movq	_nj_bctrl@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, 24(%rdi)
	movl	$1, 16(%rdi)
	addq	$20, %rdi
	movq	%r15, %rsi
	callq	_list_add
	movq	48(%rbx), %rax
	movq	%rbx, 8(%rax)
	movl	$2, 32(%rax)
	movl	24(%rbx), %esi
	movl	$2, %edi
	callq	_set_channelmap
	movq	48(%rbx), %rdi
	addq	$32, %rdi
	movq	_MAX_DATA_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	sarl	%edx
	callq	_mISDN_initbchannel
	movq	48(%rbx), %rdi
	movq	%rbx, 40(%rdi)
	movl	(%r14), %eax
	movl	%eax, 60(%rdi)
	movl	(%r13), %eax
	movl	%eax, 56(%rdi)
	movl	$2, 48(%rdi)
	addq	$52, %rdi
	movq	%r15, %rsi
	callq	_list_add
	movq	48(%rbx), %rax
	movq	%rbx, 40(%rax)
	movq	%rbx, %rdi
	callq	_nj_setup
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mISDN_register_device
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_nj_init_card
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movq	%rbx, %rdi
	callq	_nj_release
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_nj_cnt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	incl	%esi
	movl	%esi, (%rax)
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_notice
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MISDN_MAX_IDLEN,8,3            ## @MISDN_MAX_IDLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"netjet.%d"

	.comm	_nj_cnt,4,2                     ## @nj_cnt
	.comm	_card_lock,4,2                  ## @card_lock
	.comm	_Cards,4,2                      ## @Cards
	.comm	_ISDN_P_B_RAW,4,2               ## @ISDN_P_B_RAW
	.comm	_ISDN_P_B_MASK,4,2              ## @ISDN_P_B_MASK
	.comm	_ISDN_P_B_HDLC,4,2              ## @ISDN_P_B_HDLC
	.comm	_nj_dctrl,4,2                   ## @nj_dctrl
	.comm	_MAX_DATA_MEM,4,2               ## @MAX_DATA_MEM
	.comm	_NJ_DMA_RXSIZE,4,2              ## @NJ_DMA_RXSIZE
	.comm	_nj_l2l1B,4,2                   ## @nj_l2l1B
	.comm	_nj_bctrl,4,2                   ## @nj_bctrl
L_.str.1:                               ## @.str.1
	.asciz	"Netjet %d cards installed\n"

	.no_dead_strip	_setup_instance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_instance
_setup_instance:                        ; @setup_instance
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _MISDN_MAX_IDLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MISDN_MAX_IDLEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	x1, x8, #1
Lloh3:
	adrp	x22, _nj_cnt@GOTPAGE
Lloh4:
	ldr	x22, [x22, _nj_cnt@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w3, w8, #1
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
Lloh7:
	adrp	x20, _card_lock@GOTPAGE
Lloh8:
	ldr	x20, [x20, _card_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_write_lock_irqsave
	add	x0, x19, #60
Lloh9:
	adrp	x1, _Cards@GOTPAGE
Lloh10:
	ldr	x1, [x1, _Cards@GOTPAGEOFF]
	bl	_list_add_tail
	mov	x0, x20
	bl	_write_unlock_irqrestore
	mov	x0, x19
	bl	__set_debug
	ldr	w8, [x19]
	add	x20, x19, #16
	str	w8, [x19, #40]
	add	x21, x19, #56
	mov	x0, x21
	bl	_spin_lock_init
	str	x21, [x19, #32]
	mov	x0, x20
	mov	x1, x19
	bl	_mISDNisac_init
Lloh11:
	adrp	x8, _ISDN_P_B_RAW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ISDN_P_B_RAW@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _ISDN_P_B_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ISDN_P_B_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w8, w9, w8
	mov	w23, #1
	lsl	w8, w23, w8
Lloh17:
	adrp	x10, _ISDN_P_B_HDLC@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ISDN_P_B_HDLC@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	and	w9, w10, w9
	lsl	w9, w23, w9
	orr	w8, w9, w8
	str	w8, [x19, #16]
Lloh20:
	adrp	x8, _nj_dctrl@GOTPAGE
Lloh21:
	ldr	x8, [x8, _nj_dctrl@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	add	x21, x19, #20
	ldr	x8, [x19, #48]
	str	w23, [x8]
	ldr	w1, [x19, #24]
	mov	w0, #1
	bl	_set_channelmap
Lloh23:
	adrp	x24, _MAX_DATA_MEM@GOTPAGE
Lloh24:
	ldr	x24, [x24, _MAX_DATA_MEM@GOTPAGEOFF]
	ldr	x0, [x19, #48]
	ldr	w1, [x24]
Lloh25:
	adrp	x25, _NJ_DMA_RXSIZE@GOTPAGE
Lloh26:
	ldr	x25, [x25, _NJ_DMA_RXSIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	asr	w2, w8, #1
	bl	_mISDN_initbchannel
	ldr	x8, [x19, #48]
	str	x19, [x8, #8]
Lloh27:
	adrp	x26, _nj_l2l1B@GOTPAGE
Lloh28:
	ldr	x26, [x26, _nj_l2l1B@GOTPAGEOFF]
Lloh29:
	adrp	x27, _nj_bctrl@GOTPAGE
Lloh30:
	ldr	x27, [x27, _nj_bctrl@GOTPAGEOFF]
	ldr	w9, [x26]
	ldr	w10, [x27]
	stp	w10, w9, [x8, #24]
	str	w23, [x8, #16]
	add	x0, x8, #20
	mov	x1, x21
	bl	_list_add
	ldr	x8, [x19, #48]
	str	x19, [x8, #8]
	mov	w23, #2
	str	w23, [x8, #32]
	ldr	w1, [x19, #24]
	mov	w0, #2
	bl	_set_channelmap
	ldr	x8, [x19, #48]
	add	x0, x8, #32
	ldr	w1, [x24]
	ldr	w8, [x25]
	asr	w2, w8, #1
	bl	_mISDN_initbchannel
	ldr	x8, [x19, #48]
	str	x19, [x8, #40]
	ldr	w9, [x26]
	ldr	w10, [x27]
	stp	w10, w9, [x8, #56]
	str	w23, [x8, #48]
	add	x0, x8, #52
	mov	x1, x21
	bl	_list_add
	ldr	x8, [x19, #48]
	str	x19, [x8, #40]
	mov	x0, x19
	bl	_nj_setup
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_mISDN_register_device
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_nj_init_card
	mov	x21, x0
	cbz	w0, LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_nj_release
LBB0_4:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w8, [x22]
	add	w1, w8, #1
	str	w1, [x22]
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_notice
	b	LBB0_4
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MISDN_MAX_IDLEN,8,3            ; @MISDN_MAX_IDLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"netjet.%d"

	.comm	_nj_cnt,4,2                     ; @nj_cnt
	.comm	_card_lock,4,2                  ; @card_lock
	.comm	_Cards,4,2                      ; @Cards
	.comm	_ISDN_P_B_RAW,4,2               ; @ISDN_P_B_RAW
	.comm	_ISDN_P_B_MASK,4,2              ; @ISDN_P_B_MASK
	.comm	_ISDN_P_B_HDLC,4,2              ; @ISDN_P_B_HDLC
	.comm	_nj_dctrl,4,2                   ; @nj_dctrl
	.comm	_MAX_DATA_MEM,4,2               ; @MAX_DATA_MEM
	.comm	_NJ_DMA_RXSIZE,4,2              ; @NJ_DMA_RXSIZE
	.comm	_nj_l2l1B,4,2                   ; @nj_l2l1B
	.comm	_nj_bctrl,4,2                   ; @nj_bctrl
l_.str.1:                               ; @.str.1
	.asciz	"Netjet %d cards installed\n"

	.no_dead_strip	_setup_instance
.subsections_via_symbols
