	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edge_store
_edge_store:                            ## @edge_store
	.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
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_trigger_types@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	4(%rax,%r15,8), %edi
	movq	%rbx, %rsi
	callq	_sysfs_streq
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%r15
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jl	LBB0_1
LBB0_3:
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jne	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_11
LBB0_5:
	movq	%r12, %rbx
	movq	%r14, %r12
	movq	(%r13), %rax
	movl	%r15d, %ecx
	movb	(%rax,%rcx,8), %r15b
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movb	(%r12), %al
	cmpb	%al, %r15b
	je	LBB0_10
## %bb.6:
	testb	%al, %al
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_gpio_sysfs_free_irq
LBB0_8:
	testb	%r15b, %r15b
	je	LBB0_10
## %bb.9:
	movzbl	%r15b, %esi
	movq	%r12, %rdi
	callq	_gpio_sysfs_request_irq
	testq	%rax, %rax
	cmovneq	%rax, %rbx
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_trigger_types,8,3              ## @trigger_types
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_edge_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edge_store
_edge_store:                            ; @edge_store
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x0
	bl	_dev_get_drvdata
	mov	x21, x0
Lloh0:
	adrp	x23, _trigger_types@GOTPAGE
Lloh1:
	ldr	x23, [x23, _trigger_types@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x24, #0
	mov	w25, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w0, [x8, x25]
	mov	x1, x22
	bl	_sysfs_streq
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	add	x25, x25, #8
	cmp	x24, w0, sxtw
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w24, #0
LBB0_5:
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w24, w0
	b.ne	LBB0_7
; %bb.6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_13
LBB0_7:
	ldr	x8, [x23]
	mov	w9, w24
	lsl	x9, x9, #3
	ldrb	w23, [x8, x9]
	add	x22, x21, #4
	mov	x0, x22
	bl	_mutex_lock
	ldrb	w8, [x21]
	cmp	w23, w8
	b.eq	LBB0_12
; %bb.8:
	cbz	w8, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_gpio_sysfs_free_irq
LBB0_10:
	cbz	w23, LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, x23
	bl	_gpio_sysfs_request_irq
	cmp	x0, #0
	csel	x19, x19, x0, eq
LBB0_12:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_trigger_types,8,3              ; @trigger_types
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_edge_store
.subsections_via_symbols
