	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_binary_fragment
_apply_binary_fragment:                 ## @apply_binary_fragment
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	16(%rdx), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.5:
	movq	%rsi, %r14
	cmpq	$0, (%rdi)
	je	LBB0_8
## %bb.6:
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
LBB0_8:
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_12
## %bb.9:
	movl	$-1, %r12d
	cmpl	$129, %eax
	jne	LBB0_14
## %bb.10:
	movq	(%r14), %rsi
	movq	8(%r14), %rdi
	movl	16(%rbx), %edx
	movq	8(%rbx), %rcx
	leaq	-40(%rbp), %r8
	callq	_patch_delta
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_clear_image
	movq	%r15, 8(%r14)
	movq	-40(%rbp), %rax
	movq	%rax, (%r14)
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_12:
	movq	%r14, %rdi
	callq	_clear_image
	movq	8(%rbx), %rsi
	movq	%rsi, (%r14)
	movl	16(%rbx), %edi
	callq	_xmemdupz
	movq	%rax, 8(%r14)
LBB0_13:
	xorl	%r12d, %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	__
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	jne	LBB0_4
## %bb.3:
	movq	(%r15), %rsi
LBB0_4:
	movl	%eax, %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing binary patch data for '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"cannot reverse-apply a binary patch without the reverse hunk to '%s'"

	.no_dead_strip	_apply_binary_fragment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_binary_fragment
_apply_binary_fragment:                 ; @apply_binary_fragment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	ldr	x21, [x2, #16]
	cbz	x21, LBB0_7
; %bb.1:
	mov	x19, x1
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x21, [x21, #24]
	cbz	x21, LBB0_11
LBB0_3:
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.5:
	ldp	x1, x0, [x19]
	ldr	w2, [x21, #16]
	ldr	x3, [x21, #8]
	add	x4, sp, #8
	bl	_patch_delta
	cbz	x0, LBB0_8
; %bb.6:
	mov	x20, x0
	mov	x0, x19
	bl	_clear_image
	mov	w0, #0
	ldr	x8, [sp, #8]
	stp	x8, x20, [x19]
	b	LBB0_10
LBB0_7:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_8:
	mov	w0, #-1
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_clear_image
	ldr	x1, [x21, #8]
	str	x1, [x19]
	ldr	w0, [x21, #16]
	bl	_xmemdupz
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_11:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	bl	__
	ldr	x1, [x20, #8]
	cbnz	x1, LBB0_14
; %bb.13:
	ldr	x1, [x20]
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_error
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing binary patch data for '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"cannot reverse-apply a binary patch without the reverse hunk to '%s'"

	.no_dead_strip	_apply_binary_fragment
.subsections_via_symbols
