	.file	"extr_http1.c_flatten_headers.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"HTTP/1.1 %d %s\r\nConnection: %s\r\nContent-Length: %zu\r\n"
	.align 8
.LC1:
	.string	"HTTP/1.1 %d %s\r\nConnection: %s\r\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Server: %s\r\n"
	.text
	.p2align 4
	.type	flatten_headers, @function
flatten_headers:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	DWORD PTR [rsi], 999
	mov	rax, QWORD PTR 24[rsi]
	setle	dil
	mov	r12, QWORD PTR [rax]
	call	assert@PLT
	mov	r9d, DWORD PTR 16[r13]
	mov	rcx, QWORD PTR 8[r13]
	mov	r8, rbx
	cmp	r9d, DWORD PTR SIZE_MAX[rip]
	mov	edx, DWORD PTR 0[r13]
	je	.L2
	xor	eax, eax
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	sprintf@PLT
	movsx	rbx, eax
	mov	rax, QWORD PTR [r12]
	add	rbx, rbp
	cmp	QWORD PTR 8[rax], 0
	jne	.L7
.L4:
	mov	rsi, r13
	mov	rdi, rbx
	mov	edx, 1
	call	flatten_res_headers@PLT
	cdqe
	add	rbx, rax
	mov	eax, 2573
	mov	WORD PTR [rbx], ax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	rax, 2[rbx]
	sub	rax, rbp
	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
.L2:
	.cfi_restore_state
	xor	eax, eax
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	sprintf@PLT
	movsx	rbx, eax
	mov	rax, QWORD PTR [r12]
	add	rbx, rbp
	cmp	QWORD PTR 8[rax], 0
	je	.L4
.L7:
	mov	rdx, QWORD PTR [rax]
	mov	rdi, rbx
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	sprintf@PLT
	cdqe
	add	rbx, rax
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	flatten_headers, .-flatten_headers
	.comm	SIZE_MAX,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_http1.c_flatten_headers.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"HTTP/1.1 %d %s\015\012Connection: %s\015\012Content"
	.ascii	"-Length: %zu\015\012\000"
	.align	2
.LC1:
	.ascii	"HTTP/1.1 %d %s\015\012Connection: %s\015\012\000"
	.align	2
.LC2:
	.ascii	"Server: %s\015\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flatten_headers, %function
flatten_headers:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r1
	mov	r6, r0
	ldr	r0, [r1]
	ldr	r3, [r1, #12]
	cmp	r0, #1000
	movge	r0, #0
	movlt	r0, #1
	sub	sp, sp, #12
	mov	r5, r2
	ldr	r7, [r3]
	bl	assert
	ldr	r2, .L11
	ldr	r3, [r4, #8]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L2
	str	r5, [sp]
	str	r3, [sp, #4]
	ldm	r4, {r2, r3}
	mov	r0, r6
	ldr	r1, .L11+4
	bl	sprintf
	ldr	r3, [r7]
	add	r5, r6, r0
	ldr	r2, [r3, #4]
	cmp	r2, #0
	bne	.L10
.L4:
	mov	r1, r4
	mov	r2, #1
	mov	r0, r5
	bl	flatten_res_headers
	mov	r1, #13
	mov	r2, #10
	add	r3, r5, r0
	strb	r1, [r5, r0]
	add	r0, r3, #2
	sub	r0, r0, r6
	strb	r2, [r3, #1]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	str	r5, [sp]
	ldm	r4, {r2, r3}
	mov	r0, r6
	ldr	r1, .L11+8
	bl	sprintf
	ldr	r3, [r7]
	add	r5, r6, r0
	ldr	r2, [r3, #4]
	cmp	r2, #0
	beq	.L4
.L10:
	mov	r0, r5
	ldr	r2, [r3]
	ldr	r1, .L11+12
	bl	sprintf
	add	r5, r5, r0
	b	.L4
.L12:
	.align	2
.L11:
	.word	SIZE_MAX
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	flatten_headers, .-flatten_headers
	.comm	SIZE_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
