	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdfs_open_file                 ## -- Begin function cdfs_open_file
	.p2align	4, 0x90
_cdfs_open_file:                        ## @cdfs_open_file
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.2:
	movq	%rdx, %r15
	movq	%rdi, %rbx
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%r14, 16(%rbx)
	movl	$-1, (%rbx)
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_cdfs_find_file
	movl	%eax, 4(%rbx)
	jmp	LBB0_7
LBB0_4:
	cmpl	$0, (%r14)
	je	LBB0_6
## %bb.5:
	movl	$0, 4(%rbx)
	movl	4(%r14), %edi
	callq	_intfstream_get_size
	movq	16(%rbx), %rcx
	cltd
	idivl	(%rcx)
	shll	$11, %eax
	movl	%eax, 8(%rbx)
	movl	4(%rbx), %eax
	jmp	LBB0_7
LBB0_6:
	movl	$-1, 4(%rbx)
	movl	$-1, %eax
LBB0_7:
	notl	%eax
	shrl	$31, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdfs_open_file                 ; -- Begin function cdfs_open_file
	.p2align	2
_cdfs_open_file:                        ; @cdfs_open_file
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	mov	w0, #0
	cbz	x19, LBB0_8
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_8
; %bb.2:
	mov	x21, x2
	mov	x0, x19
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	str	x20, [x19, #16]
	mov	w8, #-1
	str	w8, [x19]
	cbz	x21, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_cdfs_find_file
LBB0_4:
	str	w0, [x19, #4]
	b	LBB0_7
LBB0_5:
	ldr	w8, [x20]
	cbz	w8, LBB0_9
; %bb.6:
	str	wzr, [x19, #4]
	ldr	w0, [x20, #4]
	bl	_intfstream_get_size
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	sdiv	w8, w0, w8
	lsl	w8, w8, #11
	str	w8, [x19, #8]
	ldr	w0, [x19, #4]
LBB0_7:
	mvn	w8, w0
	lsr	w0, w8, #31
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w0, #-1
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
