	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclgevf_pci_init
_hclgevf_pci_init:                      ## @hclgevf_pci_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -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
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_2:
	movl	$64, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_4:
	movq	_HCLGEVF_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_request_regions
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	movq	%r14, %rdi
	callq	_pci_disable_device
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_pci_set_master
	movq	%r15, 8(%r15)
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_pci_iomap
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_pci_clear_master
	movq	%r14, %rdi
	callq	_pci_release_regions
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable PCI device\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't set consistent PCI DMA, exiting"

	.comm	_HCLGEVF_DRIVER_NAME,4,2        ## @HCLGEVF_DRIVER_NAME
L_.str.2:                               ## @.str.2
	.asciz	"PCI request regions failed %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"can't map configuration register space\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hclgevf_pci_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclgevf_pci_init
_hclgevf_pci_init:                      ; @hclgevf_pci_init
	.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, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_pci_enable_device
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_2:
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _HCLGEVF_DRIVER_NAME@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HCLGEVF_DRIVER_NAME@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_request_regions
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.5:
	str	x20, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_dev_err
LBB0_7:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_8:
	mov	x0, x20
	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
LBB0_9:
	mov	x0, x19
	bl	_pci_set_master
	str	x21, [x21, #8]
	mov	x0, x19
	mov	w1, #2
	mov	w2, #0
	bl	_pci_iomap
	str	w0, [x21]
	cbnz	w0, LBB0_8
; %bb.10:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_pci_clear_master
	mov	x0, x19
	bl	_pci_release_regions
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable PCI device\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't set consistent PCI DMA, exiting"

	.comm	_HCLGEVF_DRIVER_NAME,4,2        ; @HCLGEVF_DRIVER_NAME
l_.str.2:                               ; @.str.2
	.asciz	"PCI request regions failed %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"can't map configuration register space\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hclgevf_pci_init
.subsections_via_symbols
