	.file	"670857.c"
	.intel_syntax noprefix
	.text
	.globl	listenfd
	.bss
	.align 4
	.type	listenfd, @object
	.size	listenfd, 4
listenfd:
	.zero	4
	.globl	connfd
	.align 4
	.type	connfd, @object
	.size	connfd, 4
connfd:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Socket created failed."
.LC1:
	.string	"bind failed."
.LC2:
	.string	"listening...."
	.align 8
.LC3:
	.string	"Couldn't register signal handler."
.LC4:
	.string	"received EOF "
.LC5:
	.string	"read %d bytes: %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, 320
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, sig_urg[rip]
	mov	QWORD PTR -272[rbp], rax
	lea	rax, -272[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -136[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR listenfd[rip], eax
	mov	eax, DWORD PTR listenfd[rip]
	test	eax, eax
	jns	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L8
.L2:
	mov	WORD PTR -304[rbp], 2
	mov	edi, 6666
	call	htons@PLT
	mov	WORD PTR -302[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -300[rbp], eax
	mov	eax, DWORD PTR listenfd[rip]
	lea	rcx, -304[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L8
.L4:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR listenfd[rip]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -312[rbp], 16
	mov	eax, DWORD PTR listenfd[rip]
	lea	rdx, -312[rbp]
	lea	rcx, -288[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR connfd[rip], eax
	lea	rax, -272[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 23
	call	sigaction@PLT
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, -2
	jmp	.L8
.L5:
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR connfd[rip]
	mov	esi, 8
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
.L7:
	mov	eax, DWORD PTR connfd[rip]
	lea	rcx, -112[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], 0
	jne	.L6
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L8
.L6:
	mov	eax, DWORD PTR -308[rbp]
	cdqe
	mov	BYTE PTR -112[rbp+rax], 0
	lea	rdx, -112[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC6:
	.string	"SIGURG received "
.LC7:
	.string	"read %d OOB byte: %s\n"
	.text
	.globl	sig_urg
	.type	sig_urg, @function
sig_urg:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR connfd[rip]
	lea	rsi, -112[rbp]
	mov	ecx, 1
	mov	edx, 100
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -116[rbp], eax
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	BYTE PTR -112[rbp+rax], 0
	lea	rdx, -112[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sig_urg, .-sig_urg
	.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	"670857.c"
	.text
	.comm	listenfd,4,4
	.comm	connfd,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Socket created failed.\000"
	.align	2
.LC1:
	.ascii	"bind failed.\000"
	.align	2
.LC2:
	.ascii	"listening....\000"
	.align	2
.LC3:
	.ascii	"Couldn't register signal handler.\000"
	.align	2
.LC4:
	.ascii	"received EOF \000"
	.align	2
.LC5:
	.ascii	"read %d bytes: %s \012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #292
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L10+4
	str	r3, [fp, #-256]
	sub	r3, fp, #256
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #0
	str	r3, [fp, #-124]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	mov	r3, r0
	ldr	r2, .L10+8
	str	r3, [r2]
	ldr	r3, .L10+8
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L10+12
	bl	puts
	mvn	r3, #0
	b	.L8
.L2:
	sub	r3, fp, #12
	sub	r3, r3, #276
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L10+16
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #276
	strh	r2, [r3, #2]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-284]
	ldr	r3, .L10+8
	ldr	r3, [r3]
	sub	r1, fp, #288
	mov	r2, #16
	mov	r0, r3
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L10+20
	bl	puts
	mvn	r3, #0
	b	.L8
.L4:
	ldr	r0, .L10+24
	bl	puts
	ldr	r3, .L10+8
	ldr	r3, [r3]
	mov	r1, #5
	mov	r0, r3
	bl	listen
	mov	r3, #16
	str	r3, [fp, #-296]
	ldr	r3, .L10+8
	ldr	r3, [r3]
	sub	r2, fp, #296
	sub	r1, fp, #272
	mov	r0, r3
	bl	accept
	mov	r3, r0
	ldr	r2, .L10+28
	str	r3, [r2]
	sub	r3, fp, #256
	mov	r2, #0
	mov	r1, r3
	mov	r0, #23
	bl	sigaction
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L10+32
	bl	puts
	mvn	r3, #1
	b	.L8
.L5:
	ldr	r3, .L10+28
	ldr	r4, [r3]
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	mov	r1, #8
	mov	r0, r4
	bl	fcntl
.L7:
	ldr	r3, .L10+28
	ldr	r3, [r3]
	sub	r1, fp, #116
	mov	r2, #100
	mov	r0, r3
	bl	read
	str	r0, [fp, #-292]
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L10+36
	bl	puts
	mov	r3, #0
	b	.L8
.L6:
	sub	r2, fp, #116
	ldr	r3, [fp, #-292]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #116
	mov	r2, r3
	ldr	r1, [fp, #-292]
	ldr	r0, .L10+40
	bl	printf
	b	.L7
.L8:
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC6
	.word	sig_urg
	.word	listenfd
	.word	.LC0
	.word	6666
	.word	.LC1
	.word	.LC2
	.word	connfd
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.section	.rodata
	.align	2
.LC7:
	.ascii	"SIGURG received \000"
	.align	2
.LC8:
	.ascii	"read %d OOB byte: %s\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sig_urg
	.syntax unified
	.arm
	.fpu softvfp
	.type	sig_urg, %function
sig_urg:
	@ 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]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L14+4
	bl	puts
	ldr	r3, .L14+8
	ldr	r0, [r3]
	sub	r1, fp, #108
	mov	r3, #1
	mov	r2, #100
	bl	recv
	str	r0, [fp, #-112]
	sub	r2, fp, #108
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #108
	mov	r2, r3
	ldr	r1, [fp, #-112]
	ldr	r0, .L14+12
	bl	printf
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC9
	.word	.LC7
	.word	connfd
	.word	.LC8
	.size	sig_urg, .-sig_urg
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
