	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx88_ir_irq                    ## -- Begin function cx88_ir_irq
	.p2align	4, 0x90
_cx88_ir_irq:                           ## @cx88_ir_irq
	.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	(%rdi), %r13
	movq	$0, -48(%rbp)
	testq	%r13, %r13
	je	LBB0_7
## %bb.1:
	cmpl	$0, 8(%r13)
	je	LBB0_7
## %bb.2:
	movq	_MO_SAMPLE_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	movl	%eax, %ebx
	cmpl	$255, %eax
	jne	LBB0_4
## %bb.3:
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	jne	LBB0_7
LBB0_4:
	movl	$32, %r14d
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	notl	%eax
	shrl	$31, %eax
	movl	%eax, -48(%rbp)
	movl	%ebx, %edi
	sarl	$31, %edi
	xorl	%ebx, %edi
	callq	_fls
	movl	$32, %esi
	subq	%rax, %rsi
	movl	%r14d, %edi
	callq	_min
	movl	%eax, %r12d
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	imull	%r12d, %eax
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	movq	_ir_samplerate@GOTPCREL(%rip), %rcx
	divl	(%rcx)
	movl	%eax, -44(%rbp)
	movq	(%r13), %rdi
	movq	%r15, %rsi
	callq	_ir_raw_event_store_with_filter
	movl	%r12d, %ecx
	shll	%cl, %ebx
	subl	%r12d, %r14d
	jne	LBB0_5
## %bb.6:
	movq	(%r13), %rdi
	callq	_ir_raw_event_handle
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MO_SAMPLE_IO,4,2               ## @MO_SAMPLE_IO
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.comm	_ir_samplerate,4,2              ## @ir_samplerate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx88_ir_irq                    ; -- Begin function cx88_ir_irq
	.p2align	2
_cx88_ir_irq:                           ; @cx88_ir_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x22, [x0]
	str	xzr, [sp, #8]
	cbz	x22, LBB0_7
; %bb.1:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _MO_SAMPLE_IO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MO_SAMPLE_IO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cx_read
	mov	x19, x0
	cmp	w0, #255
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x22]
	ldr	x8, [x8]
	cbnz	x8, LBB0_7
LBB0_4:
	mov	w23, #32
Lloh3:
	adrp	x24, _NSEC_PER_SEC@GOTPAGE
Lloh4:
	ldr	x24, [x24, _NSEC_PER_SEC@GOTPAGEOFF]
	mov	w25, #19923
	movk	w25, #4194, lsl #16
Lloh5:
	adrp	x26, _ir_samplerate@GOTPAGE
Lloh6:
	ldr	x26, [x26, _ir_samplerate@GOTPAGEOFF]
	mov	w20, #32
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mvn	w8, w19
	lsr	w8, w8, #31
	str	w8, [sp, #8]
	eor	w0, w19, w19, asr #31
	bl	_fls
	sub	x1, x23, x0
	mov	x0, x20
	bl	_min
	mov	x21, x0
	ldrsw	x8, [x24]
	mul	x8, x8, x25
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #6
	mul	w8, w8, w0
	ldr	w9, [x26]
	udiv	w8, w8, w9
	str	w8, [sp, #12]
	ldr	x0, [x22]
	add	x1, sp, #8
	bl	_ir_raw_event_store_with_filter
	lsl	w19, w19, w21
	subs	w20, w20, w21
	b.ne	LBB0_5
; %bb.6:
	ldr	x0, [x22]
	bl	_ir_raw_event_handle
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MO_SAMPLE_IO,4,2               ; @MO_SAMPLE_IO
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.comm	_ir_samplerate,4,2              ; @ir_samplerate
.subsections_via_symbols
