	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00pci_probe                ## -- Begin function rt2x00pci_probe
	.p2align	4, 0x90
_rt2x00pci_probe:                       ## @rt2x00pci_probe
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_pci_enable_device
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_rt2x00_probe_err
	jmp	LBB0_21
LBB0_2:
	movq	%r15, %rdi
	callq	_pci_name
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_request_regions
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_rt2x00_probe_err
	jmp	LBB0_20
LBB0_4:
	movq	%r15, %rdi
	callq	_pci_set_master
	movq	%r15, %rdi
	callq	_pci_set_mwi
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	_rt2x00_probe_err
LBB0_6:
	leaq	4(%r15), %rbx
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	callq	_rt2x00_probe_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_9:
	movl	4(%r14), %esi
	movl	$40, %edi
	callq	_ieee80211_alloc_hw
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_pci_set_drvdata
	movq	(%r12), %r13
	movq	%rbx, 32(%r13)
	movq	%r14, 24(%r13)
	movq	%r12, 16(%r13)
	movl	(%r15), %eax
	movl	%eax, 8(%r13)
	movl	(%r14), %eax
	movl	%eax, 4(%r13)
	movq	%r15, %rdi
	callq	_pci_is_pcie
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:
	movq	_RT2X00_CHIP_INTF_PCI@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	callq	_rt2x00_probe_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_12:
	movq	_RT2X00_CHIP_INTF_PCIE@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_rt2x00_set_chip_intf
	movq	%r13, %rdi
	callq	_rt2x00pci_alloc_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.15:
	movq	_PCI_DEVICE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	movl	-44(%rbp), %eax
	movl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_rt2x00lib_probe_dev
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_rt2x00pci_free_reg
LBB0_18:
	movq	%r12, %rdi
	callq	_ieee80211_free_hw
LBB0_19:
	movq	%r15, %rdi
	callq	_pci_clear_mwi
	movq	%r15, %rdi
	callq	_pci_release_regions
LBB0_20:
	movq	%r15, %rdi
	callq	_pci_disable_device
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enable device failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"PCI request regions failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"MWI not available\n"

L_.str.3:                               ## @.str.3
	.asciz	"PCI DMA not supported\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.4:                               ## @.str.4
	.asciz	"Failed to allocate hardware\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RT2X00_CHIP_INTF_PCIE,4,2      ## @RT2X00_CHIP_INTF_PCIE
	.comm	_RT2X00_CHIP_INTF_PCI,4,2       ## @RT2X00_CHIP_INTF_PCI
	.comm	_PCI_DEVICE_ID,4,2              ## @PCI_DEVICE_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00pci_probe                ; -- Begin function rt2x00pci_probe
	.p2align	2
_rt2x00pci_probe:                       ; @rt2x00pci_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_pci_enable_device
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rt2x00_probe_err
	b	LBB0_16
LBB0_2:
	mov	x0, x19
	bl	_pci_name
	mov	x1, x0
	mov	x0, x19
	bl	_pci_request_regions
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_rt2x00_probe_err
	b	LBB0_15
LBB0_4:
	mov	x0, x19
	bl	_pci_set_master
	mov	x0, x19
	bl	_pci_set_mwi
	cbz	x0, LBB0_6
; %bb.5:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_rt2x00_probe_err
LBB0_6:
	add	x21, x19, #4
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x21
	bl	_dma_set_mask
	cbz	x0, LBB0_9
; %bb.7:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_rt2x00_probe_err
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_9:
	ldr	w1, [x20, #4]
	mov	w0, #40
	bl	_ieee80211_alloc_hw
	cbz	x0, LBB0_17
; %bb.10:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_pci_set_drvdata
	ldr	x23, [x22]
	stp	x20, x21, [x23, #24]
	str	x22, [x23, #16]
	ldr	w8, [x19]
	ldr	w9, [x20]
	stp	w9, w8, [x23, #4]
	mov	x0, x19
	bl	_pci_is_pcie
Lloh10:
	adrp	x8, _RT2X00_CHIP_INTF_PCI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RT2X00_CHIP_INTF_PCI@GOTPAGEOFF]
Lloh12:
	adrp	x9, _RT2X00_CHIP_INTF_PCIE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RT2X00_CHIP_INTF_PCIE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	mov	x0, x23
	bl	_rt2x00_set_chip_intf
	mov	x0, x23
	bl	_rt2x00pci_alloc_reg
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.11:
Lloh14:
	adrp	x8, _PCI_DEVICE_ID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_DEVICE_ID@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	str	w8, [x23]
	mov	x0, x23
	bl	_rt2x00lib_probe_dev
	mov	x21, x0
	cbz	w0, LBB0_16
; %bb.12:
	mov	x0, x23
	bl	_rt2x00pci_free_reg
LBB0_13:
	mov	x0, x22
	bl	_ieee80211_free_hw
LBB0_14:
	mov	x0, x19
	bl	_pci_clear_mwi
	mov	x0, x19
	bl	_pci_release_regions
LBB0_15:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_rt2x00_probe_err
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enable device failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"PCI request regions failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"MWI not available\n"

l_.str.3:                               ; @.str.3
	.asciz	"PCI DMA not supported\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.4:                               ; @.str.4
	.asciz	"Failed to allocate hardware\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RT2X00_CHIP_INTF_PCIE,4,2      ; @RT2X00_CHIP_INTF_PCIE
	.comm	_RT2X00_CHIP_INTF_PCI,4,2       ; @RT2X00_CHIP_INTF_PCI
	.comm	_PCI_DEVICE_ID,4,2              ; @PCI_DEVICE_ID
.subsections_via_symbols
