	.file	"94776.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dev/hive_dev"
.LC1:
	.string	"Can't open device"
.LC2:
	.string	"fd_2 is = %d\n"
.LC3:
	.string	"Open a device 2: %d\n"
.LC4:
	.string	"fd is = %d\n"
.LC5:
	.string	"Open a device 1: %d\n"
	.align 8
.LC6:
	.string	"Failed to read the message from the device."
.LC7:
	.string	"SOME MAGIC _read_: %s\n"
	.align 8
.LC8:
	.string	"\nType a buffersize and press ENTER:"
.LC9:
	.string	"%d"
	.align 8
.LC10:
	.string	"Type some text to write and press ENTER:"
.LC11:
	.string	"%[^\n]%*c"
.LC12:
	.string	"buf is: %d\n"
	.align 8
.LC13:
	.string	"Failed to write the message to the device `our_buf`."
.LC14:
	.string	"Written line: %s\n"
.LC15:
	.string	"Press ENTER to to read!"
	.align 8
.LC16:
	.string	"Failed to read the message from the device `our_buf`."
.LC17:
	.string	"Read line: %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -84[rbp], eax
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -80[rbp], eax
	mov	BYTE PTR -49[rbp], 0
	movabs	rax, 2334402961930153815
	movabs	rdx, 7307218077897482605
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	movabs	rax, 2338324117647811955
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -24[rbp], 1380276052
	mov	WORD PTR -20[rbp], 8523
	mov	BYTE PTR -18[rbp], 0
	cmp	DWORD PTR -80[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L12
.L2:
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -84[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L12
.L4:
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -76[rbp], 31
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, 1074290944
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 0
	jns	.L5
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L12
.L5:
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rax, -92[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	lea	rdx, -92[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 1074290945
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rax, -49[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -88[rbp], 0
.L9:
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	movzx	eax, BYTE PTR -49[rbp+rax]
	test	al, al
	je	.L14
	add	DWORD PTR -88[rbp], 1
	jmp	.L9
.L14:
	nop
	add	DWORD PTR -88[rbp], 1
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	lea	rcx, -49[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L10
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L12
.L10:
	lea	rax, -49[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	lea	rax, -49[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -84[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	lea	rcx, -49[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L11
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L12
.L11:
	lea	rax, -49[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"94776.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/hive_dev\000"
	.align	2
.LC2:
	.ascii	"Can't open device\000"
	.align	2
.LC3:
	.ascii	"fd_2 is = %d\012\000"
	.align	2
.LC4:
	.ascii	"Open a device 2: %d\012\000"
	.align	2
.LC5:
	.ascii	"fd is = %d\012\000"
	.align	2
.LC6:
	.ascii	"Open a device 1: %d\012\000"
	.align	2
.LC7:
	.ascii	"Failed to read the message from the device.\000"
	.align	2
.LC8:
	.ascii	"SOME MAGIC _read_: %s\012\000"
	.align	2
.LC9:
	.ascii	"\012Type a buffersize and press ENTER:\000"
	.align	2
.LC10:
	.ascii	"%d\000"
	.align	2
.LC11:
	.ascii	"Type some text to write and press ENTER:\000"
	.align	2
.LC12:
	.ascii	"%[^\012]%*c\000"
	.align	2
.LC13:
	.ascii	"buf is: %d\012\000"
	.align	2
.LC14:
	.ascii	"Failed to write the message to the device `our_buf`"
	.ascii	".\000"
	.align	2
.LC15:
	.ascii	"Written line: %s\012\000"
	.align	2
.LC16:
	.ascii	"Press ENTER to to read!\000"
	.align	2
.LC17:
	.ascii	"Failed to read the message from the device `our_buf"
	.ascii	"`.\000"
	.align	2
.LC18:
	.ascii	"Read line: %s\012\000"
	.align	2
.LC1:
	.ascii	"Wow, we made these bees TWERK!\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #2
	ldr	r0, .L15+4
	bl	open
	str	r0, [fp, #-68]
	mov	r1, #2
	ldr	r0, .L15+4
	bl	open
	str	r0, [fp, #-64]
	mov	r3, #0
	strb	r3, [fp, #-44]
	ldr	r3, .L15+8
	sub	ip, fp, #40
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r3, #16
	strb	r3, [ip]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L15+12
	bl	puts
	ldr	r1, [fp, #-64]
	ldr	r0, .L15+16
	bl	printf
	mov	r3, #0
	b	.L12
.L2:
	ldr	r1, [fp, #-64]
	ldr	r0, .L15+20
	bl	printf
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L15+12
	bl	puts
	ldr	r1, [fp, #-68]
	ldr	r0, .L15+24
	bl	printf
	mov	r3, #0
	b	.L12
.L4:
	ldr	r1, [fp, #-68]
	ldr	r0, .L15+28
	bl	printf
	mov	r3, #31
	str	r3, [fp, #-60]
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L15+32
	ldr	r0, [fp, #-64]
	bl	ioctl
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-64]
	bl	lseek
	ldr	r3, [fp, #-60]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-60]
	mov	r2, r3
	ldr	r1, [fp, #-56]
	ldr	r0, [fp, #-64]
	bl	read
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L15+36
	bl	printf
	mov	r3, #0
	b	.L12
.L5:
	ldr	r1, [fp, #-56]
	ldr	r0, .L15+40
	bl	printf
	ldr	r0, .L15+44
	bl	puts
	sub	r3, fp, #76
	mov	r1, r3
	ldr	r0, .L15+48
	bl	__isoc99_scanf
	bl	getchar
	sub	r3, fp, #76
	mov	r2, r3
	ldr	r1, .L15+52
	ldr	r0, [fp, #-68]
	bl	ioctl
	ldr	r0, .L15+56
	bl	puts
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L15+60
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-72]
.L9:
	sub	r2, fp, #44
	ldr	r3, [fp, #-72]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L14
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
	b	.L9
.L14:
	nop
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
	ldr	r1, [fp, #-72]
	ldr	r0, .L15+64
	bl	printf
	ldr	r2, [fp, #-72]
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	write
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L15+68
	bl	printf
	mov	r3, #0
	b	.L12
.L10:
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L15+72
	bl	printf
	ldr	r2, [fp, #-72]
	sub	r3, fp, #44
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-68]
	bl	lseek
	ldr	r0, .L15+76
	bl	printf
	bl	getchar
	ldr	r2, [fp, #-72]
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	read
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L15+80
	bl	printf
	mov	r3, #0
	b	.L12
.L11:
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L15+84
	bl	printf
	mov	r3, #0
.L12:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC19
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	1074028800
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	1074028801
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
