	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function in_evdev_clean_binds
_in_evdev_clean_binds:                  ## @in_evdev_clean_binds
	.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	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_KEY_CNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movq	%rbx, %rax
	andq	$-4, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	andl	$-4, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movl	16(%r14), %r12d
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_EVIOCGBIT
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	cmpq	$0, 8(%r14)
	je	LBB0_5
LBB0_3:
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.4:
	movq	_KEY_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_KEYBITS_BIT_SET
	movq	_KEY_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_KEYBITS_BIT_SET
	movq	_KEY_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_KEYBITS_BIT_SET
	movq	_KEY_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_KEYBITS_BIT_SET
LBB0_5:
	movq	_KEY_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.7:
	movq	_IN_BINDTYPE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_KEY_CNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r12d
	cmpl	%ecx, %r12d
	jge	LBB0_16
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	testl	%eax, %eax
	jle	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax,%rcx,4)
	movl	$0, (%r15,%rcx,4)
	xorl	%eax, %eax
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	cmpl	$1, %eax
	sbbl	$-1, %r13d
	incl	%ebx
	movq	_IN_BINDTYPE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jge	LBB0_14
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_IN_BIND_OFFS
	movl	%eax, %r14d
	movl	%r12d, %edi
	callq	_KEYBITS_BIT
	movslq	%r14d, %rcx
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%r15,%rcx,4), %eax
	jmp	LBB0_13
LBB0_6:
	xorl	%r13d, %r13d
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	cmpq	$0, 8(%r14)
	jne	LBB0_3
	jmp	LBB0_5
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_CNT,4,2                    ## @KEY_CNT
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in_evdev: ioctl failed"

	.comm	_KEY_LEFT,4,2                   ## @KEY_LEFT
	.comm	_KEY_RIGHT,4,2                  ## @KEY_RIGHT
	.comm	_KEY_UP,4,2                     ## @KEY_UP
	.comm	_KEY_DOWN,4,2                   ## @KEY_DOWN
	.comm	_IN_BINDTYPE_COUNT,4,2          ## @IN_BINDTYPE_COUNT
	.no_dead_strip	_in_evdev_clean_binds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function in_evdev_clean_binds
_in_evdev_clean_binds:                  ; @in_evdev_clean_binds
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _KEY_CNT@GOTPAGE
Lloh4:
	ldr	x25, [x25, _KEY_CNT@GOTPAGEOFF]
	ldrsw	x12, [x25]
	and	x8, x12, #0xfffffffffffffffc
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xfffffffffffffff0
	sub	x22, x9, x8
	mov	sp, x22
	and	w23, w12, #0xfffffffc
	mov	x0, x22
	mov	w1, #0
	mov	x2, x23
	bl	_memset
	ldr	w24, [x21, #16]
Lloh7:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_EVIOCGBIT
	mov	x1, x0
	mov	x0, x24
	mov	x2, x22
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
LBB0_2:
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _KEY_LEFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _KEY_LEFT@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_KEYBITS_BIT_SET
Lloh13:
	adrp	x8, _KEY_RIGHT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _KEY_RIGHT@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_KEYBITS_BIT_SET
Lloh16:
	adrp	x8, _KEY_UP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _KEY_UP@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_KEYBITS_BIT_SET
Lloh19:
	adrp	x8, _KEY_DOWN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _KEY_DOWN@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_KEYBITS_BIT_SET
LBB0_4:
	ldr	w9, [x25]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.5:
	mov	w21, #0
	mov	w22, #0
Lloh22:
	adrp	x26, _IN_BINDTYPE_COUNT@GOTPAGE
Lloh23:
	ldr	x26, [x26, _IN_BINDTYPE_COUNT@GOTPAGEOFF]
	ldr	w8, [x26]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x25]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w22, w22, #1
	cmp	w22, w9
	b.ge	LBB0_15
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w23, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=2
	mov	w8, #0
	lsl	x9, x9, #2
	str	wzr, [x19, x9]
	str	wzr, [x20, x9]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	cmp	w8, #0
	cinc	w21, w21, ne
	add	w23, w23, #1
	ldr	w8, [x26]
	cmp	w23, w8
	b.ge	LBB0_6
LBB0_12:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	mov	x1, x23
	bl	_IN_BIND_OFFS
	mov	x24, x0
	mov	x0, x22
	bl	_KEYBITS_BIT
	sxtw	x9, w24
	cbz	w0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w8, [x20, x9, lsl #2]
	b	LBB0_11
LBB0_14:
	mov	w21, #0
LBB0_15:
	ldur	x8, [x29, #-72]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.16:
	mov	x0, x21
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_2
	b	LBB0_4
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_CNT,4,2                    ; @KEY_CNT
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in_evdev: ioctl failed"

	.comm	_KEY_LEFT,4,2                   ; @KEY_LEFT
	.comm	_KEY_RIGHT,4,2                  ; @KEY_RIGHT
	.comm	_KEY_UP,4,2                     ; @KEY_UP
	.comm	_KEY_DOWN,4,2                   ; @KEY_DOWN
	.comm	_IN_BINDTYPE_COUNT,4,2          ; @IN_BINDTYPE_COUNT
	.no_dead_strip	_in_evdev_clean_binds
.subsections_via_symbols
