	.file	"extr_tcp_inq.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"46p:"
.LC1:
	.string	"server socket"
.LC2:
	.string	"setsockopt(SO_REUSEADDR)"
.LC3:
	.string	"bind"
.LC4:
	.string	"listen"
.LC5:
	.string	"pthread_create"
.LC6:
	.string	"client socket"
.LC7:
	.string	"connect"
.LC8:
	.string	"setsockopt(TCP_INQ)"
.LC9:
	.string	"recvmsg"
.LC10:
	.string	"control message is truncated"
.LC11:
	.string	"unexpected inq: %d\n"
.LC12:
	.string	"PASSED\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rsi
	push	rbx
	.cfi_offset 3, -56
	mov	ebx, edi
	sub	rsp, 120
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR CMSG_SIZE[rip]
	mov	rcx, rsp
	mov	DWORD PTR -136[rbp], 1
	mov	r14, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L48:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L48
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L49
.L4:
	mov	QWORD PTR -152[rbp], rsp
	lea	r13, .LC0[rip]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, r13
	mov	rsi, r12
	mov	edi, ebx
	call	getopt@PLT
	mov	r15d, eax
	cmp	eax, -1
	je	.L50
	cmp	r15d, 54
	je	.L6
	cmp	r15d, 112
	je	.L7
	cmp	r15d, 52
	jne	.L8
	mov	DWORD PTR addr_len[rip], 4
	mov	eax, DWORD PTR PF_INET[rip]
	mov	DWORD PTR family[rip], eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR optarg[rip]
	call	atoi@PLT
	mov	DWORD PTR port[rip], eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	mov	DWORD PTR addr_len[rip], 4
	mov	eax, DWORD PTR PF_INET6[rip]
	mov	DWORD PTR family[rip], eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L50:
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	edi, DWORD PTR family[rip]
	xor	edx, edx
	call	socket@PLT
	mov	ebx, eax
	test	eax, eax
	js	.L51
.L11:
	mov	edi, DWORD PTR family[rip]
	lea	r12, -144[rbp]
	lea	r13, -136[rbp]
	mov	rsi, r12
	call	setup_loopback_addr@PLT
	mov	edx, DWORD PTR SO_REUSEADDR[rip]
	mov	rcx, r13
	mov	edi, ebx
	mov	rsi, QWORD PTR SOL_SOCKET[rip]
	mov	r8d, 4
	call	setsockopt@PLT
	test	rax, rax
	jne	.L52
.L12:
	mov	edx, DWORD PTR addr_len[rip]
	mov	rsi, r12
	mov	edi, ebx
	call	bind@PLT
	cmp	eax, -1
	je	.L53
.L13:
	mov	esi, 128
	mov	edi, ebx
	call	listen@PLT
	cmp	eax, -1
	je	.L54
.L14:
	mov	edx, DWORD PTR start_server[rip]
	xor	esi, esi
	movsx	rcx, ebx
	lea	rdi, -132[rbp]
	call	pthread_create@PLT
	test	rax, rax
	jne	.L55
.L15:
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	edi, DWORD PTR family[rip]
	xor	edx, edx
	call	socket@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L56
.L16:
	mov	edi, DWORD PTR family[rip]
	lea	rbx, -140[rbp]
	mov	rsi, rbx
	call	setup_loopback_addr@PLT
	mov	edx, DWORD PTR addr_len[rip]
	mov	rsi, rbx
	mov	edi, r12d
	call	connect@PLT
	cmp	eax, -1
	je	.L57
.L17:
	mov	edx, DWORD PTR TCP_INQ[rip]
	mov	rsi, QWORD PTR SOL_TCP[rip]
	mov	rcx, r13
	mov	edi, r12d
	mov	r8d, 4
	call	setsockopt@PLT
	test	rax, rax
	jne	.L58
