	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function change_protocol
_change_protocol:                       ## @change_protocol
	.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	%rsi, %rbx
	movq	(%rdi), %r14
	movl	(%rsi), %eax
	movq	_RC_PROTO_BIT_RCMM32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_2
## %bb.1:
	movq	_IR_RCMM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_RC_PROTO_BIT_RC5@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_9
## %bb.3:
	movl	8(%r14), %edi
	callq	_FW_VERSION
	cmpl	$9760, %eax                     ## imm = 0x2620
	jl	LBB0_4
## %bb.5:
	movq	_IR_RC5_EXT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_4:
	movq	_IR_RC5@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%r15), %ecx
LBB0_7:
	movq	(%rax), %rdx
	movl	%ecx, (%rbx)
	xorl	%eax, %eax
	cmpq	(%r14), %rdx
	jne	LBB0_8
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rdx, (%r14)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av7110_set_ir_config           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_BIT_RCMM32,4,2        ## @RC_PROTO_BIT_RCMM32
	.comm	_IR_RCMM,8,3                    ## @IR_RCMM
	.comm	_RC_PROTO_BIT_RC5,4,2           ## @RC_PROTO_BIT_RC5
	.comm	_IR_RC5_EXT,8,3                 ## @IR_RC5_EXT
	.comm	_IR_RC5,8,3                     ## @IR_RC5
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_change_protocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function change_protocol
_change_protocol:                       ; @change_protocol
	.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	x20, x1
	ldr	x19, [x0]
	ldr	w9, [x1]
Lloh0:
	adrp	x8, _RC_PROTO_BIT_RCMM32@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_PROTO_BIT_RCMM32@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _IR_RCMM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IR_RCMM@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x21, _RC_PROTO_BIT_RC5@GOTPAGE
Lloh6:
	ldr	x21, [x21, _RC_PROTO_BIT_RC5@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w9
	b.eq	LBB0_7
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_FW_VERSION
Lloh7:
	adrp	x8, _IR_RC5@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IR_RC5@GOTPAGEOFF]
Lloh9:
	adrp	x9, _IR_RC5_EXT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IR_RC5_EXT@GOTPAGEOFF]
	mov	w10, #9759
	cmp	w0, w10
	csel	x9, x9, x8, gt
	ldr	w8, [x21]
LBB0_4:
	ldr	x9, [x9]
	str	w8, [x20]
	ldr	x8, [x19]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	str	x9, [x19]
	mov	x0, x19
	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
	b	_av7110_set_ir_config
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_BIT_RCMM32,4,2        ; @RC_PROTO_BIT_RCMM32
	.comm	_IR_RCMM,8,3                    ; @IR_RCMM
	.comm	_RC_PROTO_BIT_RC5,4,2           ; @RC_PROTO_BIT_RC5
	.comm	_IR_RC5_EXT,8,3                 ; @IR_RC5_EXT
	.comm	_IR_RC5,8,3                     ; @IR_RC5
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_change_protocol
.subsections_via_symbols
