	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_xmp_decode
_ir_xmp_decode:                         ## @ir_xmp_decode
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	callq	_is_timing_event
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rcx
	shrq	$32, %rcx
	movq	%rbx, %rdi
	movl	(%r14), %r15d
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, %rbx
	movq	%rcx, %r12
	movl	4(%rax), %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_TO_US
	movl	%eax, %r14d
	movl	%r12d, %edi
	callq	_TO_STR
	leaq	L_.str(%rip), %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	%r14d, %r8d
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r13), %ebx
	cmpl	$128, %ebx
	je	LBB0_14
## %bb.4:
	cmpl	$129, %ebx
	je	LBB0_10
## %bb.5:
	cmpl	$130, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_45
## %bb.6:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.8:
	movq	_XMP_LEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XMP_UNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%r15d, %edi
	callq	_eq_margin
	xorl	%r12d, %r12d
	testl	%eax, %eax
	je	LBB0_42
## %bb.9:
	movq	$128, (%r13)
	jmp	LBB0_42
LBB0_1:
	xorl	%r12d, %r12d
	testq	%r13, %r13
	je	LBB0_42
## %bb.2:
	movl	$130, (%r14)
	jmp	LBB0_42
LBB0_14:
	movl	$128, %ebx
	testl	%r12d, %r12d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_45
## %bb.15:
	movq	_XMP_TRAILER_SPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XMP_NIBBLE_PREFIX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%r15d, %edi
	callq	_geq_margin
	testl	%eax, %eax
	je	LBB0_35
## %bb.16:
	movl	4(%r13), %edx
	cmpl	$16, %edx
	jne	LBB0_17
## %bb.19:
	movq	8(%r13), %rsi
	movl	12(%rsi), %eax
	movl	(%rbx), %edx
	subl	%edx, %eax
	cltq
	imulq	$-2004318071, %rax, %rcx        ## imm = 0x88888889
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %edi
	sarl	$3, %edi
	shrl	$31, %ecx
	addl	%edi, %ecx
	addl	$-2000, %ecx                    ## imm = 0xF830
	cmpl	$30750, %eax                    ## imm = 0x781E
	jge	LBB0_20
## %bb.51:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_46
LBB0_10:
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.12:
	movq	_XMP_LEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XMP_UNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_eq_margin
	xorl	%r12d, %r12d
	testl	%eax, %eax
	je	LBB0_42
## %bb.13:
	movl	$128, (%r13)
	jmp	LBB0_42
LBB0_7:
	movl	$130, %ebx
	jmp	LBB0_45
LBB0_11:
	movl	$129, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_45:
	movl	4(%r13), %r14d
	movl	%r15d, %edi
	callq	_TO_US
	movl	%eax, %r15d
	movl	%r12d, %edi
	callq	_TO_STR
	leaq	L_.str.11(%rip), %rsi
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_46:
	movl	$130, (%r13)
LBB0_47:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_42:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	movq	_XMP_HALFFRAME_SPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movl	%r15d, %edi
	callq	_geq_margin
	testl	%eax, %eax
	je	LBB0_43
## %bb.36:
	movl	4(%r13), %edx
	cmpl	$8, %edx
	je	LBB0_40
## %bb.37:
	cmpl	$16, %edx
	jne	LBB0_39
## %bb.38:
	leaq	L_.str.8(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$16, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$8, 4(%r13)
	jmp	LBB0_40
LBB0_17:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_18:
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_46
LBB0_20:
	movl	(%rsi), %eax
	subl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, (%rsi)
	movl	$2, %edi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rsi,%rdi,4), %eax
	subl	(%rbx), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rsi,%rdi,4)
	cmpq	$16, %rdi
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	(%rsi,%rdi,4), %eax
	subl	(%rbx), %eax
	cltd
	idivl	%ecx
	movl	%eax, (%rsi,%rdi,4)
	addq	$2, %rdi
	jmp	LBB0_21