.L18:
	lea	rax, -80[rbp]
	mov	edi, DWORD PTR BUF_SIZE[rip]
	mov	QWORD PTR -88[rbp], 0
	lea	rbx, -128[rbp]
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	mov	QWORD PTR -96[rbp], 0
	mov	DWORD PTR -128[rbp], 1
	mov	QWORD PTR -120[rbp], rax
	mov	DWORD PTR -112[rbp], r14d
	mov	DWORD PTR -108[rbp], 0
	call	malloc@PLT
	mov	edx, DWORD PTR BUF_SIZE[rip]
	mov	rsi, rbx
	mov	edi, r12d
	mov	QWORD PTR -80[rbp], rax
	mov	r13, rax
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	xor	edx, edx
	sar	eax
	mov	DWORD PTR -72[rbp], eax
	call	recvmsg@PLT
	cmp	eax, DWORD PTR -72[rbp]
	je	.L19
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC9[rip]
	mov	edi, 1
	call	error@PLT
.L19:
	mov	eax, DWORD PTR -108[rbp]
	test	DWORD PTR MSG_CTRUNC[rip], eax
	jne	.L59
.L20:
	mov	rdi, rbx
	call	CMSG_FIRSTHDR@PLT
	mov	rsi, rax
	test	rax, rax
	jne	.L23
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, rbx
	call	CMSG_NXTHDR@PLT
	mov	rsi, rax
	test	rax, rax
	je	.L21
.L23:
	mov	rax, QWORD PTR SOL_TCP[rip]
	cmp	QWORD PTR [rsi], rax
	jne	.L22
	mov	rax, QWORD PTR TCP_CM_INQ[rip]
	cmp	QWORD PTR 8[rsi], rax
	jne	.L22
	mov	rdi, rsi
	mov	QWORD PTR -152[rbp], rsi
	call	CMSG_DATA@PLT
	mov	rsi, QWORD PTR -152[rbp]
	mov	r15d, DWORD PTR [rax]
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L21:
	mov	eax, DWORD PTR BUF_SIZE[rip]
	sub	eax, DWORD PTR -72[rbp]
	cmp	eax, r15d
	je	.L24
	mov	edi, DWORD PTR stderr[rip]
	mov	edx, r15d
	lea	rsi, .LC11[rip]
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	lea	rdi, .LC12[rip]
	call	printf@PLT
	mov	rdi, r13
	call	free@PLT
	mov	edi, r12d
	call	close@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L60
	lea	rsp, -40[rbp]
	xor	eax, eax
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L59:
	.cfi_restore_state
	lea	rdx, .LC10[rip]
	xor	esi, esi
	mov	edi, 1
	call	error@PLT
	jmp	.L20
