	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_patch
_check_patch:                           ## @check_patch
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rsi), %r15
	movq	8(%rsi), %r14
	testq	%r15, %r15
	cmoveq	%r14, %r15
	movq	$0, -64(%rbp)
	movl	$1, 16(%rsi)
	leaq	-64(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	callq	_check_preimage
	testl	%eax, %eax
	je	LBB0_1
LBB0_38:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_in_fn_table
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_was_deleted
	movl	$1, %edx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	%r13, %rdi
	callq	_to_be_deleted
	movl	$1, %edx
	testq	%rax, %rax
	jne	LBB0_5
LBB0_4:
	xorl	%edx, %edx
LBB0_5:
	testq	%r14, %r14
	je	LBB0_30
## %bb.6:
	cmpq	$0, 24(%rbx)
	jg	LBB0_9
## %bb.7:
	cmpq	$0, 56(%rbx)
	jne	LBB0_9
## %bb.8:
	cmpq	$0, 48(%rbx)
	je	LBB0_23
LBB0_9:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_check_to_create
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	cmpq	$0, 8(%r12)
	je	LBB0_15
## %bb.11:
	movl	$1, 32(%rbx)
LBB0_12:
	cmpl	$0, 36(%rbx)
	je	LBB0_13
LBB0_23:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_24
	jmp	LBB0_30
LBB0_13:
	cmpq	$0, 24(%rbx)
	jle	LBB0_21
## %bb.14:
	movq	_S_IFREG@GOTPCREL(%rip), %rcx
	movl	$420, %eax                      ## imm = 0x1A4
	orl	(%rcx), %eax
	jmp	LBB0_22
LBB0_15:
	cmpl	$128, %eax
	je	LBB0_20
## %bb.16:
	cmpl	$129, %eax
	jne	LBB0_38
## %bb.17:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_18
LBB0_21:
	movl	40(%rbx), %eax
LBB0_22:
	movl	%eax, 36(%rbx)
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_30
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_strcmp
	movl	36(%rbx), %ecx
	movl	40(%rbx), %edx
	testl	%ecx, %ecx
	jne	LBB0_26
## %bb.25:
	movl	%edx, 36(%rbx)
	movl	%edx, %ecx
LBB0_26:
	xorl	%edx, %ecx
	movq	_S_IFMT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_30
## %bb.27:
	testl	%eax, %eax
	je	LBB0_28
## %bb.29:
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movl	36(%rbx), %esi
	movl	40(%rbx), %ecx
	movl	%eax, %edi
	movq	%r14, %rdx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_38
LBB0_30:
	cmpl	$0, (%r12)
	je	LBB0_31
LBB0_32:
	cmpl	$0, 44(%rbx)
	je	LBB0_33
LBB0_35:
	movq	-64(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_apply_data
	testq	%rax, %rax
	js	LBB0_36
## %bb.37:
	movl	$0, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_38
LBB0_31:
	movq	%rbx, %rdi
	callq	_check_unsafe_path
	movq	%rax, %rcx
	movl	$-128, %eax
	testq	%rcx, %rcx
	jne	LBB0_38
	jmp	LBB0_32
LBB0_33:
	movq	8(%rbx), %rsi
	movq	%r12, %rdi
	callq	_path_is_beyond_symlink
	testq	%rax, %rax
	je	LBB0_35
## %bb.34:
	leaq	L_.str.4(%rip), %rdi
	callq	__
	movq	8(%rbx), %rsi
	movl	%eax, %edi
	jmp	LBB0_19
LBB0_36:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r15, %rsi
	jmp	LBB0_19
LBB0_28:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	36(%rbx), %esi
	movl	40(%rbx), %ecx
	movl	%eax, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_38
LBB0_20:
	leaq	L_.str.1(%rip), %rdi
LBB0_18:
	callq	__
	movl	%eax, %edi
	movq	%r14, %rsi
LBB0_19:
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_38
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: already exists in index"

L_.str.1:                               ## @.str.1
	.asciz	"%s: already exists in working directory"

	.comm	_S_IFREG,4,2                    ## @S_IFREG
	.comm	_S_IFMT,4,2                     ## @S_IFMT
L_.str.2:                               ## @.str.2
	.asciz	"new mode (%o) of %s does not match old mode (%o)"

L_.str.3:                               ## @.str.3
	.asciz	"new mode (%o) of %s does not match old mode (%o) of %s"

L_.str.4:                               ## @.str.4
	.asciz	"affected file '%s' is beyond a symbolic link"

L_.str.5:                               ## @.str.5
	.asciz	"%s: patch does not apply"

	.no_dead_strip	_check_patch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_patch
_check_patch:                           ; @check_patch
	.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	x19, x1
	mov	x21, x0
	ldp	x8, x20, [x1]
	cmp	x8, #0
	csel	x24, x20, x8, eq
	str	xzr, [sp, #32]
	mov	w8, #1
	str	w8, [x1, #16]
	add	x2, sp, #32
	add	x3, sp, #40
	bl	_check_preimage
	cbnz	w0, LBB0_40
; %bb.1:
	ldr	x22, [x19]
	mov	x0, x21
	mov	x1, x20
	bl	_in_fn_table
	cbz	x0, LBB0_5
; %bb.2:
	mov	x23, x0
	bl	_was_deleted
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x23
	bl	_to_be_deleted
	cbz	x0, LBB0_5
LBB0_4:
	mov	w2, #1
	cbnz	x20, LBB0_6
	b	LBB0_25
LBB0_5:
	mov	w2, #0
	cbz	x20, LBB0_25
LBB0_6:
	ldr	x8, [x19, #24]
	cmp	x8, #0
	b.gt	LBB0_9
; %bb.7:
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_9
; %bb.8:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_13
LBB0_9:
	mov	x0, x21
	mov	x1, x20
	bl	_check_to_create
	cbz	w0, LBB0_12
; %bb.10:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_16
; %bb.11:
	mov	w8, #1
	str	w8, [x19, #32]
LBB0_12:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_14
LBB0_13:
	cbnz	x22, LBB0_20
	b	LBB0_25
LBB0_14:
	ldr	x8, [x19, #24]
	cmp	x8, #1
	b.lt	LBB0_19
; %bb.15:
Lloh0:
	adrp	x8, _S_IFREG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S_IFREG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #420
	orr	w8, w8, w9
	str	w8, [x19, #36]
	cbnz	x22, LBB0_20
	b	LBB0_25
LBB0_16:
	cmp	w0, #128
	b.eq	LBB0_37
; %bb.17:
	cmp	w0, #129
	b.ne	LBB0_40
; %bb.18:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_38
LBB0_19:
	ldr	w8, [x19, #40]
	str	w8, [x19, #36]
	cbz	x22, LBB0_25
LBB0_20:
	mov	x0, x22
	mov	x1, x20
	bl	_strcmp
	ldp	w9, w8, [x19, #36]
	cbnz	w9, LBB0_22
; %bb.21:
	str	w8, [x19, #36]
	mov	x9, x8
LBB0_22:
	eor	w8, w9, w8
Lloh5:
	adrp	x9, _S_IFMT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _S_IFMT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_25
; %bb.23:
	cbz	w0, LBB0_34
; %bb.24:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__
	ldp	w8, w9, [x19, #36]
	str	x22, [sp, #24]
	b	LBB0_35
LBB0_25:
	ldr	w8, [x21]
	cbz	w8, LBB0_29
LBB0_26:
	ldr	w8, [x19, #44]
	cbz	w8, LBB0_31
LBB0_27:
	ldr	x3, [sp, #32]
	add	x2, sp, #40
	mov	x0, x21
	mov	x1, x19
	bl	_apply_data
	tbnz	x0, #63, LBB0_33
; %bb.28:
	mov	w0, #0
	str	wzr, [x19, #16]
	b	LBB0_40
LBB0_29:
	mov	x0, x19
	bl	_check_unsafe_path
	cbz	x0, LBB0_26
; %bb.30:
	mov	w0, #-128
	b	LBB0_40
LBB0_31:
	ldr	x1, [x19, #8]
	mov	x0, x21
	bl	_path_is_beyond_symlink
	cbz	x0, LBB0_27
; %bb.32:
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	__
	ldr	x8, [x19, #8]
	b	LBB0_36
LBB0_33:
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	str	x24, [sp]
	b	LBB0_39
LBB0_34:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	ldp	w8, w9, [x19, #36]
LBB0_35:
	stp	x20, x9, [sp, #8]
LBB0_36:
	str	x8, [sp]
	b	LBB0_39
LBB0_37:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_38:
	bl	__
	str	x20, [sp]
LBB0_39:
	bl	_error
LBB0_40:
	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
	.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 AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: already exists in index"

l_.str.1:                               ; @.str.1
	.asciz	"%s: already exists in working directory"

	.comm	_S_IFREG,4,2                    ; @S_IFREG
	.comm	_S_IFMT,4,2                     ; @S_IFMT
l_.str.2:                               ; @.str.2
	.asciz	"new mode (%o) of %s does not match old mode (%o)"

l_.str.3:                               ; @.str.3
	.asciz	"new mode (%o) of %s does not match old mode (%o) of %s"

l_.str.4:                               ; @.str.4
	.asciz	"affected file '%s' is beyond a symbolic link"

l_.str.5:                               ; @.str.5
	.asciz	"%s: patch does not apply"

	.no_dead_strip	_check_patch
.subsections_via_symbols
