	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_handshake
_http_handshake:                        ## @http_handshake
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	8(%r15), %esi
	movq	%r14, %rdi
	callq	_http_write_reply
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	$131, (%r15)
	jmp	LBB0_13
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	leaq	-28(%rbp), %rsi
	movq	%r14, %rdi
	callq	_http_read_header
	testl	%eax, %eax
	js	LBB0_7
## %bb.12:
	movl	$128, (%r15)
LBB0_13:
	movl	$1, %ebx
	jmp	LBB0_14
LBB0_2:
	movq	16(%r15), %rbx
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	%rbx, %rdi
	callq	_ffurl_handshake
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_4
## %bb.3:
	addl	$2, %ebx
	jmp	LBB0_14
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_7:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_handle_http_errors
	jmp	LBB0_14
LBB0_4:
	js	LBB0_14
## %bb.5:
	movabsq	$4294967425, %rax               ## imm = 0x100000081
	movq	%rax, (%r15)
	movl	$2, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Lower protocol\n"

L_.str.1:                               ## @.str.1
	.asciz	"Read headers\n"

L_.str.2:                               ## @.str.2
	.asciz	"Reply code: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_http_handshake
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function http_handshake
lCPI0_0:
	.long	129                             ; 0x81
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_http_handshake:                        ; @http_handshake
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x21, [x0]
	ldr	w8, [x21]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w20, #0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w8, [x21, #8]
	str	x8, [sp]
Lloh5:
	adrp	x2, l_.str.2@PAGE
Lloh6:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w1, [x21, #8]
	mov	x0, x19
	bl	_http_write_reply
	tbnz	w0, #31, LBB0_10
; %bb.3:
	mov	w8, #131
	b	LBB0_7
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_AVERROR
LBB0_5:
Lloh10:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	add	x1, sp, #12
	mov	x0, x19
	bl	_http_read_header
	tbnz	w0, #31, LBB0_11
; %bb.6:
	mov	w8, #128
LBB0_7:
	str	w8, [x21]
	mov	w20, #1
	b	LBB0_14
LBB0_8:
	ldr	x20, [x21, #16]
Lloh15:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	x0, x20
	bl	_ffurl_handshake
	mov	x20, x0
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.9:
	add	w20, w20, #2
	b	LBB0_14
LBB0_10:
	mov	x20, x0
	b	LBB0_14
LBB0_11:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_handle_http_errors
	b	LBB0_14
LBB0_12:
	tbnz	w20, #31, LBB0_14
; %bb.13:
Lloh20:
	adrp	x8, lCPI0_0@PAGE
Lloh21:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21]
	mov	w20, #2
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdr	Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
                                        ; -- End function
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Lower protocol\n"

l_.str.1:                               ; @.str.1
	.asciz	"Read headers\n"

l_.str.2:                               ; @.str.2
	.asciz	"Reply code: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_http_handshake
.subsections_via_symbols
