	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_delta
_apply_delta:                           ## @apply_delta
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	movq	_report_buffer@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_SLIDING_VIEW_INIT
	movq	%rax, -56(%rbp)
	movq	%rdx, -48(%rbp)
	xorl	%eax, %eax
	callq	_init_postimage
	testq	%rax, %rax
	je	LBB0_1
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_die
	jmp	LBB0_3
LBB0_1:
	movq	_postimage@GOTPCREL(%rip), %rdi
	callq	_buffer_tmpfile_rewind
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	testq	%r15, %r15
	je	LBB0_7
## %bb.4:
	leaq	-48(%rbp), %rbx
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_printf
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	xorl	%eax, %eax
	callq	_get_response_line
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_parse_cat_response_line
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_die
LBB0_6:
	movq	-48(%rbp), %rdi
	movl	$1, %esi
	callq	_check_preimage_overflow
LBB0_7:
	movq	_S_IFLNK@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %r14
	leaq	-56(%rbp), %rdi
	movq	%r14, %rsi
	callq	_strbuf_addstr
	movq	-48(%rbp), %rbx
	movq	%r14, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_check_preimage_overflow
	movq	%r14, %rdi
	callq	_strlen
	movslq	%eax, %rdi
	addq	-48(%rbp), %rdi
	movq	%rdi, -48(%rbp)
	movl	$1, %esi
	callq	_check_preimage_overflow
LBB0_9:
	leaq	-56(%rbp), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movq	%r12, %rcx
	callq	_svndiff0_apply
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_11:
	testq	%r15, %r15
	je	LBB0_16
## %bb.12:
	movq	-48(%rbp), %rdi
	movl	$1, %esi
	callq	_signed_add_overflows
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	-48(%rbp), %rsi
	leaq	1(%rsi), %rax
	movq	%rax, -48(%rbp)
	leaq	-56(%rbp), %rdi
	movl	$1, %edx
	callq	_move_window
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_14:
	movq	-56(%rbp), %rax
	cmpb	$10, (%rax)
	je	LBB0_16
## %bb.15:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_16:
	movq	_postimage@GOTPCREL(%rip), %rdi
	callq	_buffer_tmpfile_prepare_to_read
	movq	%rax, %rbx
	testq	%rax, %rax
	jns	LBB0_18
## %bb.17:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_18:
	leaq	-56(%rbp), %rdi
	callq	_strbuf_release
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_report_buffer,4,2              ## @report_buffer
	.comm	_postimage,4,2                  ## @postimage
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot open temporary file for blob retrieval"

L_.str.1:                               ## @.str.1
	.asciz	"cat-blob %s\n"

	.comm	_stdout,4,2                     ## @stdout
L_.str.2:                               ## @.str.2
	.asciz	"invalid cat-blob response: %s"

	.comm	_S_IFLNK,8,3                    ## @S_IFLNK
L_.str.3:                               ## @.str.3
	.asciz	"link "

L_.str.4:                               ## @.str.4
	.asciz	"cannot apply delta"

L_.str.5:                               ## @.str.5
	.asciz	"cannot seek to end of input"

L_.str.6:                               ## @.str.6
	.asciz	"missing newline after cat-blob response"

L_.str.7:                               ## @.str.7
	.asciz	"cannot read temporary file for blob retrieval"

	.no_dead_strip	_apply_delta
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_delta
_apply_delta:                           ; @apply_delta
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, _report_buffer@GOTPAGE
Lloh1:
	ldr	x0, [x0, _report_buffer@GOTPAGEOFF]
	mov	w1, #0
	bl	_SLIDING_VIEW_INIT
	stp	x0, x1, [sp, #16]
	bl	_init_postimage
	cbz	x0, LBB0_2
LBB0_1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die
	mov	x22, #0
	b	LBB0_3
LBB0_2:
Lloh4:
	adrp	x0, _postimage@GOTPAGE
Lloh5:
	ldr	x0, [x0, _postimage@GOTPAGEOFF]
	bl	_buffer_tmpfile_rewind
	mov	x22, x0
	cbz	x0, LBB0_1
LBB0_3:
	cbz	x19, LBB0_7
; %bb.4:
	add	x8, sp, #16
	add	x25, x8, #8
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printf
Lloh8:
	adrp	x8, _stdout@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_fflush
	bl	_get_response_line
	mov	x24, x0
	mov	x1, x25
	bl	_parse_cat_response_line
	cbz	x0, LBB0_6
; %bb.5:
	str	x24, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_die
LBB0_6:
	ldr	x0, [sp, #24]
	mov	w1, #1
	bl	_check_preimage_overflow
LBB0_7:
Lloh13:
	adrp	x8, _S_IFLNK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _S_IFLNK@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_9
; %bb.8:
Lloh16:
	adrp	x23, l_.str.3@PAGE
Lloh17:
	add	x23, x23, l_.str.3@PAGEOFF
	add	x0, sp, #16
	mov	x1, x23
	bl	_strbuf_addstr
	ldr	x24, [sp, #24]
	mov	x0, x23
	bl	_strlen
	mov	x1, x0
	mov	x0, x24
	bl	_check_preimage_overflow
	mov	x0, x23
	bl	_strlen
	ldr	x8, [sp, #24]
	add	x0, x8, w0, sxtw
	str	x0, [sp, #24]
	mov	w1, #1
	bl	_check_preimage_overflow
LBB0_9:
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	bl	_svndiff0_apply
	cbz	x0, LBB0_11
; %bb.10:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_die
LBB0_11:
	cbz	x19, LBB0_16
; %bb.12:
	ldr	x0, [sp, #24]
	mov	w1, #1
	bl	_signed_add_overflows
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	x1, [sp, #24]
	add	x8, x1, #1
	str	x8, [sp, #24]
	add	x0, sp, #16
	mov	w2, #1
	bl	_move_window
	cbz	x0, LBB0_14
; %bb.13:
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_die
LBB0_14:
	ldr	x8, [sp, #16]
	ldrb	w8, [x8]
	cmp	w8, #10
	b.eq	LBB0_16
; %bb.15:
Lloh22:
	adrp	x0, l_.str.6@PAGE
Lloh23:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_die
LBB0_16:
Lloh24:
	adrp	x0, _postimage@GOTPAGE
Lloh25:
	ldr	x0, [x0, _postimage@GOTPAGEOFF]
	bl	_buffer_tmpfile_prepare_to_read
	mov	x19, x0
	tbz	x0, #63, LBB0_18
; %bb.17:
Lloh26:
	adrp	x0, l_.str.7@PAGE
Lloh27:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_die
LBB0_18:
	add	x0, sp, #16
	bl	_strbuf_release
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_report_buffer,4,2              ; @report_buffer
	.comm	_postimage,4,2                  ; @postimage
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot open temporary file for blob retrieval"

l_.str.1:                               ; @.str.1
	.asciz	"cat-blob %s\n"

	.comm	_stdout,4,2                     ; @stdout
l_.str.2:                               ; @.str.2
	.asciz	"invalid cat-blob response: %s"

	.comm	_S_IFLNK,8,3                    ; @S_IFLNK
l_.str.3:                               ; @.str.3
	.asciz	"link "

l_.str.4:                               ; @.str.4
	.asciz	"cannot apply delta"

l_.str.5:                               ; @.str.5
	.asciz	"cannot seek to end of input"

l_.str.6:                               ; @.str.6
	.asciz	"missing newline after cat-blob response"

l_.str.7:                               ; @.str.7
	.asciz	"cannot read temporary file for blob retrieval"

	.no_dead_strip	_apply_delta
.subsections_via_symbols
