	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enable_chip
_enable_chip:                           ## @enable_chip
	.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
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	movq	_ipath_state_wait@GOTPCREL(%rip), %rdi
	callq	_init_waitqueue_head
LBB0_2:
	movq	64(%r15), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r15, %rdi
	callq	_ipath_write_kreg
	leaq	72(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_INFINIPATH_S_PIOENABLE@GOTPCREL(%rip), %rax
	movq	_INFINIPATH_S_PIOBUFAVAILUPD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	%edx, 4(%r15)
	movl	8(%r15), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_INFINIPATH_S_UPDTHRESH_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %edx
	movl	%edx, 4(%r15)
LBB0_4:
	movq	64(%r15), %rax
	movl	8(%rax), %esi
	movq	%r15, %rdi
	callq	_ipath_write_kreg
	movq	64(%r15), %rax
	movl	4(%rax), %esi
	movq	%r15, %rdi
	callq	_ipath_read_kreg64
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movb	12(%r15), %al
	movb	16(%r15), %cl
	movl	$1, %edx
	shll	%cl, %edx
	btsl	%eax, %edx
	orl	(%r15), %edx
	movl	%edx, (%r15)
	movq	_IPATH_NODMA_RTAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 20(%r15)
	jne	LBB0_6
## %bb.5:
	movb	24(%r15), %cl
	movl	$1, %eax
	shlq	%cl, %rax
	orl	%eax, %edx
	movl	%edx, (%r15)
LBB0_6:
	movq	64(%r15), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ipath_write_kreg
	movq	_IPATH_INITTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r15)
	movq	_ur_rcvegrindextail@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_ipath_read_ureg32
	movq	_ur_rcvegrindexhead@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_ipath_write_ureg
	movq	_ur_rcvhdrhead@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	56(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	orl	32(%r15), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_ipath_write_ureg
	cmpl	$0, 36(%r15)
	jle	LBB0_13
## %bb.7:
	movq	48(%r15), %rax
	movl	(%rax), %edi
	callq	_le64_to_cpu
	movq	40(%r15), %rcx
	movl	%eax, (%rcx)
	cmpl	$2, 36(%r15)
	jl	LBB0_13
## %bb.8:
	movq	48(%r15), %rax
	movl	4(%rax), %edi
	callq	_le64_to_cpu
	movq	40(%r15), %rcx
	movl	%eax, 4(%rcx)
	cmpl	$3, 36(%r15)
	jl	LBB0_13
## %bb.9:
	movq	48(%r15), %rax
	movl	8(%rax), %edi
	callq	_le64_to_cpu
	movq	40(%r15), %rcx
	movl	%eax, 8(%rcx)
	cmpl	$4, 36(%r15)
	jl	LBB0_13
## %bb.10:
	movq	48(%r15), %rax
	movl	12(%rax), %edi
	callq	_le64_to_cpu
	movq	40(%r15), %rcx
	movl	%eax, 12(%rcx)
	cmpl	$5, 36(%r15)
	jl	LBB0_13
## %bb.11:
	movl	$4, %ebx
	movq	_IPATH_SWAP_PIOBUFS@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	andl	20(%r15), %eax
	movq	%rbx, %rcx
	xorq	$1, %rcx
	testl	%eax, %eax
	movq	48(%r15), %rax
	cmoveq	%rbx, %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_le64_to_cpu
	movq	40(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	36(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movq	_IPATH_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ipath_state_wait,4,2           ## @ipath_state_wait
	.comm	_INFINIPATH_S_PIOENABLE,4,2     ## @INFINIPATH_S_PIOENABLE
	.comm	_INFINIPATH_S_PIOBUFAVAILUPD,4,2 ## @INFINIPATH_S_PIOBUFAVAILUPD
	.comm	_INFINIPATH_S_UPDTHRESH_SHIFT,4,2 ## @INFINIPATH_S_UPDTHRESH_SHIFT
	.comm	_IPATH_NODMA_RTAIL,4,2          ## @IPATH_NODMA_RTAIL
	.comm	_IPATH_INITTED,4,2              ## @IPATH_INITTED
	.comm	_ur_rcvegrindextail,4,2         ## @ur_rcvegrindextail
	.comm	_ur_rcvegrindexhead,4,2         ## @ur_rcvegrindexhead
	.comm	_ur_rcvhdrhead,4,2              ## @ur_rcvhdrhead
	.comm	_IPATH_SWAP_PIOBUFS,4,2         ## @IPATH_SWAP_PIOBUFS
	.comm	_IPATH_PRESENT,4,2              ## @IPATH_PRESENT
	.no_dead_strip	_enable_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enable_chip
_enable_chip:                           ; @enable_chip
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	cbnz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, _ipath_state_wait@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ipath_state_wait@GOTPAGEOFF]
	bl	_init_waitqueue_head
LBB0_2:
	ldr	x8, [x19, #64]
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_ipath_write_kreg
	add	x20, x19, #72
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _INFINIPATH_S_PIOENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INFINIPATH_S_PIOENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _INFINIPATH_S_PIOBUFAVAILUPD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INFINIPATH_S_PIOBUFAVAILUPD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [x19, #4]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_4
; %bb.3:
Lloh8:
	adrp	x9, _INFINIPATH_S_UPDTHRESH_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INFINIPATH_S_UPDTHRESH_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w2, w8, w2
	str	w2, [x19, #4]
LBB0_4:
	ldr	x8, [x19, #64]
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_ipath_write_kreg
	ldr	x8, [x19, #64]
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_ipath_read_kreg64
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w8, #1
	ldp	w9, w10, [x19, #12]
	lsl	w9, w8, w9
	lsl	w8, w8, w10
	orr	w8, w8, w9
	ldr	w9, [x19]
	orr	w2, w8, w9
	str	w2, [x19]
	ldr	w8, [x19, #20]
Lloh11:
	adrp	x9, _IPATH_NODMA_RTAIL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IPATH_NODMA_RTAIL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x19, #24]
	mov	w9, #1
	lsl	x8, x9, x8
	orr	w2, w2, w8
	str	w2, [x19]
LBB0_6:
	ldr	x8, [x19, #64]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ipath_write_kreg
Lloh14:
	adrp	x8, _IPATH_INITTED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IPATH_INITTED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
Lloh17:
	adrp	x8, _ur_rcvegrindextail@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ur_rcvegrindextail@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ipath_read_ureg32
	mov	x2, x0
Lloh20:
	adrp	x8, _ur_rcvegrindexhead@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ur_rcvegrindexhead@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_ipath_write_ureg
Lloh23:
	adrp	x8, _ur_rcvhdrhead@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ur_rcvhdrhead@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w8, [x19, #32]
	ldr	x9, [x19, #56]
	ldr	x9, [x9]
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #0
	bl	_ipath_write_ureg
	ldr	w8, [x19, #36]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.7:
	ldr	x8, [x19, #48]
	ldr	w0, [x8]
	bl	_le64_to_cpu
	ldr	x8, [x19, #40]
	str	w0, [x8]
	ldr	w8, [x19, #36]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.8:
	ldr	x8, [x19, #48]
	ldr	w0, [x8, #4]
	bl	_le64_to_cpu
	ldr	x8, [x19, #40]
	str	w0, [x8, #4]
	ldr	w8, [x19, #36]
	cmp	w8, #3
	b.lt	LBB0_13
; %bb.9:
	ldr	x8, [x19, #48]
	ldr	w0, [x8, #8]
	bl	_le64_to_cpu
	ldr	x8, [x19, #40]
	str	w0, [x8, #8]
	ldr	w8, [x19, #36]
	cmp	w8, #4
	b.lt	LBB0_13
; %bb.10:
	ldr	x8, [x19, #48]
	ldr	w0, [x8, #12]
	bl	_le64_to_cpu
	ldr	x8, [x19, #40]
	str	w0, [x8, #12]
	ldr	w8, [x19, #36]
	cmp	w8, #5
	b.lt	LBB0_13
; %bb.11:
	mov	w20, #4
Lloh26:
	adrp	x21, _IPATH_SWAP_PIOBUFS@GOTPAGE
Lloh27:
	ldr	x21, [x21, _IPATH_SWAP_PIOBUFS@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #20]
	ldr	w9, [x21]
	ldr	x10, [x19, #48]
	eor	x11, x20, #0x1
	tst	w9, w8
	csel	x8, x20, x11, eq
	ldr	w0, [x10, x8, lsl #2]
	bl	_le64_to_cpu
	ldr	x8, [x19, #40]
	str	w0, [x8, x20, lsl #2]
	add	x20, x20, #1
	ldrsw	x8, [x19, #36]
	cmp	x20, x8
	b.lt	LBB0_12
LBB0_13:
Lloh28:
	adrp	x8, _IPATH_PRESENT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IPATH_PRESENT@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ipath_state_wait,4,2           ; @ipath_state_wait
	.comm	_INFINIPATH_S_PIOENABLE,4,2     ; @INFINIPATH_S_PIOENABLE
	.comm	_INFINIPATH_S_PIOBUFAVAILUPD,4,2 ; @INFINIPATH_S_PIOBUFAVAILUPD
	.comm	_INFINIPATH_S_UPDTHRESH_SHIFT,4,2 ; @INFINIPATH_S_UPDTHRESH_SHIFT
	.comm	_IPATH_NODMA_RTAIL,4,2          ; @IPATH_NODMA_RTAIL
	.comm	_IPATH_INITTED,4,2              ; @IPATH_INITTED
	.comm	_ur_rcvegrindextail,4,2         ; @ur_rcvegrindextail
	.comm	_ur_rcvegrindexhead,4,2         ; @ur_rcvegrindexhead
	.comm	_ur_rcvhdrhead,4,2              ; @ur_rcvhdrhead
	.comm	_IPATH_SWAP_PIOBUFS,4,2         ; @IPATH_SWAP_PIOBUFS
	.comm	_IPATH_PRESENT,4,2              ; @IPATH_PRESENT
	.no_dead_strip	_enable_chip
.subsections_via_symbols
