	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_fritz
_setup_fritz:                           ## @setup_fritz
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	movl	20(%rbx), %edx
	movl	$32, %esi
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.3:
	movq	8(%rbx), %rdi
	callq	_inl
	movl	%eax, %r15d
	movq	_AVM_HDLC_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CHIP_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_outl
	movq	_CHIP_WINDOW@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	movq	_HDLC_STATUS@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_inl
	movl	%eax, %r14d
	movq	_debug@GOTPCREL(%rip), %rax
	movq	_DEBUG_HW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.4:
	shrl	$24, %r14d
	movl	20(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_pr_notice
	movl	20(%rbx), %esi
	movl	%r15d, %eax
	movzbl	%al, %edx
	movzbl	%ah, %ecx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_notice
	movl	20(%rbx), %esi
	andl	$15, %r14d
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pr_notice
LBB0_5:
	movq	_V1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ISAC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%rbx), %edx
	callq	_ASSIGN_FUNC
	movq	_IPAC_TYPE_ISAC@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movl	20(%rbx), %esi
	movq	8(%rbx), %rdx
	movq	%rdx, %rcx
	addq	$31, %rcx
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_pr_info
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	movq	8(%rbx), %rdi
	callq	_inl
	movl	%eax, %r15d
	movq	_AVM_HDLC_STATUS_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_inl
	movl	%eax, %r14d
	movq	_debug@GOTPCREL(%rip), %rax
	movq	_DEBUG_HW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
