	.file	"extr_cx88-input.c_cx88_ir_irq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cx88_ir_irq
	.type	cx88_ir_irq, @function
cx88_ir_irq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r12, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	r12, r12
	je	.L1
	mov	eax, DWORD PTR 8[r12]
	test	eax, eax
	jne	.L15
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edi, DWORD PTR MO_SAMPLE_IO[rip]
	call	cx_read@PLT
	mov	r15d, eax
	cmp	eax, 255
	jne	.L3
	mov	rax, QWORD PTR [r12]
	cmp	QWORD PTR [rax], 0
	jne	.L1
.L3:
	mov	r13, rsp
	mov	ebp, 32
	mov	r14d, 32
	mov	rdi, r13
	call	init_ir_raw_event@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, r15d
	not	edi
	mov	eax, edi
	shr	eax, 31
	test	r15d, r15d
	cmovns	edi, r15d
	mov	DWORD PTR [rsp], eax
	call	fls@PLT
	mov	rsi, r14
	mov	edi, ebp
	sub	rsi, rax
	call	min@PLT
	xor	edx, edx
	mov	rdi, QWORD PTR [r12]
	mov	rsi, r13
	imul	ecx, DWORD PTR ir_samplerate[rip], 1000
	mov	ebx, eax
	mov	eax, DWORD PTR NSEC_PER_SEC[rip]
	imul	eax, ebx
	div	ecx
	mov	DWORD PTR 4[rsp], eax
	call	ir_raw_event_store_with_filter@PLT
	mov	ecx, ebx
	sal	r15d, cl
	sub	ebp, ebx
	jne	.L5
	mov	rdi, QWORD PTR [r12]
	call	ir_raw_event_handle@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cx88_ir_irq, .-cx88_ir_irq
	.comm	ir_samplerate,4,4
	.comm	NSEC_PER_SEC,4,4
	.comm	MO_SAMPLE_IO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cx88-input.c_cx88_ir_irq.c"
	.text
	.global	__aeabi_uidiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cx88_ir_irq
	.syntax unified
	.arm
	.fpu softvfp
	.type	cx88_ir_irq, %function
cx88_ir_irq:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r7, [r0]
	ldr	r3, .L20
	sub	sp, sp, #20
	cmp	r7, #0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	beq	.L1
	ldr	r3, [r7, #4]
	cmp	r3, #0
	bne	.L18
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L18:
	ldr	r3, .L20+4
	ldr	r0, [r3]
	bl	cx_read
	cmp	r0, #255
	mov	r5, r0
	bne	.L3
	ldr	r3, [r7]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L1
.L3:
	add	r0, sp, #4
	bl	init_ir_raw_event
	mov	r6, #32
	ldr	r9, .L20+8
	ldr	r8, .L20+12
.L5:
	mvn	r0, r5
	cmp	r5, #0
	lsr	r3, r0, #31
	movge	r0, r5
	str	r3, [sp, #4]
	bl	fls
	mov	r1, r0
	mov	r0, r6
	rsb	r1, r1, #32
	bl	min
	mov	r4, r0
	ldr	r1, [r8]
	ldr	r0, [r9]
	rsb	r3, r1, r1, lsl #5
	add	r1, r1, r3, lsl #2
	lsl	r1, r1, #3
	mul	r0, r4, r0
	bl	__aeabi_uidiv
	mov	r3, r0
	add	r1, sp, #4
	ldr	r0, [r7]
	str	r3, [sp, #8]
	bl	ir_raw_event_store_with_filter
	subs	r6, r6, r4
	lsl	r5, r5, r4
	bne	.L5
	ldr	r0, [r7]
	bl	ir_raw_event_handle
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	MO_SAMPLE_IO
	.word	NSEC_PER_SEC
	.word	ir_samplerate
	.size	cx88_ir_irq, .-cx88_ir_irq
	.comm	ir_samplerate,4,4
	.comm	NSEC_PER_SEC,4,4
	.comm	MO_SAMPLE_IO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
