	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ffio_fdopen                    ## -- Begin function ffio_fdopen
	.p2align	4, 0x90
_ffio_fdopen:                           ## @ffio_fdopen
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %r12d
	movl	%r12d, %ebx
	testl	%r12d, %r12d
	jne	LBB0_2
## %bb.1:
	movq	_IO_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	movl	%ebx, %edi
	callq	_av_malloc
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_18
## %bb.3:
	movl	$8, %edi
	callq	_av_mallocz
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_16
## %bb.4:
	movq	%r15, (%rax)
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	4(%r15), %edx
	movq	-40(%rbp), %rdi
	movq	-48(%rbp), %rcx
	movq	_io_read_packet@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_io_write_packet@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_io_seek@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movl	%ebx, %esi
	callq	_avio_alloc_context
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_16
## %bb.5:
	movq	40(%r15), %rdi
	callq	_av_strdup
	movq	(%r14), %rcx
	movq	%rax, 48(%rcx)
	movq	(%r14), %rax
	cmpq	$0, 48(%rax)
	je	LBB0_6
LBB0_7:
	movq	32(%r15), %rdi
	callq	_av_strdup
	movq	(%r14), %rcx
	movq	%rax, 40(%rcx)
	movq	(%r14), %rax
	cmpq	$0, 40(%rax)
	je	LBB0_8
LBB0_9:
	movq	_AVIO_FLAG_DIRECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	4(%r15), %ecx
	movl	%ecx, (%rax)
	xorl	%ecx, %ecx
	cmpq	$0, 24(%r15)
	jne	LBB0_11
## %bb.10:
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_11:
	movl	%ecx, 20(%rax)
	movl	%r12d, 4(%rax)
	movl	16(%r15), %edx
	movl	%edx, 32(%rax)
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.12:
	movq	_io_read_pause@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 28(%rax)
	movq	_io_read_seek@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 24(%rax)
	cmpq	$0, (%rdx)
	je	LBB0_14
## %bb.13:
	movq	_AVIO_SEEKABLE_TIME@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 20(%rax)
LBB0_14:
	movq	_io_short_seek@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	_ff_avio_class@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	cmpq	$0, 40(%r15)
	jne	LBB0_15
	jmp	LBB0_7
LBB0_8:
	cmpq	$0, 32(%r15)
	je	LBB0_9
LBB0_15:
	movq	%r14, %rdi
	callq	_avio_closep
LBB0_16:
	leaq	-48(%rbp), %rdi
	callq	_av_freep
	leaq	-40(%rbp), %rdi
	callq	_av_freep
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_17:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_BUFFER_SIZE,4,2             ## @IO_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
	.comm	_io_read_packet,4,2             ## @io_read_packet
	.comm	_io_write_packet,4,2            ## @io_write_packet
	.comm	_io_seek,4,2                    ## @io_seek
	.comm	_AVIO_FLAG_DIRECT,4,2           ## @AVIO_FLAG_DIRECT
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_io_read_pause,4,2              ## @io_read_pause
	.comm	_io_read_seek,4,2               ## @io_read_seek
	.comm	_AVIO_SEEKABLE_TIME,4,2         ## @AVIO_SEEKABLE_TIME
	.comm	_io_short_seek,4,2              ## @io_short_seek
	.comm	_ff_avio_class,4,2              ## @ff_avio_class
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ffio_fdopen                    ; -- Begin function ffio_fdopen
	.p2align	2
_ffio_fdopen:                           ; @ffio_fdopen
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w22, [x1]
Lloh0:
	adrp	x8, _IO_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, #0
	csel	w21, w8, w22, eq
	mov	x0, x21
	bl	_av_malloc
	str	x0, [sp]
	cbz	x0, LBB0_9