LBB0_23:
	movl	(%rsi), %r9d
	movl	8(%rsi), %r11d
	movl	4(%rsi), %ecx
	addl	%r9d, %ecx
	addl	%r11d, %ecx
	addl	12(%rsi), %ecx
	movl	16(%rsi), %edx
	addl	%edx, %ecx
	movl	20(%rsi), %r8d
	addl	%r8d, %ecx
	movl	24(%rsi), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	addl	%eax, %ecx
	movl	28(%rsi), %r13d
	leal	(%rcx,%r13), %eax
	addl	$15, %eax
	addl	%r13d, %ecx
	addl	$30, %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	andl	$-16, %ecx
	subl	%ecx, %eax
	movl	32(%rsi), %r10d
	movl	36(%rsi), %edi
	addl	%r10d, %edi
	movl	40(%rsi), %ecx
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	addl	%ecx, %edi
	movl	44(%rsi), %ecx
	addl	%ecx, %edi
	movl	48(%rsi), %r14d
	addl	%r14d, %edi
	movl	52(%rsi), %r12d
	addl	%r12d, %edi
	movl	56(%rsi), %ebx
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	addl	%ebx, %edi
	movl	60(%rsi), %r15d
	leal	(%r15,%rdi), %ebx
	addl	$15, %ebx
	leal	(%r15,%rdi), %esi
	addl	$30, %esi
	testl	%ebx, %ebx
	cmovnsl	%ebx, %esi
	andl	$-16, %esi
	subl	%esi, %ebx
	cmpl	$15, %eax
	jne	LBB0_25
## %bb.24:
	cmpl	$15, %ebx
	jne	LBB0_25
## %bb.26:
	shll	$4, %r9d
	orl	%r9d, %r11d
	shll	$4, %r10d
	orl	%r10d, %ecx
	cmpl	%ecx, %r11d
	jne	LBB0_27
## %bb.29:
	shll	$4, %edx
	orl	%r8d, %edx
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	shll	$4, %ebx
	cmpl	$68, %edx
	je	LBB0_31
