	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function velocity_get_pci_info
_velocity_get_pci_info:                 ## @velocity_get_pci_info
	.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	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_pci_set_master
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_pci_resource_start
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_flags
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_pci_resource_flags
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_pci_resource_len
	movq	%rax, %rcx
	movq	_VELOCITY_IO_SIZE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jge	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_IO,4,2              ## @IORESOURCE_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"region #0 is not an I/O resource, aborting.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"region #1 is an I/O resource, aborting.\n"

	.comm	_VELOCITY_IO_SIZE,8,3           ## @VELOCITY_IO_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"region #1 is too small.\n"

	.no_dead_strip	_velocity_get_pci_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function velocity_get_pci_info
_velocity_get_pci_info:                 ; @velocity_get_pci_info
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_pci_set_master
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_start
	str	x0, [x20, #8]
	mov	x0, x19
	mov	w1, #1
	bl	_pci_resource_start
	str	x0, [x20]
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_flags
Lloh0:
	adrp	x20, _IORESOURCE_IO@GOTPAGE
Lloh1:
	ldr	x20, [x20, _IORESOURCE_IO@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_pci_resource_flags
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	w1, #1
	bl	_pci_resource_len
Lloh6:
	adrp	x8, _VELOCITY_IO_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VELOCITY_IO_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_8
; %bb.5:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_dev_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_IO,4,2              ; @IORESOURCE_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"region #0 is not an I/O resource, aborting.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"region #1 is an I/O resource, aborting.\n"

	.comm	_VELOCITY_IO_SIZE,8,3           ; @VELOCITY_IO_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"region #1 is too small.\n"

	.no_dead_strip	_velocity_get_pci_info
.subsections_via_symbols
