	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smack_from_secattr
_smack_from_secattr:                    ## @smack_from_secattr
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_SMK_LABELLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	(%r12), %eax
	movq	_NETLBL_SECATTR_MLS_LVL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	_NETLBL_SECATTR_MLS_CAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.2:
	movl	24(%r12), %edi
	xorl	%esi, %esi
	callq	_netlbl_secattr_catmap_walk
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_smack_catset_bit
	movl	24(%r12), %edi
	incl	%ebx
	movl	%ebx, %esi
	callq	_netlbl_secattr_catmap_walk
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_4
LBB0_5:
	movq	16(%r12), %rdi
	movq	_smack_cipso_direct@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_13
## %bb.6:
	movq	_SMK_MAXLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_memcpy
	jmp	LBB0_14
LBB0_7:
	movq	_NETLBL_SECATTR_SECID@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.8:
	movl	8(%r12), %edi
	callq	_smack_from_secid
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	movq	_SMK_MAXLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	jmp	LBB0_12
LBB0_13:
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_smack_from_cipso
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_smack_net_ambient@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_SMK_MAXLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.11:
	movq	%r14, %rdi
LBB0_12:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_strncpy                        ## TAILCALL
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SMK_LABELLEN,4,2               ## @SMK_LABELLEN
	.comm	_NETLBL_SECATTR_MLS_LVL,4,2     ## @NETLBL_SECATTR_MLS_LVL
	.comm	_NETLBL_SECATTR_MLS_CAT,4,2     ## @NETLBL_SECATTR_MLS_CAT
	.comm	_smack_cipso_direct,8,3         ## @smack_cipso_direct
	.comm	_SMK_MAXLEN,4,2                 ## @SMK_MAXLEN
	.comm	_NETLBL_SECATTR_SECID,4,2       ## @NETLBL_SECATTR_SECID
	.comm	_smack_net_ambient,8,3          ## @smack_net_ambient
	.no_dead_strip	_smack_from_secattr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smack_from_secattr
_smack_from_secattr:                    ; @smack_from_secattr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _SMK_LABELLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMK_LABELLEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	ldr	w8, [x0]
Lloh8:
	adrp	x9, _NETLBL_SECATTR_MLS_LVL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NETLBL_SECATTR_MLS_LVL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
	mov	x0, x21
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	ldr	w8, [x20]
Lloh11:
	adrp	x9, _NETLBL_SECATTR_MLS_CAT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NETLBL_SECATTR_MLS_CAT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	w0, [x20, #24]
	mov	w1, #0
	bl	_netlbl_secattr_catmap_walk
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x22, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_smack_catset_bit
	ldr	w0, [x20, #24]
	add	w1, w22, #1
	bl	_netlbl_secattr_catmap_walk
	mov	x22, x0
	tbz	w0, #31, LBB0_4
LBB0_5:
	ldr	x0, [x20, #16]
Lloh14:
	adrp	x8, _smack_cipso_direct@GOTPAGE
Lloh15:
	ldr	x8, [x8, _smack_cipso_direct@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.6:
Lloh17:
	adrp	x8, _SMK_MAXLEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SMK_MAXLEN@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_memcpy
	b	LBB0_11
LBB0_7:
Lloh20:
	adrp	x9, _NETLBL_SECATTR_SECID@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NETLBL_SECATTR_SECID@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.8:
	ldr	w0, [x20, #8]
	bl	_smack_from_secid
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
Lloh23:
	adrp	x8, _SMK_MAXLEN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SMK_MAXLEN@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldur	x8, [x29, #-40]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	b	LBB0_15
LBB0_10:
	mov	x1, x21
	mov	x2, x19
	bl	_smack_from_cipso
LBB0_11:
	ldur	x8, [x29, #-40]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.12:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh32:
	adrp	x8, _smack_net_ambient@GOTPAGE
Lloh33:
	ldr	x8, [x8, _smack_net_ambient@GOTPAGEOFF]
Lloh34:
	ldr	x1, [x8]
Lloh35:
	adrp	x8, _SMK_MAXLEN@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SMK_MAXLEN@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	ldur	x8, [x29, #-40]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	mov	x0, x19
LBB0_15:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_strncpy
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SMK_LABELLEN,4,2               ; @SMK_LABELLEN
	.comm	_NETLBL_SECATTR_MLS_LVL,4,2     ; @NETLBL_SECATTR_MLS_LVL
	.comm	_NETLBL_SECATTR_MLS_CAT,4,2     ; @NETLBL_SECATTR_MLS_CAT
	.comm	_smack_cipso_direct,8,3         ; @smack_cipso_direct
	.comm	_SMK_MAXLEN,4,2                 ; @SMK_MAXLEN
	.comm	_NETLBL_SECATTR_SECID,4,2       ; @NETLBL_SECATTR_SECID
	.comm	_smack_net_ambient,8,3          ; @smack_net_ambient
	.no_dead_strip	_smack_from_secattr
.subsections_via_symbols
