	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av7110_check_ir_config         ## -- Begin function av7110_check_ir_config
	.p2align	4, 0x90
_av7110_check_ir_config:                ## @av7110_check_ir_config
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movq	_av_cnt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_24
## %bb.1:
	movq	%rdi, %r14
	movq	_av_list@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdi, (%rdx)
	je	LBB0_2
## %bb.3:
	leaq	-1(%rcx), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %rdi
	je	LBB0_24
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%rbx), %r15
	cmpq	%r14, 8(%rdx,%rbx,8)
	movq	%r15, %rbx
	jne	LBB0_5
## %bb.6:
	cmpq	%rcx, %r15
	setb	%cl
	testq	%r14, %r14
	jne	LBB0_8
	jmp	LBB0_24
LBB0_2:
	movb	$1, %cl
	xorl	%r15d, %r15d
	testq	%r14, %r14
	je	LBB0_24
LBB0_8:
	testb	%cl, %cl
	je	LBB0_24
## %bb.9:
	movl	(%r14), %eax
	andl	$1, %eax
	movq	_ir_protocol@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r15,4), %edx
	cmpl	%edx, %eax
	jne	LBB0_12
## %bb.10:
	testl	%esi, %esi
	jne	LBB0_12
## %bb.11:
	movq	_ir_inversion@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %esi
	xorl	%eax, %eax
	cmpl	%esi, 4(%r14)
	je	LBB0_22
LBB0_12:
	testl	%edx, %edx
	je	LBB0_14
## %bb.13:
	movl	$1, (%rcx,%r15,4)
	movl	$1, %r8d
	movq	_IR_RCMM@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_14:
	movl	24(%r14), %edi
	callq	_FW_VERSION
	xorl	%r8d, %r8d
	cmpl	$9760, %eax                     ## imm = 0x2620
	setge	%cl
	jl	LBB0_15
## %bb.16:
	movq	_IR_RC5_EXT@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_IR_RC5@GOTPCREL(%rip), %rax
LBB0_17:
	movb	%cl, %r8b
	addl	%r8d, %r8d
LBB0_18:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	%r8d, 8(%r14)
	movq	_ir_inversion@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax,%r15,4)
	je	LBB0_19
## %bb.20:
	movl	$1, (%rax,%r15,4)
	movl	$32768, %r8d                    ## imm = 0x8000
	orl	8(%r14), %r8d
	movl	%r8d, 8(%r14)
	movl	(%rax,%r15,4), %eax
	jmp	LBB0_21
LBB0_19:
	xorl	%eax, %eax
LBB0_21:
	movl	%eax, 4(%r14)
	movq	_COMTYPE_PIDFILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SetIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_av7110_fw_cmd
LBB0_22:
	movq	_ir_device_mask@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%r15,8), %rcx
	cmpq	%rcx, 16(%r14)
	je	LBB0_24
## %bb.23:
	movq	%rcx, 16(%r14)
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_av_cnt,4,2                     ## @av_cnt
	.comm	_av_list,8,3                    ## @av_list
	.comm	_ir_protocol,8,3                ## @ir_protocol
	.comm	_ir_inversion,8,3               ## @ir_inversion
	.comm	_IR_RCMM,4,2                    ## @IR_RCMM
	.comm	_IR_RC5_EXT,4,2                 ## @IR_RC5_EXT
	.comm	_IR_RC5,4,2                     ## @IR_RC5
	.comm	_COMTYPE_PIDFILTER,4,2          ## @COMTYPE_PIDFILTER
	.comm	_SetIR,4,2                      ## @SetIR
	.comm	_ir_device_mask,8,3             ## @ir_device_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av7110_check_ir_config         ; -- Begin function av7110_check_ir_config
	.p2align	2
_av7110_check_ir_config:                ; @av7110_check_ir_config
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
Lloh3:
	adrp	x8, _av_cnt@GOTPAGE
