	.file	"824290.c"
	.intel_syntax noprefix
	.text
	.globl	fd
	.bss
	.align 4
	.type	fd, @object
	.size	fd, 4
fd:
	.zero	4
	.local	aiocbp
	.comm	aiocbp,168,32
	.globl	event
	.align 16
	.type	event, @object
	.size	event, 24
event:
	.zero	24
	.text
	.type	read_from_event, @function
read_from_event:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movzx	eax, BYTE PTR aio_struct_ready.0[rip]
	xor	eax, 1
	test	al, al
	je	.L2
	lea	rdx, aiocbp[rip]
	mov	eax, 0
	mov	ecx, 21
	mov	rdi, rdx
	rep stosq
	mov	eax, DWORD PTR fd[rip]
	mov	DWORD PTR aiocbp[rip], eax
	lea	rax, event[rip]
	mov	QWORD PTR aiocbp[rip+16], rax
	mov	QWORD PTR aiocbp[rip+128], 0
	mov	QWORD PTR aiocbp[rip+24], 24
	mov	DWORD PTR aiocbp[rip+44], 0
	mov	DWORD PTR aiocbp[rip+40], 29
	lea	rax, aiocbp[rip]
	mov	QWORD PTR aiocbp[rip+32], rax
.L2:
	lea	rdi, aiocbp[rip]
	call	aio_read@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_from_event, .-read_from_event
	.section	.rodata
	.align 8
.LC0:
	.string	"get event: type = 0x%x, code = 0x%x, value = 0x%x\n"
	.text
	.type	aio_complete_handler, @function
aio_complete_handler:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 29
	jne	.L5
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	aio_error@PLT
	test	eax, eax
	jne	.L5
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	aio_return@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 18[rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 16[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	call	read_from_event
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	aio_complete_handler, .-aio_complete_handler
	.section	.rodata
.LC1:
	.string	"Usage: %s <dev>\n"
.LC2:
	.string	"failed to open file"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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
	cmp	DWORD PTR -196[rbp], 2
	je	.L7
	mov	rax, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	jmp	.L12
.L7:
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	jns	.L9
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L9:
	lea	rax, -160[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -24[rbp], 4
	lea	rax, aio_complete_handler[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -160[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 29
	call	sigaction@PLT
	call	read_from_event
.L10:
	jmp	.L10
.L12:
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.local	aio_struct_ready.0
	.comm	aio_struct_ready.0,1,1
	.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	"824290.c"
	.text
	.comm	fd,4,4
	.local	aiocbp
	.comm	aiocbp,144,4
	.comm	event,16,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_from_event, %function
read_from_event:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L3
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L3+4
	mov	r0, r3
	mov	r3, #144
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, .L3+8
	ldr	r3, [r3]
	ldr	r2, .L3+4
	str	r3, [r2]
	ldr	r3, .L3+4
	ldr	r2, .L3+12
	str	r2, [r3, #12]
	ldr	r3, .L3+4
	mov	r2, #0
	str	r2, [r3, #104]
	ldr	r3, .L3+4
	mov	r2, #16
	str	r2, [r3, #16]
	ldr	r3, .L3+4
	mov	r2, #0
	str	r2, [r3, #28]
	ldr	r3, .L3+4
	mov	r2, #29
	str	r2, [r3, #24]
	ldr	r3, .L3+4
	ldr	r2, .L3+4
	str	r2, [r3, #20]
.L2:
	ldr	r0, .L3+4
	bl	aio_read
	nop
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	aio_struct_ready.5681
	.word	aiocbp
	.word	fd
	.word	event
	.size	read_from_event, .-read_from_event
	.section	.rodata
	.align	2
.LC0:
	.ascii	"get event: type = 0x%x, code = 0x%x, value = 0x%x\012"
	.ascii	"\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	aio_complete_handler, %function
aio_complete_handler:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #29
	bne	.L7
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	aio_error
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r0, [fp, #-12]
	bl	aio_return
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #8]
	mov	r1, r3
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #10]
	mov	r2, r3
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	ldr	r0, .L8
	bl	printf
	bl	read_from_event
.L7:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.size	aio_complete_handler, .-aio_complete_handler
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage: %s <dev>\012\000"
	.align	2
.LC2:
	.ascii	"failed to open file\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	str	r0, [fp, #-168]
	str	r1, [fp, #-172]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-168]
	cmp	r3, #2
	beq	.L11
	ldr	r3, [fp, #-172]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17+4
	bl	printf
	mvn	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	b	.L16
.L11:
	ldr	r3, [fp, #-172]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L17+8
	str	r3, [r2]
	ldr	r3, .L17+8
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L17+12
	bl	puts
.L13:
	sub	r3, fp, #148
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #4
	str	r3, [fp, #-16]
	ldr	r3, .L17+16
	str	r3, [fp, #-148]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	mov	r0, #29
	bl	sigaction
	bl	read_from_event
.L14:
	b	.L14
.L16:
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	.LC1
	.word	fd
	.word	.LC2
	.word	aio_complete_handler
	.size	main, .-main
	.local	aio_struct_ready.5681
	.comm	aio_struct_ready.5681,1,1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
