	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tomoyo_write_domain_profile
_tomoyo_write_domain_profile:           ## @tomoyo_write_domain_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movb	$0, (%rax)
	movq	_tomoyo_domain_list_lock@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_down_read
	incq	%rbx
	movq	%rbx, %rdi
	callq	_tomoyo_find_domain
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_up_read
	leaq	-40(%rbp), %rdx
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_strict_strtoul
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	testq	%r14, %r14
	je	LBB0_8
## %bb.4:
	movq	-40(%rbp), %rcx
	movq	_TOMOYO_MAX_PROFILES@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jae	LBB0_8
## %bb.5:
	movq	_tomoyo_profile_ptr@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rdx,%rcx,8)
	jne	LBB0_7
## %bb.6:
	movq	_tomoyo_policy_loaded@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	jne	LBB0_8
LBB0_7:
	movq	%rcx, (%r14)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_tomoyo_domain_list_lock,4,2    ## @tomoyo_domain_list_lock
	.comm	_TOMOYO_MAX_PROFILES,8,3        ## @TOMOYO_MAX_PROFILES
	.comm	_tomoyo_profile_ptr,8,3         ## @tomoyo_profile_ptr
	.comm	_tomoyo_policy_loaded,4,2       ## @tomoyo_policy_loaded
	.no_dead_strip	_tomoyo_write_domain_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_domain_profile
_tomoyo_write_domain_profile:           ; @tomoyo_write_domain_profile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x20, [x0]
	mov	x0, x20
	mov	w1, #32
	bl	_strchr
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	strb	wzr, [x19], #1
Lloh0:
	adrp	x21, _tomoyo_domain_list_lock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tomoyo_domain_list_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_down_read
	mov	x0, x19
	bl	_tomoyo_find_domain
	mov	x19, x0
	mov	x0, x21
	bl	_up_read
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #10
	bl	_strict_strtoul
	cbz	x0, LBB0_4
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #64
	ret
LBB0_4:
	cbz	x19, LBB0_8
; %bb.5:
	ldr	x8, [sp, #8]
Lloh5:
	adrp	x9, _TOMOYO_MAX_PROFILES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TOMOYO_MAX_PROFILES@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_8
; %bb.6:
Lloh8:
	adrp	x9, _tomoyo_profile_ptr@GOTPAGE
Lloh9:
	ldr	x9, [x9, _tomoyo_profile_ptr@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	x9, [x9, x8, lsl #3]
Lloh11:
	adrp	x10, _tomoyo_policy_loaded@GOTPAGE
Lloh12:
	ldr	x10, [x10, _tomoyo_policy_loaded@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	cmp	x9, #0
	mov	w0, #0
	ccmp	w10, #0, #4, eq
	b.ne	LBB0_3
; %bb.7:
	str	x8, [x19]
	b	LBB0_3
LBB0_8:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_tomoyo_domain_list_lock,4,2    ; @tomoyo_domain_list_lock
	.comm	_TOMOYO_MAX_PROFILES,8,3        ; @TOMOYO_MAX_PROFILES
	.comm	_tomoyo_profile_ptr,8,3         ; @tomoyo_profile_ptr
	.comm	_tomoyo_policy_loaded,4,2       ; @tomoyo_policy_loaded
	.no_dead_strip	_tomoyo_write_domain_profile
.subsections_via_symbols
