	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_wakeup_protocols
_store_wakeup_protocols:                ## @store_wakeup_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	$40, %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, %rbx
	callq	_to_rc_dev
	movq	%rax, %r13
	movq	_RC_PROTO_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	24(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13), %r12
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sysfs_streq
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_2:
	cmpl	%ebx, 8(%r13)
	je	LBB0_17
## %bb.3:
	movl	%ebx, 8(%r13)
	leaq	48(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	_RC_PROTO_RC6_MCE@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	(%rax), %ebx
	movl	$-2146500608, %eax              ## imm = 0x800F0000
	cmovnel	%ecx, %eax
	movq	%r13, %rsi
	addq	$32, %rsi
	movl	%eax, 32(%r13)
	movq	$0, 40(%r13)
	movq	%r13, %rdi
	callq	*16(%r13)
	testq	%rax, %rax
	cmovneq	%rax, %r15
	jmp	LBB0_17
LBB0_4:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	_protocols@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_5
## %bb.6:
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	btq	%r15, %r12
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rsi
	movq	%rbx, %rdi
	callq	_sysfs_streq
	testq	%rax, %rax
	je	LBB0_9
## %bb.18:
	movl	%r15d, %ebx
	jmp	LBB0_11
LBB0_5:
	xorl	%r15d, %r15d
LBB0_10:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_11:
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jne	LBB0_13
## %bb.12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_13:
	cmpq	$0, 56(%r13)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_14
## %bb.15:
	movl	$1, %eax
	movl	%ebx, %ecx
	shlq	%cl, %rax
	movq	%rax, -72(%rbp)
	leaq	-72(%rbp), %rdi
	callq	_ir_raw_load_modules
	cmpq	$0, -72(%rbp)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_2
## %bb.16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
LBB0_17:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r15, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_UNKNOWN,4,2           ## @RC_PROTO_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"none"

	.comm	_protocols,8,3                  ## @protocols
	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Wakeup protocol changed to %d\n"

	.comm	_RC_PROTO_RC6_MCE,4,2           ## @RC_PROTO_RC6_MCE
	.no_dead_strip	_store_wakeup_protocols
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_wakeup_protocols
_store_wakeup_protocols:                ; @store_wakeup_protocols
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x23, x2
	bl	_to_rc_dev
	mov	x21, x0
Lloh0:
	adrp	x8, _RC_PROTO_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_PROTO_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	add	x20, x0, #24
	mov	x0, x20
	bl	_mutex_lock
	ldr	x25, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_sysfs_streq
	cbz	x0, LBB0_3
LBB0_1:
	ldr	w8, [x21, #8]
	cmp	w8, w22
	b.eq	LBB0_12
; %bb.2:
	str	w22, [x21, #8]
	add	x0, x21, #48
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_dev_dbg
Lloh7:
	adrp	x8, _RC_PROTO_RC6_MCE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RC_PROTO_RC6_MCE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mov	w9, #-2146500608
	cmp	w22, w8
	csel	w8, w9, wzr, eq
	mov	x1, x21
	str	w8, [x1, #32]!
	str	xzr, [x21, #40]
	ldr	x8, [x21, #16]
	mov	x0, x21
	blr	x8
	cmp	x0, #0
	csel	x19, x19, x0, eq
	b	LBB0_12
LBB0_3:
Lloh10:
	adrp	x24, _protocols@GOTPAGE
Lloh11:
	ldr	x24, [x24, _protocols@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x26, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x26, x26, #1
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	x26, w0, sxtw
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsr	x8, x25, x26
	tbz	w8, #0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	ldr	x1, [x8, x26, lsl #3]
	mov	x0, x23
	bl	_sysfs_streq
	cbz	x0, LBB0_5
; %bb.8:
	mov	x22, x26
	b	LBB0_10
LBB0_9:
	mov	w26, #0
LBB0_10:
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w26, w0
	b.ne	LBB0_13
LBB0_11:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_12:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	ldr	x8, [x21, #56]
	cbz	x8, LBB0_1
; %bb.14:
	mov	w8, #1
	lsl	x8, x8, x22
	str	x8, [sp, #8]
	add	x0, sp, #8
	bl	_ir_raw_load_modules
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_1
	b	LBB0_11
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_UNKNOWN,4,2           ; @RC_PROTO_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"none"

	.comm	_protocols,8,3                  ; @protocols
	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Wakeup protocol changed to %d\n"

	.comm	_RC_PROTO_RC6_MCE,4,2           ; @RC_PROTO_RC6_MCE
	.no_dead_strip	_store_wakeup_protocols
.subsections_via_symbols
