	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spider_net_setup_pci_dev
_spider_net_setup_pci_dev:              ## @spider_net_setup_pci_dev
	.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, %r14
	callq	_pci_enable_device
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_13
LBB0_2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_flags
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.5:
	movq	_spider_net_driver_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_request_regions
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_12:
	movq	%r14, %rdi
	callq	_pci_disable_device
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_pci_set_master
	xorl	%eax, %eax
	callq	_spider_net_alloc_card
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %rbx
	movq	%r14, 16(%rax)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	%rax, %r15
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movq	8(%rbx), %rcx
	movq	%r15, (%rcx)
	leaq	(%rax,%r15), %rdx
	movq	%rdx, 8(%rcx)
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_ioremap
	movl	%eax, (%rbx)
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
LBB0_11:
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_pci_release_regions
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't enable PCI device\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't find proper PCI device base address.\n"

	.comm	_spider_net_driver_name,4,2     ## @spider_net_driver_name
L_.str.2:                               ## @.str.2
	.asciz	"Couldn't obtain PCI resources, aborting.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Couldn't allocate net_device structure, aborting.\n"

	.no_dead_strip	_spider_net_setup_pci_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spider_net_setup_pci_dev
_spider_net_setup_pci_dev:              ; @spider_net_setup_pci_dev
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_pci_enable_device
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_flags
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:
Lloh5:
	adrp	x8, _spider_net_driver_name@GOTPAGE
Lloh6:
	ldr	x8, [x8, _spider_net_driver_name@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_request_regions
	cbz	x0, LBB0_10
; %bb.4:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_dev_err
LBB0_7:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_8:
	mov	x20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	bl	_pci_set_master
	bl	_spider_net_alloc_card
	cbz	x0, LBB0_13
; %bb.11:
	mov	x20, x0
	str	x19, [x0, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_start
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
	ldr	x8, [x20, #8]
	add	x9, x0, x21
	stp	x21, x9, [x8]
	mov	x0, x21
	bl	_ioremap
	str	w0, [x20]
	cbnz	w0, LBB0_9
; %bb.12:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_dev_err
	mov	x0, x19
	bl	_pci_release_regions
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't enable PCI device\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't find proper PCI device base address.\n"

	.comm	_spider_net_driver_name,4,2     ; @spider_net_driver_name
l_.str.2:                               ; @.str.2
	.asciz	"Couldn't obtain PCI resources, aborting.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Couldn't allocate net_device structure, aborting.\n"

	.no_dead_strip	_spider_net_setup_pci_dev
.subsections_via_symbols
