	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_repo_logmsg_reencode           ## -- Begin function repo_logmsg_reencode
	.p2align	4, 0x90
_repo_logmsg_reencode:                  ## @repo_logmsg_reencode
	.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	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	xorl	%edx, %edx
	callq	_repo_get_commit_buffer
	movq	%rax, %rbx
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	cmpb	$0, (%r15)
	je	LBB0_2
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_get_header
	movq	%rax, %rbx
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	%rbx, (%r14)
LBB0_6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	leaq	L_.str(%rip), %r14
	cmovneq	%rbx, %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_same_encoding
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_get_cached_commit_buffer
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rax, %rdi
	jne	LBB0_11
## %bb.10:
	callq	_xstrdup
	movq	%rax, %rdi
LBB0_11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	testq	%rdi, %rdi
	jne	LBB0_16
## %bb.12:
	xorl	%r15d, %r15d
	testq	%r14, %r14
	jne	LBB0_19
	jmp	LBB0_18
LBB0_2:
	testq	%r14, %r14
	je	LBB0_20
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_get_header
	movq	%rax, (%r14)
	jmp	LBB0_20
LBB0_13:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_reencode_string
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%rax, %rbx
	callq	_repo_unuse_commit_buffer
	movq	%rbx, %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:
	movq	%r15, %rsi
	callq	_replace_encoding_header
	movq	%rax, %r15
	testq	%r14, %r14
	jne	LBB0_19
LBB0_18:
	movq	%rbx, %rdi
	callq	_free
LBB0_19:
	testq	%r15, %r15
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmovneq	%r15, %rbx
	jmp	LBB0_20
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_20:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%r15d, %r15d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	testq	%r14, %r14
	jne	LBB0_19
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UTF-8"

L_.str.1:                               ## @.str.1
	.asciz	"encoding"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_repo_logmsg_reencode           ; -- Begin function repo_logmsg_reencode
	.p2align	2
_repo_logmsg_reencode:                  ; @repo_logmsg_reencode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x23, x1
	mov	x24, x0
	mov	x2, #0
	bl	_repo_get_commit_buffer
	mov	x19, x0
	cbz	x21, LBB0_8
; %bb.1:
	ldrb	w8, [x21]
	cbz	w8, LBB0_8
; %bb.2:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_get_header
	mov	x22, x0
	cbz	x20, LBB0_4
; %bb.3:
	str	x22, [x20]
LBB0_4:
Lloh2:
	adrp	x8, l_.str@PAGE
Lloh3:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x22, #0
	csel	x25, x8, x22, eq
	mov	x0, x25
	mov	x1, x21
	bl	_same_encoding
	cbz	x0, LBB0_10
; %bb.5:
	cbz	x22, LBB0_16
; %bb.6:
	mov	x0, x24
	mov	x1, x23
	mov	x2, #0
	bl	_get_cached_commit_buffer
	cmp	x19, x0
	b.eq	LBB0_12
; %bb.7:
	mov	x25, x19
	cbnz	x25, LBB0_13
	b	LBB0_17
LBB0_8:
	cbz	x20, LBB0_16
; %bb.9:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_get_header
	str	x0, [x20]
	b	LBB0_16
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x25
	bl	_reencode_string
	cbz	x0, LBB0_17
; %bb.11:
	mov	x25, x0
	mov	x0, x24
	mov	x1, x23
	mov	x2, x19
	bl	_repo_unuse_commit_buffer
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_xstrdup
	mov	x25, x0
	cbz	x25, LBB0_17
LBB0_13:
	mov	x0, x25
	mov	x1, x21
	bl	_replace_encoding_header
	mov	x21, x0
	cbnz	x20, LBB0_15
LBB0_14:
	mov	x0, x22
	bl	_free
LBB0_15:
	cmp	x21, #0
	csel	x19, x19, x21, eq
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	x21, #0
	cbnz	x20, LBB0_15
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UTF-8"

l_.str.1:                               ; @.str.1
	.asciz	"encoding"

.subsections_via_symbols
