	.file	"extr_file_storage.c_open_backing_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"unable to open backing file: %s\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"invalid file type: %s\n"
.LC2:
	.string	"file not readable: %s\n"
.LC3:
	.string	"unable to find file size: %s\n"
.LC4:
	.string	"file too small: %s\n"
.LC5:
	.string	"open backing file: %s\n"
	.text
	.p2align 4
	.type	open_backing_file, @function
open_backing_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	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, 8
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	ebx, DWORD PTR [rdi]
	mov	esi, DWORD PTR O_LARGEFILE[rip]
	neg	r12d
	test	ebx, ebx
	je	.L34
.L2:
	or	esi, DWORD PTR O_RDONLY[rip]
	xor	edx, edx
	mov	rdi, r14
	call	filp_open@PLT
	mov	rbp, rax
.L3:
	mov	rdi, rbp
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L35
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR FMODE_WRITE[rip], eax
	mov	edx, 1
	mov	rax, QWORD PTR 16[rbp]
	cmove	ebx, edx
	test	rax, rax
	je	.L6
	mov	r15, QWORD PTR [rax]
	test	r15, r15
	je	.L6
	mov	edi, DWORD PTR 8[r15]
	call	S_ISBLK@PLT
	test	rax, rax
	jne	.L36
	mov	edi, DWORD PTR 8[r15]
	call	S_ISREG@PLT
	test	eax, eax
	je	.L6
.L8:
	mov	rax, QWORD PTR 8[rbp]
	test	rax, rax
	je	.L10
	cmp	QWORD PTR 24[rax], 0
	jne	.L11
	cmp	QWORD PTR 16[rax], 0
	je	.L10
.L11:
	cmp	QWORD PTR 8[rax], 0
	je	.L37
.L12:
	mov	rax, QWORD PTR [r15]
	mov	edi, DWORD PTR [rax]
	call	i_size_read@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L38
	mov	r15d, eax
	mov	eax, 1
	sar	r15d, 9
	cmp	QWORD PTR mod_data[rip], 0
	jne	.L39
	cmp	r15d, eax
	jl	.L40
.L15:
	mov	rdi, rbp
	call	get_file@PLT
	mov	DWORD PTR 4[r13], r12d
	mov	rdx, r14
	mov	rdi, r13
	mov	DWORD PTR 0[r13], ebx
	lea	rsi, .LC5[rip]
	xor	r12d, r12d
	mov	QWORD PTR 16[r13], rbp
	mov	DWORD PTR 8[r13], r15d
	call	LDBG@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, r14
	lea	rsi, .LC1[rip]
	mov	rdi, r13
	xor	eax, eax
	call	LINFO@PLT
