	.file	"531863.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Failed to create socket"
	.align 8
.LC1:
	.string	"Successfully bound to socket %d\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, 16
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	bind_open_port
	mov	WORD PTR -6[rbp], ax
	movzx	eax, WORD PTR -6[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC2:
	.string	"Port %d is in use\n"
.LC3:
	.string	"Failed to bind"
.LC4:
	.string	"Unable to find a valid port"
	.text
	.type	bind_open_port, @function
bind_open_port:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -34[rbp], 8081
	jmp	.L5
.L10:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	movzx	eax, WORD PTR -34[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jne	.L6
	movzx	eax, WORD PTR -34[rbp]
	jmp	.L11
.L6:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 98
	jne	.L8
	movzx	eax, WORD PTR -34[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L8:
	lea	rdi, .LC3[rip]
	call	perror@PLT
.L9:
	movzx	eax, WORD PTR -34[rbp]
	add	eax, 1
	mov	WORD PTR -34[rbp], ax
.L5:
	cmp	WORD PTR -34[rbp], 8090
	jbe	.L10
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L11:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bind_open_port, .-bind_open_port
	.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	"531863.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Failed to create socket\000"
	.align	2
.LC1:
	.ascii	"Successfully bound to socket %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, [fp, #-8]
	bl	bind_open_port
	mov	r3, r0
	strh	r3, [fp, #-10]	@ movhi
	ldrh	r3, [fp, #-10]
	mov	r1, r3
	ldr	r0, .L4+4
	bl	printf
	ldr	r0, [fp, #-8]
	bl	close
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Port %d is in use\012\000"
	.align	2
.LC3:
	.ascii	"Failed to bind\000"
	.align	2
.LC4:
	.ascii	"Unable to find a valid port\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bind_open_port, %function
bind_open_port:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	strh	r3, [fp, #-26]	@ movhi
	b	.L7
.L12:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	ldrh	r3, [fp, #-26]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	ldrh	r3, [fp, #-26]
	b	.L13
.L8:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #98
	bne	.L10
	ldrh	r3, [fp, #-26]
	mov	r1, r3
	ldr	r0, .L15+8
	bl	printf
	b	.L11
.L10:
	ldr	r0, .L15+12
	bl	perror
.L11:
	ldrh	r3, [fp, #-26]
	add	r3, r3, #1
	strh	r3, [fp, #-26]	@ movhi
.L7:
	ldrh	r3, [fp, #-26]
	ldr	r2, .L15+16
	cmp	r3, r2
	bls	.L12
	ldr	r0, .L15+20
	bl	printf
	mov	r3, #0
.L13:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC5
	.word	8081
	.word	.LC2
	.word	.LC3
	.word	8090
	.word	.LC4
	.size	bind_open_port, .-bind_open_port
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
