	.file	"extr_alignment.c_sign_extend.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sign_extend, @function
sign_extend:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ebx, esi
	sub	rsp, 32
	.cfi_def_cfa_offset 48
	mov	QWORD PTR 8[rsp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 16[rsp], 0
	call	cpu_to_le32@PLT
	mov	QWORD PTR 8[rsp], rax
	test	ebx, ebx
	jle	.L2
	lea	esi, -1[rbx]
	lea	rax, 8[rsp]
	lea	r8, 1[rsi]
	lea	rsi, 16[rsp]
	lea	rdi, [rax+r8]
	mov	rdx, rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movzx	ecx, BYTE PTR [rax]
	add	rax, 1
	add	rdx, 1
	mov	BYTE PTR -1[rdx], cl
	cmp	rax, rdi
	jne	.L3
	add	ebx, 1
	add	rsi, r8
	cmp	ebx, 3
	setle	al
.L4:
	test	cl, cl
	jns	.L7
	test	al, al
	jne	.L9
.L7:
	mov	rdi, QWORD PTR 16[rsp]
	call	le32_to_cpu@PLT
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L18
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rax, rsi
.L5:
	add	rax, 1
	mov	BYTE PTR -1[rax], -1
	lea	edx, [rbx+rax]
	sub	edx, esi
	cmp	edx, 4
	jle	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movzx	ecx, BYTE PTR 15[rsp]
	mov	eax, 1
	mov	ebx, 1
	lea	rsi, 16[rsp]
	jmp	.L4
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sign_extend, .-sign_extend
	.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_alignment.c_sign_extend.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sign_extend, %function
sign_extend:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, lr}
	ldr	r2, .L15
	sub	sp, sp, #16
	mov	r4, r1
	str	r0, [sp, #4]
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	r3, [sp, #8]
	bl	cpu_to_le32
	cmp	r4, #0
	str	r0, [sp, #4]
	ble	.L2
	add	r3, sp, #4
	add	ip, r3, r4
	add	r0, sp, #7
.L3:
	ldrb	r2, [r3], #1	@ zero_extendqisi2
	cmp	r3, ip
	strb	r2, [r0, #1]!
	bne	.L3
	add	r1, r4, #1
	cmp	r1, #3
	movgt	r3, #0
	movle	r3, #1
	add	r0, sp, #8
	add	r4, r0, r4
.L4:
	ands	r3, r3, r2, lsr #7
	bne	.L8
.L6:
	ldr	r0, [sp, #8]
	bl	le32_to_cpu
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #16
	@ sp needed
	pop	{r4, pc}
.L8:
	mov	r2, r4
	mvn	r0, #0
.L5:
	strb	r0, [r2], #1
	add	r3, r2, r1
	sub	r3, r3, r4
	cmp	r3, #4
	ble	.L5
	b	.L6
.L2:
	mov	r3, #1
	ldrb	r2, [sp, #7]	@ zero_extendqisi2
	mov	r1, r3
	add	r4, sp, #8
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC0
	.size	sign_extend, .-sign_extend
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
