	.file	"extr_oid.c_git_oid_fromstrn.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"too short"
.LC1:
	.string	"too long"
.LC2:
	.string	"contains invalid characters"
	.text
	.p2align 4
	.globl	git_oid_fromstrn
	.type	git_oid_fromstrn, @function
git_oid_fromstrn:
.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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	test	rdi, rdi
	setne	al
	xor	edi, edi
	test	rsi, rsi
	setne	dil
	and	edi, eax
	call	assert@PLT
	lea	rdi, .LC0[rip]
	test	rbp, rbp
	je	.L9
	cmp	QWORD PTR GIT_OID_HEXSZ[rip], rbp
	lea	rdi, .LC1[rip]
	jb	.L9
	mov	edx, DWORD PTR GIT_OID_RAWSZ[rip]
	mov	rdi, QWORD PTR [r12]
	xor	esi, esi
	xor	ebx, ebx
	call	memset@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdx, rbx
	mov	ecx, eax
	shr	rdx
	sal	ecx, 4
	add	rdx, QWORD PTR [r12]
	test	bl, 1
	cmove	eax, ecx
	add	rbx, 1
	or	BYTE PTR [rdx], al
	cmp	rbp, rbx
	je	.L11
.L6:
	movsx	edi, BYTE PTR 0[r13+rbx]
	call	git__fromhex@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
.L9:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	jmp	oid_error_invalid@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	.cfi_endproc
.LFE0:
	.size	git_oid_fromstrn, .-git_oid_fromstrn
	.comm	GIT_OID_RAWSZ,4,4
	.comm	GIT_OID_HEXSZ,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_oid.c_git_oid_fromstrn.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"too short\000"
	.align	2
.LC1:
	.ascii	"too long\000"
	.align	2
.LC2:
	.ascii	"contains invalid characters\000"
	.text
	.align	2
	.global	git_oid_fromstrn
	.syntax unified
	.arm
	.fpu softvfp
	.type	git_oid_fromstrn, %function
git_oid_fromstrn:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r8, r0
	mov	r6, r2
	subs	r0, r1, #0
	movne	r0, #1
	cmp	r8, #0
	moveq	r0, #0
	mov	r7, r1
	bl	assert
	cmp	r6, #0
	beq	.L10
	ldr	r3, .L13
	ldr	r3, [r3]
	cmp	r3, r6
	bcc	.L11
	ldr	r3, .L13+4
	mov	r1, #0
	ldr	r2, [r3]
	ldr	r0, [r8]
	sub	r6, r6, #1
	add	r6, r7, r6
	sub	r4, r7, #1
	bl	memset
	rsb	r7, r7, #1
	b	.L6
.L4:
	ldr	r2, [r8]
	tst	r5, #1
	ldrb	r3, [r2, r5, lsr #1]	@ zero_extendqisi2
	lsleq	r0, r0, #4
	orr	r0, r3, r0
	cmp	r4, r6
	strb	r0, [r2, r5, lsr #1]
	beq	.L12
.L6:
	add	r5, r7, r4
	ldrb	r0, [r4, #1]!	@ zero_extendqisi2
	bl	git__fromhex
	cmp	r0, #0
	bge	.L4
	ldr	r0, .L13+8
	pop	{r4, r5, r6, r7, r8, lr}
	b	oid_error_invalid
.L11:
	ldr	r0, .L13+12
	pop	{r4, r5, r6, r7, r8, lr}
	b	oid_error_invalid
.L12:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r0, .L13+16
	pop	{r4, r5, r6, r7, r8, lr}
	b	oid_error_invalid
.L14:
	.align	2
.L13:
	.word	GIT_OID_HEXSZ
	.word	GIT_OID_RAWSZ
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.size	git_oid_fromstrn, .-git_oid_fromstrn
	.comm	GIT_OID_RAWSZ,4,4
	.comm	GIT_OID_HEXSZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
