	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hg_patch_to_mail
_hg_patch_to_mail:                      ## @hg_patch_to_mail
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -64(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_strbuf_getline_lf
	testl	%eax, %eax
	je	LBB0_1
LBB0_17:
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strbuf_reset
	movq	%rbx, %rdi
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r13, %rdx
	callq	_strbuf_fread
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jle	LBB0_20
## %bb.18:
	leaq	-64(%rbp), %rbx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi
	movl	-56(%rbp), %edx
	movl	$1, %esi
	movq	%r14, %rcx
	callq	_fwrite
	movq	%rbx, %rdi
	callq	_strbuf_reset
	movq	%rbx, %rdi
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r13, %rdx
	callq	_strbuf_fread
	testq	%rax, %rax
	jg	LBB0_19
	jmp	LBB0_20
LBB0_1:
	leaq	L_.str(%rip), %r15
	leaq	-72(%rbp), %r12
	leaq	-64(%rbp), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rdx
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_strbuf_getline_lf
	testl	%eax, %eax
	jne	LBB0_17
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_skip_prefix
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	callq	_skip_prefix
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %r15
	movq	$0, (%r15)
	movq	-72(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	movl	$10, %edx
	callq	_parse_timestamp
	cmpq	$0, (%r15)
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movq	-80(%rbp), %rdi
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdx
	callq	_skip_prefix
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r12d
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	movq	-72(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	movl	$10, %edx
	callq	_strtol
	cmpq	$0, (%rbx)
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	movq	-80(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_11
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_labs
	cltq
	imulq	$-1851608123, %rax, %rcx        ## imm = 0x91A2B3C5
	shrq	$32, %rcx
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$11, %eax
	addl	%ecx, %eax
	imull	$100, %eax, %ebx
	movq	%r15, %rdi
	callq	_labs
	cltq
	imulq	$-1851608123, %rax, %rcx        ## imm = 0x91A2B3C5
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$11, %ecx
	addl	%edx, %ecx
	imull	$3600, %ecx, %ecx               ## imm = 0xE10
	subl	%ecx, %eax
	movswl	%ax, %ecx
	imull	$-30583, %ecx, %ecx             ## imm = 0x8889
	shrl	$16, %ecx
	addl	%eax, %ecx
	movzwl	%cx, %eax
	movswl	%ax, %ecx
	shrl	$15, %eax
	sarl	$5, %ecx
	addl	%eax, %ecx
	movswl	%cx, %eax
	addl	%ebx, %eax
	cltq
	movq	%rax, %rbx
	negq	%rbx
	testq	%r15, %r15
	cmovleq	%rax, %rbx
	movq	_RFC2822@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DATE_MODE
	movl	%r12d, %edi
	movq	%rbx, %rsi
	leaq	L_.str(%rip), %r15
	movl	%eax, %edx
	callq	_show_date
	movq	%r14, %rdi
	leaq	L_.str.7(%rip), %rsi
	movq	%rax, %rdx
	callq	_fprintf
	leaq	-72(%rbp), %r12
	leaq	-64(%rbp), %rbx
	jmp	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi
	leaq	L_.str.8(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	jne	LBB0_16
## %bb.14:
	movq	-64(%rbp), %rdx
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	callq	_fprintf
	jmp	LBB0_17
LBB0_11:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.6(%rip), %rdi
LBB0_12:
	callq	__
	movl	%eax, %edi
	callq	_error
	movl	%eax, %r15d
LBB0_20:
	leaq	-64(%rbp), %rdi
	callq	_strbuf_release
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,16,3               ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"# User "

L_.str.1:                               ## @.str.1
	.asciz	"From: %s\n"

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

	.comm	_errno,8,3                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"invalid timestamp"

L_.str.4:                               ## @.str.4
	.asciz	" "

L_.str.5:                               ## @.str.5
	.asciz	"invalid Date line"

L_.str.6:                               ## @.str.6
	.asciz	"invalid timezone offset"

L_.str.7:                               ## @.str.7
	.asciz	"Date: %s\n"

	.comm	_RFC2822,4,2                    ## @RFC2822
L_.str.8:                               ## @.str.8
	.asciz	"# "

L_.str.9:                               ## @.str.9
	.asciz	"\n%s\n"

	.no_dead_strip	_hg_patch_to_mail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hg_patch_to_mail
_hg_patch_to_mail:                      ; @hg_patch_to_mail
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	str	q0, [sp, #16]
	add	x0, sp, #16
	bl	_strbuf_getline_lf
	cbz	w0, LBB0_5
LBB0_1:
	add	x0, sp, #16
	bl	_strbuf_reset
	add	x0, sp, #16
	mov	w1, #8192
	mov	x2, x19
	bl	_strbuf_fread
	cmp	x0, #1
	b.lt	LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp, #16]
	ldr	w2, [sp, #24]
	mov	w1, #1
	mov	x3, x20
	bl	_fwrite
	add	x0, sp, #16
	bl	_strbuf_reset
	add	x0, sp, #16
	mov	w1, #8192
	mov	x2, x19
	bl	_strbuf_fread
	cmp	x0, #0
	b.gt	LBB0_2
LBB0_3:
	mov	w19, #0
LBB0_4:
	add	x0, sp, #16
	bl	_strbuf_release
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
Lloh3:
	adrp	x22, l_.str@PAGE
Lloh4:
	add	x22, x22, l_.str@PAGEOFF
Lloh5:
	adrp	x23, l_.str.2@PAGE
Lloh6:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh7:
	adrp	x21, _errno@GOTPAGE
Lloh8:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	mov	w26, #46021
	movk	w26, #37282, lsl #16
Lloh9:
	adrp	x27, l_.str.1@PAGE
Lloh10:
	add	x27, x27, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x2, [sp, #8]
	mov	x0, x20
	mov	x1, x27
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	bl	_fprintf
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x0, sp, #16
	mov	x1, x19
	bl	_strbuf_getline_lf
	cbnz	w0, LBB0_1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp, #16]
	add	x2, sp, #8
	mov	x1, x22
	bl	_skip_prefix
	cbnz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [sp, #16]
	add	x2, sp, #8
	mov	x1, x23
	bl	_skip_prefix
	cbz	x0, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	str	xzr, [x21]
	ldr	x0, [sp, #8]
	mov	x1, sp
	mov	w2, #10
	bl	_parse_timestamp
	ldr	x8, [x21]
	cbnz	x8, LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x28, x0
	ldr	x0, [sp]
	add	x2, sp, #8
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_skip_prefix
	cbz	x0, LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	str	xzr, [x21]
	ldr	x0, [sp, #8]
	mov	x1, sp
	mov	w2, #10
	bl	_strtol
	ldr	x8, [x21]
	cbnz	x8, LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [sp]
	ldrb	w8, [x8]
	cbnz	w8, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x24, x0
	bl	_labs
	smull	x8, w0, w26
	lsr	x8, x8, #32
	add	w8, w8, w0
	asr	w9, w8, #11
	add	w25, w9, w8, lsr #31
	mov	x0, x24
	bl	_labs
	smull	x8, w0, w26
	lsr	x8, x8, #32
	add	w8, w8, w0
	asr	w9, w8, #11
	add	w8, w9, w8, lsr #31
	mov	w9, #3600
	msub	w8, w8, w9, w0
	sxth	w9, w8
	mov	w10, #-30583
	mul	w9, w9, w10
	add	w8, w8, w9, lsr #16
	and	w9, w8, #0x8000
	sbfx	w8, w8, #5, #11
	add	w8, w8, w9, lsr #15
	mov	w9, #100
	madd	w8, w25, w9, w8
	sxtw	x8, w8
	cmp	x24, #0
	cneg	x24, x8, gt
Lloh13:
	adrp	x8, _RFC2822@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RFC2822@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_DATE_MODE
	mov	x2, x0
	mov	x0, x28
	mov	x1, x24
	bl	_show_date
	mov	x2, x0
	mov	x0, x20
Lloh16:
	adrp	x1, l_.str.7@PAGE
Lloh17:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_7
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [sp, #16]
Lloh18:
	adrp	x1, l_.str.8@PAGE
Lloh19:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_starts_with
	cbnz	x0, LBB0_8
; %bb.17:
	ldr	x2, [sp, #16]
Lloh20:
	adrp	x1, l_.str.9@PAGE
Lloh21:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	b	LBB0_1
LBB0_18:
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_21
LBB0_19:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_21
LBB0_20:
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_21:
	bl	__
	bl	_error
	mov	x19, x0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,16,3               ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"# User "

l_.str.1:                               ; @.str.1
	.asciz	"From: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"# Date "

	.comm	_errno,8,3                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"invalid timestamp"

l_.str.4:                               ; @.str.4
	.asciz	" "

l_.str.5:                               ; @.str.5
	.asciz	"invalid Date line"

l_.str.6:                               ; @.str.6
	.asciz	"invalid timezone offset"

l_.str.7:                               ; @.str.7
	.asciz	"Date: %s\n"

	.comm	_RFC2822,4,2                    ; @RFC2822
l_.str.8:                               ; @.str.8
	.asciz	"# "

l_.str.9:                               ; @.str.9
	.asciz	"\n%s\n"

	.no_dead_strip	_hg_patch_to_mail
.subsections_via_symbols
