	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcim_release
_pcim_release:                          ## @pcim_release
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_to_pci_dev
	movq	%rax, %r14
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_pci_disable_msi
LBB0_2:
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_pci_disable_msix
LBB0_4:
	movq	_DEVICE_COUNT_RESOURCE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ecx
	btl	%ebx, %ecx
	jae	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pci_release_region
	movl	(%r12), %eax
	jmp	LBB0_8
LBB0_9:
	cmpq	$0, 32(%r15)
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_pci_clear_mwi
LBB0_11:
	cmpq	$0, 24(%r15)
	je	LBB0_13
## %bb.12:
	movl	16(%r15), %esi
	movq	%r14, %rdi
	callq	_pci_intx
LBB0_13:
	cmpq	$0, 8(%r15)
	je	LBB0_15
## %bb.14:
	cmpl	$0, 4(%r15)
	je	LBB0_16
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_disable_device             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DEVICE_COUNT_RESOURCE,4,2      ## @DEVICE_COUNT_RESOURCE
	.no_dead_strip	_pcim_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcim_release
_pcim_release:                          ; @pcim_release
	.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, x1
	bl	_to_pci_dev
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_pci_disable_msi
LBB0_2:
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_pci_disable_msix
LBB0_4:
Lloh0:
	adrp	x22, _DEVICE_COUNT_RESOURCE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DEVICE_COUNT_RESOURCE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:
	mov	w21, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w21, w21, #1
	cmp	w21, w8
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19]
	lsr	w9, w9, w21
	tbz	w9, #0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_pci_release_region
	ldr	w8, [x22]
	b	LBB0_6
LBB0_9:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_pci_clear_mwi
LBB0_11:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_pci_intx
LBB0_13:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_16
LBB0_15:
	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_16:
	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
	b	_pci_disable_device
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DEVICE_COUNT_RESOURCE,4,2      ; @DEVICE_COUNT_RESOURCE
	.no_dead_strip	_pcim_release
.subsections_via_symbols
