	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_fopen_utf8                  ## -- Begin function av_fopen_utf8
	.p2align	4, 0x90
_av_fopen_utf8:                         ## @av_fopen_utf8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movsbl	(%rsi), %eax
	cmpl	$97, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$119, %eax
	je	LBB0_5
## %bb.2:
	cmpl	$114, %eax
	jne	LBB0_14
## %bb.3:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_4:
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rcx), %esi
	orl	%eax, %esi
	movq	_O_APPEND@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rcx), %esi
	orl	%eax, %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
LBB0_6:
	orl	(%rcx), %esi
LBB0_7:
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%rbx, %rdx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	1(%rdx), %ecx
	incq	%rdx
	cmpb	$98, %cl
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	testb	%cl, %cl
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpb	$43, %cl
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	andl	%eax, %esi
	orl	%r8d, %esi
	jmp	LBB0_8
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_15:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_12:
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_avpriv_open
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_fdopen                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_APPEND,4,2                   ## @O_APPEND
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_BINARY,4,2                   ## @O_BINARY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_fopen_utf8                  ; -- Begin function av_fopen_utf8
	.p2align	2
_av_fopen_utf8:                         ; @av_fopen_utf8
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldrsb	w8, [x1]
	cmp	w8, #97
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #119
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #114
	b.ne	LBB0_12
; %bb.3:
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
Lloh9:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w9, w8, w9
Lloh12:
	adrp	x10, _O_APPEND@GOTPAGE
Lloh13:
	ldr	x10, [x10, _O_APPEND@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh14:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x8]
Lloh17:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w9, w8, w9
Lloh20:
	adrp	x10, _O_TRUNC@GOTPAGE
Lloh21:
	ldr	x10, [x10, _O_TRUNC@GOTPAGEOFF]
LBB0_6:
	ldr	w10, [x10]
	orr	w1, w9, w10
LBB0_7:
Lloh22:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mvn	w8, w8
Lloh25:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh26:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	mov	x10, x19
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x10, #1]!
	cmp	w11, #98
	b.eq	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cbz	w11, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w11, #43
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	and	w11, w1, w8
	orr	w1, w11, w9
	b	LBB0_8
LBB0_12:
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _errno@GOTPAGE
Lloh32:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh33:
	str	w8, [x9]
LBB0_13:
	mov	x0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w2, #438
	bl	_avpriv_open
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.15:
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_fdopen
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_APPEND,4,2                   ; @O_APPEND
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_BINARY,4,2                   ; @O_BINARY
.subsections_via_symbols
