	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movq	%r15, %rdi
	callq	_pci_enable_device
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_17
LBB0_2:
	movl	$64, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	testq	%rax, %rax
	je	LBB0_8
## %bb.18:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movl	$64, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movl	$1, %eax
LBB0_9:
	movl	%eax, (%r12)
	movq	_vmxnet3_driver_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_pci_request_selected_regions
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_11:
	movq	%r15, %rdi
	callq	_pci_set_master
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	%rax, %r12
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_ioremap
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pci_resource_start
	movq	%rax, %r12
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pci_resource_len
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_ioremap
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	jne	LBB0_17
## %bb.14:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r14), %rdi
	callq	_iounmap
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_15:
	negl	%ebx
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_pci_release_selected_regions
LBB0_16:
	movq	%r15, %rdi
	callq	_pci_disable_device
LBB0_17:
	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"

L_.str.1:                               ## @.str.1
	.asciz	"pci_set_consistent_dma_mask failed\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"pci_set_dma_mask failed\n"

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

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

L_.str.5:                               ## @.str.5
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_pci_enable_device
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
	str	x22, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_19
LBB0_2:
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_dma_mask
	cbz	x0, LBB0_5
; %bb.3:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_dma_mask
	cbz	x0, LBB0_8
; %bb.4:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_5:
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_consistent_dma_mask
	cbz	x0, LBB0_9
; %bb.6:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_err
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_18
LBB0_8:
	mov	w8, #0
	b	LBB0_10
LBB0_9:
	mov	w8, #1
LBB0_10:
	str	w8, [x21]
Lloh9:
	adrp	x8, _vmxnet3_driver_name@GOTPAGE
Lloh10:
	ldr	x8, [x8, _vmxnet3_driver_name@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #3
	bl	_pci_request_selected_regions
	cbz	w0, LBB0_12
; %bb.11:
	mov	x22, x0
	str	x22, [sp]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_18
LBB0_12:
	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_15
; %bb.13:
	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_16
; %bb.14:
	mov	w22, #0
	b	LBB0_19
LBB0_15:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	b	LBB0_17
LBB0_16:
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh23:
	ldr	w21, [x8]
	ldr	x0, [x20]
	bl	_iounmap
LBB0_17:
	neg	w22, w21
	mov	x0, x19
	mov	w1, #3
	bl	_pci_release_selected_regions
LBB0_18:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_19:
	mov	x0, x22
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable adapter: error %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"pci_set_consistent_dma_mask failed\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"pci_set_dma_mask failed\n"

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

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

l_.str.5:                               ; @.str.5
	.asciz	"Failed to map bar1\n"

	.no_dead_strip	_vmxnet3_alloc_pci_resources
.subsections_via_symbols
