	.file	"extr_splitfs.c_splitfs_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	".split"
.LC1:
	.string	"%s.split"
.LC2:
	.string	"splitfs_open: stat failed\n"
.LC3:
	.string	"splitfs_open: not a file\n"
	.text
	.p2align 4
	.type	splitfs_open, @function
splitfs_open:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR F_READ[rip]
	cmp	QWORD PTR [rsi], rax
	je	.L2
	mov	eax, DWORD PTR EPERM[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L38
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L2:
	.cfi_restore_state
	mov	rbx, rsi
	mov	esi, 46
	mov	r12, rdi
	call	strrchr@PLT
	mov	rsi, rax
	test	rax, rax
	je	.L4
	mov	ecx, 7
	lea	rdi, .LC0[rip]
	repz cmpsb
	seta	al
	sbb	al, 0
	test	al, al
	je	.L36
.L4:
	mov	rdi, r12
	call	strlen@PLT
	lea	edi, 7[rax]
	call	malloc@PLT
	mov	rdx, r12
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	rbp, rax
	call	sprintf@PLT
	mov	esi, DWORD PTR O_RDONLY[rip]
	mov	rdi, rbp
	call	open@PLT
	mov	rdi, rbp
	mov	r13d, eax
	call	free@PLT
	cmp	r13d, -1
	je	.L36
	lea	rsi, 20[rsp]
	mov	edi, r13d
	call	fstat@PLT
	test	rax, rax
	js	.L39
	mov	edi, DWORD PTR 20[rsp]
	call	S_ISREG@PLT
	test	eax, eax
	je	.L40
	mov	edi, 24
	call	malloc@PLT
	mov	esi, 24
	mov	rdi, rax
	mov	rbp, rax
	call	bzero@PLT
	mov	edi, DWORD PTR CONF_BUF[rip]
	call	malloc@PLT
	mov	r12, rax
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR CONF_BUF[rip]
	mov	edx, r13d
	mov	rdi, r12
	call	fgetstr@PLT
	test	rax, rax
	jle	.L16
	movsx	edi, BYTE PTR [r12]
	mov	r14, r12
	test	dil, dil
	jne	.L17
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L10:
	movsx	edi, BYTE PTR 1[r14]
	add	r14, 1
	test	dil, dil
	je	.L34
.L17:
	call	isspace@PLT
	test	rax, rax
	je	.L10
	cmp	BYTE PTR [r14], 0
	je	.L34
	movsx	edi, BYTE PTR 1[r14]
	mov	BYTE PTR [r14], 0
	lea	r15, 1[r14]
	test	dil, dil
	jne	.L12
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L14:
	movsx	edi, BYTE PTR 1[r15]
	add	r15, 1
	test	dil, dil
	je	.L34
.L12:
	call	isspace@PLT
	test	rax, rax
	jne	.L14
	cmp	BYTE PTR [r15], 0
	je	.L34
.L15:
	mov	eax, DWORD PTR 0[rbp]
	mov	rdi, QWORD PTR 16[rbp]
	lea	esi, 1[rax]
	mov	DWORD PTR 0[rbp], esi
	sal	esi, 3
	call	realloc@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	QWORD PTR 16[rbp], rax
	mov	eax, DWORD PTR 0[rbp]
	lea	esi, 0[0+rax*8]
	call	realloc@PLT
	mov	rdx, QWORD PTR 16[rbp]
	mov	rdi, r12
	mov	QWORD PTR 8[rbp], rax
	movsx	rax, DWORD PTR 0[rbp]
	lea	r14, -8[0+rax*8]
	add	rdx, r14
	mov	QWORD PTR 8[rsp], rdx
	call	strdup@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	rdi, r15
	mov	QWORD PTR [rdx], rax
	add	r14, QWORD PTR 8[rbp]
	call	strdup@PLT
	mov	QWORD PTR [r14], rax
	jmp	.L8
.L41:
	mov	rdi, rbp
.L35:
	call	split_file_destroy@PLT
	.p2align 4,,10
	.p2align 3
.L36:
	mov	eax, DWORD PTR ENOENT[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	r15, r12
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, r12
	call	free@PLT
	mov	edi, r13d
	call	close@PLT
	mov	eax, DWORD PTR 0[rbp]
	mov	rdi, rbp
	test	eax, eax
	je	.L35
	call	split_openfile@PLT
	mov	QWORD PTR errno[rip], rax
	test	rax, rax
	jne	.L41
	mov	QWORD PTR 8[rbx], rbp
	xor	eax, eax
	jmp	.L1
.L39:
	lea	rdi, .LC2[rip]
	call	printf@PLT
	mov	edi, r13d
	call	close@PLT
	mov	eax, DWORD PTR ENOENT[rip]
	jmp	.L1
.L40:
	lea	rdi, .LC3[rip]
	call	printf@PLT
	mov	edi, r13d
	call	close@PLT
	mov	eax, DWORD PTR EISDIR[rip]
	jmp	.L1
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	splitfs_open, .-splitfs_open
	.comm	errno,8,8
	.comm	O_RDONLY,4,4
	.comm	F_READ,8,8
	.comm	EPERM,4,4
	.comm	ENOENT,4,4
	.comm	EISDIR,4,4
	.comm	CONF_BUF,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_splitfs.c_splitfs_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	".split\000"
	.align	2
.LC1:
	.ascii	"%s.split\000"
	.align	2
.LC2:
	.ascii	"splitfs_open: stat failed\012\000"
	.align	2
.LC3:
	.ascii	"splitfs_open: not a file\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	splitfs_open, %function
splitfs_open:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L42
	ldr	r2, [r1]
	ldr	r3, [r3]
	mov	r5, r1
	ldr	r1, .L42+4
	sub	sp, sp, #20
	cmp	r2, r3
	ldr	r1, [r1]
	str	r1, [sp, #12]
	mov	r1,#0
	beq	.L2
	ldr	r3, .L42+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L42+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r1, #46
	mov	r4, r0
	bl	strrchr
	cmp	r0, #0
	beq	.L4
	ldr	r1, .L42+12
	bl	strcmp
	cmp	r0, #0
	beq	.L37
.L4:
	mov	r0, r4
	bl	strlen
	add	r0, r0, #7
	bl	malloc
	mov	r6, r0
	mov	r2, r4
	ldr	r1, .L42+16
	bl	sprintf
	ldr	r3, .L42+20
	mov	r0, r6
	ldr	r1, [r3]
	bl	open
	mov	r7, r0
	mov	r0, r6
	bl	free
	cmn	r7, #1
	beq	.L37
	mov	r0, r7
	add	r1, sp, #8
	bl	fstat
	cmp	r0, #0
	blt	.L40
	ldr	r0, [sp, #8]
	bl	S_ISREG
	cmp	r0, #0
	beq	.L41
	mov	r0, #12
	bl	malloc
	ldr	r8, .L42+24
	mov	r1, #12
	mov	r4, r0
	bl	bzero
	ldr	r1, [r8]
	mov	r0, r1
	str	r1, [sp, #4]
	bl	malloc
	mov	r6, r0
	ldr	r1, [sp, #4]
.L8:
	mov	r2, r7
	mov	r0, r6
	bl	fgetstr
	cmp	r0, #0
	ble	.L16
	ldrb	r0, [r6]	@ zero_extendqisi2
	cmp	r0, #0
	movne	fp, r6
	bne	.L17
	b	.L13
.L10:
	ldrb	r0, [fp, #1]!	@ zero_extendqisi2
	cmp	r0, #0
	beq	.L13
.L17:
	bl	isspace
	cmp	r0, #0
	beq	.L10
	ldrb	r3, [fp]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L13
	mov	r10, fp
	mov	r3, #0
	strb	r3, [r10], #1
	ldrb	r0, [fp, #1]	@ zero_extendqisi2
	cmp	r0, #0
	bne	.L12
	b	.L13
.L14:
	ldrb	r0, [r10, #1]!	@ zero_extendqisi2
	cmp	r0, #0
	beq	.L13
.L12:
	bl	isspace
	cmp	r0, #0
	bne	.L14
	ldrb	r3, [r10]	@ zero_extendqisi2
	cmp	r3, #0
	moveq	r10, r6
.L15:
	ldr	r3, [r4]
	ldr	r0, [r4, #8]
	add	r3, r3, #1
	lsl	r1, r3, #2
	str	r3, [r4]
	bl	realloc
	mov	r3, r0
	ldr	r1, [r4]
	str	r3, [r4, #8]
	lsl	r1, r1, #2
	ldr	r0, [r4, #4]
	bl	realloc
	mov	r3, r0
	mov	r0, r6
	str	r3, [r4, #4]
	ldr	fp, [r4]
	ldr	r9, [r4, #8]
	bl	strdup
	mov	r2, r0
	sub	fp, fp, #-1073741823
	mov	r0, r10
	str	r2, [r9, fp, lsl #2]
	ldr	r10, [r4, #4]
	bl	strdup
	ldr	r1, [r8]
	str	r0, [r10, fp, lsl #2]
	b	.L8
.L16:
	mov	r0, r6
	bl	free
	mov	r0, r7
	bl	close
	ldr	r3, [r4]
	mov	r0, r4
	cmp	r3, #0
	beq	.L36
	bl	split_openfile
	ldr	r3, .L42+28
	cmp	r0, #0
	str	r0, [r3]
	streq	r4, [r5, #4]
	beq	.L1
	mov	r0, r4
.L36:
	bl	split_file_destroy
.L37:
	ldr	r3, .L42+32
	ldr	r0, [r3]
	b	.L1
.L13:
	mov	r10, r6
	b	.L15
.L40:
	ldr	r0, .L42+36
	bl	printf
	mov	r0, r7
	bl	close
	ldr	r3, .L42+32
	ldr	r0, [r3]
	b	.L1
.L41:
	ldr	r0, .L42+40
	bl	printf
	mov	r0, r7
	bl	close
	ldr	r3, .L42+44
	ldr	r0, [r3]
	b	.L1
.L39:
	bl	__stack_chk_fail
.L43:
	.align	2
.L42:
	.word	F_READ
	.word	.LC4
	.word	EPERM
	.word	.LC0
	.word	.LC1
	.word	O_RDONLY
	.word	CONF_BUF
	.word	errno
	.word	ENOENT
	.word	.LC2
	.word	.LC3
	.word	EISDIR
	.size	splitfs_open, .-splitfs_open
	.comm	errno,4,4
	.comm	O_RDONLY,4,4
	.comm	F_READ,4,4
	.comm	EPERM,4,4
	.comm	ENOENT,4,4
	.comm	EISDIR,4,4
	.comm	CONF_BUF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
