	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ima_add_template_entry         ## -- Begin function ima_add_template_entry
	.p2align	4, 0x90
_ima_add_template_entry:                ## @ima_add_template_entry
	.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
	movq	%rcx, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_IMA_DIGEST_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_ima_extend_list_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.5:
	movq	%r12, %rdi
	callq	_ima_add_digest_entry
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:
	leal	(,%r14,4), %edx
	movq	%r13, %rdi
	movl	$255, %esi
	callq	_memset
LBB0_7:
	movq	%r13, %rdi
	callq	_ima_pcr_extend
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %ebx
	xorl	%r14d, %r14d
	leaq	L_.str.3(%rip), %r13
	jmp	LBB0_10
LBB0_1:
	movl	4(%r12), %esi
	leal	(,%r14,4), %edx
	movq	%r13, %rdi
	callq	_memcpy
	movq	%r13, %rdi
	callq	_ima_lookup_digest_entry
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	movl	$1, %r14d
	leaq	L_.str.1(%rip), %r13
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
	movl	$1, %r14d
	leaq	L_.str(%rip), %r13
	jmp	LBB0_10
LBB0_3:
	movq	%r12, %rdi
	callq	_ima_add_digest_entry
	testl	%eax, %eax
	jns	LBB0_7
LBB0_4:
	movl	%eax, %ebx
	xorl	%r14d, %r14d
	leaq	L_.str.2(%rip), %r13
LBB0_10:
	movq	_ima_extend_list_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_AUDIT_INTEGRITY_PCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	subq	$8, %rsp
	movq	%r15, %rsi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %r8
	movl	%ebx, %r9d
	pushq	%r14
	callq	_integrity_audit_msg
	addq	$16, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IMA_DIGEST_SIZE,4,2            ## @IMA_DIGEST_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hash_added"

	.comm	_ima_extend_list_mutex,4,2      ## @ima_extend_list_mutex
L_.str.1:                               ## @.str.1
	.asciz	"hash_exists"

L_.str.2:                               ## @.str.2
	.asciz	"ENOMEM"

L_.str.3:                               ## @.str.3
	.asciz	"TPM error"

	.comm	_AUDIT_INTEGRITY_PCR,4,2        ## @AUDIT_INTEGRITY_PCR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ima_add_template_entry         ; -- Begin function ima_add_template_entry
	.p2align	2
_ima_add_template_entry:                ; @ima_add_template_entry
	.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
	sub	sp, sp, #16
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _IMA_DIGEST_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IMA_DIGEST_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	lsl	x8, x24, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
Lloh8:
	adrp	x0, _ima_extend_list_mutex@GOTPAGE
Lloh9:
	ldr	x0, [x0, _ima_extend_list_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	cbz	w22, LBB0_4
; %bb.1:
	mov	x0, x21
	bl	_ima_add_digest_entry
	tbnz	w0, #31, LBB0_7
; %bb.2:
	lsl	w2, w24, #2
	mov	x0, x23
	mov	w1, #255
	bl	_memset
LBB0_3:
	mov	x0, x23
	bl	_ima_pcr_extend
	mov	w8, #1
Lloh10:
	adrp	x9, l_.str@PAGE
Lloh11:
	add	x9, x9, l_.str@PAGEOFF
Lloh12:
	adrp	x10, l_.str.3@PAGE
Lloh13:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w0, #0
	csel	w23, w8, wzr, eq
	csel	x24, x9, x10, eq
	csel	w22, wzr, w0, eq
	b	LBB0_8
LBB0_4:
	ldr	w1, [x21, #4]
	lsl	w2, w24, #2
	mov	x0, x23
	bl	_memcpy
	mov	x0, x23
	bl	_ima_lookup_digest_entry
	cbz	x0, LBB0_6
; %bb.5:
	mov	w22, #0
	mov	w23, #1
Lloh14:
	adrp	x24, l_.str.1@PAGE
Lloh15:
	add	x24, x24, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x0, x21
	bl	_ima_add_digest_entry
	tbz	w0, #31, LBB0_3
LBB0_7:
	mov	x22, x0
	mov	w23, #0
Lloh16:
	adrp	x24, l_.str.2@PAGE
Lloh17:
	add	x24, x24, l_.str.2@PAGEOFF
LBB0_8:
Lloh18:
	adrp	x0, _ima_extend_list_mutex@GOTPAGE
Lloh19:
	ldr	x0, [x0, _ima_extend_list_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh20:
	adrp	x8, _AUDIT_INTEGRITY_PCR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AUDIT_INTEGRITY_PCR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w2, [x21]
	mov	x1, x20
	mov	x3, x19
	mov	x4, x24
	mov	x5, x22
	mov	x6, x23
	bl	_integrity_audit_msg
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x22
	sub	sp, x29, #48
	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_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IMA_DIGEST_SIZE,4,2            ; @IMA_DIGEST_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hash_added"

	.comm	_ima_extend_list_mutex,4,2      ; @ima_extend_list_mutex
l_.str.1:                               ; @.str.1
	.asciz	"hash_exists"

l_.str.2:                               ; @.str.2
	.asciz	"ENOMEM"

l_.str.3:                               ; @.str.3
	.asciz	"TPM error"

	.comm	_AUDIT_INTEGRITY_PCR,4,2        ; @AUDIT_INTEGRITY_PCR
.subsections_via_symbols
