	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_to_git
_encode_to_git:                         ## @encode_to_git
	.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
	testq	%r8, %r8
	je	LBB0_4
## %bb.1:
	movl	%r9d, %r12d
	movq	%r8, %rbx
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	_CONV_WRITE_OBJECT@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.2:
	testq	%r13, %r13
	je	LBB0_4
LBB0_5:
	movl	$1, %r15d
	testq	%r14, %r14
	jne	LBB0_7
## %bb.6:
	testq	%rcx, %rcx
	je	LBB0_20
LBB0_7:
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	movl	%r12d, %r8d
	callq	_validate_encoding
	testq	%rax, %rax
	je	LBB0_9
LBB0_4:
	xorl	%r15d, %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movq	%r13, %r8
	callq	_trace_encoding
	movq	_default_encoding@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	-64(%rbp), %r8
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rcx
	callq	_reencode_string_len
	testq	%rax, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_12
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movq	_default_encoding@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdi
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.11:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_die
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_12:
	movq	_default_encoding@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	-64(%rbp), %r8
	leaq	L_.str.2(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, %rcx
	callq	_trace_encoding
	testl	%r12d, %r12d
	je	LBB0_19
## %bb.13:
	movq	%rbx, %rdi
	callq	_check_roundtrip
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	movq	-64(%rbp), %rsi
	movq	_default_encoding@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	-72(%rbp), %r8
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_reencode_string_len
	movq	%rax, %r12
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	callq	_trace_printf
	movq	-72(%rbp), %r8
	leaq	L_.str.4(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_trace_encoding
	testq	%r12, %r12
	je	LBB0_17
## %bb.15:
	cmpq	%r13, -72(%rbp)
	jne	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_18
LBB0_17:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movq	_default_encoding@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_die
LBB0_18:
	movq	%r12, %rdi
	callq	_free
LBB0_19:
	movq	-64(%rbp), %rdx
	leaq	1(%rdx), %rcx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_strbuf_attach
	jmp	LBB0_20
LBB0_21:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_error
	xorl	%r15d, %r15d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_CONV_WRITE_OBJECT,4,2          ## @CONV_WRITE_OBJECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"source"

	.comm	_default_encoding,8,3           ## @default_encoding
L_.str.1:                               ## @.str.1
	.asciz	"failed to encode '%s' from %s to %s"

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

L_.str.3:                               ## @.str.3
	.asciz	"Checking roundtrip encoding for %s...\n"

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

L_.str.5:                               ## @.str.5
	.asciz	"encoding '%s' from %s to %s and back is not the same"

	.no_dead_strip	_encode_to_git
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_to_git
_encode_to_git:                         ; @encode_to_git
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x4, LBB0_6
; %bb.1:
	mov	x20, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _CONV_WRITE_OBJECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONV_WRITE_OBJECT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	x1, LBB0_3
; %bb.2:
	cbz	x22, LBB0_6
LBB0_3:
	cbnz	x23, LBB0_5
; %bb.4:
	cbz	x19, LBB0_18
LBB0_5:
	and	w25, w8, w5
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	mov	x4, x25
	bl	_validate_encoding
	cbz	x0, LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_19
LBB0_7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	mov	x3, x23
	mov	x4, x22
	bl	_trace_encoding
Lloh5:
	adrp	x26, _default_encoding@GOTPAGE
Lloh6:
	ldr	x26, [x26, _default_encoding@GOTPAGEOFF]
	ldr	x2, [x26]
	add	x4, sp, #8
	mov	x0, x23
	mov	x1, x22
	mov	x3, x20
	bl	_reencode_string_len
	mov	x24, x0
	cbnz	x0, LBB0_10
; %bb.8:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	ldr	x3, [x26]
	cbz	w25, LBB0_20
; %bb.9:
	mov	x1, x21
	mov	x2, x20
	bl	_die
LBB0_10:
	ldr	x2, [x26]
	ldr	x4, [sp, #8]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	x3, x24
	bl	_trace_encoding
	cbz	w25, LBB0_17
; %bb.11:
	mov	x0, x20
	bl	_check_roundtrip
	cbz	x0, LBB0_17
; %bb.12:
	ldr	x1, [sp, #8]
	ldr	x3, [x26]
	mov	x4, sp
	mov	x0, x24
	mov	x2, x20
	bl	_reencode_string_len
	mov	x25, x0
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_trace_printf
	ldr	x4, [sp]
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	mov	x3, x25
	bl	_trace_encoding
	cbz	x25, LBB0_15
; %bb.13:
	ldr	x8, [sp]
	cmp	x8, x22
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x23
	mov	x1, x25
	mov	x2, x22
	bl	_memcmp
	cbz	x0, LBB0_16
LBB0_15:
Lloh15:
	adrp	x0, l_.str.5@PAGE
Lloh16:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	ldr	x3, [x26]
	mov	x1, x21
	mov	x2, x20
	bl	_die
LBB0_16:
	mov	x0, x25
	bl	_free
LBB0_17:
	ldr	x2, [sp, #8]
	add	x3, x2, #1
	mov	x0, x19
	mov	x1, x24
	bl	_strbuf_attach
LBB0_18:
	mov	w0, #1
LBB0_19:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_20:
	mov	x1, x21
	mov	x2, x20
	bl	_error
	mov	w0, #0
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CONV_WRITE_OBJECT,4,2          ; @CONV_WRITE_OBJECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"source"

	.comm	_default_encoding,8,3           ; @default_encoding
l_.str.1:                               ; @.str.1
	.asciz	"failed to encode '%s' from %s to %s"

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

l_.str.3:                               ; @.str.3
	.asciz	"Checking roundtrip encoding for %s...\n"

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

l_.str.5:                               ; @.str.5
	.asciz	"encoding '%s' from %s to %s and back is not the same"

	.no_dead_strip	_encode_to_git
.subsections_via_symbols
