	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_smart_http
_check_smart_http:                      ## @check_smart_http
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdx), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-32(%rbp), %rdx
	callq	_skip_prefix
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	-32(%rbp), %rdi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_skip_prefix
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	-32(%rbp), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_14
## %bb.3:
	movl	4(%r14), %ecx
	movl	8(%r14), %edx
	movq	_PACKET_READ_CHOMP_NEWLINE@GOTPCREL(%rip), %rax
	movq	_PACKET_READ_DIE_ON_ERR_PACKET@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	orl	(%rax), %r8d
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movl	$-1, %esi
	callq	_packet_reader_init
	movq	%r15, %rdi
	callq	_packet_reader_read
	movq	_PACKET_READ_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die
LBB0_5:
	movq	-56(%rbp), %rdi
	leaq	L_.str.3(%rip), %rsi
	leaq	-32(%rbp), %rdx
	callq	_skip_prefix
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	-32(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
LBB0_7:
	movq	-56(%rbp), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movq	-56(%rbp), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die
	jmp	LBB0_14
LBB0_10:
	leaq	-56(%rbp), %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_packet_reader_read
	cmpq	$0, -48(%rbp)
	jg	LBB0_11
## %bb.12:
	movl	-36(%rbp), %eax
	movl	%eax, 8(%r14)
	movl	-40(%rbp), %eax
	movl	%eax, 4(%r14)
LBB0_13:
	movl	$1, (%r14)
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"application/x-"

L_.str.1:                               ## @.str.1
	.asciz	"-advertisement"

	.comm	_PACKET_READ_CHOMP_NEWLINE,4,2  ## @PACKET_READ_CHOMP_NEWLINE
	.comm	_PACKET_READ_DIE_ON_ERR_PACKET,4,2 ## @PACKET_READ_DIE_ON_ERR_PACKET
	.comm	_PACKET_READ_NORMAL,8,3         ## @PACKET_READ_NORMAL
L_.str.2:                               ## @.str.2
	.asciz	"invalid server response; expected service, got flush packet"

L_.str.3:                               ## @.str.3
	.asciz	"# service="

L_.str.4:                               ## @.str.4
	.asciz	"version 2"

L_.str.5:                               ## @.str.5
	.asciz	"invalid server response; got '%s'"

	.no_dead_strip	_check_smart_http
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_smart_http
_check_smart_http:                      ; @check_smart_http
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x2]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	sub	x2, x29, #24
	bl	_skip_prefix
	cbz	x0, LBB0_12
; %bb.1:
	ldur	x0, [x29, #-24]
	sub	x2, x29, #24
	mov	x1, x20
	bl	_skip_prefix
	cbz	x0, LBB0_12
; %bb.2:
	ldur	x0, [x29, #-24]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_12
; %bb.3:
Lloh4:
	adrp	x8, _PACKET_READ_CHOMP_NEWLINE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PACKET_READ_CHOMP_NEWLINE@GOTPAGEOFF]
	ldp	w3, w2, [x19, #4]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _PACKET_READ_DIE_ON_ERR_PACKET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PACKET_READ_DIE_ON_ERR_PACKET@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w4, w9, w8
	add	x0, sp, #16
	mov	w1, #-1
	bl	_packet_reader_init
	add	x0, sp, #16
	bl	_packet_reader_read
Lloh10:
	adrp	x8, _PACKET_READ_NORMAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PACKET_READ_NORMAL@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	bl	_die
LBB0_5:
	ldr	x0, [sp, #16]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	sub	x2, x29, #24
	bl	_skip_prefix
	cbz	x0, LBB0_7
; %bb.6:
	ldur	x0, [x29, #-24]
	mov	x1, x20
	bl	_strcmp
	cbz	x0, LBB0_9
LBB0_7:
	ldr	x0, [sp, #16]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.8:
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	ldr	x8, [sp, #16]
	str	x8, [sp]
	bl	_die
	b	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #16
	bl	_packet_reader_read
	ldr	x8, [sp, #24]
	cmp	x8, #0
	b.gt	LBB0_9
; %bb.10:
	ldr	d0, [sp, #32]
	stur	d0, [x19, #4]
LBB0_11:
	mov	w8, #1
	str	w8, [x19]
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"application/x-"

l_.str.1:                               ; @.str.1
	.asciz	"-advertisement"

	.comm	_PACKET_READ_CHOMP_NEWLINE,4,2  ; @PACKET_READ_CHOMP_NEWLINE
	.comm	_PACKET_READ_DIE_ON_ERR_PACKET,4,2 ; @PACKET_READ_DIE_ON_ERR_PACKET
	.comm	_PACKET_READ_NORMAL,8,3         ; @PACKET_READ_NORMAL
l_.str.2:                               ; @.str.2
	.asciz	"invalid server response; expected service, got flush packet"

l_.str.3:                               ; @.str.3
	.asciz	"# service="

l_.str.4:                               ; @.str.4
	.asciz	"version 2"

l_.str.5:                               ; @.str.5
	.asciz	"invalid server response; got '%s'"

	.no_dead_strip	_check_smart_http
.subsections_via_symbols
