	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_av_log_set_level
	cmpl	$2, %r14d
	jg	LBB0_2
## %bb.1:
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_printf
LBB0_16:
	movl	$1, %r15d
	jmp	LBB0_17
LBB0_2:
	movq	8(%rbx), %r12
	movq	16(%rbx), %rbx
	xorl	%eax, %eax
	callq	_avformat_network_init
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	leaq	-64(%rbp), %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rdi
	leaq	-64(%rbp), %r8
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_avio_open2
	movq	_stderr@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	leaq	L_.str.5(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_fprintf
	movq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_avio_accept
	testl	%eax, %eax
	js	LBB0_13
## %bb.8:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str.6(%rip), %r12
	leaq	-56(%rbp), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	je	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rdi
	callq	_avio_close
	movq	-48(%rbp), %rdi
	movq	%r13, %rsi
	callq	_avio_accept
	testl	%eax, %eax
	jns	LBB0_9
LBB0_13:
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_avio_close
	testl	%ebx, %ebx
	jns	LBB0_17
## %bb.14:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_17
## %bb.15:
	movl	(%r14), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str.9(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_16
LBB0_3:
	movl	%eax, %r15d
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_av_err2str
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_av_err2str
	leaq	L_.str.4(%rip), %rsi
LBB0_6:
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_17:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.7(%rip), %rdi
	callq	_perror
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_13
LBB0_18:
	movl	(%r14), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	-56(%rbp), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_process_client
	movq	-48(%rbp), %rdi
	callq	_avio_close
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage: %s input http://hostname[:port]\nAPI example program to serve http to multiple clients.\n\n"

L_.str.1:                               ## @.str.1
	.asciz	"listen"

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

	.comm	_stderr,4,2                     ## @stderr
L_.str.3:                               ## @.str.3
	.asciz	"Failed to set listen mode for server: %s\n"

	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
L_.str.4:                               ## @.str.4
	.asciz	"Failed to open server: %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"Entering main loop.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Accepted client, forking process.\n"

L_.str.7:                               ## @.str.7
	.asciz	"Fork failed"

	.comm	_errno,4,2                      ## @errno
L_.str.8:                               ## @.str.8
	.asciz	"In child.\n"

	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
L_.str.9:                               ## @.str.9
	.asciz	"Some errors occurred: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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	x20, x1
	mov	x19, x0
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_av_log_set_level
	cmp	w19, #2
	b.gt	LBB0_3
; %bb.1:
	ldr	x1, [x20]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
LBB0_2:
	mov	w20, #1
	b	LBB0_16
LBB0_3:
	ldp	x19, x21, [x20, #8]
	bl	_avformat_network_init
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #24
	mov	w3, #0
	bl	_av_dict_set
	tbnz	w0, #31, LBB0_13
; %bb.4:
Lloh9:
	adrp	x8, _AVIO_FLAG_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVIO_FLAG_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x0, sp, #8
	add	x4, sp, #24
	mov	x1, x21
	mov	x3, #0
	bl	_avio_open2
Lloh12:
	adrp	x22, _stderr@GOTPAGE
Lloh13:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	w21, [x22]
	tbnz	w0, #31, LBB0_14
; %bb.5:
Lloh14:
	adrp	x1, l_.str.5@PAGE
Lloh15:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	ldr	x0, [sp, #8]
	add	x1, sp, #16
	bl	_avio_accept
	tbnz	w0, #31, LBB0_10
; %bb.6:
Lloh16:
	adrp	x20, l_.str.6@PAGE
Lloh17:
	add	x20, x20, l_.str.6@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	mov	x1, x20
	bl	_fprintf
	bl	_fork
	tbnz	w0, #31, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	w0, LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #16]
	bl	_avio_close
	ldr	x0, [sp, #8]
	add	x1, sp, #16
	bl	_avio_accept
	tbz	w0, #31, LBB0_7
LBB0_10:
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	_avio_close
	mov	w20, #0
	tbz	w21, #31, LBB0_16
; %bb.11:
Lloh18:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_16
; %bb.12:
	ldr	w19, [x22]
	mov	x0, x21
	bl	_av_err2str
	str	x0, [sp]
Lloh21:
	adrp	x1, l_.str.9@PAGE
Lloh22:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	b	LBB0_2
LBB0_13:
	mov	x20, x0
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w19, [x8]
	bl	_av_err2str
	str	x0, [sp]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	b	LBB0_15
LBB0_14:
	mov	x20, x0
	bl	_av_err2str
	str	x0, [sp]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
LBB0_15:
	bl	_fprintf
LBB0_16:
	mov	x0, x20
	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
LBB0_17:
Lloh30:
	adrp	x0, l_.str.7@PAGE
Lloh31:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_perror
Lloh32:
	adrp	x8, _errno@GOTPAGE
Lloh33:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_10
LBB0_18:
	ldr	w0, [x22]
Lloh35:
	adrp	x1, l_.str.8@PAGE
Lloh36:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_fprintf
	ldr	x0, [sp, #16]
	mov	x1, x19
	bl	_process_client
	ldr	x0, [sp, #8]
	bl	_avio_close
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage: %s input http://hostname[:port]\nAPI example program to serve http to multiple clients.\n\n"

l_.str.1:                               ; @.str.1
	.asciz	"listen"

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

	.comm	_stderr,4,2                     ; @stderr
l_.str.3:                               ; @.str.3
	.asciz	"Failed to set listen mode for server: %s\n"

	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
l_.str.4:                               ; @.str.4
	.asciz	"Failed to open server: %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"Entering main loop.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Accepted client, forking process.\n"

l_.str.7:                               ; @.str.7
	.asciz	"Fork failed"

	.comm	_errno,4,2                      ; @errno
l_.str.8:                               ; @.str.8
	.asciz	"In child.\n"

	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
l_.str.9:                               ; @.str.9
	.asciz	"Some errors occurred: %s\n"

.subsections_via_symbols
