	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_pci_init
_hclge_pci_init:                        ## @hclge_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	8(%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_11
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_6
## %bb.3:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_6:
	movq	_HCLGE_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_request_regions
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movq	%r14, %rdi
	callq	_pci_disable_device
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_pci_set_master
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_pcim_iomap
	movl	%eax, 4(%r15)
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	movq	%r14, %rdi
	callq	_pci_sriov_get_totalvfs
	movl	%eax, (%r15)
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.4(%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_10
	.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"

L_.str.2:                               ## @.str.2
	.asciz	"set DMA mask to 32 bits\n"

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

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_pci_init
_hclge_pci_init:                        ; @hclge_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	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_pci_enable_device
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_10
LBB0_2:
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_6
; %bb.3:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_5:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_6:
Lloh6:
	adrp	x8, _HCLGE_DRIVER_NAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HCLGE_DRIVER_NAME@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_request_regions
	cbz	w0, LBB0_11
; %bb.7:
	mov	x21, x0
	str	x21, [sp]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_dev_err
LBB0_9:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_10:
	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
LBB0_11:
	mov	x0, x19
	bl	_pci_set_master
	mov	x0, x19
	mov	w1, #2
	mov	w2, #0
	bl	_pcim_iomap
	str	w0, [x20, #4]
	cbz	w0, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_pci_sriov_get_totalvfs
	mov	w21, #0
	str	w0, [x20]
	b	LBB0_10
LBB0_13:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	mov	x0, x19
	bl	_pci_clear_master
	mov	x0, x19
	bl	_pci_release_regions
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.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"

l_.str.2:                               ; @.str.2
	.asciz	"set DMA mask to 32 bits\n"

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

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

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