	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_protocols
_store_protocols:                       ## @store_protocols
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r13
	callq	_to_rc_dev
	movq	%rax, %rbx
	leaq	36(%rax), %r12
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpq	$0, 8(%rbx)
	je	LBB0_1
## %bb.2:
	leaq	32(%rbx), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%rbx), %r14
	movq	%r14, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_parse_protocol_change
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	16(%rbx), %rax
	movq	_RC_DRIVER_IR_RAW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	-48(%rbp), %rdi
	callq	_ir_raw_load_modules
LBB0_6:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	-48(%rbp), %rdx
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	cmpq	%r14, %rdx
	je	LBB0_10
## %bb.9:
	movq	%rdx, (%rbx)
	movq	-48(%rbp), %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_10:
	movq	24(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.11:
	movq	%rbx, %r12
	addq	$40, %r12
	cmpq	$0, (%r12)
	je	LBB0_16
## %bb.12:
	cmpq	$0, -48(%rbp)
	je	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	*%rcx
	testl	%eax, %eax
	jns	LBB0_16
## %bb.14:
	movq	24(%rbx), %rcx
LBB0_15:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	*%rcx
	jmp	LBB0_16
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %r15d
	jmp	LBB0_17
LBB0_3:
	movl	%eax, %r15d
	jmp	LBB0_16
LBB0_7:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%r13d, %r15d
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_17:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Normal protocol change requested\n"

L_.str.1:                               ## @.str.1
	.asciz	"Protocol switching not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RC_DRIVER_IR_RAW,8,3           ## @RC_DRIVER_IR_RAW
L_.str.2:                               ## @.str.2
	.asciz	"Error setting protocols to 0x%llx\n"

L_.str.3:                               ## @.str.3
	.asciz	"Protocols changed to 0x%llx\n"

	.no_dead_strip	_store_protocols
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_protocols
_store_protocols:                       ; @store_protocols
	.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	x19, x3
	mov	x23, x2
	bl	_to_rc_dev
	mov	x21, x0
	add	x22, x0, #36
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_13
; %bb.1:
	add	x20, x21, #32
	mov	x0, x20
	bl	_mutex_lock
	ldr	x24, [x21]
	str	x24, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x23
	bl	_parse_protocol_change
	tbnz	w0, #31, LBB0_14
; %bb.2:
	ldr	x8, [x21, #16]
Lloh2:
	adrp	x9, _RC_DRIVER_IR_RAW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RC_DRIVER_IR_RAW@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	add	x0, sp, #8
	bl	_ir_raw_load_modules
LBB0_4:
	ldr	x8, [x21, #8]
	add	x1, sp, #8
	mov	x0, x21
	blr	x8
	ldr	x8, [sp, #8]
	tbnz	w0, #31, LBB0_15
; %bb.5:
	cmp	x8, x24
	b.eq	LBB0_7
; %bb.6:
	str	x8, [x21]
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.3@PAGE
Lloh6:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
LBB0_7:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_16
; %bb.8:
	add	x22, x21, #40
	ldr	x9, [x22]
	cbz	x9, LBB0_16
; %bb.9:
	ldr	x9, [sp, #8]
	cbz	x9, LBB0_12
; %bb.10:
	mov	x0, x21
	mov	x1, x22
	blr	x8
	tbz	w0, #31, LBB0_16
; %bb.11:
	ldr	x8, [x21, #24]
LBB0_12:
	stp	xzr, xzr, [x22]
	mov	x0, x21
	mov	x1, x22
	blr	x8
	b	LBB0_16
LBB0_13:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_17
LBB0_14:
	mov	x19, x0
	b	LBB0_16
LBB0_15:
	mov	x23, x0
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
	mov	x19, x23
LBB0_16:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_17:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Normal protocol change requested\n"

l_.str.1:                               ; @.str.1
	.asciz	"Protocol switching not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RC_DRIVER_IR_RAW,8,3           ; @RC_DRIVER_IR_RAW
l_.str.2:                               ; @.str.2
	.asciz	"Error setting protocols to 0x%llx\n"

l_.str.3:                               ; @.str.3
	.asciz	"Protocols changed to 0x%llx\n"

	.no_dead_strip	_store_protocols
.subsections_via_symbols
