	.file	"587501.c"
	.intel_syntax noprefix
	.text
	.globl	packet_n
	.bss
	.align 4
	.type	packet_n, @object
	.size	packet_n, 4
packet_n:
	.zero	4
	.globl	line_n
	.align 4
	.type	line_n, @object
	.size	line_n, 4
line_n:
	.zero	4
	.globl	tid
	.align 8
	.type	tid, @object
	.size	tid, 8
tid:
	.zero	8
	.globl	packet_flag
	.align 4
	.type	packet_flag, @object
	.size	packet_flag, 4
packet_flag:
	.zero	4
	.globl	erl_read
	.align 4
	.type	erl_read, @object
	.size	erl_read, 4
erl_read:
	.zero	4
	.globl	erl_write
	.data
	.align 4
	.type	erl_write, @object
	.size	erl_write, 4
erl_write:
	.long	1
	.section	.rodata
.LC0:
	.string	"Closing with reason:"
	.text
	.globl	catch
	.type	catch, @function
catch:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	catch, .-catch
	.globl	close_driver
	.type	close_driver, @function
close_driver:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE1:
	.size	close_driver, .-close_driver
	.section	.rodata
.LC1:
	.string	"Error while sigaction"
.LC2:
	.string	"packet"
	.text
	.globl	main
	.type	main, @function
main:
.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, 416
	mov	DWORD PTR -404[rbp], edi
	mov	QWORD PTR -416[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, catch[rip]
	mov	QWORD PTR -384[rbp], rax
	lea	rax, -384[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -248[rbp], 0
	lea	rax, -384[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 13
	call	sigaction@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	cmp	DWORD PTR -404[rbp], 1
	jg	.L5
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -416[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L6
	mov	rax, QWORD PTR -416[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR packet_n[rip], eax
	mov	DWORD PTR packet_flag[rip], 1
	jmp	.L11
.L6:
	mov	DWORD PTR packet_flag[rip], 0
	mov	rax, QWORD PTR -416[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR line_n[rip], eax
.L11:
	mov	eax, DWORD PTR erl_read[rip]
	lea	rcx, -224[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -392[rbp], eax
	cmp	DWORD PTR -392[rbp], 0
	jns	.L8
	mov	edi, 1
	call	exit@PLT
.L8:
	cmp	DWORD PTR -392[rbp], 0
	jne	.L9
	mov	edi, 1
	call	exit@PLT
.L9:
	lea	rdx, -224[rbp]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -392[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR erl_write[rip]
	lea	rcx, -112[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -388[rbp], eax
	cmp	DWORD PTR -388[rbp], 0
	jg	.L11
	mov	eax, 0
	call	close_driver
	jmp	.L11
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.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	"587501.c"
	.text
	.global	packet_n
	.bss
	.align	2
	.type	packet_n, %object
	.size	packet_n, 4
packet_n:
	.space	4
	.global	line_n
	.align	2
	.type	line_n, %object
	.size	line_n, 4
line_n:
	.space	4
	.comm	tid,4,4
	.global	packet_flag
	.align	2
	.type	packet_flag, %object
	.size	packet_flag, 4
packet_flag:
	.space	4
	.global	erl_read
	.align	2
	.type	erl_read, %object
	.size	erl_read, 4
erl_read:
	.space	4
	.global	erl_write
	.data
	.align	2
	.type	erl_write, %object
	.size	erl_write, 4
erl_write:
	.word	1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Closing with reason:\000"
	.text
	.align	2
	.global	catch
	.syntax unified
	.arm
	.fpu softvfp
	.type	catch, %function
catch:
	@ 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]
	ldr	r0, .L2
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	catch, .-catch
	.align	2
	.global	close_driver
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_driver, %function
close_driver:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L5
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	close_driver, .-close_driver
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Error while sigaction\000"
	.align	2
.LC2:
	.ascii	"packet\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 = 360
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #360
	str	r0, [fp, #-360]
	str	r1, [fp, #-364]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L17+4
	str	r3, [fp, #-348]
	sub	r3, fp, #348
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #0
	str	r3, [fp, #-216]
	sub	r3, fp, #348
	mov	r2, #0
	mov	r1, r3
	mov	r0, #13
	bl	sigaction
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L17+8
	bl	puts
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-360]
	cmp	r3, #1
	bgt	.L9
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-364]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L17+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-364]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L17+16
	str	r3, [r2]
	ldr	r3, .L17+20
	mov	r2, #1
	str	r2, [r3]
	b	.L15
.L10:
	ldr	r3, .L17+20
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-364]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L17+24
	str	r3, [r2]
.L15:
	ldr	r3, .L17+28
	ldr	r3, [r3]
	sub	r1, fp, #208
	mov	r2, #100
	mov	r0, r3
	bl	read
	str	r0, [fp, #-356]
	ldr	r3, [fp, #-356]
	cmp	r3, #0
	bge	.L12
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, [fp, #-356]
	cmp	r3, #0
	bne	.L13
	mov	r0, #1
	bl	exit
.L13:
	sub	r2, fp, #208
	sub	r3, fp, #108
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, .L17+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-356]
	sub	r1, fp, #108
	mov	r0, r3
	bl	write
	str	r0, [fp, #-352]
	ldr	r3, [fp, #-352]
	cmp	r3, #0
	bgt	.L15
	bl	close_driver
	b	.L15
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	catch
	.word	.LC1
	.word	.LC2
	.word	packet_n
	.word	packet_flag
	.word	line_n
	.word	erl_read
	.word	erl_write
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
