	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tomoyo_write_profile
_tomoyo_write_profile:                  ## @tomoyo_write_profile
	.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	(%rdi), %r14
	movq	%r14, %rdi
	movl	$45, %esi
	callq	_strchr
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movb	$0, (%rbx)
LBB0_2:
	leaq	-72(%rbp), %rdx
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_strict_strtoul
	testq	%rax, %rax
	je	LBB0_3
LBB0_29:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_30:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_31:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	1(%rbx), %r12
	testq	%rbx, %rbx
	cmoveq	%r14, %r12
	movq	-72(%rbp), %rdi
	callq	_tomoyo_find_or_assign_new_profile
	testq	%rax, %rax
	je	LBB0_29
## %bb.4:
	movq	%rax, %r14
	movq	%r12, %rdi
	movl	$61, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_29
## %bb.5:
	movq	%rax, %rbx
	movb	$0, (%rax)
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_TOMOYO_MAX_CONTROL_INDEX@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_29
## %bb.7:
	xorl	%ebx, %ebx
	movq	_tomoyo_control_array@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,4), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.28:                              ##   in Loop: Header=BB0_8 Depth=1
	incq	%r14
	movl	(%r15), %eax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jb	LBB0_8
	jmp	LBB0_29
LBB0_12:
	incq	%rbx
	movq	%rbx, %rdi
	callq	_tomoyo_save_name
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_31
LBB0_9:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	incq	%r15
	leaq	L_.str.1(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.25:
	movl	-44(%rbp), %eax
	movq	(%r13), %rcx
	movl	8(%rcx,%rbx,4), %ecx
	cmpl	%ecx, %eax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jbe	LBB0_27
## %bb.26:
	movl	%ecx, -44(%rbp)
	movl	%ecx, %eax
	jmp	LBB0_27
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_30
LBB0_10:
	cmpl	$128, %r14d
	jne	LBB0_11
## %bb.15:
	movq	_tomoyo_mode_2@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_11:
	movq	_tomoyo_mode_4@GOTPCREL(%rip), %rax
LBB0_16:
	movq	(%rax), %r14
	movq	(%r14), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_17
## %bb.19:
	movq	8(%r14), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:
	movq	16(%r14), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_22
## %bb.23:
	movq	24(%r14), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_29
## %bb.24:
	movl	$3, %eax
	jmp	LBB0_18
LBB0_17:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_20:
	movl	$1, %eax
	jmp	LBB0_18
LBB0_22:
	movl	$2, %eax
LBB0_18:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, -44(%rbp)
LBB0_27:
	movq	(%rdx), %rcx
	movl	%eax, (%rcx,%rbx)
	xorl	%eax, %eax
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"COMMENT"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TOMOYO_MAX_CONTROL_INDEX,4,2   ## @TOMOYO_MAX_CONTROL_INDEX
	.comm	_tomoyo_control_array,8,3       ## @tomoyo_control_array
L_.str.1:                               ## @.str.1
	.asciz	"%u"

	.comm	_tomoyo_mode_2,8,3              ## @tomoyo_mode_2
	.comm	_tomoyo_mode_4,8,3              ## @tomoyo_mode_4
	.no_dead_strip	_tomoyo_write_profile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tomoyo_write_profile
_tomoyo_write_profile:                  ; @tomoyo_write_profile
	.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
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #45
	bl	_strchr
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	strb	wzr, [x20]
LBB0_2:
	mov	x2, sp
	mov	x0, x19
	mov	w1, #10
	bl	_strict_strtoul
	cbz	x0, LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
	cmp	x20, #0
	csinc	x20, x19, x20, eq
	ldr	x0, [sp]
	bl	_tomoyo_find_or_assign_new_profile
	cbz	x0, LBB0_3
; %bb.7:
	mov	x19, x0
	mov	x0, x20
	mov	w1, #61
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.8:
	mov	x21, x0
	strb	wzr, [x0]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.9:
Lloh4:
	adrp	x25, _TOMOYO_MAX_CONTROL_INDEX@GOTPAGE
Lloh5:
	ldr	x25, [x25, _TOMOYO_MAX_CONTROL_INDEX@GOTPAGEOFF]
	ldr	w8, [x25]
	cbz	w8, LBB0_3
; %bb.10:
	mov	x23, #0
	mov	x22, #0
Lloh6:
	adrp	x24, _tomoyo_control_array@GOTPAGE
Lloh7:
	ldr	x24, [x24, _tomoyo_control_array@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x1, [x8, x23]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	ldr	w8, [x25]
	add	x23, x23, #16
	cmp	x22, x8
	b.lo	LBB0_11
	b	LBB0_3
LBB0_13:
	add	x0, x21, #1
	bl	_tomoyo_save_name
	cbz	x0, LBB0_18
; %bb.14:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
	b	LBB0_5
LBB0_15:
	add	x20, x21, #1
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #12
	mov	x0, x20
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_19
; %bb.16:
	ldr	w8, [sp, #12]
	ldr	x9, [x24]
	add	x9, x9, x23
	ldr	w9, [x9, #8]
	cmp	w8, w9
	b.ls	LBB0_28
; %bb.17:
	str	w9, [sp, #12]
	mov	x8, x9
	b	LBB0_28
LBB0_18:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_19:
Lloh12:
	adrp	x8, _tomoyo_mode_2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _tomoyo_mode_2@GOTPAGEOFF]
Lloh14:
	adrp	x9, _tomoyo_mode_4@GOTPAGE
Lloh15:
	ldr	x9, [x9, _tomoyo_mode_4@GOTPAGEOFF]
	cmp	w22, #128
	csel	x8, x8, x9, eq
	ldr	x21, [x8]
	ldr	x1, [x21]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_24
; %bb.20:
	ldr	x1, [x21, #8]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_25
; %bb.21:
	ldr	x1, [x21, #16]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_26
; %bb.22:
	ldr	x1, [x21, #24]
	mov	x0, x20
	bl	_strcmp
	cbnz	x0, LBB0_3
; %bb.23:
	mov	w8, #3
	b	LBB0_27
LBB0_24:
	mov	w8, #0
	str	wzr, [sp, #12]
	b	LBB0_28
LBB0_25:
	mov	w8, #1
	b	LBB0_27
LBB0_26:
	mov	w8, #2
LBB0_27:
	str	w8, [sp, #12]
LBB0_28:
	mov	w0, #0
	ldr	x9, [x19]
	str	w8, [x9, x22, lsl #2]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"COMMENT"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TOMOYO_MAX_CONTROL_INDEX,4,2   ; @TOMOYO_MAX_CONTROL_INDEX
	.comm	_tomoyo_control_array,8,3       ; @tomoyo_control_array
l_.str.1:                               ; @.str.1
	.asciz	"%u"

	.comm	_tomoyo_mode_2,8,3              ; @tomoyo_mode_2
	.comm	_tomoyo_mode_4,8,3              ; @tomoyo_mode_4
	.no_dead_strip	_tomoyo_write_profile
.subsections_via_symbols