## %bb.30:
	leaq	L_.str.5(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	movl	%r11d, -52(%rbp)                ## 4-byte Spill
	callq	_dev_dbg
	movl	-52(%rbp), %r11d                ## 4-byte Reload
LBB0_31:
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	shll	$28, %eax
	shll	$24, %r13d
	orl	%eax, %r13d
	shll	$16, %r11d
	shll	$12, %r14d
	orl	%r13d, %r14d
	orl	%r11d, %r14d
	shll	$8, %r12d
	orl	%r14d, %r12d
	orl	%r15d, %r12d
	orl	%ebx, %r12d
	leaq	L_.str.6(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_32
## %bb.33:
	movq	%rbx, %rdi
	callq	_rc_repeat
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_34
LBB0_43:
	movl	(%rbx), %esi
	movq	_XMP_UNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	callq	_geq_margin
	testl	%eax, %eax
	je	LBB0_44
## %bb.48:
	movslq	4(%r13), %rax
	cmpq	$16, %rax
	jne	LBB0_50
## %bb.49:
	leaq	L_.str.10(%rip), %rsi
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$16, %edx
	jmp	LBB0_18
LBB0_39:
	leaq	L_.str.9(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_40
LBB0_25:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	movl	%ebx, %ecx
	jmp	LBB0_28
LBB0_44:
	movl	(%r13), %ebx
	jmp	LBB0_45
LBB0_50:
	movq	8(%r13), %rcx
	movl	%r15d, (%rcx,%rax,4)
	incl	4(%r13)
LBB0_40:
	movl	$129, (%r13)
LBB0_41:
	xorl	%r12d, %r12d
	jmp	LBB0_42
LBB0_27:
	leaq	L_.str.4(%rip), %rsi
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r11d, %edx
LBB0_28:
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	$130, (%rax)
	jmp	LBB0_47
LBB0_32:
	movq	_RC_PROTO_XMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_rc_keydown
LBB0_34:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	$130, (%rax)
	jmp	LBB0_41
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"XMP decode started at state %d %d (%uus %s)\n"

	.comm	_XMP_LEADER,4,2                 ## @XMP_LEADER
	.comm	_XMP_UNIT,4,2                   ## @XMP_UNIT
	.comm	_XMP_TRAILER_SPACE,4,2          ## @XMP_TRAILER_SPACE
	.comm	_XMP_NIBBLE_PREFIX,4,2          ## @XMP_NIBBLE_PREFIX
L_.str.1:                               ## @.str.1
	.asciz	"received TRAILER period at index %d: %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"divider to small %d.\n"

L_.str.3:                               ## @.str.3
	.asciz	"checksum errors sum1=0x%X sum2=0x%X\n"

L_.str.4:                               ## @.str.4
	.asciz	"subaddress nibbles mismatch 0x%02X != 0x%02X\n"

L_.str.5:                               ## @.str.5
	.asciz	"Warning: OEM nibbles 0x%02X. Expected 0x44\n"

L_.str.6:                               ## @.str.6
	.asciz	"XMP scancode 0x%06x\n"

	.comm	_RC_PROTO_XMP,4,2               ## @RC_PROTO_XMP
L_.str.7:                               ## @.str.7
	.asciz	"Repeat last key\n"

	.comm	_XMP_HALFFRAME_SPACE,4,2        ## @XMP_HALFFRAME_SPACE
L_.str.8:                               ## @.str.8
	.asciz	"received half frame pulse at index %d. Probably a final frame key-up event: %u\n"

L_.str.9:                               ## @.str.9
	.asciz	"received half frame pulse at index %d: %u\n"

L_.str.10:                              ## @.str.10
	.asciz	"to many pulses (%d) ignoring: %u\n"

L_.str.11:                              ## @.str.11
	.asciz	"XMP decode failed at count %d state %d (%uus %s)\n"

	.no_dead_strip	_ir_xmp_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ir_xmp_decode
lCPI0_0:
	.long	128                             ; 0x80
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ir_xmp_decode:                         ; @ir_xmp_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #8]
	mov	x0, x1
	mov	x1, x2
	bl	_is_timing_event
	cbz	w0, LBB0_7
; %bb.1:
	lsr	x21, x20, #32
	ldp	w24, w25, [x23]
	mov	x0, x20
	bl	_TO_US
	mov	x22, x0
	mov	x0, x21
	bl	_TO_STR
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #16]
	stp	x24, x25, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w22, [x23]
	cmp	w22, #128
	b.eq	LBB0_9
; %bb.2:
	cmp	w22, #129
	b.eq	LBB0_11
; %bb.3:
	cmp	w22, #130
	b.ne	LBB0_21
; %bb.4:
	cbz	w21, LBB0_15
; %bb.5:
Lloh2:
	adrp	x8, _XMP_LEADER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XMP_LEADER@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _XMP_UNIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XMP_UNIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w2, w8, #1
	mov	x0, x20
	bl	_eq_margin
	cbz	w0, LBB0_23
; %bb.6:
	mov	w0, #0
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x23]
	b	LBB0_23
LBB0_7:
	cbz	x21, LBB0_14
LBB0_8:
	mov	w0, #0
	mov	w8, #130
	str	w8, [x23]
	b	LBB0_23
LBB0_9:
	cbz	w21, LBB0_16
; %bb.10:
	mov	w22, #128
	b	LBB0_21
LBB0_11:
	cbz	w21, LBB0_20
; %bb.12:
Lloh10:
	adrp	x8, _XMP_LEADER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _XMP_LEADER@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _XMP_UNIT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _XMP_UNIT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w2, w8, #1
	mov	x0, x20
	bl	_eq_margin
	cbz	w0, LBB0_23
; %bb.13:
	mov	w0, #0
	mov	w8, #128
	str	w8, [x23]
	b	LBB0_23
LBB0_14:
	mov	w0, #0
	b	LBB0_23
LBB0_15:
	mov	w22, #130
	b	LBB0_21
LBB0_16:
Lloh16:
	adrp	x8, _XMP_TRAILER_SPACE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XMP_TRAILER_SPACE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x22, _XMP_NIBBLE_PREFIX@GOTPAGE
Lloh20:
	ldr	x22, [x22, _XMP_NIBBLE_PREFIX@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_geq_margin
	cbz	w0, LBB0_24
; %bb.17:
	ldr	w8, [x23, #4]
	cmp	w8, #16
	b.ne	LBB0_28
; %bb.18:
	ldr	x12, [x23, #8]
	ldr	w10, [x12, #12]
	ldr	w8, [x22]
	mov	w9, #34953
	movk	w9, #34952, lsl #16
	sub	w11, w10, w8
	smull	x9, w11, w9
	lsr	x9, x9, #32
	add	w9, w9, w11
	asr	w13, w9, #3
	add	w9, w13, w9, lsr #31
	sub	w13, w9, #2000
	mov	w9, #30750
	cmp	w11, w9
	b.ge	LBB0_29
; %bb.19:
	str	x13, [sp]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_22
LBB0_20:
	mov	w22, #129
LBB0_21:
	ldr	w24, [x23, #4]
	mov	x0, x20
	bl	_TO_US
	mov	x20, x0
	mov	x0, x21
	bl	_TO_STR
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp, #16]
	stp	x24, x22, [sp]
Lloh23:
	adrp	x1, l_.str.11@PAGE
Lloh24:
	add	x1, x1, l_.str.11@PAGEOFF
LBB0_22:
	mov	x0, x19
	bl	_dev_dbg
	mov	w8, #130
	str	w8, [x23]
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
Lloh28:
	adrp	x8, _XMP_HALFFRAME_SPACE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _XMP_HALFFRAME_SPACE@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_geq_margin
	cbz	w0, LBB0_36
; %bb.25:
	ldr	w8, [x23, #4]
	cmp	w8, #8
	b.eq	LBB0_40
; %bb.26:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	cmp	w8, #16
	b.ne	LBB0_39
; %bb.27:
	mov	w8, #16
	stp	x8, x20, [sp]
Lloh31:
	adrp	x1, l_.str.8@PAGE
Lloh32:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w8, #8
	str	w8, [x23, #4]
	b	LBB0_40
LBB0_28:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x8, x20, [sp]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_22
LBB0_29:
	ldp	w9, w11, [x12]
	sub	w8, w9, w8
	sdiv	w8, w8, w13
	str	w8, [x12]
	ldr	w17, [x22]
	sub	w9, w11, w17
	sdiv	w0, w9, w13
	ldr	w9, [x12, #8]
	sub	w9, w9, w17
	sdiv	w9, w9, w13
	stp	w0, w9, [x12, #4]
	sub	w10, w10, w17
	sdiv	w1, w10, w13
	ldp	w10, w11, [x12, #16]
	sub	w10, w10, w17
	sdiv	w10, w10, w13
	stp	w1, w10, [x12, #12]
	sub	w11, w11, w17
	sdiv	w11, w11, w13
	ldp	w14, w15, [x12, #24]
	sub	w14, w14, w17
	sdiv	w20, w14, w13
	stp	w11, w20, [x12, #20]
	sub	w14, w15, w17
	sdiv	w21, w14, w13
	ldp	w14, w15, [x12, #32]
	sub	w14, w14, w17
	sdiv	w14, w14, w13
	stp	w21, w14, [x12, #28]
	sub	w15, w15, w17
	sdiv	w2, w15, w13
	ldp	w15, w16, [x12, #40]
	sub	w15, w15, w17
	sdiv	w22, w15, w13
	stp	w2, w22, [x12, #36]
	sub	w15, w16, w17
	sdiv	w15, w15, w13
	ldp	w16, w3, [x12, #48]
	sub	w16, w16, w17
	sdiv	w24, w16, w13
	stp	w15, w24, [x12, #44]
	sub	w16, w3, w17
	sdiv	w25, w16, w13
	ldp	w16, w3, [x12, #56]
	sub	w16, w16, w17
	sdiv	w16, w16, w13
	stp	w25, w16, [x12, #52]
	sub	w17, w3, w17
	sdiv	w26, w17, w13
	str	w26, [x12, #60]
	add	w12, w8, w0
	add	w12, w12, w9
	add	w12, w12, w1
	add	w12, w12, w10
	add	w12, w12, w11
	add	w12, w12, w20
	add	w12, w12, w21
	add	w12, w12, #15
	and	w13, w12, #0xf
	negs	w12, w12
	and	w12, w12, #0xf
	csneg	w12, w13, w12, mi
	add	w13, w14, w2
	add	w13, w13, w22
	add	w13, w13, w15
	add	w13, w13, w24
	add	w13, w13, w25
	add	w13, w13, w16
	add	w13, w13, w26
	add	w13, w13, #15
	and	w17, w13, #0xf
	negs	w13, w13
	and	w13, w13, #0xf
	csneg	w13, w17, w13, mi
	cmp	w12, #15
	b.ne	LBB0_41
; %bb.30:
	cmp	w13, #15
	b.ne	LBB0_41
; %bb.31:
	orr	w27, w9, w8, lsl #4
	orr	w8, w15, w14, lsl #4
	cmp	w27, w8
	b.ne	LBB0_44
; %bb.32:
	orr	w8, w11, w10, lsl #4
	lsl	w28, w16, #4
	cmp	w8, #68
	b.eq	LBB0_34
; %bb.33:
	str	x8, [sp]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_34:
	lsl	w8, w20, #28
	orr	w8, w8, w27, lsl #16
	orr	w8, w8, w21, lsl #24
	orr	w8, w8, w24, lsl #12
	orr	w8, w8, w25, lsl #8
	orr	w8, w8, w26
	orr	w20, w8, w28
	str	x20, [sp]
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	cbz	w22, LBB0_45
; %bb.35:
	mov	x0, x19
	bl	_rc_repeat
Lloh39:
	adrp	x1, l_.str.7@PAGE
Lloh40:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_8
LBB0_36:
	ldr	w1, [x22]
Lloh41:
	adrp	x8, _XMP_UNIT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _XMP_UNIT@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_geq_margin
	cbz	w0, LBB0_42
; %bb.37:
	ldrsw	x8, [x23, #4]
	cmp	w8, #16
	b.ne	LBB0_43
; %bb.38:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	mov	w8, #16
	stp	x8, x20, [sp]
Lloh44:
	adrp	x1, l_.str.10@PAGE
Lloh45:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_22
LBB0_39:
	stp	x8, x20, [sp]
Lloh46:
	adrp	x1, l_.str.9@PAGE
Lloh47:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_40:
	mov	w0, #0
	mov	w8, #129
	str	w8, [x23]
	b	LBB0_23
LBB0_41:
	stp	x12, x13, [sp]
Lloh48:
	adrp	x1, l_.str.3@PAGE
Lloh49:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_22
LBB0_42:
	ldr	w22, [x23]
	b	LBB0_21
LBB0_43:
	mov	w0, #0
	ldr	x9, [x23, #8]
	str	w20, [x9, x8, lsl #2]
	ldr	w8, [x23, #4]
	add	w8, w8, #1
	mov	w9, #129
	stp	w9, w8, [x23]
	b	LBB0_23
LBB0_44:
	stp	x27, x8, [sp]
Lloh50:
	adrp	x1, l_.str.4@PAGE
Lloh51:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_22
LBB0_45:
Lloh52:
	adrp	x8, _RC_PROTO_XMP@GOTPAGE
Lloh53:
	ldr	x8, [x8, _RC_PROTO_XMP@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_rc_keydown
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"XMP decode started at state %d %d (%uus %s)\n"

	.comm	_XMP_LEADER,4,2                 ; @XMP_LEADER
	.comm	_XMP_UNIT,4,2                   ; @XMP_UNIT
	.comm	_XMP_TRAILER_SPACE,4,2          ; @XMP_TRAILER_SPACE
	.comm	_XMP_NIBBLE_PREFIX,4,2          ; @XMP_NIBBLE_PREFIX
l_.str.1:                               ; @.str.1
	.asciz	"received TRAILER period at index %d: %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"divider to small %d.\n"

l_.str.3:                               ; @.str.3
	.asciz	"checksum errors sum1=0x%X sum2=0x%X\n"

l_.str.4:                               ; @.str.4
	.asciz	"subaddress nibbles mismatch 0x%02X != 0x%02X\n"

l_.str.5:                               ; @.str.5
	.asciz	"Warning: OEM nibbles 0x%02X. Expected 0x44\n"

l_.str.6:                               ; @.str.6
	.asciz	"XMP scancode 0x%06x\n"

	.comm	_RC_PROTO_XMP,4,2               ; @RC_PROTO_XMP
l_.str.7:                               ; @.str.7
	.asciz	"Repeat last key\n"

	.comm	_XMP_HALFFRAME_SPACE,4,2        ; @XMP_HALFFRAME_SPACE
l_.str.8:                               ; @.str.8
	.asciz	"received half frame pulse at index %d. Probably a final frame key-up event: %u\n"

l_.str.9:                               ; @.str.9
	.asciz	"received half frame pulse at index %d: %u\n"

l_.str.10:                              ; @.str.10
	.asciz	"to many pulses (%d) ignoring: %u\n"

l_.str.11:                              ; @.str.11
	.asciz	"XMP decode failed at count %d state %d (%uus %s)\n"

	.no_dead_strip	_ir_xmp_decode
.subsections_via_symbols
