	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_imon_decode
_ir_imon_decode:                        ## @ir_imon_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	%rdi, %rbx
	leaq	16(%rbp), %r12
	movq	8(%rdi), %r14
	movq	32(%rbp), %rax
	movq	%rax, 16(%rsp)
	movaps	16(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_is_timing_event
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	(%r14), %r15d
	movl	12(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r12), %rdi
	callq	_TO_US
	movl	%eax, %r13d
	movl	8(%r12), %edi
	callq	_TO_STR
	leaq	L_.str(%rip), %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	movl	%eax, %r9d
	callq	_dev_dbg
	movl	(%r14), %eax
	movq	_STATE_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.2:
	xorl	%ecx, %ecx
	cmpl	$0, 8(%r12)
	jne	LBB0_30
## %bb.3:
	movq	(%r12), %rbx
	movl	$10, %edi
	callq	_MS_TO_NS
	cmpq	%rax, %rbx
	jle	LBB0_28
## %bb.4:
	movl	$128, (%r14)
	xorl	%ecx, %ecx
	jmp	LBB0_30
LBB0_5:
	xorl	%ecx, %ecx
	cmpq	$0, 16(%r12)
	je	LBB0_30
## %bb.6:
	movl	$128, (%r14)
	jmp	LBB0_30
LBB0_7:
	movq	(%r12), %rdi
	movq	_IMON_UNIT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	sarl	%edx
	callq	_geq_margin
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_30
## %bb.8:
	leaq	LJTI0_0(%rip), %rbx
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_11 Depth=1
	movl	$131, (%r14)
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r12), %rdi
	movl	(%r13), %esi
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	sarl	%edx
	callq	_geq_margin
	testl	%eax, %eax
	je	LBB0_28
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_decrease_duration
	movl	(%r14), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	(%rbx,%rax,4), %rax
	addq	%rbx, %rax
	jmpq	*%rax
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$0, 8(%r12)
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	$131, (%r14)
	movq	_IMON_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$0, 8(%r12)
	jne	LBB0_29
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ir_imon_decode_scancode
	movl	$128, (%r14)
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	4(%r14), %eax
	addl	%eax, %eax
	movl	%eax, 4(%r14)
	cmpl	$0, 8(%r12)
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_11 Depth=1
	orl	$1, %eax
	movl	%eax, 4(%r14)
LBB0_19:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	_IMON_CHKBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	12(%r14), %edi
	callq	_BIT
	testl	%r15d, %eax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_11 Depth=1
	xorl	%eax, %eax
	testb	$3, 4(%r14)
	sete	%al
	cmpl	%eax, 8(%r14)
	jne	LBB0_29
LBB0_21:                                ##   in Loop: Header=BB0_11 Depth=1
	subl	$1, 12(%r14)
	jae	LBB0_9
## %bb.22:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$129, (%r14)
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	_IMON_CHKBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	12(%r14), %edi
	callq	_BIT
	movl	8(%r12), %ecx
	testl	%r15d, %eax
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%ecx, 8(%r14)
	movl	$130, (%r14)
	jmp	LBB0_10
LBB0_25:                                ##   in Loop: Header=BB0_11 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$130, (%r14)
	jmp	LBB0_10
LBB0_28:
	xorl	%ecx, %ecx
	jmp	LBB0_30
LBB0_29:
	movl	(%r14), %r15d
	movl	12(%r14), %ebx
	movq	(%r12), %rdi
	callq	_TO_US
	movl	%eax, %r13d
	movl	8(%r12), %edi
	callq	_TO_STR
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	movl	%eax, %r9d
	callq	_dev_dbg
	movq	_STATE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_30:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_15
	.long	L0_0_set_17
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iMON decode started at state %d bitno %d (%uus %s)\n"

	.comm	_STATE_ERROR,4,2                ## @STATE_ERROR
	.comm	_IMON_UNIT,4,2                  ## @IMON_UNIT
	.comm	_IMON_BITS,4,2                  ## @IMON_BITS
	.comm	_IMON_CHKBITS,4,2               ## @IMON_CHKBITS
L_.str.1:                               ## @.str.1
	.asciz	"iMON decode failed at state %d bitno %d (%uus %s)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ir_imon_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_imon_decode
