	.file	"extr_imap-send.c_lf_to_crlf.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lf_to_crlf, @function
lf_to_crlf:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	mov	rdi, QWORD PTR [rdi]
	test	rdi, rdi
	je	.L2
	mov	rax, QWORD PTR 8[rbp]
	xor	edx, edx
	lea	r8, [rdi+rax]
	xor	edi, edi
	.p2align 4,,10
	.p2align 3
.L4:
	mov	ecx, edx
	lea	rsi, 1[rdi]
	movzx	edx, BYTE PTR [rax]
	cmp	cl, 13
	je	.L8
	add	rdi, 2
	cmp	dl, 10
	je	.L3
.L8:
	mov	rdi, rsi
.L3:
	add	rax, 1
	cmp	r8, rax
	jne	.L4
.L2:
	call	xmallocz@PLT
	mov	rdx, QWORD PTR 0[rbp]
	mov	rsi, rax
	test	rdx, rdx
	je	.L9
	xor	r8d, r8d
	xor	edx, edx
	xor	ecx, ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r8d, edi
	mov	rdx, r10
	add	rcx, 1
	mov	BYTE PTR [r9], r8b
	cmp	QWORD PTR 0[rbp], rcx
	jbe	.L5
.L7:
	mov	rdi, QWORD PTR 8[rbp]
	lea	r9, [rsi+rdx]
	lea	r10, 1[rdx]
	lea	r11, 2[rdx]
	movzx	edi, BYTE PTR [rdi+rcx]
	cmp	dil, 10
	jne	.L10
	cmp	r8b, 13
	je	.L10
	mov	BYTE PTR [r9], 13
	mov	rax, QWORD PTR 8[rbp]
	lea	r9, [rsi+r10]
	movzx	r8d, BYTE PTR [rax+rcx]
	lea	rax, 3[rdx]
	add	rcx, 1
	mov	rdx, r11
	mov	r11, rax
	mov	BYTE PTR [r9], r8b
	cmp	QWORD PTR 0[rbp], rcx
	ja	.L7
.L5:
	mov	rdi, rbp
	mov	rcx, r11
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	strbuf_attach@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	r11d, 1
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 8
	mov	rcx, r11
	jmp	strbuf_attach@PLT
	.cfi_endproc
.LFE0:
	.size	lf_to_crlf, .-lf_to_crlf
	.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_imap-send.c_lf_to_crlf.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lf_to_crlf, %function
lf_to_crlf:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r0]
	cmp	r0, #0
	beq	.L2
	sub	lr, r0, #1
	mov	r0, #0
	mov	r1, r0
	ldr	r2, [r4, #4]
	add	lr, r2, lr
	sub	r2, r2, #1
.L4:
	mov	r3, r1
	ldrb	r1, [r2, #1]!	@ zero_extendqisi2
	subs	r3, r3, #13
	movne	r3, #1
	cmp	r1, #10
	movne	r3, #0
	add	ip, r0, #1
	cmp	r3, #0
	moveq	r0, ip
	addne	r0, r0, #2
	cmp	lr, r2
	bne	.L4
.L2:
	bl	xmallocz
	ldr	r2, [r4]
	mov	r1, r0
	cmp	r2, #0
	beq	.L9
	mov	lr, #0
	mov	r8, #13
	mov	r2, lr
	mov	ip, lr
.L7:
	ldr	r3, [r4, #4]
	cmp	lr, #13
	ldrb	r5, [r3, ip]	@ zero_extendqisi2
	add	r7, r2, #1
	sub	r3, r5, #10
	clz	r3, r3
	lsr	r3, r3, #5
	moveq	r3, #0
	cmp	r3, #0
	moveq	lr, r5
	strbne	r8, [r1, r2]
	ldrne	lr, [r4, #4]
	add	r6, r1, r2
	ldrbne	lr, [lr, ip]	@ zero_extendqisi2
	addne	r6, r1, r7
	strb	lr, [r6]
	ldr	r5, [r4]
	add	r3, r2, #2
	addne	r0, r2, #3
	add	ip, ip, #1
	movne	r2, r3
	moveq	r2, r7
	movne	r3, r0
	cmp	r5, ip
	bhi	.L7
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	strbuf_attach
.L9:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r3, #1
	b	strbuf_attach
	.size	lf_to_crlf, .-lf_to_crlf
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
