	.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	64(%rdi), %edi
	movq	_MISDN_MAX_IDLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	decq	%rsi
	movq	_w6692_cnt@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	incl	%ecx
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	movq	_card_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_write_lock_irqsave
	leaq	4(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_Cards@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_write_unlock_irqrestore
	movb	(%r14), %cl
	movl	$1, %r12d
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	__set_debug
	leaq	80(%rbx), %rdi
	callq	_spin_lock_init
	leaq	8(%rbx), %r14
	movq	_MAX_DFRAME_LEN_L1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_W6692_ph_bh@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mISDN_initdchannel
	movq	_ISDN_P_TE_S0@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, 8(%rbx)
	movq	_w6692_l2l1D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_w6692_dctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	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
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	btsl	%eax, %r12d
	movl	%r12d, 12(%rbx)
	movq	%rbx, 40(%rbx)
	movl	$2, 16(%rbx)
	leaq	20(%rbx), %r12
	movq	48(%rbx), %rdi
	movq	_MAX_DATA_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_W_B_FIFO_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mISDN_initbchannel
	movq	48(%rbx), %rax
	movq	%rbx, 24(%rax)
	movabsq	$4294967297, %rcx               ## imm = 0x100000001
	movq	%rcx, (%rax)
	movq	_w6692_l2l1B@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	%ecx, 16(%rax)
	movq	_w6692_bctrl@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	%ecx, 12(%rax)
	movl	24(%rbx), %esi
	movl	$1, %edi
	callq	_set_channelmap
	movq	48(%rbx), %rdi
	addq	$8, %rdi
	movq	%r12, %rsi
	callq	_list_add
	movq	48(%rbx), %rdi
	addq	$32, %rdi
	movq	_MAX_DATA_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_W_B_FIFO_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mISDN_initbchannel
	movq	48(%rbx), %rax
	movq	%rbx, 56(%rax)
	movabsq	$8589934594, %rcx               ## imm = 0x200000002
	movq	%rcx, 32(%rax)
	movl	(%r15), %ecx
	movl	%ecx, 48(%rax)
	movl	(%r13), %ecx
	movq	%r14, %r13
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%ecx, 44(%rax)
	movl	24(%rbx), %esi
	movl	$2, %edi
	callq	_set_channelmap
	movq	48(%rbx), %rdi
	addq	$40, %rdi
	movq	%r12, %rsi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_setup_w6692
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	_w6692_cnt@GOTPCREL(%rip), %r15
	movq	72(%rbx), %rsi
	movl	64(%rbx), %edx
	movq	%r13, %rdi
	callq	_mISDN_register_device
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_init_card
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_w6692_l1callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_create_l1
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movl	60(%rbx), %edi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_6:
	movq	%r13, %rdi
	callq	_mISDN_unregister_device
LBB0_7:
	movl	56(%rbx), %edi
	movl	$256, %esi                      ## imm = 0x100
	callq	_release_region
LBB0_8:
	movq	48(%rbx), %rdi
	addq	$32, %rdi
	callq	_mISDN_freebchannel
	movq	48(%rbx), %rdi
	callq	_mISDN_freebchannel
	movq	%r13, %rdi
	callq	_mISDN_freedchannel
	movq	_card_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_write_lock_irqsave
	movq	%r14, %rdi
	callq	_list_del
	movq	%r15, %rdi
	callq	_write_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_kfree
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r15), %esi
	incl	%esi
	movl	%esi, (%r15)
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_notice
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MISDN_MAX_IDLEN,8,3            ## @MISDN_MAX_IDLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w6692.%d"

	.comm	_w6692_cnt,4,2                  ## @w6692_cnt
	.comm	_card_lock,4,2                  ## @card_lock
	.comm	_Cards,4,2                      ## @Cards
	.comm	_MAX_DFRAME_LEN_L1,4,2          ## @MAX_DFRAME_LEN_L1
	.comm	_W6692_ph_bh,4,2                ## @W6692_ph_bh
	.comm	_ISDN_P_TE_S0,4,2               ## @ISDN_P_TE_S0
	.comm	_w6692_l2l1D,4,2                ## @w6692_l2l1D
	.comm	_w6692_dctrl,4,2                ## @w6692_dctrl
	.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	_MAX_DATA_MEM,4,2               ## @MAX_DATA_MEM
	.comm	_W_B_FIFO_THRESH,4,2            ## @W_B_FIFO_THRESH
	.comm	_w6692_l2l1B,4,2                ## @w6692_l2l1B
	.comm	_w6692_bctrl,4,2                ## @w6692_bctrl
	.comm	_w6692_l1callback,4,2           ## @w6692_l1callback
