	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tomoyo_encode                  ## -- Begin function tomoyo_encode
	.p2align	4, 0x90
_tomoyo_encode:                         ## @tomoyo_encode
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, %r15d
	movq	%rdi, %r12
	movzbl	(%r14), %ebx
	incq	%r14
	movzbl	%bl, %edi
	callq	_tomoyo_is_valid
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$2, %r15d
	jl	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	-1(%r15), %esi
	leaq	1(%r12), %rdi
	movb	%bl, (%r12)
	cmpb	$92, %bl
	jne	LBB0_1
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$3, %r15d
	jb	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	$-2, %r15d
	movb	$92, 1(%r12)
	addq	$2, %r12
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	testb	%bl, %bl
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$5, %r15d
	jl	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	addl	$-4, %r15d
	movb	$92, (%r12)
	movl	%ebx, %eax
	shrb	$6, %al
	orb	$48, %al
	movb	%al, 1(%r12)
	movl	%ebx, %eax
	shrb	$3, %al
	andb	$7, %al
	orb	$48, %al
	movb	%al, 2(%r12)
	andb	$7, %bl
	orb	$48, %bl
	movb	%bl, 3(%r12)
	addq	$4, %r12
	jmp	LBB0_6
LBB0_8:
	cmpl	$2, %r15d
	jge	LBB0_9
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movb	$0, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tomoyo_encode                  ; -- Begin function tomoyo_encode
	.p2align	2
_tomoyo_encode:                         ; @tomoyo_encode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	w21, #92
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x1
	mov	x22, x0
	ldrb	w20, [x19], #1
	mov	x0, x20
	bl	_tomoyo_is_valid
	cbz	x0, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w8, w23, #2
	b.lt	LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w1, w23, #1
	mov	x0, x22
	strb	w20, [x0], #1
	cmp	w20, #92
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w23, #3
	b.lo	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x0, x22, #2
	strb	w21, [x22, #1]
	mov	x1, x8
	b	LBB0_1
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	cbz	w20, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w23, #5
	b.lt	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w1, w23, #4
	strb	w21, [x22]
	lsr	w8, w20, #6
	orr	w8, w8, #0x30
	strb	w8, [x22, #1]
	mov	w8, #48
	bfxil	w8, w20, #3, #3
	strb	w8, [x22, #2]
	mov	w8, #48
	bfxil	w8, w20, #0, #3
	add	x0, x22, #4
	strb	w8, [x22, #3]
	b	LBB0_1
LBB0_9:
	cmp	w23, #2
	b.ge	LBB0_12
LBB0_10:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w0, #0
	strb	wzr, [x22]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