lCPI0_0:
	.long	131                             ; 0x83
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ir_imon_decode:                        ; @ir_imon_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x20, x1
	mov	x19, x0
	ldr	x24, [x0, #8]
	ldr	q0, [x1]
	str	q0, [sp]
	ldr	x8, [x1, #16]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_is_timing_event
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w21, [x24]
	ldr	w22, [x24, #12]
	ldr	x0, [x20]
	bl	_TO_US
	mov	x23, x0
	ldr	w0, [x20, #8]
	bl	_TO_STR
	mov	x5, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	bl	_dev_dbg
	ldr	w8, [x24]
Lloh2:
	adrp	x25, _STATE_ERROR@GOTPAGE
Lloh3:
	ldr	x25, [x25, _STATE_ERROR@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.2:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	x19, [x20]
	mov	w0, #10
	bl	_MS_TO_NS
	cmp	x19, x0
	b.gt	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_29
LBB0_5:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
LBB0_6:
	mov	w0, #0
	mov	w8, #128
	str	w8, [x24]
	b	LBB0_29
LBB0_7:
	ldr	x0, [x20]
Lloh4:
	adrp	x21, _IMON_UNIT@GOTPAGE
Lloh5:
	ldr	x21, [x21, _IMON_UNIT@GOTPAGEOFF]
	ldr	w1, [x21]
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w2, w8, #1
	bl	_geq_margin
	cbz	w0, LBB0_29
; %bb.8:
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	mov	w23, #128
Lloh8:
	adrp	x27, _IMON_CHKBITS@GOTPAGE
Lloh9:
	ldr	x27, [x27, _IMON_CHKBITS@GOTPAGEOFF]
	mov	w26, #130
Lloh10:
	adrp	x22, lJTI0_0@PAGE
Lloh11:
	add	x22, x22, lJTI0_0@PAGEOFF
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_12 Depth=1
	mov	w8, #129
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	str	w8, [x24]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x20]
	ldr	w1, [x21]
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w2, w8, #1
	bl	_geq_margin
	cbz	w0, LBB0_29
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x20
	bl	_decrease_duration
	ldr	w8, [x24]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	adr	x9, LBB0_14
	ldrb	w10, [x22, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	str	d8, [x24]
Lloh12:
	adrp	x8, _IMON_BITS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IMON_BITS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x24, #12]
	b	LBB0_11
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_28
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_ir_imon_decode_scancode
	str	w23, [x24]
	b	LBB0_11
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x24, #4]
	lsl	w8, w8, #1
	str	w8, [x24, #4]
	ldr	w9, [x20, #8]
	cbnz	w9, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	orr	w8, w8, #0x1
	str	w8, [x24, #4]
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w28, [x27]
	ldr	w0, [x24, #12]
	bl	_BIT
	tst	w0, w28
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x24, #8]
	ldrb	w9, [x24, #4]
	tst	w9, #0x3
	cset	w9, eq
	cmp	w8, w9
	b.ne	LBB0_28
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x24, #12]
	sub	w9, w8, #1
	str	w9, [x24, #12]
	cbz	w8, LBB0_9
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w8, #131
	b	LBB0_10
LBB0_24:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w28, [x27]
	ldr	w0, [x24, #12]
	bl	_BIT
	ldr	w8, [x20, #8]
	tst	w0, w28
	b.eq	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_12 Depth=1
	str	w8, [x24, #8]
	str	w26, [x24]
	b	LBB0_11
LBB0_26:                                ;   in Loop: Header=BB0_12 Depth=1
	cbnz	w8, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_12 Depth=1
	str	w26, [x24]
	b	LBB0_11
LBB0_28:
	ldr	w21, [x24]
	ldr	w22, [x24, #12]
	ldr	x0, [x20]
	bl	_TO_US
	mov	x23, x0
	ldr	w0, [x20, #8]
	bl	_TO_STR
	mov	x5, x0
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	bl	_dev_dbg
	ldr	w8, [x25]
	str	w8, [x24]
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_29:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_14-LBB0_14)>>2
	.byte	(LBB0_16-LBB0_14)>>2
	.byte	(LBB0_18-LBB0_14)>>2
	.byte	(LBB0_24-LBB0_14)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iMON decode started at state %d bitno %d (%uus %s)\n"

	.comm	_STATE_ERROR,4,2                ; @STATE_ERROR
	.comm	_IMON_UNIT,4,2                  ; @IMON_UNIT
	.comm	_IMON_BITS,4,2                  ; @IMON_BITS
	.comm	_IMON_CHKBITS,4,2               ; @IMON_CHKBITS
l_.str.1:                               ; @.str.1
	.asciz	"iMON decode failed at state %d bitno %d (%uus %s)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ir_imon_decode
.subsections_via_symbols
