	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function subfile_open
_subfile_open:                          ## @subfile_open
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movq	%rdi, %r13
	movq	%rsi, -48(%rbp)
	movq	16(%rdi), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpq	8(%rbx), %rax
	jle	LBB0_7
LBB0_3:
	leaq	L_.str.1(%rip), %rax
	leaq	-48(%rbp), %rdx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_av_strstart
	leaq	24(%rbx), %r12
	movq	-48(%rbp), %rsi
	leaq	8(%r13), %rcx
	movl	(%r13), %eax
	movl	4(%r13), %r9d
	movq	%r12, %rdi
	movl	%r15d, %edx
	movq	%r14, %r8
	pushq	%r13
	pushq	%rax
	callq	_ffurl_open_whitelist
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movq	8(%rbx), %rax
	movq	%rax, 16(%rbx)
	movq	%r13, %rdi
	callq	_slave_seek
	movl	%eax, %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jns	LBB0_6
## %bb.5:
	movl	(%r12), %edi
	callq	_ffurl_close
	movl	%ebx, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	cmpq	8(%rbx), %rax
	jg	LBB0_3
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INT64_MAX,8,3                  ## @INT64_MAX
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"end before start\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"subfile:"

	.no_dead_strip	_subfile_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function subfile_open
_subfile_open:                          ; @subfile_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
	str	x1, [sp, #8]
	ldr	x23, [x0, #16]
	ldr	x8, [x23]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _INT64_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT64_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_2:
	ldr	x9, [x23, #8]
	cmp	x8, x9
	b.le	LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	x0, x1
	mov	x1, x8
	bl	_av_strstart
	add	x22, x23, #24
	ldr	x1, [sp, #8]
	add	x3, x19, #8
	ldp	w6, w5, [x19]
	mov	x0, x22
	mov	x2, x21
	mov	x4, x20
	mov	x7, x19
	bl	_ffurl_open_whitelist
	tbnz	w0, #31, LBB0_7
; %bb.4:
	ldr	x8, [x23, #8]
	str	x8, [x23, #16]
	mov	x0, x19
	bl	_slave_seek
	tbnz	w0, #31, LBB0_8
; %bb.5:
	mov	w20, #0
	b	LBB0_9
LBB0_6:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	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
	add	sp, sp, #80
	b	_AVERROR
LBB0_7:
	mov	x20, x0
	b	LBB0_9
LBB0_8:
	mov	x20, x0
	ldr	w0, [x22]
	bl	_ffurl_close
LBB0_9:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_INT64_MAX,8,3                  ; @INT64_MAX
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"end before start\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"subfile:"

	.no_dead_strip	_subfile_open
.subsections_via_symbols
