	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_binary
_apply_binary:                          ## @apply_binary
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdx), %r14
	testq	%r14, %r14
	jne	LBB0_2
## %bb.1:
	movq	8(%r13), %r14
LBB0_2:
	movq	_the_hash_algo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ebx
	movq	16(%r13), %rdi
	callq	_strlen
	cmpl	%ebx, %eax
	jne	LBB0_6
## %bb.3:
	movq	24(%r13), %rdi
	callq	_strlen
	cmpl	%ebx, %eax
	jne	LBB0_6
## %bb.4:
	movq	16(%r13), %rdi
	leaq	-48(%rbp), %rsi
	callq	_get_oid_hex
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	24(%r13), %rdi
	leaq	-48(%rbp), %rsi
	callq	_get_oid_hex
	testq	%rax, %rax
	je	LBB0_8
LBB0_6:
	leaq	L_.str(%rip), %rdi
LBB0_7:
	callq	__
	movl	%eax, %edi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_error
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpq	$0, (%r13)
	je	LBB0_11
## %bb.9:
	movq	(%r15), %rdi
	movq	8(%r15), %rsi
	movq	_blob_type@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rcx
	callq	_hash_object_file
	movq	%rbx, %rdi
	callq	_oid_to_hex
	movq	16(%r13), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %ebx
	leaq	-48(%rbp), %rdi
	callq	_oid_to_hex
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
LBB0_18:
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_25
LBB0_11:
	cmpq	$0, 8(%r15)
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
LBB0_13:
	movq	24(%r13), %rdi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_get_oid_hex
	movq	%rbx, %rdi
	callq	_is_null_oid
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_clear_image
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_15:
	leaq	-48(%rbp), %rdi
	callq	_has_object_file
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	leaq	-48(%rbp), %rdi
	leaq	-60(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_read_object_file
	testq	%rax, %rax
	je	LBB0_17
## %bb.19:
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_clear_image
	movq	%r12, (%r15)
	movq	-56(%rbp), %rax
	movq	%rax, 8(%r15)
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_20:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_apply_binary_fragment
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_17:
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movq	24(%r13), %rsi
	movl	%eax, %edi
	movq	%r14, %rdx
	jmp	LBB0_18
LBB0_22:
	movq	(%r15), %rdi
	movq	8(%r15), %rsi
	movq	_blob_type@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %r15
	movq	%r15, %rcx
	callq	_hash_object_file
	movq	%r15, %rdi
	callq	_oid_to_hex
	movq	24(%r13), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_23
## %bb.24:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movl	%eax, %r15d
	movq	24(%r13), %rbx
	leaq	-48(%rbp), %rdi
	callq	_oid_to_hex
	movl	%r15d, %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_25
LBB0_23:
	xorl	%eax, %eax
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_the_hash_algo,8,3              ## @the_hash_algo
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot apply binary patch to '%s' without full index line"

	.comm	_blob_type,4,2                  ## @blob_type
L_.str.1:                               ## @.str.1
	.asciz	"the patch applies to '%s' (%s), which does not match the current contents."

L_.str.2:                               ## @.str.2
	.asciz	"the patch applies to an empty '%s' but it is not empty"

L_.str.3:                               ## @.str.3
	.asciz	"the necessary postimage %s for '%s' cannot be read"

L_.str.4:                               ## @.str.4
	.asciz	"binary patch does not apply to '%s'"

L_.str.5:                               ## @.str.5
	.asciz	"binary patch to '%s' creates incorrect result (expecting %s, got %s)"

	.no_dead_strip	_apply_binary
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_binary
_apply_binary:                          ; @apply_binary
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x2]
	cbnz	x19, LBB0_2
; %bb.1:
	ldr	x19, [x20, #8]
LBB0_2:
Lloh0:
	adrp	x8, _the_hash_algo@GOTPAGE
Lloh1:
	ldr	x8, [x8, _the_hash_algo@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w23, [x8]
	ldr	x0, [x20, #16]
	bl	_strlen
	cmp	w0, w23
	b.ne	LBB0_6
; %bb.3:
	ldr	x0, [x20, #24]
	bl	_strlen
	cmp	w0, w23
	b.ne	LBB0_6
; %bb.4:
	ldr	x0, [x20, #16]
	add	x1, sp, #40
	bl	_get_oid_hex
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x20, #24]
	add	x1, sp, #40
	bl	_get_oid_hex
	cbz	x0, LBB0_11
LBB0_6:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	__
LBB0_8:
	mov	x1, x19
LBB0_9:
	bl	_error
LBB0_10:
	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
	add	sp, sp, #112
	ret
LBB0_11:
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.12:
	ldp	x0, x1, [x21]
Lloh5:
	adrp	x8, _blob_type@GOTPAGE
Lloh6:
	ldr	x8, [x8, _blob_type@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x3, sp, #40
	bl	_hash_object_file
	add	x0, sp, #40
	bl	_oid_to_hex
	ldr	x1, [x20, #16]
	bl	_strcmp
	cbz	x0, LBB0_16
; %bb.13:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x20, x0
	add	x0, sp, #40
	bl	_oid_to_hex
	str	x0, [sp]
	mov	x0, x20
	b	LBB0_8
LBB0_14:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_16
; %bb.15:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_16:
	ldr	x0, [x20, #24]
	add	x1, sp, #40
	bl	_get_oid_hex
	add	x0, sp, #40
	bl	_is_null_oid
	cbz	x0, LBB0_18
; %bb.17:
	mov	x0, x21
	bl	_clear_image
	mov	w0, #0
	b	LBB0_10
LBB0_18:
	add	x0, sp, #40
	bl	_has_object_file
	cbz	x0, LBB0_21
; %bb.19:
	add	x0, sp, #40
	add	x1, sp, #36
	add	x2, sp, #24
	bl	_read_object_file
	cbz	x0, LBB0_23
; %bb.20:
	mov	x22, x0
	mov	x0, x21
	bl	_clear_image
	mov	w0, #0
	ldr	x8, [sp, #24]
	stp	x22, x8, [x21]
	b	LBB0_10
LBB0_21:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_apply_binary_fragment
	cbz	x0, LBB0_24
; %bb.22:
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_23:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__
	ldr	x1, [x20, #24]
	str	x19, [sp]
	b	LBB0_9
LBB0_24:
	ldp	x0, x1, [x21]
Lloh16:
	adrp	x8, _blob_type@GOTPAGE
Lloh17:
	ldr	x8, [x8, _blob_type@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x3, sp, #40
	bl	_hash_object_file
	add	x0, sp, #40
	bl	_oid_to_hex
	ldr	x1, [x20, #24]
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.25:
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	mov	x21, x0
	ldr	x20, [x20, #24]
	add	x0, sp, #40
	bl	_oid_to_hex
	stp	x20, x0, [sp]
	mov	x0, x21
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_the_hash_algo,8,3              ; @the_hash_algo
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot apply binary patch to '%s' without full index line"

	.comm	_blob_type,4,2                  ; @blob_type
l_.str.1:                               ; @.str.1
	.asciz	"the patch applies to '%s' (%s), which does not match the current contents."

l_.str.2:                               ; @.str.2
	.asciz	"the patch applies to an empty '%s' but it is not empty"

l_.str.3:                               ; @.str.3
	.asciz	"the necessary postimage %s for '%s' cannot be read"

l_.str.4:                               ; @.str.4
	.asciz	"binary patch does not apply to '%s'"

l_.str.5:                               ; @.str.5
	.asciz	"binary patch to '%s' creates incorrect result (expecting %s, got %s)"

	.no_dead_strip	_apply_binary
.subsections_via_symbols
