	.file	"extr_35161.c_send_fd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	send_fd
	.type	send_fd, @function
send_fd:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	mov	r12d, edi
	mov	edi, 4
	sub	rsp, 88
	mov	DWORD PTR -100[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	call	CMSG_SPACE@PLT
	mov	rcx, rsp
	cdqe
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L13:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L13
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L14
.L4:
	lea	r14, -80[rbp]
	xor	esi, esi
	mov	edx, 32
	mov	BYTE PTR -41[rbp], 0
	lea	rax, -41[rbp]
	mov	rdi, r14
	mov	DWORD PTR -88[rbp], 1
	mov	QWORD PTR -96[rbp], rax
	call	memset@PLT
	lea	rax, -96[rbp]
	mov	edi, 4
	mov	DWORD PTR -80[rbp], 1
	mov	QWORD PTR -56[rbp], rax
	mov	QWORD PTR -64[rbp], rsp
	call	CMSG_LEN@PLT
	mov	rdi, r14
	mov	QWORD PTR -72[rbp], rax
	call	CMSG_FIRSTHDR@PLT
	mov	edi, 4
	mov	r13, rax
	call	CMSG_LEN@PLT
	mov	rdi, r13
	mov	QWORD PTR 8[r13], rax
	mov	eax, DWORD PTR SOL_SOCKET[rip]
	mov	DWORD PTR 4[r13], eax
	mov	eax, DWORD PTR SCM_RIGHTS[rip]
	mov	DWORD PTR 0[r13], eax
	call	CMSG_DATA@PLT
	lea	rsi, -100[rbp]
	mov	edx, 4
	mov	edi, eax
	call	memmove@PLT
	xor	edx, edx
	mov	rsi, r14
	mov	edi, r12d
	call	sendmsg@PLT
	cmp	DWORD PTR -88[rbp], eax
	jne	.L7
	mov	edi, r12d
	call	close@PLT
	xor	eax, eax
.L1:
	mov	rsi, QWORD PTR -40[rbp]
	xor	rsi, QWORD PTR fs:40
	jne	.L15
	lea	rsp, -24[rbp]
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, -1
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	send_fd, .-send_fd
	.comm	SOL_SOCKET,4,4
	.comm	SCM_RIGHTS,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_35161.c_send_fd.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	send_fd
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_fd, %function
send_fd:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #44
	ldr	r3, .L8
	str	r1, [fp, #-56]
	mov	r6, r0
	mov	r0, #4
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	bl	CMSG_SPACE
	mov	r5, #0
	mov	r2, #1
	add	r3, r0, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	sub	r1, fp, #28
	sub	r3, fp, #52
	mov	r0, #4
	str	r1, [fp, #-52]
	str	r2, [fp, #-48]
	str	r2, [fp, #-44]
	str	r3, [fp, #-32]
	str	sp, [fp, #-36]
	strb	r5, [fp, #-28]
	str	r5, [fp, #-40]
	bl	CMSG_LEN
	mov	r3, r0
	sub	r0, fp, #44
	str	r3, [fp, #-40]
	bl	CMSG_FIRSTHDR
	mov	r4, r0
	mov	r0, #4
	bl	CMSG_LEN
	ldr	r2, .L8+4
	ldr	r3, .L8+8
	ldr	r2, [r2]
	ldr	r3, [r3]
	str	r0, [r4, #8]
	str	r3, [r4]
	str	r2, [r4, #4]
	mov	r0, r4
	bl	CMSG_DATA
	mov	r2, #4
	sub	r1, fp, #56
	bl	memmove
	mov	r2, r5
	mov	r0, r6
	sub	r1, fp, #44
	bl	sendmsg
	ldr	r3, [fp, #-48]
	cmp	r3, r0
	bne	.L4
	mov	r0, r6
	bl	close
	mov	r0, r5
.L1:
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L4:
	mvn	r0, #0
	b	.L1
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	SOL_SOCKET
	.word	SCM_RIGHTS
	.size	send_fd, .-send_fd
	.comm	SOL_SOCKET,4,4
	.comm	SCM_RIGHTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
