	.file	"extr_dir.c_get_acorn_filename.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ARCHIMEDES"
.LC1:
	.string	"%3.3x"
	.text
	.p2align 4
	.globl	get_acorn_filename
	.type	get_acorn_filename, @function
get_acorn_filename:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	isofs_name_translate@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	rax, QWORD PTR [rbx]
	mov	edx, DWORD PTR [rax]
	mov	eax, edx
	and	eax, 1
	lea	eax, 16[rdx+rax]
	movzx	edx, BYTE PTR [rbx]
	sub	edx, eax
	cmp	edx, 32
	je	.L15
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	cdqe
	mov	edx, 10
	lea	rsi, .LC0[rip]
	lea	rbp, [rbx+rax]
	mov	rdi, rbp
	call	strncmp@PLT
	test	rax, rax
	jne	.L1
	cmp	BYTE PTR 0[r13], 95
	je	.L16
.L4:
	mov	rax, QWORD PTR 8[rbx]
	test	BYTE PTR [rax], 2
	jne	.L1
	cmp	BYTE PTR 13[rbp], -1
	jne	.L1
	movzx	eax, BYTE PTR 12[rbp]
	and	eax, -16
	cmp	al, -16
	jne	.L1
	movsx	rax, r12d
	lea	rsi, .LC1[rip]
	add	r12d, 4
	mov	BYTE PTR 0[r13+rax], 44
	movzx	edx, BYTE PTR 11[rbp]
	lea	rdi, 1[r13+rax]
	call	sprintf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	test	BYTE PTR 19[rbp], 1
	je	.L4
	mov	BYTE PTR 0[r13], 33
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	get_acorn_filename, .-get_acorn_filename
	.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_dir.c_get_acorn_filename.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ARCHIMEDES\000"
	.align	2
.LC1:
	.ascii	"%3.3x\000"
	.text
	.align	2
	.global	get_acorn_filename
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_acorn_filename, %function
get_acorn_filename:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r6, r1
	bl	isofs_name_translate
	subs	r4, r0, #0
	beq	.L1
	ldr	r3, [r5]
	ldr	r3, [r3]
	tst	r3, #1
	add	r0, r3, #8
	addne	r0, r3, #9
	ldrb	r3, [r5]	@ zero_extendqisi2
	sub	r3, r3, r0
	cmp	r3, #32
	bne	.L1
	add	r7, r5, r0
	mov	r0, r7
	mov	r2, #10
	ldr	r1, .L18
	bl	strncmp
	cmp	r0, #0
	bne	.L1
	ldrb	r3, [r6]	@ zero_extendqisi2
	cmp	r3, #95
	beq	.L16
.L4:
	ldr	r3, [r5, #4]
	ldr	r3, [r3]
	tst	r3, #2
	bne	.L1
	ldrb	r3, [r7, #13]	@ zero_extendqisi2
	cmp	r3, #255
	beq	.L17
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldrb	r3, [r7, #19]	@ zero_extendqisi2
	tst	r3, #1
	movne	r3, #33
	strbne	r3, [r6]
	b	.L4
.L17:
	ldrb	r3, [r7, #12]	@ zero_extendqisi2
	and	r3, r3, #240
	cmp	r3, #240
	bne	.L1
	mov	r3, #44
	add	r0, r4, #1
	strb	r3, [r6, r4]
	ldrb	r2, [r7, #11]	@ zero_extendqisi2
	ldr	r1, .L18+4
	add	r0, r6, r0
	bl	sprintf
	add	r4, r4, #4
	b	.L1
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	.LC1
	.size	get_acorn_filename, .-get_acorn_filename
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
