	.file	"extr_cloudabi64_sock.c_cloudabi64_sys_sock_send.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cloudabi64_sys_sock_send
	.type	cloudabi64_sys_sock_send, @function
cloudabi64_sys_sock_send:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	edx, 32
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 120
	.cfi_def_cfa_offset 176
	mov	QWORD PTR 8[rsp], rdi
	mov	rdi, QWORD PTR 8[r13]
	lea	rsi, 32[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 16[rsp], 0
	call	copyin@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L1
	mov	rdi, QWORD PTR 32[rsp]
	cmp	rdi, QWORD PTR UIO_MAXIOV[rip]
	mov	r8d, DWORD PTR EINVAL[rip]
	jbe	.L11
.L1:
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 120
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	ecx, DWORD PTR M_WAITOK[rip]
	mov	edx, DWORD PTR M_SOCKET[rip]
	mov	esi, 16
	call	mallocarray@PLT
	mov	edi, DWORD PTR 56[rsp]
	mov	r15, rax
	call	TO_PTR@PLT
	cmp	QWORD PTR 32[rsp], 0
	je	.L4
	mov	rbp, rax
	mov	rbx, r15
	lea	r14, 64[rsp]
	xor	r12d, r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 84[rsp]
	add	r12, 1
	add	rbp, 32
	add	rbx, 16
	call	TO_PTR@PLT
	mov	QWORD PTR -8[rbx], rax
	mov	eax, DWORD PTR 80[rsp]
	mov	DWORD PTR -16[rbx], eax
	cmp	QWORD PTR 32[rsp], r12
	jbe	.L4
.L6:
	mov	edx, 32
	mov	rsi, r14
	mov	rdi, rbp
	call	copyin@PLT
	test	eax, eax
	je	.L5
	mov	esi, DWORD PTR M_SOCKET[rip]
	mov	rdi, r15
	mov	DWORD PTR 8[rsp], eax
	call	free@PLT
	mov	r8d, DWORD PTR 8[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR 44[rsp]
	mov	ebx, DWORD PTR 40[rsp]
	call	TO_PTR@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 184
	mov	esi, DWORD PTR 4[r13]
	mov	rdx, r15
	mov	r8, rax
	lea	rax, 32[rsp]
	mov	r9d, ebx
	push	rax
	.cfi_def_cfa_offset 192
	mov	rcx, QWORD PTR 48[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	call	cloudabi_sock_send@PLT
	mov	esi, DWORD PTR M_SOCKET[rip]
	mov	rdi, r15
	mov	DWORD PTR 24[rsp], eax
	call	free@PLT
	pop	rax
	.cfi_def_cfa_offset 184
	pop	rdx
	.cfi_def_cfa_offset 176
	mov	r8d, DWORD PTR 8[rsp]
	test	r8d, r8d
	jne	.L1
	mov	rax, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR 0[r13]
	lea	rdi, 16[rsp]
	mov	edx, 8
	mov	QWORD PTR 16[rsp], rax
	call	copyout@PLT
	mov	r8d, eax
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cloudabi64_sys_sock_send, .-cloudabi64_sys_sock_send
	.comm	UIO_MAXIOV,8,8
	.comm	M_WAITOK,4,4
	.comm	M_SOCKET,4,4
	.comm	EINVAL,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_cloudabi64_sock.c_cloudabi64_sys_sock_send.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cloudabi64_sys_sock_send
	.syntax unified
	.arm
	.fpu softvfp
	.type	cloudabi64_sys_sock_send, %function
cloudabi64_sys_sock_send:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L15
	sub	sp, sp, #92
	mov	r7, r1
	mov	r8, r0
	mov	r2, #24
	ldr	r0, [r1, #8]
	add	r1, sp, #36
	ldr	ip, [ip]
	str	ip, [sp, #84]
	mov	ip,#0
	str	r3, [sp, #28]
	bl	copyin
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, .L15+4
	ldr	r0, [sp, #36]
	ldr	r3, [r3]
	cmp	r0, r3
	bls	.L3
	ldr	r3, .L15+8
	ldr	r4, [r3]
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #84]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #92
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r3, .L15+12
	ldr	r10, .L15+16
	ldr	r3, [r3]
	mov	r1, #8
	ldr	r2, [r10]
	bl	mallocarray
	mov	r6, r0
	ldr	r0, [sp, #56]
	bl	TO_PTR
	ldr	r3, [sp, #36]
	cmp	r3, #0
	beq	.L4
	mov	r5, r0
	mov	fp, r4
	add	r9, r6, #4
	b	.L6
.L5:
	ldr	r0, [sp, #76]
	bl	TO_PTR
	ldr	r2, [sp, #72]
	ldr	r3, [sp, #36]
	str	r0, [r9, fp, lsl #3]
	str	r2, [r6, fp, lsl #3]
	add	fp, fp, #1
	cmp	r3, fp
	add	r5, r5, #24
	bls	.L4
.L6:
	mov	r2, #24
	mov	r0, r5
	add	r1, sp, #60
	bl	copyin
	subs	r4, r0, #0
	beq	.L5
	mov	r0, r6
	ldr	r1, [r10]
	bl	free
	b	.L1
.L4:
	ldr	r0, [sp, #44]
	ldr	r4, [r7, #4]
	str	r3, [sp, #20]
	bl	TO_PTR
	ldr	ip, [sp, #40]
	add	r2, sp, #32
	mov	r1, r4
	ldr	r3, [sp, #20]
	str	r0, [sp]
	str	ip, [sp, #4]
	str	r2, [sp, #8]
	mov	r0, r8
	mov	r2, r6
	bl	cloudabi_sock_send
	mov	r4, r0
	ldr	r1, [r10]
	mov	r0, r6
	bl	free
	cmp	r4, #0
	bne	.L1
	ldr	r3, [sp, #32]
	mov	r2, #4
	ldr	r1, [r7]
	add	r0, sp, #28
	str	r3, [sp, #28]
	bl	copyout
	mov	r4, r0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC0
	.word	UIO_MAXIOV
	.word	EINVAL
	.word	M_WAITOK
	.word	M_SOCKET
	.size	cloudabi64_sys_sock_send, .-cloudabi64_sys_sock_send
	.comm	UIO_MAXIOV,4,4
	.comm	M_WAITOK,4,4
	.comm	M_SOCKET,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
