	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function redrat3_process_ir_data
LCPI0_0:
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_redrat3_process_ir_data:               ## @redrat3_process_ir_data
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	40(%rdi), %r14
	addq	$8, %rdi
	callq	_redrat3_val_to_mod_freq
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	cmpq	$0, 32(%r13)
	je	LBB0_3
## %bb.2:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,0,0,0]
	movaps	%xmm0, -96(%rbp)
	movq	%rbx, -80(%rbp)
	movq	(%r13), %rdi
	leaq	-96(%rbp), %rsi
	callq	_ir_raw_event_store
LBB0_3:
	movl	24(%r13), %edi
	callq	_be16_to_cpu
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r15d
	leaq	-64(%rbp), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	shlq	$2, %rdi
	addq	16(%r13), %rdi
	callq	_get_unaligned_be16
	movl	%eax, %edi
	callq	_redrat3_len_to_us
	movl	%ebx, %ecx
	notl	%ecx
	andl	$1, %ecx
	movl	%ecx, -60(%rbp)
	movl	%eax, %edi
	callq	_US_TO_NS
	movq	_IR_MAX_DURATION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	movl	%ecx, -52(%rbp)
	cmpl	$0, -60(%rbp)
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %rdx
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r13), %rdi
	movq	%r12, %rsi
	callq	_ir_raw_event_store_with_filter
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_5
LBB0_6:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, -60(%rbp)
	movq	(%r13), %rax
	movl	(%rax), %edx
	movl	%edx, -52(%rbp)
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r13), %rdi
	leaq	-64(%rbp), %rsi
	callq	_ir_raw_event_store_with_filter
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r13), %rdi
	callq	_ir_raw_event_handle
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got mod_freq of %u\n"

	.comm	_IR_MAX_DURATION,4,2            ## @IR_MAX_DURATION
L_.str.1:                               ## @.str.1
	.asciz	"storing %s with duration %d (i: %d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"pulse"

L_.str.3:                               ## @.str.3
	.asciz	"space"

L_.str.4:                               ## @.str.4
	.asciz	"storing trailing timeout with duration %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"calling ir_raw_event_handle\n"

	.no_dead_strip	_redrat3_process_ir_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function redrat3_process_ir_data
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_redrat3_process_ir_data:               ; @redrat3_process_ir_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x19, x0
	stp	xzr, xzr, [sp, #56]
	str	xzr, [sp, #72]
	ldr	x20, [x0, #40]
	add	x0, x0, #8
	bl	_redrat3_val_to_mod_freq
	mov	x21, x0
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	cbz	x21, LBB0_3
; %bb.1:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp, #32]
	str	x21, [sp, #48]
	ldr	x0, [x19]
	add	x1, sp, #32
	bl	_ir_raw_event_store
LBB0_3:
	ldr	w0, [x19, #24]
	bl	_be16_to_cpu
	cbz	w0, LBB0_6
; %bb.4:
	mov	x22, #0
	mov	w23, w0
Lloh4:
	adrp	x24, _IR_MAX_DURATION@GOTPAGE
Lloh5:
	ldr	x24, [x24, _IR_MAX_DURATION@GOTPAGEOFF]
Lloh6:
	adrp	x25, l_.str.2@PAGE
Lloh7:
	add	x25, x25, l_.str.2@PAGEOFF
Lloh8:
	adrp	x26, l_.str.3@PAGE
Lloh9:
	add	x26, x26, l_.str.3@PAGEOFF
Lloh10:
	adrp	x21, l_.str.1@PAGE
Lloh11:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19, #8]
	ldr	w8, [x8, x22, lsl #2]
	add	x0, x9, x8, lsl #2
	bl	_get_unaligned_be16
	bl	_redrat3_len_to_us
	mvn	w8, w22
	and	w8, w8, #0x1
	str	w8, [sp, #60]
	bl	_US_TO_NS
	ldr	w8, [x24]
	cmp	w0, w8
	csel	w8, w0, w8, lt
	str	w8, [sp, #68]
	ldr	w9, [sp, #60]
	cmp	w9, #0
	csel	x9, x26, x25, eq
	stp	x8, x22, [sp, #8]
	str	x9, [sp]
	mov	x0, x20
	mov	x1, x21
	bl	_dev_dbg
	ldr	x0, [x19]
	add	x1, sp, #56
	bl	_ir_raw_event_store_with_filter
	add	x22, x22, #1
	cmp	x23, x22
	b.ne	LBB0_5
LBB0_6:
Lloh12:
	adrp	x8, lCPI0_1@PAGE
Lloh13:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	stur	d0, [sp, #60]
	ldr	x8, [x19]
	ldr	w8, [x8]
	str	w8, [sp, #68]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x0, [x19]
	add	x1, sp, #56
	bl	_ir_raw_event_store_with_filter
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x0, [x19]
	bl	_ir_raw_event_handle
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdr	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got mod_freq of %u\n"

	.comm	_IR_MAX_DURATION,4,2            ; @IR_MAX_DURATION
l_.str.1:                               ; @.str.1
	.asciz	"storing %s with duration %d (i: %d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"pulse"

l_.str.3:                               ; @.str.3
	.asciz	"space"

l_.str.4:                               ; @.str.4
	.asciz	"storing trailing timeout with duration %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"calling ir_raw_event_handle\n"

	.no_dead_strip	_redrat3_process_ir_data
.subsections_via_symbols