; %bb.1:
	mov	w0, #8
	bl	_av_mallocz
	str	x0, [sp, #8]
	cbz	x0, LBB0_13
; %bb.2:
	str	x19, [x0]
	ldp	x0, x3, [sp]
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _AVIO_FLAG_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AVIO_FLAG_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w2, w9, w8
Lloh6:
	adrp	x8, _io_read_packet@GOTPAGE
Lloh7:
	ldr	x8, [x8, _io_read_packet@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
Lloh9:
	adrp	x8, _io_write_packet@GOTPAGE
Lloh10:
	ldr	x8, [x8, _io_write_packet@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
Lloh12:
	adrp	x8, _io_seek@GOTPAGE
Lloh13:
	ldr	x8, [x8, _io_seek@GOTPAGEOFF]
Lloh14:
	ldr	w6, [x8]
	mov	x1, x21
	bl	_avio_alloc_context
	str	x0, [x20]
	cbz	x0, LBB0_13
; %bb.3:
	ldr	x0, [x19, #40]
	bl	_av_strdup
	ldr	x8, [x20]
	str	x0, [x8, #48]
	ldr	x8, [x20]
	ldr	x8, [x8, #48]
	cbz	x8, LBB0_10
LBB0_4:
	ldr	x0, [x19, #32]
	bl	_av_strdup
	ldr	x8, [x20]
	str	x0, [x8, #40]
	ldr	x8, [x20]
	ldr	x9, [x8, #40]
	cbz	x9, LBB0_11
LBB0_5:
	ldr	w9, [x19, #4]
Lloh15:
	adrp	x10, _AVIO_FLAG_DIRECT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AVIO_FLAG_DIRECT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	and	w9, w10, w9
	str	w9, [x8]
	ldr	x9, [x19, #24]
Lloh18:
	adrp	x10, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh19:
	ldr	x10, [x10, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w9, w10, wzr, eq
	str	w9, [x8, #20]
	str	w22, [x8, #4]
	ldr	w10, [x19, #16]
	str	w10, [x8, #32]
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_8
; %bb.6:
Lloh21:
	adrp	x11, _io_read_pause@GOTPAGE
Lloh22:
	ldr	x11, [x11, _io_read_pause@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
Lloh24:
	adrp	x12, _io_read_seek@GOTPAGE
Lloh25:
	ldr	x12, [x12, _io_read_seek@GOTPAGEOFF]
Lloh26:
	ldr	w12, [x12]
	stp	w12, w11, [x8, #24]
	ldr	x10, [x10]
	cbz	x10, LBB0_8
; %bb.7:
Lloh27:
	adrp	x10, _AVIO_SEEKABLE_TIME@GOTPAGE
Lloh28:
	ldr	x10, [x10, _AVIO_SEEKABLE_TIME@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8, #20]
LBB0_8:
	mov	w0, #0
Lloh30:
	adrp	x9, _io_short_seek@GOTPAGE
Lloh31:
	ldr	x9, [x9, _io_short_seek@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	str	w9, [x8, #16]
Lloh33:
	adrp	x9, _ff_avio_class@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ff_avio_class@GOTPAGEOFF]
	str	x9, [x8, #8]
	b	LBB0_14
LBB0_9:
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	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_10:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_12
	b	LBB0_4
LBB0_11:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_5
LBB0_12:
	mov	x0, x20
	bl	_avio_closep
LBB0_13:
	add	x0, sp, #8
	bl	_av_freep
	mov	x0, sp
	bl	_av_freep
Lloh38:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_14:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_BUFFER_SIZE,4,2             ; @IO_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
	.comm	_io_read_packet,4,2             ; @io_read_packet
	.comm	_io_write_packet,4,2            ; @io_write_packet
	.comm	_io_seek,4,2                    ; @io_seek
	.comm	_AVIO_FLAG_DIRECT,4,2           ; @AVIO_FLAG_DIRECT
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_io_read_pause,4,2              ; @io_read_pause
	.comm	_io_read_seek,4,2               ; @io_read_seek
	.comm	_AVIO_SEEKABLE_TIME,4,2         ; @AVIO_SEEKABLE_TIME
	.comm	_io_short_seek,4,2              ; @io_short_seek
	.comm	_ff_avio_class,4,2              ; @ff_avio_class
.subsections_via_symbols
