	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ri_change
_ri_change:                             ## @ri_change
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_get_signals
	movslq	28(%rbx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 28(%rbx)
	movq	_IO_PIN_SHUTDOWN_LIMIT@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jg	LBB0_2
## %bb.1:
	movq	_PVR_RI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_port_irq_disable
LBB0_2:
	incl	24(%rbx)
	movq	_SerialSignal_RI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%rbx), %eax
	setne	%cl
	incl	16(%rbx,%rcx,4)
	leaq	12(%rbx), %rdi
	callq	_wake_up_interruptible
	leaq	8(%rbx), %rdi
	callq	_wake_up_interruptible
	movq	_BH_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_PIN_SHUTDOWN_LIMIT,8,3      ## @IO_PIN_SHUTDOWN_LIMIT
	.comm	_PVR_RI,4,2                     ## @PVR_RI
	.comm	_SerialSignal_RI,4,2            ## @SerialSignal_RI
	.comm	_BH_STATUS,4,2                  ## @BH_STATUS
	.no_dead_strip	_ri_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ri_change
_ri_change:                             ; @ri_change
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_get_signals
	ldrsw	x8, [x19, #28]
	add	w9, w8, #1
	str	w9, [x19, #28]
Lloh0:
	adrp	x9, _IO_PIN_SHUTDOWN_LIMIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IO_PIN_SHUTDOWN_LIMIT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x9, x8
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PVR_RI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PVR_RI@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_port_irq_disable
LBB0_2:
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
Lloh6:
	adrp	x8, _SerialSignal_RI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SerialSignal_RI@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w9
	mov	w8, #20
	mov	w9, #16
	csel	x8, x9, x8, eq
	ldr	w9, [x19, x8]
	add	w9, w9, #1
	str	w9, [x19, x8]
	add	x0, x19, #12
	bl	_wake_up_interruptible
	add	x0, x19, #8
	bl	_wake_up_interruptible
Lloh9:
	adrp	x8, _BH_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BH_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_PIN_SHUTDOWN_LIMIT,8,3      ; @IO_PIN_SHUTDOWN_LIMIT
	.comm	_PVR_RI,4,2                     ; @PVR_RI
	.comm	_SerialSignal_RI,4,2            ; @SerialSignal_RI
	.comm	_BH_STATUS,4,2                  ; @BH_STATUS
	.no_dead_strip	_ri_change
.subsections_via_symbols
