	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_divasa_get_pci_bar             ## -- Begin function divasa_get_pci_bar
	.p2align	4, 0x90
_divasa_get_pci_bar:                    ## @divasa_get_pci_bar
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$5, %edx
	jg	LBB0_1
## %bb.2:
	movq	(%rcx), %rax
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %r14
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	movq	%r14, %rdi
	callq	_DBG_TRC
	movq	_PCI_BASE_ADDRESS_SPACE_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	testb	$1, %al
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rax, %rdi
	movq	_PCI_BASE_ADDRESS_IO_MASK@GOTPCREL(%rip), %rbx
	cmoveq	_PCI_BASE_ADDRESS_MEM_MASK@GOTPCREL(%rip), %rbx
	callq	_DBG_TRC
	andq	(%rbx), %r14
	movq	%r14, %rdi
	callq	_DBG_TRC
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_BASE_ADDRESS_SPACE_IO,8,3  ## @PCI_BASE_ADDRESS_SPACE_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"  I/O"

	.comm	_PCI_BASE_ADDRESS_IO_MASK,8,3   ## @PCI_BASE_ADDRESS_IO_MASK
L_.str.2:                               ## @.str.2
	.asciz	"  memory"

	.comm	_PCI_BASE_ADDRESS_MEM_MASK,8,3  ## @PCI_BASE_ADDRESS_MEM_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_divasa_get_pci_bar             ; -- Begin function divasa_get_pci_bar
	.p2align	2
_divasa_get_pci_bar:                    ; @divasa_get_pci_bar
	.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
	cmp	w2, #5
	b.gt	LBB0_2
; %bb.1:
	ldr	x8, [x3]
	ldr	x19, [x8, w2, sxtw #3]
	b	LBB0_3
LBB0_2:
	mov	x19, #0
LBB0_3:
	mov	x0, x19
	bl	_DBG_TRC
Lloh0:
	adrp	x8, _PCI_BASE_ADDRESS_SPACE_IO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_BASE_ADDRESS_SPACE_IO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w19, w8
Lloh3:
	adrp	x9, l_.str.1@PAGE
Lloh4:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh5:
	adrp	x10, l_.str.2@PAGE
Lloh6:
	add	x10, x10, l_.str.2@PAGEOFF
	tst	x8, #0x1
	csel	x0, x10, x9, eq
Lloh7:
	adrp	x8, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGEOFF]
Lloh9:
	adrp	x9, _PCI_BASE_ADDRESS_IO_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCI_BASE_ADDRESS_IO_MASK@GOTPAGEOFF]
	csel	x20, x8, x9, eq
	bl	_DBG_TRC
	ldr	x8, [x20]
	and	x19, x8, x19
	mov	x0, x19
	bl	_DBG_TRC
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_BASE_ADDRESS_SPACE_IO,8,3  ; @PCI_BASE_ADDRESS_SPACE_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"  I/O"

	.comm	_PCI_BASE_ADDRESS_IO_MASK,8,3   ; @PCI_BASE_ADDRESS_IO_MASK
l_.str.2:                               ; @.str.2
	.asciz	"  memory"

	.comm	_PCI_BASE_ADDRESS_MEM_MASK,8,3  ; @PCI_BASE_ADDRESS_MEM_MASK
.subsections_via_symbols
