	.file	"extr_ssl_tls.c_mbedtls_ssl_flush_output.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"=> flush output"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Bad usage of mbedtls_ssl_set_bio() or mbedtls_ssl_set_bio()"
	.section	.rodata.str1.1
.LC2:
	.string	"<= flush output"
.LC3:
	.string	"ssl->f_send"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"outgoing message counter would wrap"
	.text
	.p2align 4
	.globl	mbedtls_ssl_flush_output
	.type	mbedtls_ssl_flush_output, @function
mbedtls_ssl_flush_output:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	rsi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, 2
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	MBEDTLS_SSL_DEBUG_MSG@PLT
	cmp	QWORD PTR 0[rbp], 0
	je	.L19
	mov	eax, DWORD PTR 8[rbp]
	test	eax, eax
	je	.L4
	lea	r12, .LC3[rip]
	jg	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR 8[rbp]
	sub	eax, r13d
	mov	DWORD PTR 8[rbp], eax
	test	eax, eax
	jle	.L6
.L5:
	mov	rdi, rbp
	call	mbedtls_ssl_hdr_len@PLT
	movsx	rsi, DWORD PTR 8[rbp]
	mov	edi, 2
	call	MBEDTLS_SSL_DEBUG_MSG@PLT
	mov	ebx, DWORD PTR 28[rbp]
	mov	rdi, rbp
	call	mbedtls_ssl_hdr_len@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 24[rbp]
	lea	esi, [rbx+rax]
	add	esi, DWORD PTR 12[rbp]
	sub	esi, edx
	movsx	rsi, esi
	call	[QWORD PTR 0[rbp]]
	mov	rsi, r12
	mov	edi, 2
	mov	r13d, eax
	mov	edx, eax
	call	MBEDTLS_SSL_DEBUG_RET@PLT
	test	r13d, r13d
	jg	.L20
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L6:
	.cfi_restore_state
	mov	ebx, 8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, QWORD PTR 16[rbp]
	movzx	eax, bl
	lea	rdx, -8[rdx+rax*8]
	add	QWORD PTR [rdx], 1
	jne	.L11
	sub	ebx, 1
.L7:
	mov	rdi, rbp
	call	ssl_ep_len@PLT
	cmp	al, bl
	jb	.L10
.L11:
	mov	rdi, rbp
	call	ssl_ep_len@PLT
	cmp	al, bl
	je	.L21
.L4:
	lea	rsi, .LC2[rip]
	mov	edi, 2
	xor	r13d, r13d
	call	MBEDTLS_SSL_DEBUG_MSG@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L21:
	.cfi_restore_state
	lea	rsi, .LC4[rip]
	mov	edi, 1
	call	MBEDTLS_SSL_DEBUG_MSG@PLT
	mov	r13d, DWORD PTR MBEDTLS_ERR_SSL_COUNTER_WRAPPING[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rsi, .LC1[rip]
	mov	edi, 1
	call	MBEDTLS_SSL_DEBUG_MSG@PLT
	mov	r13d, DWORD PTR MBEDTLS_ERR_SSL_BAD_INPUT_DATA[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mbedtls_ssl_flush_output, .-mbedtls_ssl_flush_output
	.comm	MBEDTLS_ERR_SSL_COUNTER_WRAPPING,4,4
	.comm	MBEDTLS_ERR_SSL_BAD_INPUT_DATA,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_ssl_tls.c_mbedtls_ssl_flush_output.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"=> flush output\000"
	.align	2
.LC1:
	.ascii	"Bad usage of mbedtls_ssl_set_bio() or mbedtls_ssl_s"
	.ascii	"et_bio()\000"
	.align	2
.LC2:
	.ascii	"<= flush output\000"
	.align	2
.LC3:
	.ascii	"ssl->f_send\000"
	.align	2
.LC4:
	.ascii	"outgoing message counter would wrap\000"
	.text
	.align	2
	.global	mbedtls_ssl_flush_output
	.syntax unified
	.arm
	.fpu softvfp
	.type	mbedtls_ssl_flush_output, %function
mbedtls_ssl_flush_output:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r1, .L22
	mov	r0, #2
	bl	MBEDTLS_SSL_DEBUG_MSG
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L19
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L4
	ble	.L6
	ldr	r6, .L22+4
	b	.L5
.L20:
	ldr	r2, [r4, #4]
	sub	r5, r2, r5
	cmp	r5, #0
	str	r5, [r4, #4]
	ble	.L6
.L5:
	mov	r0, r4
	bl	mbedtls_ssl_hdr_len
	ldr	r1, [r4, #4]
	mov	r0, #2
	bl	MBEDTLS_SSL_DEBUG_MSG
	mov	r0, r4
	ldr	r5, [r4, #20]
	bl	mbedtls_ssl_hdr_len
	ldr	r1, [r4, #8]
	ldr	r2, [r4, #4]
	add	r5, r5, r0
	add	r1, r5, r1
	sub	r1, r1, r2
	ldr	r3, [r4]
	ldr	r0, [r4, #16]
	blx	r3
	mov	r5, r0
	mov	r2, r0
	mov	r1, r6
	mov	r0, #2
	bl	MBEDTLS_SSL_DEBUG_RET
	cmp	r5, #0
	bgt	.L20
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L6:
	mov	r5, #8
	b	.L7
.L10:
	ldr	r1, [r4, #12]
	sub	r0, r5, #1
	ldr	r3, [r1, r2, lsl #2]
	add	r3, r3, #1
	cmp	r3, #0
	str	r3, [r1, r2, lsl #2]
	bne	.L11
	and	r5, r0, #255
.L7:
	mov	r0, r4
	bl	ssl_ep_len
	cmp	r0, r5
	sub	r2, r5, #-1073741823
	bcc	.L10
.L11:
	mov	r0, r4
	bl	ssl_ep_len
	cmp	r0, r5
	beq	.L21
.L4:
	mov	r5, #0
	ldr	r1, .L22+8
	mov	r0, #2
	bl	MBEDTLS_SSL_DEBUG_MSG
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L21:
	mov	r0, #1
	ldr	r1, .L22+12
	bl	MBEDTLS_SSL_DEBUG_MSG
	ldr	r3, .L22+16
	ldr	r5, [r3]
	b	.L1
.L19:
	mov	r0, #1
	ldr	r1, .L22+20
	bl	MBEDTLS_SSL_DEBUG_MSG
	ldr	r3, .L22+24
	ldr	r5, [r3]
	b	.L1
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	.LC3
	.word	.LC2
	.word	.LC4
	.word	MBEDTLS_ERR_SSL_COUNTER_WRAPPING
	.word	.LC1
	.word	MBEDTLS_ERR_SSL_BAD_INPUT_DATA
	.size	mbedtls_ssl_flush_output, .-mbedtls_ssl_flush_output
	.comm	MBEDTLS_ERR_SSL_COUNTER_WRAPPING,4,4
	.comm	MBEDTLS_ERR_SSL_BAD_INPUT_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
