	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stream_blob_to_fd              ## -- Begin function stream_blob_to_fd
	.p2align	4, 0x90
_stream_blob_to_fd:                     ## @stream_blob_to_fd
	.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
	movl	$16408, %eax                    ## imm = 0x4018
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -16436(%rbp)              ## 4-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %rax
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)
	leaq	-16440(%rbp), %rsi
	leaq	-16448(%rbp), %rdx
	movq	%rax, %rdi
	movq	%rbx, %rcx
	callq	_open_istream
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movl	-16440(%rbp), %eax
	movq	_OBJ_BLOB@GOTPCREL(%rip), %rcx
	movl	$-1, %r13d
	cmpl	(%rcx), %eax
	jne	LBB0_29
## %bb.4:
	leaq	-16432(%rbp), %rsi
	movq	%r12, %rdi
	movl	$16384, %edx                    ## imm = 0x4000
	callq	_read_istream
	testl	%eax, %eax
	js	LBB0_24
## %bb.5:
	movl	%eax, %r13d
	xorl	%r14d, %r14d
	movq	_SEEK_CUR@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	addl	$16384, %r14d                   ## imm = 0x4000
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	leaq	-16432(%rbp), %rsi
	movl	$16384, %edx                    ## imm = 0x4000
	callq	_read_istream
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_24
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	testl	%r13d, %r13d
	je	LBB0_25
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, -16436(%rbp)                ## 4-byte Folded Reload
	je	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$16384, %r13d                   ## imm = 0x4000
	jne	LBB0_21
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$0, -16432(%rbp,%rax)
	jne	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	cmpb	$0, -16431(%rbp,%rax)
	jne	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	cmpb	$0, -16430(%rbp,%rax)
	jne	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=2
	cmpb	$0, -16429(%rbp,%rax)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=2
	addq	$4, %rax
	cmpq	$16384, %rax                    ## imm = 0x4000
	jne	LBB0_10
	jmp	LBB0_19
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rax
	cmpl	$16384, %eax                    ## imm = 0x4000
	je	LBB0_19
	jmp	LBB0_21
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$2, %rax
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$16384, %eax                    ## imm = 0x4000
	je	LBB0_19
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=1
	testl	%r14d, %r14d
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_lseek
	cmpq	$-1, %rax
	je	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r15d, %edi
	leaq	-16432(%rbp), %rsi
	movl	%r13d, %edx
	callq	_write_in_full
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jns	LBB0_20
	jmp	LBB0_24
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$3, %rax
	cmpl	$16384, %eax                    ## imm = 0x4000
	je	LBB0_19
	jmp	LBB0_21
LBB0_1:
	movl	$-1, %r13d
	testq	%rbx, %rbx
	je	LBB0_30
## %bb.2:
	movq	%rbx, %rdi
	callq	_free_stream_filter
	jmp	LBB0_30
LBB0_24:
	movl	$-1, %r13d
LBB0_29:
	movq	%r12, %rdi
	callq	_close_istream
LBB0_30:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_32
## %bb.31:
	movl	%r13d, %eax
	addq	$16408, %rsp                    ## imm = 0x4018
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	testl	%r14d, %r14d
	movl	$-1, %r13d
	je	LBB0_28
## %bb.26:
	decl	%r14d
	movl	(%rbx), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_lseek
	cmpq	$-1, %rax
	je	LBB0_29
## %bb.27:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	$1, %edx
	callq	_xwrite
	cmpl	$1, %eax
	jne	LBB0_29
LBB0_28:
	xorl	%r13d, %r13d
	jmp	LBB0_29
LBB0_32:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OBJ_BLOB,4,2                   ## @OBJ_BLOB
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stream_blob_to_fd              ; -- Begin function stream_blob_to_fd
	.p2align	2
_stream_blob_to_fd:                     ; @stream_blob_to_fd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	w9, #16416
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #4, lsl #12             ; =16384
	sub	sp, sp, #32
	mov	x21, x3
	mov	x22, x2
	mov	x8, x1
	mov	x20, x0
Lloh2:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	stur	x9, [x29, #-72]
	add	x1, sp, #20
	add	x2, sp, #8
	mov	x0, x8
	mov	x3, x22
	bl	_open_istream
	cbz	x0, LBB0_17
; %bb.1:
	mov	x19, x0
	ldr	w8, [sp, #20]
Lloh5:
	adrp	x9, _OBJ_BLOB@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OBJ_BLOB@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.2:
	add	x24, sp, #24
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #16384
	bl	_read_istream
	tbnz	w0, #31, LBB0_24
; %bb.3:
	mov	x23, x0
	mov	w22, #0
Lloh8:
	adrp	x25, _SEEK_CUR@GOTPAGE
Lloh9:
	ldr	x25, [x25, _SEEK_CUR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #4, lsl #12           ; =16384
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #16384
	bl	_read_istream
	mov	x23, x0
	tbnz	w0, #31, LBB0_24
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cbz	w23, LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	w21, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w23, #4, lsl #12                ; =16384
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x8, #0
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x24, x8]
	cbnz	w9, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x8, x8, #1
	cmp	x8, #4, lsl #12                 ; =16384
	b.ne	LBB0_10
	b	LBB0_4
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #4, lsl #12                 ; =16384
	b.eq	LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	w22, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x22
	bl	_lseek
	cmn	x0, #1
	b.eq	LBB0_24
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #24
	mov	x0, x20
	mov	x2, x23
	bl	_write_in_full
	tbnz	w0, #31, LBB0_24
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w22, #0
	b	LBB0_5
LBB0_17:
	cbz	x22, LBB0_19
; %bb.18:
	mov	x0, x22
	bl	_free_stream_filter
	mov	w20, #-1
	b	LBB0_26
LBB0_19:
	mov	w20, #-1
	b	LBB0_26
LBB0_20:
	cbz	w22, LBB0_23
; %bb.21:
	sub	w1, w22, #1
	ldr	w2, [x25]
	mov	x0, x20
	bl	_lseek
	cmn	x0, #1
	b.eq	LBB0_24
; %bb.22:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	w2, #1
	bl	_xwrite
	cmp	w0, #1
	b.ne	LBB0_24
LBB0_23:
	mov	w20, #0
	b	LBB0_25
LBB0_24:
	mov	w20, #-1
LBB0_25:
	mov	x0, x19
	bl	_close_istream
LBB0_26:
	ldur	x8, [x29, #-72]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	mov	x0, x20
	add	sp, sp, #4, lsl #12             ; =16384
	add	sp, sp, #32
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OBJ_BLOB,4,2                   ; @OBJ_BLOB
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

.subsections_via_symbols
