	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smi_ir_decode
_smi_ir_decode:                         ## @smi_ir_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
	movq	8(%rdi), %r14
	movq	_IR_Init_Reg@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_smi_read
	movq	_rbIRVld@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.1:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_IR_Data_Cnt@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_smi_read
	movl	%eax, %r12d
	leal	3(%r12), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	xorl	%eax, %eax
	testb	$3, %r12b
	setne	%al
	addl	%ecx, %eax
	jle	LBB0_2
## %bb.3:
	movl	%eax, %r13d
	shlq	$2, %r13
	xorl	%r14d, %r14d
	movq	_IR_DATA_BUFFER_BASE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	%r14, %rdi
	callq	_smi_read
	movq	(%rbx), %rsi
	movl	%eax, (%rsi,%r14,4)
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, 4(%rsi,%r14,4)
	movl	%eax, %ecx
	sarl	$16, %ecx
	movl	%ecx, 8(%rsi,%r14,4)
	sarl	$24, %eax
	movl	%eax, 12(%rsi,%r14,4)
	addq	$4, %r14
	cmpq	%r14, %r13
	jne	LBB0_4
	jmp	LBB0_5
LBB0_2:
	movq	(%rbx), %rsi
LBB0_5:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_smi_raw_process
	movq	_IR_Init_Reg@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	_rbIRVld@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smi_set
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_6:
	movq	_rbIRhighidle@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.7:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	_SMI_SAMPLE_PERIOD@GOTPCREL(%rip), %rax
	movq	_SMI_SAMPLE_IDLEMIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	imull	(%rax), %edi
	callq	_US_TO_NS
	movl	%eax, -80(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ir_raw_event_store_with_filter
	movq	(%r15), %rdi
	movl	(%rbx), %esi
	callq	_smi_set
LBB0_8:
	movq	%r14, %rdi
	callq	_ir_raw_event_handle
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IR_Init_Reg,8,3                ## @IR_Init_Reg
	.comm	_rbIRVld,4,2                    ## @rbIRVld
	.comm	_IR_Data_Cnt,8,3                ## @IR_Data_Cnt
	.comm	_IR_DATA_BUFFER_BASE,8,3        ## @IR_DATA_BUFFER_BASE
	.comm	_rbIRhighidle,4,2               ## @rbIRhighidle
	.comm	_SMI_SAMPLE_PERIOD,4,2          ## @SMI_SAMPLE_PERIOD
	.comm	_SMI_SAMPLE_IDLEMIN,4,2         ## @SMI_SAMPLE_IDLEMIN
	.no_dead_strip	_smi_ir_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 smi_ir_decode
lCPI0_0:
	.long	4294967288                      ; 0xfffffff8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_smi_ir_decode:                         ; @smi_ir_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x21, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x23, _IR_Init_Reg@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IR_Init_Reg@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_smi_read
	mov	x20, x0
Lloh2:
	adrp	x24, _rbIRVld@GOTPAGE
Lloh3:
	ldr	x24, [x24, _rbIRVld@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
Lloh4:
	adrp	x8, _IR_Data_Cnt@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IR_Data_Cnt@GOTPAGEOFF]
Lloh6:
	ldr	x0, [x8]
	bl	_smi_read
	mov	x22, x0
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #2
	tst	w0, #0x3
	cinc	w8, w8, ne
	cmp	w8, #0
	b.le	LBB0_4
; %bb.2:
	mov	x25, #0
	lsl	x26, x8, #2
	mov	w27, #4
Lloh7:
	adrp	x8, lCPI0_0@PAGE
Lloh8:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
Lloh9:
	adrp	x28, _IR_DATA_BUFFER_BASE@GOTPAGE
Lloh10:
	ldr	x28, [x28, _IR_DATA_BUFFER_BASE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28]
	add	x0, x25, x8
	bl	_smi_read
	ldr	x1, [x21]
	add	x8, x1, x25, lsl #2
	str	w0, [x8]
	dup.2s	v0, w0
	sshl.2s	v0, v0, v8
	str	d0, [x1, x27]
	asr	w9, w0, #24
	str	w9, [x8, #12]
	add	x25, x25, #4
	add	x27, x27, #16
	cmp	x26, x25
	b.ne	LBB0_3
	b	LBB0_5
LBB0_4:
	ldr	x1, [x21]
LBB0_5:
	mov	x0, x19
	mov	x2, x22
	bl	_smi_raw_process
	ldr	x0, [x23]
	ldr	w1, [x24]
	bl	_smi_set
LBB0_6:
Lloh11:
	adrp	x21, _rbIRhighidle@GOTPAGE
Lloh12:
	ldr	x21, [x21, _rbIRhighidle@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
Lloh13:
	adrp	x8, _SMI_SAMPLE_PERIOD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SMI_SAMPLE_PERIOD@GOTPAGEOFF]
	stp	xzr, xzr, [sp]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _SMI_SAMPLE_IDLEMIN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SMI_SAMPLE_IDLEMIN@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	mul	w0, w9, w8
	bl	_US_TO_NS
	str	w0, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_ir_raw_event_store_with_filter
	ldr	x0, [x23]
	ldr	w1, [x21]
	bl	_smi_set
LBB0_8:
	mov	x0, x19
	bl	_ir_raw_event_handle
	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
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdr	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_IR_Init_Reg,8,3                ; @IR_Init_Reg
	.comm	_rbIRVld,4,2                    ; @rbIRVld
	.comm	_IR_Data_Cnt,8,3                ; @IR_Data_Cnt
	.comm	_IR_DATA_BUFFER_BASE,8,3        ; @IR_DATA_BUFFER_BASE
	.comm	_rbIRhighidle,4,2               ; @rbIRhighidle
	.comm	_SMI_SAMPLE_PERIOD,4,2          ; @SMI_SAMPLE_PERIOD
	.comm	_SMI_SAMPLE_IDLEMIN,4,2         ; @SMI_SAMPLE_IDLEMIN
	.no_dead_strip	_smi_ir_decode
.subsections_via_symbols
