	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_from_stream
_read_from_stream:                      ## @read_from_stream
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r14d
	leaq	-20(%rbp), %rcx
	callq	_IStream_Read
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_TRACE
	jmp	LBB0_6
LBB0_2:
	movl	-20(%rbp), %esi
	cmpl	%r14d, %esi
	jge	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_TRACE
	movq	_E_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_S_OK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IStream_Read failed: %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Didn't read full chunk: %u < %u\n"

	.comm	_E_FAIL,4,2                     ## @E_FAIL
	.comm	_S_OK,4,2                       ## @S_OK
	.no_dead_strip	_read_from_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_from_stream
_read_from_stream:                      ; @read_from_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	add	x3, sp, #12
	bl	_IStream_Read
	mov	x20, x0
	bl	_FAILED
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	b	LBB0_6
LBB0_2:
	ldr	w1, [sp, #12]
	cmp	w1, w19
	b.ge	LBB0_4
; %bb.3:
	str	x19, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
Lloh4:
	adrp	x8, _E_FAIL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _E_FAIL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _S_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w20, [x8]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IStream_Read failed: %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Didn't read full chunk: %u < %u\n"

	.comm	_E_FAIL,4,2                     ; @E_FAIL
	.comm	_S_OK,4,2                       ; @S_OK
	.no_dead_strip	_read_from_stream
.subsections_via_symbols
