	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_card
_init_card:                             ## @init_card
	.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
	callq	_reset_avm
	movq	(%rbx), %rax
	movq	_AVM_FRITZ_PCIV2@GOTPCREL(%rip), %rcx
	movl	8(%rbx), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_avm_fritzv2_interrupt@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_avm_fritz_interrupt@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%rbx), %ecx
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_4
## %bb.17:
	movl	%eax, %r14d
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_16
LBB0_4:
	leaq	20(%rbx), %r14
	leaq	24(%rbx), %r15
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	*(%r15)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_clear_pending_hdlc_ints
	movq	%rbx, %rdi
	callq	_inithdlc
	movq	%rbx, %rdi
	callq	_enable_hwirq
	movq	(%rbx), %rax
	movq	_AVM_FRITZ_PCIV2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_ISACX_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_WriteISAC_V2
	movq	_ISACX_CMDRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$65, %edx
	callq	_WriteISAC_V2
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_ISAC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_WriteISAC_V1
	movq	_ISAC_CMDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$65, %edx
	callq	_WriteISAC_V1
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$10, %edi
	callq	_msleep_interruptible
	movq	_DEBUG_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_debug@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	movl	16(%rbx), %ecx
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_notice
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, 16(%rbx)
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_pr_info
	movq	%rbx, %rdi
	callq	_reset_avm
	incl	%r12d
	cmpl	$4, %r12d
	jne	LBB0_5
	jmp	LBB0_15
LBB0_6:
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	12(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_pr_info
LBB0_15:
	movl	8(%rbx), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_13:
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVM_FRITZ_PCIV2,8,3            ## @AVM_FRITZ_PCIV2
	.comm	_avm_fritzv2_interrupt,4,2      ## @avm_fritzv2_interrupt
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_avm_fritz_interrupt,4,2        ## @avm_fritz_interrupt
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: couldn't get interrupt %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: ISAC init failed with %d\n"

	.comm	_ISACX_MASK,4,2                 ## @ISACX_MASK
	.comm	_ISACX_CMDRD,4,2                ## @ISACX_CMDRD
	.comm	_ISAC_MASK,4,2                  ## @ISAC_MASK
	.comm	_ISAC_CMDR,4,2                  ## @ISAC_CMDR
	.comm	_debug,4,2                      ## @debug
	.comm	_DEBUG_HW,4,2                   ## @DEBUG_HW
L_.str.2:                               ## @.str.2
	.asciz	"%s: IRQ %d count %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s: IRQ(%d) getting no IRQs during init %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_init_card
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_card
_init_card:                             ; @init_card
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	bl	_reset_avm
	ldr	x8, [x19]
Lloh0:
	adrp	x25, _AVM_FRITZ_PCIV2@GOTPAGE
Lloh1:
	ldr	x25, [x25, _AVM_FRITZ_PCIV2@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh2:
	adrp	x10, _avm_fritzv2_interrupt@GOTPAGE
Lloh3:
	ldr	x10, [x10, _avm_fritzv2_interrupt@GOTPAGEOFF]
Lloh4:
	adrp	x11, _avm_fritz_interrupt@GOTPAGE
Lloh5:
	ldr	x11, [x11, _avm_fritz_interrupt@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldp	w0, w3, [x19, #8]
	mov	x4, x19
	bl	_request_irq
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldp	w2, w1, [x19, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	b	LBB0_14
LBB0_2:
	add	x20, x19, #20
	add	x21, x19, #24
	mov	w26, #1
Lloh11:
	adrp	x27, _debug@GOTPAGE
Lloh12:
	ldr	x27, [x27, _debug@GOTPAGEOFF]
Lloh13:
	adrp	x28, _DEBUG_HW@GOTPAGE
Lloh14:
	ldr	x28, [x28, _DEBUG_HW@GOTPAGEOFF]
Lloh15:
	adrp	x22, l_.str.3@PAGE
Lloh16:
	add	x22, x22, l_.str.3@PAGEOFF
Lloh17:
	adrp	x23, l_.str.2@PAGE
Lloh18:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x21]
	mov	x0, x21
	blr	x8
	cbnz	w0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_clear_pending_hdlc_ints
	mov	x0, x19
	bl	_inithdlc
	mov	x0, x19
	bl	_enable_hwirq
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh19:
	adrp	x8, _ISACX_MASK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ISACX_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_WriteISAC_V2
Lloh22:
	adrp	x8, _ISACX_CMDRD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ISACX_CMDRD@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65
	bl	_WriteISAC_V2
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh25:
	adrp	x8, _ISAC_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ISAC_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_WriteISAC_V1
Lloh28:
	adrp	x8, _ISAC_CMDR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ISAC_CMDR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65
	bl	_WriteISAC_V1
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #10
	bl	_msleep_interruptible
	ldr	w8, [x27]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w2, w1, [x19, #8]
	ldr	w3, [x19, #16]
	mov	x0, x23
	bl	_pr_notice
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldp	w2, w1, [x19, #8]
	str	x26, [sp]
	mov	x0, x22
	bl	_pr_info
	mov	x0, x19
	bl	_reset_avm
	add	w26, w26, #1
	cmp	w26, #4
	b.ne	LBB0_3
	b	LBB0_12
LBB0_11:
	mov	x24, x0
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w1, [x19, #12]
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_pr_info
LBB0_12:
	ldr	w0, [x19, #8]
	mov	x1, x19
	bl	_free_irq
Lloh33:
	adrp	x8, _EIO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_13:
	mov	w20, #0
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_AVM_FRITZ_PCIV2,8,3            ; @AVM_FRITZ_PCIV2
	.comm	_avm_fritzv2_interrupt,4,2      ; @avm_fritzv2_interrupt
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_avm_fritz_interrupt,4,2        ; @avm_fritz_interrupt
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: couldn't get interrupt %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: ISAC init failed with %d\n"

	.comm	_ISACX_MASK,4,2                 ; @ISACX_MASK
	.comm	_ISACX_CMDRD,4,2                ; @ISACX_CMDRD
	.comm	_ISAC_MASK,4,2                  ; @ISAC_MASK
	.comm	_ISAC_CMDR,4,2                  ; @ISAC_CMDR
	.comm	_debug,4,2                      ; @debug
	.comm	_DEBUG_HW,4,2                   ; @DEBUG_HW
l_.str.2:                               ; @.str.2
	.asciz	"%s: IRQ %d count %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s: IRQ(%d) getting no IRQs during init %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_init_card
.subsections_via_symbols
