	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ir_raw_event_store_edge        ## -- Begin function ir_raw_event_store_edge
	.p2align	4, 0x90
_ir_raw_event_store_edge:               ## @ir_raw_event_store_edge
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_ev@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	8(%r12), %rsi
	callq	_DEFINE_IR_RAW_EVENT
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	movl	%r15d, %edi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_ns
	movq	_IR_MAX_DURATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_4
## %bb.3:
	movq	(%rbx), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	%rax, 8(%r12)
	movq	_IR_START_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %eax
	jne	LBB0_7
LBB0_8:
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movq	_IR_SPACE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movl	$0, (%r12)
	jmp	LBB0_13
LBB0_4:
	movq	_IR_START_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, %r14d
	testl	%r14d, %eax
	je	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_ir_raw_event_reset
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_10:
	movq	_IR_PULSE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.12:
	movl	$1, (%r12)
LBB0_13:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ir_raw_event_store
LBB0_14:
	movq	(%rbx), %rcx
	movl	%r15d, 4(%rcx)
	movl	%r14d, (%rcx)
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ev,16,3                        ## @ev
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IR_MAX_DURATION,8,3            ## @IR_MAX_DURATION
	.comm	_IR_START_EVENT,4,2             ## @IR_START_EVENT
	.comm	_IR_SPACE,4,2                   ## @IR_SPACE
	.comm	_IR_PULSE,4,2                   ## @IR_PULSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ir_raw_event_store_edge        ; -- Begin function ir_raw_event_store_edge
	.p2align	2
_ir_raw_event_store_edge:               ; @ir_raw_event_store_edge
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _ev@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ev@GOTPAGEOFF]
	ldp	x0, x1, [x22]
	bl	_DEFINE_IR_RAW_EVENT
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.1:
	bl	_ktime_get
	mov	x21, x0
	ldr	x8, [x20]
	ldr	w1, [x8, #4]
	bl	_ktime_sub
	bl	_ktime_to_ns
Lloh2:
	adrp	x8, _IR_MAX_DURATION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IR_MAX_DURATION@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.gt	LBB0_6
; %bb.2:
	ldr	x8, [x20]
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.3:
	str	x0, [x22, #8]
Lloh5:
	adrp	x8, _IR_START_EVENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IR_START_EVENT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_7
LBB0_4:
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _IR_SPACE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IR_SPACE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.5:
	str	wzr, [x22]
	b	LBB0_11
LBB0_6:
Lloh11:
	adrp	x8, _IR_START_EVENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IR_START_EVENT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w19, w8, w19
	tst	w8, w19
	b.eq	LBB0_4
LBB0_7:
	mov	x0, x20
	bl	_ir_raw_event_reset
	mov	w0, #0
	b	LBB0_12
LBB0_8:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_9:
Lloh17:
	adrp	x9, _IR_PULSE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IR_PULSE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.10:
	mov	w8, #1
	str	w8, [x22]
LBB0_11:
	mov	x0, x20
	mov	x1, x22
	bl	_ir_raw_event_store
LBB0_12:
	ldr	x8, [x20]
	stp	w19, w21, [x8]
LBB0_13:
	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
LBB0_14:
	mov	w0, #0
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ev,16,3                        ; @ev
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IR_MAX_DURATION,8,3            ; @IR_MAX_DURATION
	.comm	_IR_START_EVENT,4,2             ; @IR_START_EVENT
	.comm	_IR_SPACE,4,2                   ; @IR_SPACE
	.comm	_IR_PULSE,4,2                   ; @IR_PULSE
.subsections_via_symbols
