	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function security_context_to_sid_core
_security_context_to_sid_core:          ## @security_context_to_sid_core
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	movq	%rdi, %r13
	movq	_ss_initialized@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.7:
	movl	%r8d, %r12d
	movl	%esi, %r14d
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_SECSID_NULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	leal	1(%r14), %edi
	movl	%r8d, %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movslq	%r14d, %rax
	movb	$0, (%r15,%rax)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.14:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_kstrdup
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_11
## %bb.15:
	movq	%r15, %rdi
	callq	_kfree
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_1:
	movq	%rbx, %r12
	movq	_SECINITSID_NUM@GOTPCREL(%rip), %r14
	cmpl	$2, (%r14)
	jl	LBB0_5
## %bb.2:
	movl	$1, %ebx
	movq	_initial_sid_to_string@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	movq	%r13, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_5:
	movq	_SECINITSID_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, (%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_10:
	xorl	%r13d, %r13d
LBB0_11:
	movq	%rbx, %r12
	movq	_policy_rwlock@GOTPCREL(%rip), %rdi
	callq	_read_lock
	movq	_policydb@GOTPCREL(%rip), %rdi
	movq	_sidtab@GOTPCREL(%rip), %rsi
	leaq	-64(%rbp), %r8
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_string_to_context_struct
	movl	%eax, %ebx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_16
## %bb.13:
	movq	%r13, -64(%rbp)
	movl	%r14d, -56(%rbp)
	xorl	%r13d, %r13d
	jmp	LBB0_17
LBB0_16:
	testl	%ebx, %ebx
	jne	LBB0_18
LBB0_17:
	movq	_sidtab@GOTPCREL(%rip), %rdi
	leaq	-64(%rbp), %r14
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_sidtab_context_to_sid
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_context_destroy
LBB0_18:
	movq	_policy_rwlock@GOTPCREL(%rip), %rdi
	callq	_read_unlock
	movq	%r15, %rdi
	callq	_kfree
	movq	%r13, %rdi
	callq	_kfree
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ss_initialized,4,2             ## @ss_initialized
	.comm	_SECINITSID_NUM,4,2             ## @SECINITSID_NUM
	.comm	_initial_sid_to_string,8,3      ## @initial_sid_to_string
	.comm	_SECINITSID_KERNEL,4,2          ## @SECINITSID_KERNEL
	.comm	_SECSID_NULL,4,2                ## @SECSID_NULL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_policy_rwlock,4,2              ## @policy_rwlock
	.comm	_policydb,4,2                   ## @policydb
	.comm	_sidtab,4,2                     ## @sidtab
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_security_context_to_sid_core
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function security_context_to_sid_core
_security_context_to_sid_core:          ; @security_context_to_sid_core
	.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
	mov	x19, x2
	mov	x22, x0
Lloh0:
	adrp	x8, _ss_initialized@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ss_initialized@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x23, x5
	mov	x25, x4
	mov	x24, x3
	mov	x21, x1
Lloh3:
	adrp	x8, _SECSID_NULL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SECSID_NULL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
	add	w0, w1, #1
	mov	x1, x4
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	strb	wzr, [x20, w21, sxtw]
	cbz	w23, LBB0_12
; %bb.3:
	mov	x0, x20
	mov	x1, x25
	bl	_kstrdup
	mov	x22, x0
	cbnz	x0, LBB0_13
; %bb.4:
	mov	x0, x20
	bl	_kfree
LBB0_5:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_19
LBB0_6:
Lloh9:
	adrp	x21, _SECINITSID_NUM@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SECINITSID_NUM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.7:
	mov	w20, #1
Lloh11:
	adrp	x23, _initial_sid_to_string@GOTPAGE
Lloh12:
	ldr	x23, [x23, _initial_sid_to_string@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w0, [x8, x20, lsl #2]
	mov	x1, x22
	bl	_strcmp
	cbz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x21]
	cmp	x20, x8
	b.lt	LBB0_8
LBB0_10:
Lloh13:
	adrp	x8, _SECINITSID_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SECINITSID_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
LBB0_11:
	mov	w24, #0
	str	w20, [x19]
	b	LBB0_19
LBB0_12:
	mov	x22, #0
LBB0_13:
Lloh16:
	adrp	x0, _policy_rwlock@GOTPAGE
Lloh17:
	ldr	x0, [x0, _policy_rwlock@GOTPAGEOFF]
	bl	_read_lock
Lloh18:
	adrp	x0, _policydb@GOTPAGE
Lloh19:
	ldr	x0, [x0, _policydb@GOTPAGEOFF]
Lloh20:
	adrp	x1, _sidtab@GOTPAGE
Lloh21:
	ldr	x1, [x1, _sidtab@GOTPAGEOFF]
	mov	x4, sp
	mov	x2, x20
	mov	x3, x21
	mov	x5, x24
	bl	_string_to_context_struct
	mov	x24, x0
	cbz	w23, LBB0_16
; %bb.14:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w8, w8
	cmp	w24, w8
	b.ne	LBB0_16
; %bb.15:
	str	x22, [sp]
	str	w21, [sp, #8]
	mov	x22, #0
	b	LBB0_17
LBB0_16:
	cbnz	w24, LBB0_18
LBB0_17:
Lloh25:
	adrp	x0, _sidtab@GOTPAGE
Lloh26:
	ldr	x0, [x0, _sidtab@GOTPAGEOFF]
	mov	x1, sp
	mov	x2, x19
	bl	_sidtab_context_to_sid
	mov	x24, x0
	mov	x0, sp
	bl	_context_destroy
LBB0_18:
Lloh27:
	adrp	x0, _policy_rwlock@GOTPAGE
Lloh28:
	ldr	x0, [x0, _policy_rwlock@GOTPAGEOFF]
	bl	_read_unlock
	mov	x0, x20
	bl	_kfree
	mov	x0, x22
	bl	_kfree
LBB0_19:
	mov	x0, x24
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ss_initialized,4,2             ; @ss_initialized
	.comm	_SECINITSID_NUM,4,2             ; @SECINITSID_NUM
	.comm	_initial_sid_to_string,8,3      ; @initial_sid_to_string
	.comm	_SECINITSID_KERNEL,4,2          ; @SECINITSID_KERNEL
	.comm	_SECSID_NULL,4,2                ; @SECSID_NULL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_policy_rwlock,4,2              ; @policy_rwlock
	.comm	_policydb,4,2                   ; @policydb
	.comm	_sidtab,4,2                     ; @sidtab
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_security_context_to_sid_core
.subsections_via_symbols
