	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flatten_headers
_flatten_headers:                       ## @flatten_headers
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	24(%rsi), %rax
	movq	(%rax), %r13
	xorl	%edi, %edi
	cmpl	$1000, (%rsi)                   ## imm = 0x3E8
	setl	%dil
	callq	_assert
	movl	16(%r12), %r9d
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%r12), %edx
	movq	8(%r12), %rcx
	cmpl	(%rax), %r9d
	jne	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %r8
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %r8
	xorl	%eax, %eax
	callq	_sprintf
LBB0_3:
	movslq	%eax, %rbx
	addq	%r14, %rbx
	movq	(%r13), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.4:
	movq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	cltq
	addq	%rax, %rbx
LBB0_5:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_flatten_res_headers
	movslq	%eax, %rcx
	leaq	(%rbx,%rcx), %rax
	movw	$2573, (%rbx,%rcx)              ## imm = 0xA0D
	subq	%r14, %rax
	addq	$2, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HTTP/1.1 %d %s\r\nConnection: %s\r\nContent-Length: %zu\r\n"

L_.str.1:                               ## @.str.1
	.asciz	"HTTP/1.1 %d %s\r\nConnection: %s\r\n"

L_.str.2:                               ## @.str.2
	.asciz	"Server: %s\r\n"

	.no_dead_strip	_flatten_headers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flatten_headers
_flatten_headers:                       ; @flatten_headers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #24]
	ldr	x22, [x8]
	ldr	w8, [x1]
	cmp	w8, #1000
	cset	w0, lt
	bl	_assert
	ldr	w10, [x20, #16]
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
	ldr	w8, [x20]
	ldr	x9, [x20, #8]
	cmp	w10, w11
	b.ne	LBB0_2
; %bb.1:
	stp	x9, x21, [sp, #8]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:
	stp	x21, x10, [sp, #16]
	stp	x8, x9, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_sprintf
	add	x21, x19, w0, sxtw
	ldr	x8, [x22]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	x8, [x8]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_sprintf
	add	x21, x21, w0, sxtw
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_flatten_res_headers
	add	x8, x21, w0, sxtw
	mov	w9, #2573
	strh	w9, [x8]
	sub	x8, x8, x19
	add	x0, x8, #2
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HTTP/1.1 %d %s\r\nConnection: %s\r\nContent-Length: %zu\r\n"

l_.str.1:                               ; @.str.1
	.asciz	"HTTP/1.1 %d %s\r\nConnection: %s\r\n"

l_.str.2:                               ; @.str.2
	.asciz	"Server: %s\r\n"

	.no_dead_strip	_flatten_headers
.subsections_via_symbols
