	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imon_ir_change_protocol
_imon_ir_change_protocol:               ## @imon_ir_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	8(%rdi), %r12
	movq	16(%r12), %r15
	movabsq	$-8791026472627208192, %rax     ## imm = 0x8600000000000000
	movq	%rax, -48(%rbp)
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testl	%eax, (%rdi)
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	movl	(%r14), %eax
	jmp	LBB0_4
LBB0_1:
	xorl	%eax, %eax
LBB0_4:
	movq	_RC_PROTO_BIT_RC6_MCE@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movb	$1, -48(%rbp)
	jmp	LBB0_11
LBB0_6:
	movq	_RC_PROTO_BIT_IMON@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
LBB0_9:
	movq	_pad_stabilize@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
LBB0_11:
	movl	(%rbx), %eax
	movl	%eax, (%r14)
	movl	12(%r12), %edi
	leaq	-48(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	leaq	8(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_is_locked
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_mutex_lock
LBB0_13:
	movq	%r12, %rdi
	callq	_send_packet
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	testl	%r13d, %r13d
	jne	LBB0_17
LBB0_16:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	(%r14), %eax
	movl	%eax, (%r12)
	movl	$0, 4(%r12)
	testl	%r13d, %r13d
	jne	LBB0_17
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Looks like you're trying to use an IR protocol this device does not support\n"

	.comm	_RC_PROTO_BIT_RC6_MCE,4,2       ## @RC_PROTO_BIT_RC6_MCE
L_.str.1:                               ## @.str.1
	.asciz	"Configuring IR receiver for MCE protocol\n"

	.comm	_RC_PROTO_BIT_IMON,4,2          ## @RC_PROTO_BIT_IMON
L_.str.2:                               ## @.str.2
	.asciz	"Configuring IR receiver for iMON protocol\n"

	.comm	_pad_stabilize,4,2              ## @pad_stabilize
L_.str.3:                               ## @.str.3
	.asciz	"PAD stabilize functionality disabled\n"

L_.str.4:                               ## @.str.4
	.asciz	"Unsupported IR protocol specified, overriding to iMON IR protocol\n"

	.no_dead_strip	_imon_ir_change_protocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imon_ir_change_protocol
_imon_ir_change_protocol:               ; @imon_ir_change_protocol
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	ldr	x19, [x0, #8]
	ldr	x21, [x19, #16]
	mov	x8, #-8791026472627208192
	str	x8, [sp, #8]
	ldr	w8, [x1]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w9, [x0]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	ldr	w8, [x20]
LBB0_3:
Lloh2:
	adrp	x9, _RC_PROTO_BIT_RC6_MCE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RC_PROTO_BIT_RC6_MCE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	w8, #1
	strb	w8, [sp, #8]
Lloh7:
	adrp	x8, _RC_PROTO_BIT_RC6_MCE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RC_PROTO_BIT_RC6_MCE@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
Lloh9:
	adrp	x9, _RC_PROTO_BIT_IMON@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RC_PROTO_BIT_IMON@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
LBB0_8:
Lloh16:
	adrp	x8, _pad_stabilize@GOTPAGE
Lloh17:
	ldr	x8, [x8, _pad_stabilize@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cbnz	w8, LBB0_10
; %bb.9:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_10:
Lloh21:
	adrp	x8, _RC_PROTO_BIT_IMON@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RC_PROTO_BIT_IMON@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	str	w8, [x20]
	ldr	w0, [x19, #12]
	add	x1, sp, #8
	mov	w2, #8
	bl	_memcpy
	add	x21, x19, #8
	mov	x0, x21
	bl	_mutex_is_locked
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_mutex_lock
LBB0_13:
	mov	x0, x19
	bl	_send_packet
	mov	x23, x0
	cbz	w0, LBB0_17
; %bb.14:
	cbnz	w22, LBB0_16
LBB0_15:
	mov	x0, x21
	bl	_mutex_unlock
LBB0_16:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
	ldr	w8, [x20]
	stp	w8, wzr, [x19]
	cbnz	w22, LBB0_16
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Looks like you're trying to use an IR protocol this device does not support\n"

	.comm	_RC_PROTO_BIT_RC6_MCE,4,2       ; @RC_PROTO_BIT_RC6_MCE
l_.str.1:                               ; @.str.1
	.asciz	"Configuring IR receiver for MCE protocol\n"

	.comm	_RC_PROTO_BIT_IMON,4,2          ; @RC_PROTO_BIT_IMON
l_.str.2:                               ; @.str.2
	.asciz	"Configuring IR receiver for iMON protocol\n"

	.comm	_pad_stabilize,4,2              ; @pad_stabilize
l_.str.3:                               ; @.str.3
	.asciz	"PAD stabilize functionality disabled\n"

l_.str.4:                               ; @.str.4
	.asciz	"Unsupported IR protocol specified, overriding to iMON IR protocol\n"

	.no_dead_strip	_imon_ir_change_protocol
.subsections_via_symbols