.L9:
	mov	rax, QWORD PTR current[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR [rax]
	call	filp_close@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L34:
	.cfi_restore_state
	or	esi, DWORD PTR O_RDWR[rip]
	xor	edx, edx
	mov	rdi, r14
	call	filp_open@PLT
	mov	r15d, DWORD PTR EROFS[rip]
	mov	rdi, rax
	mov	rbp, rax
	neg	r15d
	call	PTR_ERR@PLT
	cmp	r15d, eax
	jne	.L3
	mov	esi, DWORD PTR O_LARGEFILE[rip]
	mov	ebx, 1
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rdi, r13
	mov	rdx, r14
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	LINFO@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, rbp
	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
	jmp	PTR_ERR@PLT
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	cmp	QWORD PTR [rax], 0
	mov	eax, 1
	cmove	ebx, eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L39:
	and	r15d, -4
	mov	eax, 1200
	cmp	r15d, eax
	jge	.L15
.L40:
	mov	rdx, r14
	lea	rsi, .LC4[rip]
	mov	rdi, r13
	xor	eax, eax
	call	LINFO@PLT
	mov	r12d, DWORD PTR ETOOSMALL[rip]
	neg	r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, r14
	lea	rsi, .LC2[rip]
	mov	rdi, r13
	xor	eax, eax
	call	LINFO@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edi, DWORD PTR 12[r15]
	call	bdev_read_only@PLT
	mov	edx, 1
	test	rax, rax
	cmovne	ebx, edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L38:
	mov	rdx, r14
	lea	rsi, .LC3[rip]
	mov	rdi, r13
	xor	eax, eax
	call	LINFO@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	open_backing_file, .-open_backing_file
	.comm	mod_data,8,8
	.comm	current,8,8
	.comm	O_RDWR,4,4
	.comm	O_RDONLY,4,4
	.comm	O_LARGEFILE,4,4
	.comm	FMODE_WRITE,4,4
	.comm	ETOOSMALL,4,4
	.comm	EROFS,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_file_storage.c_open_backing_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to open backing file: %s\012\000"
	.align	2
.LC1:
	.ascii	"invalid file type: %s\012\000"
	.align	2
.LC2:
	.ascii	"file not readable: %s\012\000"
	.align	2
.LC3:
	.ascii	"unable to find file size: %s\012\000"
	.align	2
.LC4:
	.ascii	"file too small: %s\012\000"
	.align	2
.LC5:
	.ascii	"open backing file: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_backing_file, %function
open_backing_file:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L40
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, [r0]
	ldr	r5, [r3]
	ldr	r9, .L40+4
	cmp	r8, #0
	mov	r6, r0
	mov	r7, r1
	ldr	r3, [r9]
	rsb	r5, r5, #0
	beq	.L34
.L2:
	ldr	r1, .L40+8
	mov	r2, #0
	ldr	r1, [r1]
	mov	r0, r7
	orr	r1, r3, r1
	bl	filp_open
	mov	r4, r0
.L3:
	mov	r0, r4
	bl	IS_ERR
	cmp	r0, #0
	bne	.L35
	ldr	r3, .L40+12
	ldr	r1, [r4]
	ldr	r2, [r3]
	ldr	r3, [r4, #8]
	tst	r1, r2
	moveq	r8, #1
	cmp	r3, #0
	beq	.L6
	ldr	r9, [r3]
	cmp	r9, #0
	beq	.L6
	ldr	r0, [r9, #4]
	bl	S_ISBLK
	cmp	r0, #0
	bne	.L36
	ldr	r0, [r9, #4]
	bl	S_ISREG
	cmp	r0, #0
	beq	.L6
.L8:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L10
	ldr	r2, [r3, #12]
	cmp	r2, #0
	bne	.L11
	ldr	r2, [r3, #8]
	cmp	r2, #0
	beq	.L10
.L11:
	ldr	r2, [r3, #4]
	cmp	r2, #0
	beq	.L37
.L12:
	ldr	r3, [r9]
	ldr	r0, [r3]
	bl	i_size_read
	subs	r5, r0, #0
	blt	.L38
	ldr	r3, .L40+16
	asr	r9, r5, #9
	ldr	r3, [r3]
	cmp	r3, #0
	movne	r3, #1200
	moveq	r3, #1
	bicne	r9, r9, #3
	cmp	r9, r3
	blt	.L39
	mov	r0, r4
	bl	get_file
	stmib	r6, {r5, r9}
	mov	r2, r7
	mov	r0, r6
	ldr	r1, .L40+20
	str	r8, [r6]
	str	r4, [r6, #12]
	bl	LDBG
	mov	r5, #0
	b	.L9
.L6:
	mov	r2, r7
	mov	r0, r6
	ldr	r1, .L40+24
	bl	LINFO
.L9:
	ldr	r3, .L40+28
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r1, [r3]
	bl	filp_close
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L34:
	ldr	r1, .L40+32
	mov	r2, r8
	ldr	r1, [r1]
	mov	r0, r7
	orr	r1, r3, r1
	bl	filp_open
	ldr	r3, .L40+36
	mov	r4, r0
	ldr	r10, [r3]
	bl	PTR_ERR
	rsb	r10, r10, #0
	cmp	r10, r0
	bne	.L3
	mov	r8, #1
	ldr	r3, [r9]
	b	.L2
.L35:
	mov	r2, r7
	mov	r0, r6
	ldr	r1, .L40+40
	bl	LINFO
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	PTR_ERR
.L37:
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r8, #1
	b	.L12
.L10:
	mov	r2, r7
	mov	r0, r6
	ldr	r1, .L40+44
	bl	LINFO
	b	.L9
.L39:
	mov	r2, r7
	mov	r0, r6
	ldr	r1, .L40+48
	bl	LINFO
	ldr	r3, .L40+52
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L9
.L36:
	ldr	r0, [r9, #8]
	bl	bdev_read_only
	cmp	r0, #0
	movne	r8, #1
	b	.L8
.L38:
	mov	r2, r7
	mov	r0, r6
	ldr	r1, .L40+56
	bl	LINFO
	b	.L9
.L41:
	.align	2
.L40:
	.word	EINVAL
	.word	O_LARGEFILE
	.word	O_RDONLY
	.word	FMODE_WRITE
	.word	mod_data
	.word	.LC5
	.word	.LC1
	.word	current
	.word	O_RDWR
	.word	EROFS
	.word	.LC0
	.word	.LC2
	.word	.LC4
	.word	ETOOSMALL
	.word	.LC3
	.size	open_backing_file, .-open_backing_file
	.comm	mod_data,4,4
	.comm	current,4,4
	.comm	O_RDWR,4,4
	.comm	O_RDONLY,4,4
	.comm	O_LARGEFILE,4,4
	.comm	FMODE_WRITE,4,4
	.comm	ETOOSMALL,4,4
	.comm	EROFS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
