	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_epf_test_set_bar
_pci_epf_test_set_bar:                  ## @pci_epf_test_set_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	callq	_epf_get_drvdata
	movq	%rax, %rcx
	movq	_BAR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_BAR_5@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %r12d
	jg	LBB0_8
## %bb.1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rcx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%r14d, %r12d
	cmpl	(%rdx), %r12d
	jg	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movslq	%r12d, %r15
	movq	_PCI_BASE_ADDRESS_MEM_TYPE_64@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax,%r15,4), %ecx
	cmpl	$1, %ecx
	movl	$2, %r14d
	sbbl	$0, %r14d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	btl	%r15d, %ecx
	jb	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, %r13
	leaq	(%rax,%r15,4), %rdx
	movl	(%rbx), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_epc_set_bar
	movq	%r13, %rdx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%r15,4), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_pci_epf_free_space
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	movq	%r13, %rdx
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	jne	LBB0_6
## %bb.5:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAR_0,4,2                      ## @BAR_0
	.comm	_BAR_5,4,2                      ## @BAR_5
	.comm	_PCI_BASE_ADDRESS_MEM_TYPE_64,4,2 ## @PCI_BASE_ADDRESS_MEM_TYPE_64
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set BAR%d\n"

	.no_dead_strip	_pci_epf_test_set_bar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_epf_test_set_bar
_pci_epf_test_set_bar:                  ; @pci_epf_test_set_bar
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x20, [x0, #24]
	bl	_epf_get_drvdata
Lloh0:
	adrp	x8, _BAR_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAR_0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x26, _BAR_5@GOTPAGE
Lloh4:
	ldr	x26, [x26, _BAR_5@GOTPAGEOFF]
	ldr	w9, [x26]
	cmp	w8, w9
	b.le	LBB0_3
LBB0_1:
	mov	w25, #0
LBB0_2:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	x21, x0
	add	x9, x19, #16
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w9, [x0]
	str	w9, [sp, #4]                    ; 4-byte Folded Spill
	ldr	x28, [x0, #16]
	mov	w23, #1
Lloh5:
	adrp	x22, _PCI_BASE_ADDRESS_MEM_TYPE_64@GOTPAGE
Lloh6:
	ldr	x22, [x22, _PCI_BASE_ADDRESS_MEM_TYPE_64@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x26]
	add	w8, w27, w24
	cmp	w8, w9
	b.gt	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	sxtw	x24, w8
	add	x2, x9, w8, sxtw #2
	ldr	w9, [x2]
	ldr	w10, [x22]
	tst	w10, w9
	cinc	w27, w23, ne
	ldr	w9, [x28]
	lsr	w8, w9, w8
	tbnz	w8, #0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x19]
	mov	x0, x20
	bl	_pci_epc_set_bar
	cbz	w0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x25, x0
	ldr	x8, [x21, #8]
	ldr	w1, [x8, x24, lsl #2]
	mov	x0, x19
	mov	x2, x24
	bl	_pci_epf_free_space
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x24
	bl	_dev_err
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w24, w8
	b.ne	LBB0_4
	b	LBB0_2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BAR_0,4,2                      ; @BAR_0
	.comm	_BAR_5,4,2                      ; @BAR_5
	.comm	_PCI_BASE_ADDRESS_MEM_TYPE_64,4,2 ; @PCI_BASE_ADDRESS_MEM_TYPE_64
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set BAR%d\n"

	.no_dead_strip	_pci_epf_test_set_bar
.subsections_via_symbols
