	.file	"extr_platform.c_os_fread_mbs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	os_fread_mbs
	.type	os_fread_mbs, @function
os_fread_mbs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	xor	esi, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edx, DWORD PTR SEEK_END[rip]
	call	fseek@PLT
	mov	rdi, r13
	call	os_ftelli64@PLT
	mov	QWORD PTR [r14], 0
	mov	r12, rax
	test	rax, rax
	jne	.L10
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
.L10:
	.cfi_restore_state
	lea	rdi, 1[rax]
	call	bmalloc@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	xor	esi, esi
	mov	rdi, r13
	mov	rbp, rax
	call	fseek@PLT
	mov	rdx, r12
	mov	rcx, r13
	mov	esi, 1
	mov	rdi, rbp
	call	fread@PLT
	mov	r12, rax
	test	rax, rax
	je	.L8
	mov	BYTE PTR 0[rbp+rax], 0
	mov	rdx, r14
	mov	rsi, rax
	mov	rdi, rbp
	call	os_mbs_to_utf8_ptr@PLT
	mov	r12, rax
.L8:
	mov	rdi, rbp
	call	bfree@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
	.cfi_endproc
.LFE0:
	.size	os_fread_mbs, .-os_fread_mbs
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,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_platform.c_os_fread_mbs.c"
	.text
	.align	2
	.global	os_fread_mbs
	.syntax unified
	.arm
	.fpu softvfp
	.type	os_fread_mbs, %function
os_fread_mbs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r3, .L11
	mov	r6, r1
	ldr	r2, [r3]
	mov	r1, #0
	bl	fseek
	mov	r0, r5
	bl	os_ftelli64
	mov	r8, #0
	subs	r4, r0, #0
	str	r8, [r6]
	bne	.L10
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	add	r0, r4, #1
	bl	bmalloc
	mov	r7, r0
	ldr	r3, .L11+4
	mov	r1, r8
	ldr	r2, [r3]
	mov	r0, r5
	bl	fseek
	mov	r2, r4
	mov	r3, r5
	mov	r0, r7
	mov	r1, #1
	bl	fread
	subs	r4, r0, #0
	beq	.L8
	mov	r1, r4
	strb	r8, [r7, r4]
	mov	r2, r6
	mov	r0, r7
	bl	os_mbs_to_utf8_ptr
	mov	r4, r0
.L8:
	mov	r0, r7
	bl	bfree
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	SEEK_END
	.word	SEEK_SET
	.size	os_fread_mbs, .-os_fread_mbs
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
