	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_client
_process_client:                        ## @process_client
	.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
	subq	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -1088(%rbp)
	movq	$0, -1080(%rbp)
	callq	_avio_handshake
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	_AV_OPT_SEARCH_CHILDREN@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r15
	leaq	-1080(%rbp), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_av_freep
	movq	%r12, %rdi
	callq	_avio_handshake
	testl	%eax, %eax
	jle	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rcx
	callq	_av_opt_get
	movq	-1080(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, (%rcx)
	je	LBB0_4
	jmp	LBB0_7
LBB0_5:
	testl	%eax, %eax
	js	LBB0_26
## %bb.6:
	movq	-1080(%rbp), %rcx
LBB0_7:
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	-1080(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.8:
	cmpb	$47, (%rdi)
	jne	LBB0_11
## %bb.9:
	incq	%rdi
	movq	%r14, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	_AVERROR_HTTP_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_12:
	movq	_AV_OPT_SEARCH_CHILDREN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_av_opt_set_int
	testl	%eax, %eax
	js	LBB0_13
## %bb.15:
	movl	(%rbx), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_avio_handshake
	testl	%eax, %eax
	jg	LBB0_16
## %bb.17:
	js	LBB0_26
## %bb.18:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_fprintf
	cmpl	$200, %r15d
	jne	LBB0_26
## %bb.19:
	movl	(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_fprintf
	movq	_AVIO_FLAG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-1088(%rbp), %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_avio_open2
	movq	-1088(%rbp), %rbx
	testl	%eax, %eax
	js	LBB0_25
## %bb.20:
	leaq	-1072(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_avio_read
	testl	%eax, %eax
	js	LBB0_23
## %bb.21:
	leaq	-1072(%rbp), %rbx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_avio_write
	movq	%r12, %rdi
	callq	_avio_flush
	movq	-1088(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_avio_read
	testl	%eax, %eax
	jns	LBB0_22
LBB0_23:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_26
## %bb.24:
	movq	-1088(%rbp), %r14
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_av_err2str
	leaq	L_.str.8(%rip), %rdx
	movq	%r14, %rdi
	jmp	LBB0_14
LBB0_13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_av_err2str
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
LBB0_14:
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_26:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.9(%rip), %rsi
	callq	_fprintf
	movq	%r12, %rdi
	callq	_avio_flush
	movl	(%rbx), %edi
	leaq	L_.str.10(%rip), %rsi
	callq	_fprintf
	movq	%r12, %rdi
	callq	_avio_close
	movl	(%rbx), %edi
	leaq	L_.str.11(%rip), %rsi
	callq	_fprintf
	movq	-1088(%rbp), %rdi
	callq	_avio_close
	leaq	-1080(%rbp), %rdi
	callq	_av_freep
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.27:
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	$200, %r15d
	jmp	LBB0_12
LBB0_25:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%eax, %edi
	callq	_av_err2str
	leaq	L_.str.7(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r14, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_26
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resource"

	.comm	_AV_OPT_SEARCH_CHILDREN,4,2     ## @AV_OPT_SEARCH_CHILDREN
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
L_.str.1:                               ## @.str.1
	.asciz	"resource=%p\n"

	.comm	_AVERROR_HTTP_NOT_FOUND,4,2     ## @AVERROR_HTTP_NOT_FOUND
L_.str.2:                               ## @.str.2
	.asciz	"reply_code"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"Failed to set reply_code: %s.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Set reply code to %d\n"

	.comm	_stderr,4,2                     ## @stderr
L_.str.5:                               ## @.str.5
	.asciz	"Handshake performed.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Opening input file.\n"

	.comm	_AVIO_FLAG_READ,4,2             ## @AVIO_FLAG_READ
L_.str.7:                               ## @.str.7
	.asciz	"Failed to open input: %s: %s.\n"

	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
L_.str.8:                               ## @.str.8
	.asciz	"Error reading from input: %s.\n"

L_.str.9:                               ## @.str.9
	.asciz	"Flushing client\n"

L_.str.10:                              ## @.str.10
	.asciz	"Closing client\n"

L_.str.11:                              ## @.str.11
	.asciz	"Closing input\n"

	.no_dead_strip	_process_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_client
_process_client:                        ; @process_client
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1072
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	stp	xzr, xzr, [sp, #24]
	bl	_avio_handshake
Lloh3:
	adrp	x23, _stderr@GOTPAGE
Lloh4:
	ldr	x23, [x23, _stderr@GOTPAGEOFF]
Lloh5:
	adrp	x22, _AV_OPT_SEARCH_CHILDREN@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AV_OPT_SEARCH_CHILDREN@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
Lloh7:
	adrp	x21, l_.str@PAGE
Lloh8:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #24
	bl	_av_freep
	mov	x0, x19
	bl	_avio_handshake
	cmp	w0, #0
	b.le	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x22]
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x21
	bl	_av_opt_get
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w9, [x8]
	cbz	w9, LBB0_2
	b	LBB0_7
LBB0_5:
	tbnz	w0, #31, LBB0_22
; %bb.6:
	ldr	x8, [sp, #24]
LBB0_7:
Lloh9:
	adrp	x24, _AV_LOG_TRACE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _AV_LOG_TRACE@GOTPAGEOFF]
	ldr	w1, [x24]
	str	x8, [sp]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_10
; %bb.8:
	ldrb	w9, [x8]
	cmp	w9, #47
	b.ne	LBB0_10
; %bb.9:
	add	x0, x8, #1
	mov	x1, x20
	bl	_strcmp
	cbz	w0, LBB0_26
LBB0_10:
Lloh13:
	adrp	x8, _AVERROR_HTTP_NOT_FOUND@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_HTTP_NOT_FOUND@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
LBB0_11:
	ldr	w3, [x22]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_av_opt_set_int
	tbnz	w0, #31, LBB0_20
; %bb.12:
	ldr	w1, [x24]
	str	x21, [sp]
Lloh18:
	adrp	x2, l_.str.4@PAGE
Lloh19:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_avio_handshake
	cmp	w0, #0
	b.gt	LBB0_13
; %bb.14:
	tbnz	w0, #31, LBB0_22
; %bb.15:
	ldr	w0, [x23]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	cmp	w21, #200
	b.ne	LBB0_22
; %bb.16:
	ldr	w0, [x23]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
Lloh24:
	adrp	x8, _AVIO_FLAG_READ@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVIO_FLAG_READ@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	add	x0, sp, #32
	mov	x1, x20
	mov	x3, #0
	mov	x4, #0
	bl	_avio_open2
	ldr	x21, [sp, #32]
	tbnz	w0, #31, LBB0_27
; %bb.17:
	add	x1, sp, #40
	mov	x0, x21
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	w2, #1024
	bl	_avio_read
	mov	x2, x0
	tbnz	w0, #31, LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x1, sp, #40
	mov	x0, x19
	bl	_avio_write
	mov	x0, x19
	bl	_avio_flush
	ldr	x0, [sp, #32]
	add	x1, sp, #40
	b	LBB0_18
LBB0_20:
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w20, [x8]
	bl	_av_err2str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh30:
	adrp	x2, l_.str.3@PAGE
Lloh31:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x20
LBB0_21:
	bl	_av_log
LBB0_22:
	ldr	w0, [x23]
Lloh32:
	adrp	x1, l_.str.9@PAGE
Lloh33:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_fprintf
	mov	x0, x19
	bl	_avio_flush
	ldr	w0, [x23]
Lloh34:
	adrp	x1, l_.str.10@PAGE
Lloh35:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_fprintf
	mov	x0, x19
	bl	_avio_close
	ldr	w0, [x23]
Lloh36:
	adrp	x1, l_.str.11@PAGE
Lloh37:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_fprintf
	ldr	x0, [sp, #32]
	bl	_avio_close
	add	x0, sp, #24
	bl	_av_freep
	ldur	x8, [x29, #-72]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.23:
	add	sp, sp, #1072
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_24:
Lloh41:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh42:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	cmp	w2, w8
	b.eq	LBB0_22
; %bb.25:
	ldr	x20, [sp, #32]
Lloh44:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh46:
	ldr	w21, [x8]
	mov	x0, x2
	bl	_av_err2str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh47:
	adrp	x2, l_.str.8@PAGE
Lloh48:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	b	LBB0_21
LBB0_26:
	mov	w21, #200
	b	LBB0_11
LBB0_27:
Lloh49:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh51:
	ldr	w22, [x8]
	bl	_av_err2str
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh52:
	adrp	x2, l_.str.7@PAGE
Lloh53:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	b	LBB0_21
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resource"

	.comm	_AV_OPT_SEARCH_CHILDREN,4,2     ; @AV_OPT_SEARCH_CHILDREN
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
l_.str.1:                               ; @.str.1
	.asciz	"resource=%p\n"

	.comm	_AVERROR_HTTP_NOT_FOUND,4,2     ; @AVERROR_HTTP_NOT_FOUND
l_.str.2:                               ; @.str.2
	.asciz	"reply_code"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"Failed to set reply_code: %s.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Set reply code to %d\n"

	.comm	_stderr,4,2                     ; @stderr
l_.str.5:                               ; @.str.5
	.asciz	"Handshake performed.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Opening input file.\n"

	.comm	_AVIO_FLAG_READ,4,2             ; @AVIO_FLAG_READ
l_.str.7:                               ; @.str.7
	.asciz	"Failed to open input: %s: %s.\n"

	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
l_.str.8:                               ; @.str.8
	.asciz	"Error reading from input: %s.\n"

l_.str.9:                               ; @.str.9
	.asciz	"Flushing client\n"

l_.str.10:                              ; @.str.10
	.asciz	"Closing client\n"

l_.str.11:                              ; @.str.11
	.asciz	"Closing input\n"

	.no_dead_strip	_process_client
.subsections_via_symbols
