	.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, %r15
	movl	120(%rdi), %edi
	movq	_MISDN_MAX_IDLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	decq	%rsi
	movq	_sfax_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
	movq	_Cards@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_write_unlock_irqrestore
	movq	%r15, %rdi
	callq	__set_debug
	leaq	124(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_init
	movq	%rbx, 104(%r15)
	movq	%rbx, 64(%r15)
	movq	_sfax_ctrl@GOTPCREL(%rip), %rax
	movq	%rax, 56(%r15)
	movl	120(%r15), %eax
	movl	%eax, 96(%r15)
	movl	%eax, 52(%r15)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movq	8(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	leaq	-48(%rbp), %rdi
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	72(%r15), %rbx
	leaq	16(%r15), %r14
	movq	_debug@GOTPCREL(%rip), %rax
	movq	_DEBUG_HW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	movl	120(%r15), %esi
	movq	-48(%rbp), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_notice
LBB0_4:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mISDNisac_init
	movq	_sfax_dctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	80(%r15), %r13
	movl	%eax, 92(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mISDNisar_init
	movl	%eax, 88(%r15)
	movl	84(%r15), %esi
	movl	$1, %edi
	callq	_set_channelmap
	movq	40(%r15), %rdi
	movq	%r13, %rsi
	callq	_list_add
	movl	84(%r15), %esi
	movl	$2, %edi
	callq	_set_channelmap
	movq	40(%r15), %rdi
	addq	$4, %rdi
	movq	%r13, %rsi
	callq	_list_add
	movq	%r15, %rdi
	callq	_setup_speedfax
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movq	%r14, %rdi
	callq	*(%r14)
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movq	8(%r15), %rsi
	movl	120(%r15), %edx
	movq	%r13, %rdi
	callq	_mISDN_register_device
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	%r15, %rdi
	callq	_init_card
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	-48(%rbp), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	*24(%r15)
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_disable_hwirq
	movl	116(%r15), %edi
	movq	%r15, %rsi
	callq	_free_irq
LBB0_11:
	movq	%r13, %rdi
	callq	_mISDN_unregister_device
LBB0_12:
	movl	112(%r15), %edi
	movl	$256, %esi                      ## imm = 0x100
	callq	_release_region
LBB0_13:
	movq	%rbx, %rdi
	callq	*72(%r15)
	movq	%r14, %rdi
	callq	*32(%r15)
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	jmp	LBB0_14
LBB0_1:
	movl	%eax, %r12d
	movl	120(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %edx
	callq	_pr_info
LBB0_14:
	movq	8(%r15), %rdi
	callq	_pci_disable_device
	movq	_card_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_write_lock_irqsave
	movq	%r15, %rdi
	callq	_list_del
	movq	%rbx, %rdi
	callq	_write_unlock_irqrestore
	movq	%r15, %rdi
	callq	_kfree
LBB0_15:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	movq	_sfax_cnt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	incl	%esi
	movl	%esi, (%rax)
	leaq	L_.str.4(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_pr_notice
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_MISDN_MAX_IDLEN,8,3            ## @MISDN_MAX_IDLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Speedfax.%d"

	.comm	_sfax_cnt,4,2                   ## @sfax_cnt
	.comm	_card_lock,4,2                  ## @card_lock
	.comm	_Cards,4,2                      ## @Cards
	.comm	_sfax_ctrl,4,2                  ## @sfax_ctrl
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.1:                               ## @.str.1
	.asciz	"isdn/ISAR.BIN"

L_.str.2:                               ## @.str.2
	.asciz	"%s: firmware request failed %d\n"

	.comm	_debug,4,2                      ## @debug
	.comm	_DEBUG_HW,4,2                   ## @DEBUG_HW
L_.str.3:                               ## @.str.3
	.asciz	"%s: got firmware %zu bytes\n"

	.comm	_sfax_dctrl,4,2                 ## @sfax_dctrl
L_.str.4:                               ## @.str.4
	.asciz	"SpeedFax %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:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	w0, [x0, #120]
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	x24, _sfax_cnt@GOTPAGE
Lloh4:
	ldr	x24, [x24, _sfax_cnt@GOTPAGEOFF]
	ldr	w8, [x24]
	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
Lloh9:
	adrp	x1, _Cards@GOTPAGE
Lloh10:
	ldr	x1, [x1, _Cards@GOTPAGEOFF]
	mov	x0, x19
	bl	_list_add_tail
	mov	x0, x20
	bl	_write_unlock_irqrestore
	mov	x0, x19
	bl	__set_debug
	add	x20, x19, #124
	mov	x0, x20
	bl	_spin_lock_init
	str	x20, [x19, #104]
Lloh11:
	adrp	x8, _sfax_ctrl@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sfax_ctrl@GOTPAGEOFF]
	stp	x8, x20, [x19, #56]
	ldr	w8, [x19, #120]
	str	w8, [x19, #96]
Lloh13:
	adrp	x9, _THIS_MODULE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _THIS_MODULE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
	ldr	x2, [x19, #8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #8
	bl	_request_firmware
	tbnz	w0, #31, LBB0_12
; %bb.1:
	add	x21, x19, #72
Lloh18:
	adrp	x8, _debug@GOTPAGE
Lloh19:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
	add	x20, x19, #16
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _DEBUG_HW@GOTPAGE
Lloh22:
	ldr	x9, [x9, _DEBUG_HW@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w1, [x19, #120]
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_notice
LBB0_3:
	mov	x0, x21
	mov	x1, x19
	bl	_mISDNisac_init
Lloh26:
	adrp	x8, _sfax_dctrl@GOTPAGE
Lloh27:
	ldr	x8, [x8, _sfax_dctrl@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	add	x23, x19, #80
	str	w8, [x19, #92]
	mov	x0, x20
	mov	x1, x19
	bl	_mISDNisar_init
	str	w0, [x19, #88]
	ldr	w1, [x19, #84]
	mov	w0, #1
	bl	_set_channelmap
	ldr	x0, [x19, #40]
	mov	x1, x23
	bl	_list_add
	ldr	w1, [x19, #84]
	mov	w0, #2
	bl	_set_channelmap
	ldr	x8, [x19, #40]
	add	x0, x8, #4
	mov	x1, x23
	bl	_list_add
	mov	x0, x19
	bl	_setup_speedfax
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.4:
	ldr	x8, [x20]
	mov	x0, x20
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.5:
	ldr	x1, [x19, #8]
	ldr	w2, [x19, #120]
	mov	x0, x23
	bl	_mISDN_register_device
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_init_card
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	x8, [x19, #24]
	ldr	x9, [sp, #8]
	ldp	w2, w1, [x9]
	mov	x0, x20
	blr	x8
	mov	x22, x0
	cbz	w0, LBB0_15
; %bb.8:
	mov	x0, x19
	bl	_disable_hwirq
	ldr	w0, [x19, #116]
	mov	x1, x19
	bl	_free_irq
LBB0_9:
	mov	x0, x23
	bl	_mISDN_unregister_device
LBB0_10:
	ldr	w0, [x19, #112]
	mov	w1, #256
	bl	_release_region
LBB0_11:
	ldr	x8, [x19, #72]
	mov	x0, x21
	blr	x8
	ldr	x8, [x19, #32]
	mov	x0, x20
	blr	x8
	ldr	x0, [sp, #8]
	bl	_release_firmware
	b	LBB0_13
LBB0_12:
	mov	x22, x0
	ldr	w1, [x19, #120]
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x22
	bl	_pr_info
LBB0_13:
	ldr	x0, [x19, #8]
	bl	_pci_disable_device
Lloh31:
	adrp	x20, _card_lock@GOTPAGE
Lloh32:
	ldr	x20, [x20, _card_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_write_lock_irqsave
	mov	x0, x19
	bl	_list_del
	mov	x0, x20
	bl	_write_unlock_irqrestore
	mov	x0, x19
	bl	_kfree
LBB0_14:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_15:
	ldr	x0, [sp, #8]
	bl	_release_firmware
	ldr	w8, [x24]
	add	w1, w8, #1
	str	w1, [x24]
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_notice
	b	LBB0_14
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MISDN_MAX_IDLEN,8,3            ; @MISDN_MAX_IDLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Speedfax.%d"

	.comm	_sfax_cnt,4,2                   ; @sfax_cnt
	.comm	_card_lock,4,2                  ; @card_lock
	.comm	_Cards,4,2                      ; @Cards
	.comm	_sfax_ctrl,4,2                  ; @sfax_ctrl
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.1:                               ; @.str.1
	.asciz	"isdn/ISAR.BIN"

l_.str.2:                               ; @.str.2
	.asciz	"%s: firmware request failed %d\n"

	.comm	_debug,4,2                      ; @debug
	.comm	_DEBUG_HW,4,2                   ; @DEBUG_HW
l_.str.3:                               ; @.str.3
	.asciz	"%s: got firmware %zu bytes\n"

	.comm	_sfax_dctrl,4,2                 ; @sfax_dctrl
l_.str.4:                               ; @.str.4
	.asciz	"SpeedFax %d cards installed\n"

	.no_dead_strip	_setup_instance
.subsections_via_symbols
