	.file	"extr_php_imap.c_php_mail_gets.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to read from socket"
.LC1:
	.string	"Failed to write to stream"
	.text
	.p2align 4
	.type	php_mail_gets, @function
php_mail_gets:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rsi
	push	r13
	.cfi_offset 13, -40
	mov	r13, rdi
	push	r12
	push	rbx
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 40
	mov	edi, DWORD PTR gets_stream[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	IMAPG@PLT
	test	rax, rax
	jne	.L21
	lea	rdi, 1[rbx]
	mov	esi, 1
	call	pemalloc@PLT
	mov	rsi, rbx
	mov	rdi, r14
	mov	r12, rax
	mov	rdx, rax
	call	r13
	test	rax, rax
	je	.L12
	mov	BYTE PTR [r12+rbx], 0
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	lea	rsp, -40[rbp]
	mov	rax, r12
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	movsx	rax, DWORD PTR GETS_FETCH_SIZE[rip]
	mov	rcx, rsp
	mov	QWORD PTR -72[rbp], rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L4
.L23:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L23
.L4:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L5
	or	QWORD PTR -8[rsp+rdx], 0
.L5:
	mov	r12, rsp
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	sub	rbx, r15
.L7:
	mov	rdx, r12
	mov	rsi, r15
	mov	rdi, r14
	call	r13
	test	rax, rax
	je	.L24
	mov	edi, DWORD PTR gets_stream[rip]
	call	IMAPG@PLT
	mov	rdx, r15
	mov	rsi, r12
	mov	rdi, rax
	call	php_stream_write@PLT
	cmp	r15, rax
	jne	.L25
.L6:
	test	rbx, rbx
	je	.L9
	movsx	r15, DWORD PTR GETS_FETCH_SIZE[rip]
	cmp	rbx, r15
	ja	.L26
	mov	r15, rbx
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR E_WARNING[rip]
	lea	rdx, .LC0[rip]
	xor	edi, edi
	call	php_error_docref@PLT
	mov	rdi, r12
	xor	r12d, r12d
	call	free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	esi, DWORD PTR E_WARNING[rip]
	lea	rdx, .LC0[rip]
	xor	edi, edi
	call	php_error_docref@PLT
.L9:
	xor	r12d, r12d
	mov	rsp, QWORD PTR -72[rbp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	esi, DWORD PTR E_WARNING[rip]
	lea	rdx, .LC1[rip]
	xor	edi, edi
	xor	r12d, r12d
	call	php_error_docref@PLT
	mov	rsp, QWORD PTR -72[rbp]
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	php_mail_gets, .-php_mail_gets
	.comm	gets_stream,4,4
	.comm	GETS_FETCH_SIZE,4,4
	.comm	E_WARNING,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_php_imap.c_php_mail_gets.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to read from socket\000"
	.align	2
.LC1:
	.ascii	"Failed to write to stream\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	php_mail_gets, %function
php_mail_gets:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r8, .L20
	ldr	r3, .L20+4
	mov	r6, r0
	ldr	r0, [r8]
	mov	r7, r1
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	IMAPG
	subs	r9, r0, #0
	bne	.L15
	mov	r1, #1
	add	r0, r4, r1
	bl	pemalloc
	mov	r5, r0
	mov	r1, r4
	mov	r0, r7
	mov	r2, r5
	blx	r6
	subs	r6, r0, #0
	strbne	r9, [r5, r4]
	beq	.L16
.L1:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r5
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r9, .L20+8
	str	sp, [fp, #-48]
	ldr	r3, [r9]
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r5, sp
	b	.L3
.L7:
	ldr	r10, [r9]
	mov	r2, r5
	cmp	r4, r10
	movls	r10, r4
	mov	r0, r7
	mov	r1, r10
	movls	r4, #0
	subhi	r4, r4, r10
	blx	r6
	cmp	r0, #0
	beq	.L18
	ldr	r0, [r8]
	bl	IMAPG
	mov	r2, r10
	mov	r1, r5
	bl	php_stream_write
	cmp	r10, r0
	bne	.L19
.L3:
	cmp	r4, #0
	bne	.L7
	mov	r5, #0
	ldr	sp, [fp, #-48]
	b	.L1
.L16:
	ldr	r3, .L20+12
	ldr	r2, .L20+16
	ldr	r1, [r3]
	bl	php_error_docref
	mov	r0, r5
	bl	free
	mov	r5, r6
	b	.L1
.L18:
	ldr	r3, .L20+12
	ldr	r2, .L20+16
	ldr	r1, [r3]
	bl	php_error_docref
	mov	r5, #0
	ldr	sp, [fp, #-48]
	b	.L1
.L19:
	ldr	r3, .L20+12
	mov	r0, #0
	ldr	r2, .L20+20
	ldr	r1, [r3]
	bl	php_error_docref
	mov	r5, #0
	ldr	sp, [fp, #-48]
	b	.L1
.L17:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	gets_stream
	.word	.LC2
	.word	GETS_FETCH_SIZE
	.word	E_WARNING
	.word	.LC0
	.word	.LC1
	.size	php_mail_gets, .-php_mail_gets
	.comm	gets_stream,4,4
	.comm	GETS_FETCH_SIZE,4,4
	.comm	E_WARNING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
