	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loop_set_wakeup_filter
_loop_set_wakeup_filter:                ## @loop_set_wakeup_filter
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 4(%rsi)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$512, %ebx                      ## imm = 0x200
	movl	$512, %edi                      ## imm = 0x200
	movl	$4, %esi
	callq	_kmalloc_array
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movl	(%r12), %edi
	movl	(%r15), %esi
	movq	%rax, %rdx
	movl	$512, %ecx                      ## imm = 0x200
	callq	_ir_raw_encode_scancode
	movl	%eax, %r15d
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	cmovnel	%r15d, %ebx
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.5:
	je	LBB0_8
## %bb.6:
	movl	%ebx, %r15d
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ir_raw_event_store
	addq	$4, %rbx
	decq	%r15
	jne	LBB0_7
LBB0_8:
	movq	%r12, %rdi
	callq	_ir_raw_event_handle
	xorl	%r15d, %r15d
LBB0_9:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_10
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.no_dead_strip	_loop_set_wakeup_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loop_set_wakeup_filter
_loop_set_wakeup_filter:                ; @loop_set_wakeup_filter
	.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
	ldr	w8, [x1, #4]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w22, #512
	mov	w0, #512
	mov	w1, #4
	bl	_kmalloc_array
	cbz	x0, LBB0_8
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19]
	ldr	w1, [x21]
	mov	x2, x20
	mov	w3, #512
	bl	_ir_raw_encode_scancode
Lloh3:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmn	w0, w8
	csel	w22, w22, w0, eq
	tbnz	w22, #31, LBB0_9
; %bb.3:
	cbz	w22, LBB0_6
; %bb.4:
	mov	x21, x20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ir_raw_event_store
	add	x21, x21, #4
	subs	x22, x22, #1
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_ir_raw_event_handle
	mov	w21, #0
	b	LBB0_10
LBB0_7:
	mov	w21, #0
	b	LBB0_11
LBB0_8:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_9:
	mov	x21, x0
LBB0_10:
	mov	x0, x20
	bl	_kfree
LBB0_11:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.no_dead_strip	_loop_set_wakeup_filter
.subsections_via_symbols
