	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_chelsio_generic_dev
_reset_chelsio_generic_dev:             ## @reset_chelsio_generic_dev
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$61440, %eax                    ## imm = 0xF000
	andl	(%rdi), %eax
	cmpl	$16384, %eax                    ## imm = 0x4000
	jne	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	testl	%esi, %esi
	jne	LBB0_6
## %bb.3:
	movq	%rdi, %rbx
	movq	_PCI_COMMAND@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	leaq	-36(%rbp), %rdx
	callq	_pci_read_config_word
	movq	(%r15), %rsi
	movq	_PCI_COMMAND_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_word
	movq	%rbx, %rdi
	callq	_pci_save_state
	movq	_PCI_MSIX_FLAGS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movl	-40(%rbp), %eax
	movq	_PCI_MSIX_FLAGS_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	jne	LBB0_5
## %bb.4:
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	orl	%eax, %edx
	movq	_PCI_MSIX_FLAGS_MASKALL@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_word
LBB0_5:
	movq	%rbx, %rdi
	callq	_pcie_flr
	movq	%rbx, %rdi
	callq	_pci_restore_state
	movq	(%r15), %rsi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_word
	jmp	LBB0_6
LBB0_1:
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.comm	_PCI_COMMAND,8,3                ## @PCI_COMMAND
	.comm	_PCI_COMMAND_MASTER,4,2         ## @PCI_COMMAND_MASTER
	.comm	_PCI_MSIX_FLAGS,8,3             ## @PCI_MSIX_FLAGS
	.comm	_PCI_MSIX_FLAGS_ENABLE,4,2      ## @PCI_MSIX_FLAGS_ENABLE
	.comm	_PCI_MSIX_FLAGS_MASKALL,4,2     ## @PCI_MSIX_FLAGS_MASKALL
	.no_dead_strip	_reset_chelsio_generic_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_chelsio_generic_dev
_reset_chelsio_generic_dev:             ; @reset_chelsio_generic_dev
	.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
	ldr	w8, [x0]
	and	w8, w8, #0xf000
	cmp	w8, #4, lsl #12                 ; =16384
	b.ne	LBB0_6
; %bb.1:
	cbnz	w1, LBB0_5
; %bb.2:
	mov	x19, x0
Lloh0:
	adrp	x20, _PCI_COMMAND@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PCI_COMMAND@GOTPAGEOFF]
	ldr	x1, [x20]
	add	x2, sp, #12
	bl	_pci_read_config_word
	ldr	x1, [x20]
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _PCI_COMMAND_MASTER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCI_COMMAND_MASTER@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_pci_write_config_word
	mov	x0, x19
	bl	_pci_save_state
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x21, _PCI_MSIX_FLAGS@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PCI_MSIX_FLAGS@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #8]
Lloh7:
	adrp	x9, _PCI_MSIX_FLAGS_ENABLE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PCI_MSIX_FLAGS_ENABLE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	x10, [x19, #8]
	ldr	x11, [x21]
	add	x1, x11, x10
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _PCI_MSIX_FLAGS_MASKALL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCI_MSIX_FLAGS_MASKALL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_pci_write_config_word
LBB0_4:
	mov	x0, x19
	bl	_pcie_flr
	mov	x0, x19
	bl	_pci_restore_state
	ldr	x1, [x20]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_pci_write_config_word
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.comm	_PCI_COMMAND,8,3                ; @PCI_COMMAND
	.comm	_PCI_COMMAND_MASTER,4,2         ; @PCI_COMMAND_MASTER
	.comm	_PCI_MSIX_FLAGS,8,3             ; @PCI_MSIX_FLAGS
	.comm	_PCI_MSIX_FLAGS_ENABLE,4,2      ; @PCI_MSIX_FLAGS_ENABLE
	.comm	_PCI_MSIX_FLAGS_MASKALL,4,2     ; @PCI_MSIX_FLAGS_MASKALL
	.no_dead_strip	_reset_chelsio_generic_dev
.subsections_via_symbols
