	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function in_evdev_set_blocking
_in_evdev_set_blocking:                 ## @in_evdev_set_blocking
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movslq	%eax, %r12
	movq	_O_NONBLOCK@GOTPCREL(%rip), %r13
	testq	%r12, (%r13)
	je	LBB0_5
## %bb.3:
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_read
	cmpl	$4, %eax
	je	LBB0_4
LBB0_5:
	movq	(%r13), %rdx
	movq	%rdx, %rax
	notq	%rax
	andq	%r12, %rax
	orq	%r12, %rdx
	testl	%r14d, %r14d
	cmovneq	%rax, %rdx
	movl	(%rbx), %edi
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_6
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	callq	_perror
	movl	$-1, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in_evdev: F_GETFL fcntl failed"

	.comm	_O_NONBLOCK,8,3                 ## @O_NONBLOCK
	.comm	_F_SETFL,4,2                    ## @F_SETFL
L_.str.1:                               ## @.str.1
	.asciz	"in_evdev: F_SETFL fcntl failed"

	.no_dead_strip	_in_evdev_set_blocking
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function in_evdev_set_blocking
_in_evdev_set_blocking:                 ; @in_evdev_set_blocking
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_fcntl
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
	sxtw	x21, w0
Lloh3:
	adrp	x22, _O_NONBLOCK@GOTPAGE
Lloh4:
	ldr	x22, [x22, _O_NONBLOCK@GOTPAGEOFF]
	ldr	x8, [x22]
	tst	x8, x21
	b.eq	LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	add	x1, sp, #8
	mov	w2, #4
	bl	_read
	cmp	w0, #4
	b.eq	LBB0_2
LBB0_3:
	ldr	x8, [x22]
	bic	x9, x21, x8
	orr	x8, x8, x21
	cmp	w20, #0
	csel	x8, x8, x9, eq
	ldr	w0, [x19]
Lloh5:
	adrp	x9, _F_SETFL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _F_SETFL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	str	x8, [sp]
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_perror
	mov	w0, #-1
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in_evdev: F_GETFL fcntl failed"

	.comm	_O_NONBLOCK,8,3                 ; @O_NONBLOCK
	.comm	_F_SETFL,4,2                    ; @F_SETFL
l_.str.1:                               ; @.str.1
	.asciz	"in_evdev: F_SETFL fcntl failed"

	.no_dead_strip	_in_evdev_set_blocking
.subsections_via_symbols
