	.file	"247019528.c"
	.intel_syntax noprefix
	.text
	.data
	.align 32
	.type	path, @object
	.size	path, 4096
path:
	.string	"/sys/devices"
	.zero	4083
	.local	pathlen
	.comm	pathlen,8,8
	.local	ret
	.comm	ret,4,4
	.text
	.type	error, @function
error:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 224
	mov	QWORD PTR -216[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L2
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L2:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vfprintf@PLT
	mov	rax, QWORD PTR -216[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L3
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -216[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 58
	jne	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 32
	call	fputc@PLT
	mov	edi, 0
	call	perror@PLT
	jmp	.L4
.L3:
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
.L4:
	mov	DWORD PTR ret[rip], 1
	nop
	mov	rax, QWORD PTR -184[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	error, .-error
	.section	.rodata
.LC0:
	.string	"open %s:"
.LC1:
	.string	"write %s:"
	.text
	.type	trigger, @function
trigger:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	openat@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L7
	lea	rsi, path[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	error
	jmp	.L10
.L7:
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 3
	lea	rsi, action.0[rip]
	mov	edi, eax
	call	write@PLT
	cmp	rax, 3
	je	.L9
	lea	rsi, path[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	error
.L9:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	trigger, .-trigger
	.section	.rodata
.LC2:
	.string	"opendir %s:"
.LC3:
	.string	"."
.LC4:
	.string	".."
.LC5:
	.string	"path too large"
.LC6:
	.string	"stat %s:"
.LC7:
	.string	"uevent"
.LC8:
	.string	"readdir %s"
	.text
	.type	search, @function
search:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rcx, QWORD PTR -208[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	edx, 65536
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	openat@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], -1
	jne	.L12
	lea	rsi, path[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	error
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	fdopendir@PLT
	mov	QWORD PTR -192[rbp], rax
	cmp	QWORD PTR -192[rbp], 0
	jne	.L14
	lea	rsi, path[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	error
	jmp	.L11
.L14:
	mov	rax, QWORD PTR pathlen[rip]
	mov	QWORD PTR -184[rbp], rax
.L23:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	je	.L28
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 19
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L29
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 19
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L29
	mov	rax, QWORD PTR pathlen[rip]
	lea	rdx, 1[rax]
	mov	QWORD PTR pathlen[rip], rdx
	lea	rdx, path[rip]
	mov	BYTE PTR [rax+rdx], 47
	mov	rax, QWORD PTR pathlen[rip]
	mov	edx, 4096
	sub	rdx, rax
	mov	rax, QWORD PTR -176[rbp]
	lea	rsi, 19[rax]
	mov	rax, QWORD PTR pathlen[rip]
	lea	rcx, path[rip]
	add	rax, rcx
	mov	rcx, rdx
	mov	edx, 0
	mov	rdi, rax
	call	memccpy@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L20
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	error
	jmp	.L19
.L20:
	lea	rdx, path[rip]
	mov	rax, QWORD PTR -168[rbp]
	sub	rax, rdx
	sub	rax, 1
	mov	QWORD PTR pathlen[rip], rax
	mov	rax, QWORD PTR -176[rbp]
	lea	rsi, 19[rax]
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	ecx, 256
	mov	edi, eax
	call	fstatat@PLT
	cmp	eax, -1
	jne	.L21
	lea	rsi, path[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	error
	jmp	.L19
.L21:
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L22
	mov	rax, QWORD PTR -176[rbp]
	lea	rdx, 19[rax]
	mov	eax, DWORD PTR -196[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	search
	jmp	.L19
.L22:
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 32768
	jne	.L19
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 19
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L19
	mov	rax, QWORD PTR -176[rbp]
	lea	rdx, 19[rax]
	mov	eax, DWORD PTR -196[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	trigger
	jmp	.L19
.L29:
	nop
.L19:
	mov	rax, QWORD PTR -184[rbp]
	mov	QWORD PTR pathlen[rip], rax
	jmp	.L23
.L28:
	nop
	mov	rax, QWORD PTR pathlen[rip]
	lea	rdx, path[rip]
	mov	BYTE PTR [rax+rdx], 0
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L24
	lea	rsi, path[rip]
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	error
.L24:
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	closedir@PLT
.L11:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	search, .-search
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	lea	rdi, path[rip]
	call	strlen@PLT
	mov	QWORD PTR pathlen[rip], rax
	lea	rsi, path[rip]
	mov	edi, -100
	call	search
	mov	eax, DWORD PTR ret[rip]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.section	.rodata
	.type	action.0, @object
	.size	action.0, 4
action.0:
	.string	"add"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"247019528.c"
	.text
	.data
	.align	2
	.type	path, %object
	.size	path, 4096
path:
	.ascii	"/sys/devices\000"
	.space	4083
	.local	pathlen
	.comm	pathlen,4,4
	.local	ret
	.comm	ret,4,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, [fp, #4]
	str	r3, [fp, #-16]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-12]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	vfprintf
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L2
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #58
	bne	.L2
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #32
	bl	fputc
	mov	r0, #0
	bl	perror
	b	.L3
.L2:
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
.L3:
	ldr	r3, .L5+8
	mov	r2, #1
	str	r2, [r3]
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	stderr
	.word	ret
	.size	error, .-error
	.section	.rodata
	.align	2
.LC1:
	.ascii	"open %s:\000"
	.align	2
.LC2:
	.ascii	"write %s:\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	trigger, %function
trigger:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r2, #1
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	openat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L8
	ldr	r1, .L12
	ldr	r0, .L12+4
	bl	error
	b	.L11
.L8:
	mov	r2, #3
	ldr	r1, .L12+8
	ldr	r0, [fp, #-8]
	bl	write
	mov	r3, r0
	cmp	r3, #3
	beq	.L10
	ldr	r1, .L12
	ldr	r0, .L12+12
	bl	error
.L10:
	ldr	r0, [fp, #-8]
	bl	close
.L11:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	path
	.word	.LC1
	.word	action.5747
	.word	.LC2
	.size	trigger, .-trigger
	.section	.rodata
	.align	2
.LC3:
	.ascii	"opendir %s:\000"
	.align	2
.LC4:
	.ascii	".\000"
	.align	2
.LC5:
	.ascii	"..\000"
	.align	2
.LC6:
	.ascii	"path too large\000"
	.align	2
.LC7:
	.ascii	"stat %s:\000"
	.align	2
.LC8:
	.ascii	"uevent\000"
	.align	2
.LC9:
	.ascii	"readdir %s\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #16384
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	openat
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmn	r3, #1
	bne	.L15
	ldr	r1, .L33+4
	ldr	r0, .L33+8
	bl	error
	b	.L14
.L15:
	ldr	r0, [fp, #-120]
	bl	fdopendir
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L17
	ldr	r1, .L33+4
	ldr	r0, .L33+8
	bl	error
	b	.L14
.L17:
	ldr	r3, .L33+12
	ldr	r3, [r3]
	str	r3, [fp, #-112]
.L26:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, [fp, #-116]
	bl	readdir
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-108]
	add	r3, r3, #11
	ldr	r1, .L33+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	ldr	r3, [fp, #-108]
	add	r3, r3, #11
	ldr	r1, .L33+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	ldr	r3, .L33+12
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L33+12
	str	r2, [r1]
	ldr	r2, .L33+4
	mov	r1, #47
	strb	r1, [r2, r3]
	ldr	r3, .L33+12
	ldr	r3, [r3]
	ldr	r2, .L33+4
	add	r0, r3, r2
	ldr	r3, [fp, #-108]
	add	r1, r3, #11
	ldr	r3, .L33+12
	ldr	r3, [r3]
	rsb	r3, r3, #4096
	mov	r2, #0
	bl	memccpy
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L23
	ldr	r0, .L33+24
	bl	error
	b	.L22
.L23:
	ldr	r3, [fp, #-104]
	ldr	r2, .L33+4
	sub	r3, r3, r2
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r3, .L33+12
	str	r2, [r3]
	ldr	r3, [fp, #-108]
	add	r1, r3, #11
	sub	r2, fp, #100
	mov	r3, #256
	ldr	r0, [fp, #-120]
	bl	fstatat
	mov	r3, r0
	cmn	r3, #1
	bne	.L24
	ldr	r1, .L33+4
	ldr	r0, .L33+28
	bl	error
	b	.L22
.L24:
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L25
	ldr	r3, [fp, #-108]
	add	r3, r3, #11
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	search
	b	.L22
.L25:
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #32768
	bne	.L22
	ldr	r3, [fp, #-108]
	add	r3, r3, #11
	ldr	r1, .L33+32
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-108]
	add	r3, r3, #11
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	trigger
	b	.L22
.L32:
	nop
.L22:
	ldr	r2, .L33+12
	ldr	r3, [fp, #-112]
	str	r3, [r2]
	b	.L26
.L31:
	nop
	ldr	r3, .L33+12
	ldr	r3, [r3]
	ldr	r2, .L33+4
	mov	r1, #0
	strb	r1, [r2, r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r1, .L33+4
	ldr	r0, .L33+36
	bl	error
.L27:
	ldr	r0, [fp, #-116]
	bl	closedir
.L14:
	ldr	r3, .L33
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC10
	.word	path
	.word	.LC3
	.word	pathlen
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	search, .-search
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r0, .L37
	bl	strlen
	mov	r3, r0
	ldr	r2, .L37+4
	str	r3, [r2]
	ldr	r1, .L37
	mvn	r0, #99
	bl	search
	ldr	r3, .L37+8
	ldr	r3, [r3]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	path
	.word	pathlen
	.word	ret
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	action.5747, %object
	.size	action.5747, 4
action.5747:
	.ascii	"add\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