Lloh4:
	ldr	x8, [x8, _av_cnt@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.1:
Lloh6:
	adrp	x9, _av_list@GOTPAGE
Lloh7:
	ldr	x9, [x9, _av_list@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x10, [x9]
	cmp	x10, x19
	b.eq	LBB0_6
; %bb.2:
	mov	x20, #0
	add	x9, x9, #8
	sub	x10, x8, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x10, x20
	b.eq	LBB0_21
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x9, x20, lsl #3]
	add	x20, x20, #1
	cmp	x11, x19
	b.ne	LBB0_3
; %bb.5:
	cmp	x20, x8
	cset	w8, lo
	cbnz	x19, LBB0_7
	b	LBB0_21
LBB0_6:
	mov	x20, #0
	mov	w8, #1
	cbz	x19, LBB0_21
LBB0_7:
	cbz	w8, LBB0_21
; %bb.8:
	ldr	w8, [x19]
	and	w10, w8, #0x1
Lloh9:
	adrp	x8, _ir_protocol@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ir_protocol@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w9, [x8, x20, lsl #2]
Lloh12:
	adrp	x21, _ir_inversion@GOTPAGE
Lloh13:
	ldr	x21, [x21, _ir_inversion@GOTPAGEOFF]
	cmp	w10, w9
	b.ne	LBB0_12
; %bb.9:
	cbnz	w1, LBB0_12
; %bb.10:
	ldr	w10, [x19, #4]
	ldr	x11, [x21]
	ldr	w11, [x11, x20, lsl #2]
	cmp	w10, w11
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_19
LBB0_12:
	cbz	w9, LBB0_14
; %bb.13:
	mov	w4, #1
	str	w4, [x8, x20, lsl #2]
Lloh14:
	adrp	x8, _IR_RCMM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IR_RCMM@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
	ldr	w0, [x19, #24]
	bl	_FW_VERSION
	mov	w8, #9759
	cmp	w0, w8
	cset	w9, gt
Lloh16:
	adrp	x8, _IR_RC5@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IR_RC5@GOTPAGEOFF]
Lloh18:
	adrp	x10, _IR_RC5_EXT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _IR_RC5_EXT@GOTPAGEOFF]
	csel	x8, x10, x8, gt
	lsl	w4, w9, #1
LBB0_15:
	ldr	w8, [x8]
	str	w8, [x19]
	str	w4, [x19, #8]
	ldr	x8, [x21]
	ldr	w9, [x8, x20, lsl #2]
	cbz	w9, LBB0_17
; %bb.16:
	lsl	x9, x20, #2
	mov	w10, #1
	str	w10, [x8, x9]
	ldr	w10, [x19, #8]
	orr	w4, w10, #0x8000
	str	w4, [x19, #8]
	ldr	w8, [x8, x9]
	b	LBB0_18
LBB0_17:
	mov	w8, #0
LBB0_18:
	str	w8, [x19, #4]
Lloh20:
	adrp	x8, _COMTYPE_PIDFILTER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _COMTYPE_PIDFILTER@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _SetIR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SetIR@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_av7110_fw_cmd
LBB0_19:
	ldr	x9, [x19, #16]
Lloh26:
	adrp	x8, _ir_device_mask@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ir_device_mask@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	x8, [x8, x20, lsl #3]
	cmp	x9, x8
	b.eq	LBB0_21
; %bb.20:
	str	x8, [x19, #16]
LBB0_21:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_av_cnt,4,2                     ; @av_cnt
	.comm	_av_list,8,3                    ; @av_list
	.comm	_ir_protocol,8,3                ; @ir_protocol
	.comm	_ir_inversion,8,3               ; @ir_inversion
	.comm	_IR_RCMM,4,2                    ; @IR_RCMM
	.comm	_IR_RC5_EXT,4,2                 ; @IR_RC5_EXT
	.comm	_IR_RC5,4,2                     ; @IR_RC5
	.comm	_COMTYPE_PIDFILTER,4,2          ; @COMTYPE_PIDFILTER
	.comm	_SetIR,4,2                      ; @SetIR
	.comm	_ir_device_mask,8,3             ; @ir_device_mask
.subsections_via_symbols
