	.file	"47365.c"
	.intel_syntax noprefix
	.text
	.globl	acpt_sock
	.bss
	.align 4
	.type	acpt_sock, @object
	.size	acpt_sock, 4
acpt_sock:
	.zero	4
	.globl	recv_sock
	.align 4
	.type	recv_sock, @object
	.size	recv_sock, 4
recv_sock:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Usage : %s <port>\n"
.LC1:
	.string	"bind() error"
	.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, 272
	mov	DWORD PTR -260[rbp], edi
	mov	QWORD PTR -272[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -260[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rax, urg_handler[rip]
	mov	QWORD PTR -208[rbp], rax
	lea	rax, -208[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -72[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR acpt_sock[rip], eax
	lea	rax, -240[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -240[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -236[rbp], eax
	mov	rax, QWORD PTR -272[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -238[rbp], ax
	mov	eax, DWORD PTR acpt_sock[rip]
	lea	rcx, -240[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	error_handling
.L3:
	mov	eax, DWORD PTR acpt_sock[rip]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -252[rbp], 16
	mov	eax, DWORD PTR acpt_sock[rip]
	lea	rdx, -252[rbp]
	lea	rcx, -224[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR recv_sock[rip], eax
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR recv_sock[rip]
	mov	esi, 8
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	lea	rax, -208[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 23
	call	sigaction@PLT
	mov	DWORD PTR -248[rbp], eax
	jmp	.L4
.L6:
	cmp	DWORD PTR -244[rbp], -1
	jne	.L5
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -244[rbp]
	cdqe
	mov	BYTE PTR -48[rbp+rax], 0
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	puts@PLT
.L4:
	mov	eax, DWORD PTR recv_sock[rip]
	lea	rsi, -48[rbp]
	mov	ecx, 0
	mov	edx, 30
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -244[rbp], eax
	cmp	DWORD PTR -244[rbp], 0
	jne	.L6
	mov	eax, DWORD PTR recv_sock[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR acpt_sock[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC2:
	.string	"Urgent message : %s\n"
	.text
	.globl	urg_handler
	.type	urg_handler, @function
urg_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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR recv_sock[rip]
	lea	rsi, -48[rbp]
	mov	ecx, 1
	mov	edx, 29
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	BYTE PTR -48[rbp+rax], 0
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	urg_handler, .-urg_handler
	.section	.rodata
.LC3:
	.string	"%s\n"
	.text
	.globl	error_handling
	.type	error_handling, @function
error_handling:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	error_handling, .-error_handling
	.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	"47365.c"
	.text
	.comm	acpt_sock,4,4
	.comm	recv_sock,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage : %s <port>\012\000"
	.align	2
.LC1:
	.ascii	"bind() error\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #236
	str	r0, [fp, #-240]
	str	r1, [fp, #-244]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-240]
	cmp	r3, #2
	beq	.L2
	ldr	r3, [fp, #-244]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L9+4
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, .L9+8
	str	r3, [fp, #-188]
	sub	r3, fp, #188
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	mov	r3, r0
	ldr	r2, .L9+12
	str	r3, [r2]
	sub	r3, fp, #220
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-220]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-216]
	ldr	r3, [fp, #-244]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-218]	@ movhi
	ldr	r3, .L9+12
	ldr	r3, [r3]
	sub	r1, fp, #220
	mov	r2, #16
	mov	r0, r3
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L9+16
	bl	error_handling
.L3:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	mov	r1, #5
	mov	r0, r3
	bl	listen
	mov	r3, #16
	str	r3, [fp, #-232]
	ldr	r3, .L9+12
	ldr	r3, [r3]
	sub	r2, fp, #232
	sub	r1, fp, #204
	mov	r0, r3
	bl	accept
	mov	r3, r0
	ldr	r2, .L9+20
	str	r3, [r2]
	ldr	r3, .L9+20
	ldr	r4, [r3]
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	mov	r1, #8
	mov	r0, r4
	bl	fcntl
	sub	r3, fp, #188
	mov	r2, #0
	mov	r1, r3
	mov	r0, #23
	bl	sigaction
	str	r0, [fp, #-228]
	b	.L4
.L6:
	ldr	r3, [fp, #-224]
	cmn	r3, #1
	bne	.L5
	b	.L4
.L5:
	sub	r2, fp, #48
	ldr	r3, [fp, #-224]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #48
	mov	r0, r3
	bl	puts
.L4:
	ldr	r3, .L9+20
	ldr	r0, [r3]
	sub	r1, fp, #48
	mov	r3, #0
	mov	r2, #30
	bl	recv
	str	r0, [fp, #-224]
	ldr	r3, [fp, #-224]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L9+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L9+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC2
	.word	.LC0
	.word	urg_handler
	.word	acpt_sock
	.word	.LC1
	.word	recv_sock
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Urgent message : %s\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	urg_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	urg_handler, %function
urg_handler:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L13+4
	ldr	r0, [r3]
	sub	r1, fp, #40
	mov	r3, #1
	mov	r2, #29
	bl	recv
	str	r0, [fp, #-44]
	sub	r2, fp, #40
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L13+8
	bl	printf
	nop
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC4
	.word	recv_sock
	.word	.LC3
	.size	urg_handler, .-urg_handler
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%s\012\000"
	.text
	.align	2
	.global	error_handling
	.syntax unified
	.arm
	.fpu softvfp
	.type	error_handling, %function
error_handling:
	@ 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	r3, .L16
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L16+4
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L17:
	.align	2
.L16:
	.word	stderr
	.word	.LC5
	.size	error_handling, .-error_handling
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