L_.str.1:                               ## @.str.1
	.asciz	"W6692 %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, #64]
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	x23, _w6692_cnt@GOTPAGE
Lloh4:
	ldr	x23, [x23, _w6692_cnt@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w3, w8, #1
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
Lloh7:
	adrp	x21, _card_lock@GOTPAGE
Lloh8:
	ldr	x21, [x21, _card_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_write_lock_irqsave
	add	x20, x19, #4
Lloh9:
	adrp	x1, _Cards@GOTPAGE
Lloh10:
	ldr	x1, [x1, _Cards@GOTPAGEOFF]
	mov	x0, x20
	bl	_list_add_tail
	mov	x0, x21
	bl	_write_unlock_irqrestore
	ldr	w8, [x23]
	mov	w22, #1
	lsl	w8, w22, w8
	str	w8, [x19]
	mov	x0, x19
	bl	__set_debug
	add	x0, x19, #80
	bl	_spin_lock_init
	add	x21, x19, #8
Lloh11:
	adrp	x8, _MAX_DFRAME_LEN_L1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAX_DFRAME_LEN_L1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _W6692_ph_bh@GOTPAGE
Lloh15:
	ldr	x8, [x8, _W6692_ph_bh@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_mISDN_initdchannel
Lloh17:
	adrp	x8, _ISDN_P_TE_S0@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ISDN_P_TE_S0@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	lsl	w8, w22, w8
Lloh20:
	adrp	x9, _w6692_l2l1D@GOTPAGE
Lloh21:
	ldr	x9, [x9, _w6692_l2l1D@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _w6692_dctrl@GOTPAGE
Lloh24:
	ldr	x10, [x10, _w6692_dctrl@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	stp	w10, w9, [x19, #28]
Lloh26:
	adrp	x9, _ISDN_P_B_RAW@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ISDN_P_B_RAW@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _ISDN_P_B_MASK@GOTPAGE
Lloh30:
	ldr	x10, [x10, _ISDN_P_B_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh32:
	adrp	x11, _ISDN_P_B_HDLC@GOTPAGE
Lloh33:
	ldr	x11, [x11, _ISDN_P_B_HDLC@GOTPAGEOFF]
	lsl	w9, w22, w9
Lloh34:
	ldr	w11, [x11]
	and	w10, w11, w10
	lsl	w10, w22, w10
	orr	w9, w10, w9
	stp	w8, w9, [x19, #8]
	str	x19, [x19, #40]
	mov	w8, #2
	str	w8, [x19, #16]
	add	x22, x19, #20
	ldr	x0, [x19, #48]
Lloh35:
	adrp	x24, _MAX_DATA_MEM@GOTPAGE
Lloh36:
	ldr	x24, [x24, _MAX_DATA_MEM@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh37:
	adrp	x25, _W_B_FIFO_THRESH@GOTPAGE
Lloh38:
	ldr	x25, [x25, _W_B_FIFO_THRESH@GOTPAGEOFF]
	ldr	w2, [x25]
	bl	_mISDN_initbchannel
	ldr	x8, [x19, #48]
	str	x19, [x8, #24]
	movi.2s	v0, #1
	str	d0, [x8]
Lloh39:
	adrp	x26, _w6692_l2l1B@GOTPAGE
Lloh40:
	ldr	x26, [x26, _w6692_l2l1B@GOTPAGEOFF]
	ldr	w9, [x26]
Lloh41:
	adrp	x27, _w6692_bctrl@GOTPAGE
Lloh42:
	ldr	x27, [x27, _w6692_bctrl@GOTPAGEOFF]
	ldr	w10, [x27]
	stp	w10, w9, [x8, #12]
	ldr	w1, [x19, #24]
	mov	w0, #1
	bl	_set_channelmap
	ldr	x8, [x19, #48]
	add	x0, x8, #8
	mov	x1, x22
	bl	_list_add
	ldr	x8, [x19, #48]
	add	x0, x8, #32
	ldr	w1, [x24]
	ldr	w2, [x25]
	bl	_mISDN_initbchannel
	ldr	x8, [x19, #48]
	str	x19, [x8, #56]
	movi.2s	v0, #2
	str	d0, [x8, #32]
	ldr	w9, [x26]
	ldr	w10, [x27]
	stp	w10, w9, [x8, #44]
	ldr	w1, [x19, #24]
	mov	w0, #2
	bl	_set_channelmap
	ldr	x8, [x19, #48]
	add	x0, x8, #40
	mov	x1, x22
	bl	_list_add
	mov	x0, x19
	bl	_setup_w6692
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x1, [x19, #72]
	ldr	w2, [x19, #64]
	mov	x0, x21
	bl	_mISDN_register_device
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_init_card
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.3:
Lloh43:
	adrp	x8, _w6692_l1callback@GOTPAGE
Lloh44:
	ldr	x8, [x8, _w6692_l1callback@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_create_l1
	mov	x22, x0
	cbz	w0, LBB0_9
; %bb.4:
	ldr	w0, [x19, #60]
	mov	x1, x19
	bl	_free_irq
LBB0_5:
	mov	x0, x21
	bl	_mISDN_unregister_device
LBB0_6:
	ldr	w0, [x19, #56]
	mov	w1, #256
	bl	_release_region
LBB0_7:
	ldr	x8, [x19, #48]
	add	x0, x8, #32
	bl	_mISDN_freebchannel
	ldr	x0, [x19, #48]
	bl	_mISDN_freebchannel
	mov	x0, x21
	bl	_mISDN_freedchannel
Lloh46:
	adrp	x21, _card_lock@GOTPAGE
Lloh47:
	ldr	x21, [x21, _card_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_write_lock_irqsave
	mov	x0, x20
	bl	_list_del
	mov	x0, x21
	bl	_write_unlock_irqrestore
	mov	x0, x19
	bl	_kfree
LBB0_8:
	mov	x0, x22
	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_9:
	ldr	w8, [x23]
	add	w1, w8, #1
	str	w1, [x23]
Lloh48:
	adrp	x0, l_.str.1@PAGE
Lloh49:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_notice
	b	LBB0_8
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.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 AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_MISDN_MAX_IDLEN,8,3            ; @MISDN_MAX_IDLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w6692.%d"

	.comm	_w6692_cnt,4,2                  ; @w6692_cnt
	.comm	_card_lock,4,2                  ; @card_lock
	.comm	_Cards,4,2                      ; @Cards
	.comm	_MAX_DFRAME_LEN_L1,4,2          ; @MAX_DFRAME_LEN_L1
	.comm	_W6692_ph_bh,4,2                ; @W6692_ph_bh
	.comm	_ISDN_P_TE_S0,4,2               ; @ISDN_P_TE_S0
	.comm	_w6692_l2l1D,4,2                ; @w6692_l2l1D
	.comm	_w6692_dctrl,4,2                ; @w6692_dctrl
	.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	_MAX_DATA_MEM,4,2               ; @MAX_DATA_MEM
	.comm	_W_B_FIFO_THRESH,4,2            ; @W_B_FIFO_THRESH
	.comm	_w6692_l2l1B,4,2                ; @w6692_l2l1B
	.comm	_w6692_bctrl,4,2                ; @w6692_bctrl
	.comm	_w6692_l1callback,4,2           ; @w6692_l1callback
l_.str.1:                               ; @.str.1
	.asciz	"W6692 %d cards installed\n"

	.no_dead_strip	_setup_instance
.subsections_via_symbols
