	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function detect_patch_format
_detect_patch_format:                   ## @detect_patch_format
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PATCH_FORMAT_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_is_directory
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	_PATCH_FORMAT_MBOX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_24:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_xfopen
	movq	%rax, %r15
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_strbuf_getline
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, -40(%rbp)
	je	LBB0_5
LBB0_7:
	movq	-48(%rbp), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	jne	LBB0_21
## %bb.8:
	movq	-48(%rbp), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	je	LBB0_9
LBB0_21:
	movq	_PATCH_FORMAT_MBOX@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %r14d
LBB0_23:
	movq	%r15, %rdi
	callq	_fclose
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	leaq	-80(%rbp), %rdi
	callq	_strbuf_release
	leaq	-64(%rbp), %rdi
	callq	_strbuf_release
	jmp	LBB0_24
LBB0_9:
	movq	-48(%rbp), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_PATCH_FORMAT_STGIT_SERIES@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_11:
	movq	-48(%rbp), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	leaq	-80(%rbp), %rdi
	movq	%r15, %rsi
	callq	_strbuf_getline
	leaq	-64(%rbp), %rdi
	movq	%r15, %rsi
	callq	_strbuf_getline
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	cmpq	$0, -72(%rbp)
	jne	LBB0_19
## %bb.15:
	movq	-64(%rbp), %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	jne	LBB0_25
## %bb.16:
	movq	-64(%rbp), %rdi
	leaq	L_.str.7(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	jne	LBB0_25
## %bb.17:
	movq	-64(%rbp), %rdi
	leaq	L_.str.8(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	je	LBB0_18
LBB0_25:
	movq	_PATCH_FORMAT_STGIT@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_12:
	movq	_PATCH_FORMAT_HG@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_18:
	movq	-40(%rbp), %rax
LBB0_19:
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:
	movq	%r15, %rdi
	callq	_is_mail
	testq	%rax, %rax
	jne	LBB0_21
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_PATCH_FORMAT_UNKNOWN,4,2       ## @PATCH_FORMAT_UNKNOWN
	.comm	_STRBUF_INIT,16,3               ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-"

	.comm	_PATCH_FORMAT_MBOX,4,2          ## @PATCH_FORMAT_MBOX
L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"From "

L_.str.3:                               ## @.str.3
	.asciz	"From: "

L_.str.4:                               ## @.str.4
	.asciz	"# This series applies on GIT commit"

	.comm	_PATCH_FORMAT_STGIT_SERIES,4,2  ## @PATCH_FORMAT_STGIT_SERIES
L_.str.5:                               ## @.str.5
	.asciz	"# HG changeset patch"

	.comm	_PATCH_FORMAT_HG,4,2            ## @PATCH_FORMAT_HG
L_.str.6:                               ## @.str.6
	.asciz	"From:"

L_.str.7:                               ## @.str.7
	.asciz	"Author:"

L_.str.8:                               ## @.str.8
	.asciz	"Date:"

	.comm	_PATCH_FORMAT_STGIT,4,2         ## @PATCH_FORMAT_STGIT
	.no_dead_strip	_detect_patch_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function detect_patch_format
_detect_patch_format:                   ; @detect_patch_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _PATCH_FORMAT_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PATCH_FORMAT_UNKNOWN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _STRBUF_INIT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _STRBUF_INIT@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
Lloh5:
	ldr	q0, [x9]
	stp	q0, q0, [sp, #16]
	str	q0, [sp]
	ldr	x21, [x0]
	cbz	x21, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	w0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_is_directory
	cbz	x0, LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _PATCH_FORMAT_MBOX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PATCH_FORMAT_MBOX@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	ldr	x0, [x20]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_xfopen
	mov	x20, x0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #32
	mov	x1, x20
	bl	_strbuf_getline
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_6
LBB0_8:
	ldr	x0, [sp, #32]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_starts_with
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	x0, [sp, #32]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_starts_with
	cbz	x0, LBB0_13
LBB0_10:
Lloh17:
	adrp	x8, _PATCH_FORMAT_MBOX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PATCH_FORMAT_MBOX@GOTPAGEOFF]
LBB0_11:
	ldr	w19, [x8]
LBB0_12:
	mov	x0, x20
	bl	_fclose
	add	x0, sp, #32
	bl	_strbuf_release
	add	x0, sp, #16
	bl	_strbuf_release
	mov	x0, sp
	bl	_strbuf_release
	b	LBB0_4
LBB0_13:
	ldr	x0, [sp, #32]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_starts_with
	cbz	x0, LBB0_15
; %bb.14:
Lloh21:
	adrp	x8, _PATCH_FORMAT_STGIT_SERIES@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PATCH_FORMAT_STGIT_SERIES@GOTPAGEOFF]
	b	LBB0_11
LBB0_15:
	ldr	x0, [sp, #32]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_22
; %bb.16:
	add	x0, sp, #16
	mov	x1, x20
	bl	_strbuf_getline
	mov	x0, sp
	mov	x1, x20
	bl	_strbuf_getline
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_24
; %bb.17:
	ldr	x9, [sp, #24]
	cbnz	x9, LBB0_24
; %bb.18:
	ldr	x0, [sp]
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_starts_with
	cbnz	x0, LBB0_21
; %bb.19:
	ldr	x0, [sp]
Lloh27:
	adrp	x1, l_.str.7@PAGE
Lloh28:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_starts_with
	cbnz	x0, LBB0_21
; %bb.20:
	ldr	x0, [sp]
Lloh29:
	adrp	x1, l_.str.8@PAGE
Lloh30:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_starts_with
	cbz	x0, LBB0_23
LBB0_21:
Lloh31:
	adrp	x8, _PATCH_FORMAT_STGIT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PATCH_FORMAT_STGIT@GOTPAGEOFF]
	b	LBB0_11
LBB0_22:
Lloh33:
	adrp	x8, _PATCH_FORMAT_HG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PATCH_FORMAT_HG@GOTPAGEOFF]
	b	LBB0_11
LBB0_23:
	ldr	x8, [sp, #40]
LBB0_24:
	cbz	x8, LBB0_12
; %bb.25:
	mov	x0, x20
	bl	_is_mail
Lloh35:
	adrp	x8, _PATCH_FORMAT_MBOX@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PATCH_FORMAT_MBOX@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w19, w19, w8, eq
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_PATCH_FORMAT_UNKNOWN,4,2       ; @PATCH_FORMAT_UNKNOWN
	.comm	_STRBUF_INIT,16,3               ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-"

	.comm	_PATCH_FORMAT_MBOX,4,2          ; @PATCH_FORMAT_MBOX
l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"From "

l_.str.3:                               ; @.str.3
	.asciz	"From: "

l_.str.4:                               ; @.str.4
	.asciz	"# This series applies on GIT commit"

	.comm	_PATCH_FORMAT_STGIT_SERIES,4,2  ; @PATCH_FORMAT_STGIT_SERIES
l_.str.5:                               ; @.str.5
	.asciz	"# HG changeset patch"

	.comm	_PATCH_FORMAT_HG,4,2            ; @PATCH_FORMAT_HG
l_.str.6:                               ; @.str.6
	.asciz	"From:"

l_.str.7:                               ; @.str.7
	.asciz	"Author:"

l_.str.8:                               ; @.str.8
	.asciz	"Date:"

	.comm	_PATCH_FORMAT_STGIT,4,2         ; @PATCH_FORMAT_STGIT
	.no_dead_strip	_detect_patch_format
.subsections_via_symbols