## %bb.8:
	shrl	$24, %r14d
	movl	20(%rbx), %esi
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_pr_notice
	movl	20(%rbx), %esi
	movl	%r15d, %eax
	movzbl	%al, %edx
	movzbl	%ah, %ecx
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_notice
	movl	20(%rbx), %esi
	andl	$15, %r14d
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pr_notice
LBB0_9:
	movq	_V2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ISAC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%rbx), %edx
	callq	_ASSIGN_FUNC
	movq	_IPAC_TYPE_ISACX@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	20(%rbx), %esi
	cmpl	$129, (%rbx)
	leaq	L_.str.8(%rip), %rax
	leaq	L_.str.9(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	16(%rbx), %ecx
	movq	8(%rbx), %r8
	leaq	L_.str.7(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_notice
	jmp	LBB0_13
LBB0_11:
	movq	8(%rbx), %rdi
	movl	$32, %esi
	callq	_release_region
	movl	(%rbx), %edx
	movl	20(%rbx), %esi
	leaq	L_.str.6(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: AVM config port %x-%x already in use\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_AVM_HDLC_1,4,2                 ## @AVM_HDLC_1
	.comm	_CHIP_INDEX,8,3                 ## @CHIP_INDEX
	.comm	_CHIP_WINDOW,8,3                ## @CHIP_WINDOW
	.comm	_HDLC_STATUS,8,3                ## @HDLC_STATUS
	.comm	_debug,4,2                      ## @debug
	.comm	_DEBUG_HW,4,2                   ## @DEBUG_HW
L_.str.1:                               ## @.str.1
	.asciz	"%s: PCI stat %#x\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: PCI Class %X Rev %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s: HDLC version %x\n"

	.comm	_V1,4,2                         ## @V1
	.comm	_ISAC,4,2                       ## @ISAC
	.comm	_IPAC_TYPE_ISAC,4,2             ## @IPAC_TYPE_ISAC
	.comm	_AVM_HDLC_STATUS_1,8,3          ## @AVM_HDLC_STATUS_1
L_.str.4:                               ## @.str.4
	.asciz	"%s: PCI V2 stat %#x\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s: PCI V2 Class %X Rev %d\n"

	.comm	_V2,4,2                         ## @V2
	.comm	_IPAC_TYPE_ISACX,4,2            ## @IPAC_TYPE_ISACX
L_.str.6:                               ## @.str.6
	.asciz	"%s: AVM unknown type %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.7:                               ## @.str.7
	.asciz	"%s: %s config irq:%d base:0x%X\n"

L_.str.8:                               ## @.str.8
	.asciz	"AVM Fritz!CARD PCI"

L_.str.9:                               ## @.str.9
	.asciz	"AVM Fritz!CARD PCIv2"

	.no_dead_strip	_setup_fritz
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_fritz
_setup_fritz:                           ; @setup_fritz
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldr	w2, [x19, #20]
	mov	w1, #32
	bl	_request_region
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_inl
	mov	x20, x0
Lloh0:
	adrp	x8, _AVM_HDLC_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVM_HDLC_1@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _CHIP_INDEX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHIP_INDEX@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outl
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _CHIP_WINDOW@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHIP_WINDOW@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _HDLC_STATUS@GOTPAGE
Lloh10:
	ldr	x10, [x10, _HDLC_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x0, x8, x10
	bl	_inl
Lloh12:
	adrp	x8, _debug@GOTPAGE
Lloh13:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _DEBUG_HW@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DEBUG_HW@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x21, x0
	ldr	w1, [x19, #20]
	str	x20, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_notice
	ldr	w1, [x19, #20]
	and	w8, w20, #0xff
	ubfx	w9, w20, #8, #8
	stp	x8, x9, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_notice
	ldr	w1, [x19, #20]
	ubfx	w8, w21, #24, #4
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_notice
LBB0_5:
Lloh24:
	adrp	x8, _V1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _V1@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _ISAC@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ISAC@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w2, [x19, #24]
	bl	_ASSIGN_FUNC
Lloh30:
	adrp	x8, _IPAC_TYPE_ISAC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IPAC_TYPE_ISAC@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
	ldr	w1, [x19, #20]
	ldr	x2, [x19, #8]
	add	x8, x2, #31
	str	x8, [sp]
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_pr_info
Lloh34:
	adrp	x8, _EIO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_inl
	mov	x21, x0
	ldr	x8, [x19, #8]
Lloh36:
	adrp	x9, _AVM_HDLC_STATUS_1@GOTPAGE
Lloh37:
	ldr	x9, [x9, _AVM_HDLC_STATUS_1@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inl
Lloh39:
	adrp	x8, _debug@GOTPAGE
Lloh40:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
Lloh42:
	adrp	x9, _DEBUG_HW@GOTPAGE
Lloh43:
	ldr	x9, [x9, _DEBUG_HW@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x20, x0
	ldr	w1, [x19, #20]
	str	x21, [sp]
Lloh45:
	adrp	x0, l_.str.4@PAGE
Lloh46:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_notice
	ldr	w1, [x19, #20]
	and	w8, w21, #0xff
	ubfx	w9, w21, #8, #8
	stp	x8, x9, [sp]
Lloh47:
	adrp	x0, l_.str.5@PAGE
Lloh48:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_notice
	ldr	w1, [x19, #20]
	ubfx	w8, w20, #24, #4
	str	x8, [sp]
Lloh49:
	adrp	x0, l_.str.3@PAGE
Lloh50:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_notice
LBB0_9:
Lloh51:
	adrp	x8, _V2@GOTPAGE
Lloh52:
	ldr	x8, [x8, _V2@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
Lloh54:
	adrp	x8, _ISAC@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ISAC@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	ldr	w2, [x19, #24]
	bl	_ASSIGN_FUNC
Lloh57:
	adrp	x8, _IPAC_TYPE_ISACX@GOTPAGE
Lloh58:
	ldr	x8, [x8, _IPAC_TYPE_ISACX@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh59:
	adrp	x8, l_.str.9@PAGE
Lloh60:
	add	x8, x8, l_.str.9@PAGEOFF
Lloh61:
	adrp	x9, l_.str.8@PAGE
Lloh62:
	add	x9, x9, l_.str.8@PAGEOFF
	ldr	w10, [x19]
	cmp	w10, #129
	csel	x8, x9, x8, eq
	ldr	x9, [x19, #8]
	ldp	w10, w1, [x19, #16]
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh63:
	adrp	x0, l_.str.7@PAGE
Lloh64:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_notice
	mov	w0, #0
	b	LBB0_13
LBB0_11:
	ldr	x0, [x19, #8]
	mov	w1, #32
	bl	_release_region
	ldr	w1, [x19, #20]
	ldr	w2, [x19]
Lloh65:
	adrp	x0, l_.str.6@PAGE
Lloh66:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_info
Lloh67:
	adrp	x8, _ENODEV@GOTPAGE
Lloh68:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpAdd	Lloh65, Lloh66
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: AVM config port %x-%x already in use\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_AVM_HDLC_1,4,2                 ; @AVM_HDLC_1
	.comm	_CHIP_INDEX,8,3                 ; @CHIP_INDEX
	.comm	_CHIP_WINDOW,8,3                ; @CHIP_WINDOW
	.comm	_HDLC_STATUS,8,3                ; @HDLC_STATUS
	.comm	_debug,4,2                      ; @debug
	.comm	_DEBUG_HW,4,2                   ; @DEBUG_HW
l_.str.1:                               ; @.str.1
	.asciz	"%s: PCI stat %#x\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: PCI Class %X Rev %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s: HDLC version %x\n"

	.comm	_V1,4,2                         ; @V1
	.comm	_ISAC,4,2                       ; @ISAC
	.comm	_IPAC_TYPE_ISAC,4,2             ; @IPAC_TYPE_ISAC
	.comm	_AVM_HDLC_STATUS_1,8,3          ; @AVM_HDLC_STATUS_1
l_.str.4:                               ; @.str.4
	.asciz	"%s: PCI V2 stat %#x\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s: PCI V2 Class %X Rev %d\n"

	.comm	_V2,4,2                         ; @V2
	.comm	_IPAC_TYPE_ISACX,4,2            ; @IPAC_TYPE_ISACX
l_.str.6:                               ; @.str.6
	.asciz	"%s: AVM unknown type %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.7:                               ; @.str.7
	.asciz	"%s: %s config irq:%d base:0x%X\n"

l_.str.8:                               ; @.str.8
	.asciz	"AVM Fritz!CARD PCI"

l_.str.9:                               ; @.str.9
	.asciz	"AVM Fritz!CARD PCIv2"

	.no_dead_strip	_setup_fritz
.subsections_via_symbols