.L58:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC8[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L18
.L55:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC5[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L15
.L52:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC2[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L12
.L51:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC1[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L11
.L56:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC6[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L16
.L57:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC7[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L17
.L54:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC4[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L14
.L53:
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC3[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L13
.L49:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L60:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	stderr,4,4
	.comm	start_server,4,4
	.comm	port,4,4
	.comm	optarg,4,4
	.comm	family,4,4
	.comm	errno,4,4
	.comm	addr_len,4,4
	.comm	TCP_INQ,4,4
	.comm	TCP_CM_INQ,8,8
	.comm	SO_REUSEADDR,4,4
	.comm	SOL_TCP,8,8
	.comm	SOL_SOCKET,8,8
	.comm	SOCK_STREAM,4,4
	.comm	PF_INET6,4,4
	.comm	PF_INET,4,4
	.comm	MSG_CTRUNC,4,4
	.comm	CMSG_SIZE,4,4
	.comm	BUF_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tcp_inq.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"46p:\000"
	.align	2
.LC1:
	.ascii	"server socket\000"
	.align	2
.LC2:
	.ascii	"setsockopt(SO_REUSEADDR)\000"
	.align	2
.LC3:
	.ascii	"bind\000"
	.align	2
.LC4:
	.ascii	"listen\000"
	.align	2
.LC5:
	.ascii	"pthread_create\000"
	.align	2
.LC6:
	.ascii	"client socket\000"
	.align	2
.LC7:
	.ascii	"connect\000"
	.align	2
.LC8:
	.ascii	"setsockopt(TCP_INQ)\000"
	.align	2
.LC9:
	.ascii	"recvmsg\000"
	.align	2
.LC10:
	.ascii	"control message is truncated\000"
	.align	2
.LC11:
	.ascii	"unexpected inq: %d\012\000"
	.align	2
.LC12:
	.ascii	"PASSED\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC13:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #76
	mov	r2, #1
	mov	r6, r0
	mov	r5, r1
	ldr	r3, .L53
	ldr	r8, .L53+4
	ldr	r3, [r3]
	ldr	r9, .L53+8
	str	r3, [fp, #-96]
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L53+12
	ldr	r7, .L53+16
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r10, .L53+20
	add	r3, sp, #8
	str	r3, [fp, #-100]
	str	r2, [fp, #-84]
.L5:
	mov	r2, r7
	mov	r1, r5
	mov	r0, r6
	bl	getopt
	cmn	r0, #1
	beq	.L42
	cmp	r0, #54
	beq	.L3
	cmp	r0, #112
	beq	.L4
	cmp	r0, #52
	bne	.L5
	mov	r2, #4
	ldr	r3, .L53+24
	str	r2, [r9]
	ldr	r3, [r3]
	str	r3, [r8]
	b	.L5
.L4:
	ldr	r3, .L53+28
	ldr	r0, [r3]
	bl	atoi
	ldr	r3, .L53+32
	str	r0, [r3]
	b	.L5
.L3:
	mov	r2, #4
	ldr	r3, [r10]
	str	r2, [r9]
	str	r3, [r8]
	b	.L5
.L42:
	ldr	r6, .L53+36
	mov	r4, r0
	mov	r2, #0
	ldr	r1, [r6]
	ldr	r0, [r8]
	bl	socket
	subs	r5, r0, #0
	blt	.L43
.L8:
	sub	r1, fp, #92
	ldr	r0, [r8]
	bl	setup_loopback_addr
	mov	r1, #4
	ldr	r3, .L53+40
	ldr	r2, .L53+44
	str	r1, [sp]
	ldr	r1, [r3]
	mov	r0, r5
	ldr	r2, [r2]
	sub	r3, fp, #84
	bl	setsockopt
	cmp	r0, #0
	bne	.L44
.L9:
	mov	r0, r5
	ldr	r2, [r9]
	sub	r1, fp, #92
	bl	bind
	cmn	r0, #1
	beq	.L45
.L10:
	mov	r1, #128
	mov	r0, r5
	bl	listen
	cmn	r0, #1
	beq	.L46
.L11:
	ldr	r2, .L53+48
	mov	r3, r5
	mov	r1, #0
	ldr	r2, [r2]
	sub	r0, fp, #80
	bl	pthread_create
	cmp	r0, #0
	bne	.L47
.L12:
	mov	r2, #0
	ldr	r1, [r6]
	ldr	r0, [r8]
	bl	socket
	subs	r5, r0, #0
	blt	.L48
.L13:
	sub	r1, fp, #88
	ldr	r0, [r8]
	bl	setup_loopback_addr
	mov	r0, r5
	ldr	r2, [r9]
	sub	r1, fp, #88
	bl	connect
	cmn	r0, #1
	beq	.L49
.L14:
	mov	r1, #4
	ldr	r2, .L53+52
	ldr	r6, .L53+56
	str	r1, [sp]
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r6]
	sub	r3, fp, #84
	bl	setsockopt
	cmp	r0, #0
	bne	.L50
.L15:
	mov	r2, #0
	mov	r9, #1
	ldr	r7, .L53+60
	ldr	r1, [fp, #-100]
	ldr	r10, [r7]
	str	r1, [fp, #-72]
	ldr	r1, [fp, #-96]
	sub	r3, fp, #48
	mov	r0, r10
	str	r3, [fp, #-60]
	str	r1, [fp, #-68]
	str	r2, [fp, #-52]
	str	r2, [fp, #-56]
	str	r2, [fp, #-64]
	str	r9, [fp, #-76]
	bl	malloc
	mov	r8, r0
	add	r10, r10, r10, lsr #31
	mov	r2, #0
	mov	r0, r5
	asr	r10, r10, r9
	sub	r1, fp, #76
	str	r10, [fp, #-44]
	str	r8, [fp, #-48]
	bl	recvmsg
	ldr	r3, [fp, #-44]
	cmp	r0, r3
	beq	.L16
	ldr	r3, .L53+64
	mov	r0, r9
	ldr	r1, [r3]
	ldr	r2, .L53+68
	bl	error
.L16:
	ldr	r3, .L53+72
	ldr	r2, [fp, #-64]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L51
.L17:
	sub	r0, fp, #76
	bl	CMSG_FIRSTHDR
	subs	r1, r0, #0
	beq	.L18
	ldr	r9, .L53+76
	b	.L20
.L19:
	sub	r0, fp, #76
	bl	CMSG_NXTHDR
	subs	r1, r0, #0
	beq	.L18
.L20:
	ldr	r2, [r1]
	ldr	r3, [r6]
	cmp	r2, r3
	bne	.L19
	ldr	r2, [r1, #4]
	ldr	r3, [r9]
	cmp	r2, r3
	bne	.L19
	mov	r0, r1
	str	r1, [fp, #-96]
	bl	CMSG_DATA
	ldr	r1, [fp, #-96]
	ldr	r4, [r0]
	b	.L19
.L18:
	ldr	r3, [r7]
	ldr	r2, [fp, #-44]
	sub	r3, r3, r2
	cmp	r3, r4
	beq	.L21
	ldr	r3, .L53+80
	mov	r2, r4
	ldr	r0, [r3]
	ldr	r1, .L53+84
	bl	fprintf
	mov	r0, #1
	bl	exit
.L21:
	ldr	r0, .L53+88
	bl	printf
	mov	r0, r8
	bl	free
	mov	r0, r5
	bl	close
	ldr	r3, .L53+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L52
	mov	r0, #0
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L51:
	mov	r1, #0
	ldr	r2, .L53+92
	mov	r0, #1
	bl	error
	b	.L17
.L50:
	ldr	r3, .L53+64
	ldr	r2, .L53+96
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L15
.L47:
	ldr	r3, .L53+64
	ldr	r2, .L53+100
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L12
.L44:
	ldr	r3, .L53+64
	ldr	r2, .L53+104
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L9
.L48:
	ldr	r3, .L53+64
	ldr	r2, .L53+108
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L13
.L43:
	ldr	r3, .L53+64
	ldr	r2, .L53+112
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L8
.L49:
	ldr	r3, .L53+64
	ldr	r2, .L53+116
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L14
.L46:
	ldr	r3, .L53+64
	ldr	r2, .L53+120
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L11
.L45:
	ldr	r3, .L53+64
	ldr	r2, .L53+124
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L10
.L52:
	bl	__stack_chk_fail
.L54:
	.align	2
.L53:
	.word	CMSG_SIZE
	.word	family
	.word	addr_len
	.word	.LC13
	.word	.LC0
	.word	PF_INET6
	.word	PF_INET
	.word	optarg
	.word	port
	.word	SOCK_STREAM
	.word	SOL_SOCKET
	.word	SO_REUSEADDR
	.word	start_server
	.word	TCP_INQ
	.word	SOL_TCP
	.word	BUF_SIZE
	.word	errno
	.word	.LC9
	.word	MSG_CTRUNC
	.word	TCP_CM_INQ
	.word	stderr
	.word	.LC11
	.word	.LC12
	.word	.LC10
	.word	.LC8
	.word	.LC5
	.word	.LC2
	.word	.LC6
	.word	.LC1
	.word	.LC7
	.word	.LC4
	.word	.LC3
	.size	main, .-main
	.comm	stderr,4,4
	.comm	start_server,4,4
	.comm	port,4,4
	.comm	optarg,4,4
	.comm	family,4,4
	.comm	errno,4,4
	.comm	addr_len,4,4
	.comm	TCP_INQ,4,4
	.comm	TCP_CM_INQ,4,4
	.comm	SO_REUSEADDR,4,4
	.comm	SOL_TCP,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,4,4
	.comm	PF_INET6,4,4
	.comm	PF_INET,4,4
	.comm	MSG_CTRUNC,4,4
	.comm	CMSG_SIZE,4,4
	.comm	BUF_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
