	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmxnet3_alloc_pci_resources
_vmxnet3_alloc_pci_resources:           ## @vmxnet3_alloc_pci_resources
	.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	%rdi, %r15
	movq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_pci_enable_device
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_2:
	movq	_vmxnet3_driver_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_pci_request_selected_regions
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_4:
	movq	%r14, %rdi
	callq	_pci_set_master
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	%rax, %r12
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_ioremap
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_pci_resource_start
	movq	%rax, %r12
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_pci_resource_len
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_ioremap
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r15), %rdi
	callq	_iounmap
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	negl	%ebx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_pci_release_selected_regions
LBB0_9:
	movq	%r14, %rdi
	callq	_pci_disable_device
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable adapter: error %d\n"

	.comm	_vmxnet3_driver_name,4,2        ## @vmxnet3_driver_name
L_.str.1:                               ## @.str.1
	.asciz	"Failed to request region for adapter: error %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to map bar0\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"Failed to map bar1\n"

	.no_dead_strip	_vmxnet3_alloc_pci_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmxnet3_alloc_pci_resources
_vmxnet3_alloc_pci_resources:           ; @vmxnet3_alloc_pci_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_pci_enable_device
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_11
LBB0_2:
Lloh2:
	adrp	x8, _vmxnet3_driver_name@GOTPAGE
Lloh3:
	ldr	x8, [x8, _vmxnet3_driver_name@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #3
	bl	_pci_request_selected_regions
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_pci_set_master
	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
	mov	x0, x21
	bl	_ioremap
	str	x0, [x20]
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_pci_resource_start
	mov	x21, x0
	mov	x0, x19
	mov	w1, #1
	bl	_pci_resource_len
	mov	x1, x0
	mov	x0, x21
	bl	_ioremap
	str	x0, [x20, #8]
	cbz	x0, LBB0_8
; %bb.6:
	mov	w21, #0
	b	LBB0_11
LBB0_7:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
	ldr	x0, [x20]
	bl	_iounmap
LBB0_9:
	neg	w21, w21
	mov	x0, x19
	mov	w1, #3
	bl	_pci_release_selected_regions
LBB0_10:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable adapter: error %d\n"

	.comm	_vmxnet3_driver_name,4,2        ; @vmxnet3_driver_name
l_.str.1:                               ; @.str.1
	.asciz	"Failed to request region for adapter: error %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to map bar0\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"Failed to map bar1\n"

	.no_dead_strip	_vmxnet3_alloc_pci_resources
.subsections_via_symbols
