	.file	"extr_wasm.c_consume_str_r.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	consume_str_r, @function
consume_str_r:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	r_buf_tell@PLT
	test	rbp, rbp
	je	.L7
	mov	rdi, rbp
	mov	rbx, rax
	call	r_buf_size@PLT
	cmp	rax, r12
	jle	.L7
	cmp	rbx, r12
	jg	.L7
	lea	rax, -1[rbx+r13]
	cmp	rax, r12
	ja	.L7
	test	r13, r13
	jne	.L9
	mov	BYTE PTR [r14], 0
	.p2align 4,,10
	.p2align 3
.L7:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rax, QWORD PTR R_BIN_WASM_STRING_LENGTH[rip]
	mov	rsi, r13
	lea	rdi, -1[rax]
	call	R_MIN@PLT
	mov	rsi, r14
	mov	rdi, rbp
	mov	edx, eax
	call	r_buf_read@PLT
	mov	rax, r13
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	consume_str_r, .-consume_str_r
	.comm	R_BIN_WASM_STRING_LENGTH,8,8
	.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_wasm.c_consume_str_r.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	consume_str_r, %function
consume_str_r:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r5, r1
	mov	r7, r2
	mov	r8, r3
	bl	r_buf_tell
	cmp	r4, #0
	beq	.L4
	mov	r6, r0
	mov	r0, r4
	bl	r_buf_size
	cmp	r6, r5
	movle	r2, #0
	movgt	r2, #1
	cmp	r0, r5
	orrle	r2, r2, #1
	cmp	r2, #0
	beq	.L8
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	sub	r0, r7, #1
	add	r0, r0, r6
	cmp	r0, r5
	bhi	.L4
	cmp	r7, #0
	bne	.L9
	mov	r0, r7
	strb	r7, [r8]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r3, .L10
	mov	r1, r7
	ldr	r0, [r3]
	sub	r0, r0, #1
	bl	R_MIN
	mov	r1, r8
	mov	r2, r0
	mov	r0, r4
	bl	r_buf_read
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	.align	2
.L10:
	.word	R_BIN_WASM_STRING_LENGTH
	.size	consume_str_r, .-consume_str_r
	.comm	R_BIN_WASM_STRING_LENGTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
