	.file	"260903.c"
	.intel_syntax noprefix
	.text
	.globl	err_handler
	.type	err_handler, @function
err_handler:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rdx, QWORD PTR stderr[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	err_handler, .-err_handler
	.section	.rodata
.LC0:
	.string	"Usage : %s <port>\n"
.LC1:
	.string	"socket() error"
.LC2:
	.string	"bind() error"
.LC3:
	.string	"listen() error"
.LC4:
	.string	"accept() error"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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
	movabs	rax, 7299807708946654536
	movabs	rdx, 8237119364314134388
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	movabs	rax, 7956010533280442223
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -24[rbp], 561938023
	mov	WORD PTR -20[rbp], 33
	cmp	DWORD PTR -100[rbp], 2
	je	.L3
	mov	rax, QWORD PTR -112[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
.L3:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	err_handler
.L4:
	lea	rax, -80[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -80[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR -112[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 -78[rbp], ax
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC2[rip]
	call	err_handler
.L5:
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC3[rip]
	call	err_handler
.L6:
	mov	DWORD PTR -92[rbp], 16
	lea	rdx, -92[rbp]
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], -1
	jne	.L7
	lea	rdi, .LC4[rip]
	call	err_handler
.L7:
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	edx, 30
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -84[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -88[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	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
.LFE7:
	.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	"260903.c"
	.text
	.align	2
	.global	err_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	err_handler, %function
err_handler:
	@ 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, .L2
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
	ldr	r3, .L2
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.size	err_handler, .-err_handler
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage : %s <port>\012\000"
	.align	2
.LC2:
	.ascii	"socket() error\000"
	.align	2
.LC3:
	.ascii	"bind() error\000"
	.align	2
.LC4:
	.ascii	"listen() error\000"
	.align	2
.LC5:
	.ascii	"accept() error\000"
	.align	2
.LC0:
	.ascii	"Hello Network Programming~~!!\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 = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L12+4
	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
	ldr	r3, [fp, #-88]
	cmp	r3, #2
	beq	.L5
	ldr	r3, [fp, #-92]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+8
	bl	printf
	mvn	r0, #0
	bl	exit
.L5:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L12+12
	bl	err_handler
.L6:
	sub	r3, fp, #72
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-72]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-92]
	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, #-70]	@ movhi
	sub	r3, fp, #72
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-80]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L12+16
	bl	err_handler
.L7:
	mov	r1, #10
	ldr	r0, [fp, #-80]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L12+20
	bl	err_handler
.L8:
	mov	r3, #16
	str	r3, [fp, #-84]
	sub	r2, fp, #84
	sub	r3, fp, #56
	mov	r1, r3
	ldr	r0, [fp, #-80]
	bl	accept
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L12+24
	bl	err_handler
.L9:
	sub	r3, fp, #40
	mov	r2, #30
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	write
	ldr	r0, [fp, #-76]
	bl	close
	ldr	r0, [fp, #-80]
	bl	close
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
