	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ima_store_template             ## -- Begin function ima_store_template
	.p2align	4, 0x90
_ima_store_template:                    ## @ima_store_template
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_IMA_TEMPLATE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	$4, (%rbx)
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.1:
	leaq	12(%rbx), %rsi
	movl	8(%rbx), %edx
	movl	$4, %edi
	callq	_ima_calc_template_hash
	testl	%eax, %eax
	js	LBB0_2
LBB0_3:
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r14, %rcx
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ima_add_template_entry         ## TAILCALL
LBB0_2:
	movl	%eax, %r12d
	movq	_AUDIT_INTEGRITY_PCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %edx
	movl	$0, (%rsp)
	leaq	L_.str(%rip), %rcx
	leaq	L_.str.1(%rip), %r8
	movq	%r14, %rsi
	movl	%r12d, %r9d
	callq	_integrity_audit_msg
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"add_template_measure"

L_.str.1:                               ## @.str.1
	.asciz	"hashing_error"

	.comm	_IMA_TEMPLATE_NAME,4,2          ## @IMA_TEMPLATE_NAME
	.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_store_template             ; -- Begin function ima_store_template
	.p2align	2
_ima_store_template:                    ; @ima_store_template
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
	mov	w22, #4
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x8, _IMA_TEMPLATE_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMA_TEMPLATE_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w22, w8, [x20]
	cbnz	w21, LBB0_2
; %bb.1:
	add	x1, x20, #12
	ldr	w2, [x20, #8]
	mov	w0, #4
	bl	_ima_calc_template_hash
	tbnz	w0, #31, LBB0_3
LBB0_2:
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	mov	x3, x19
	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	_ima_add_template_entry
LBB0_3:
	mov	x22, x0
Lloh5:
	adrp	x8, _AUDIT_INTEGRITY_PCR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AUDIT_INTEGRITY_PCR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w2, [x20, #4]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
Lloh10:
	adrp	x4, l_.str.1@PAGE
Lloh11:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x5, x22
	mov	w6, #0
	bl	_integrity_audit_msg
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add_template_measure"

l_.str.1:                               ; @.str.1
	.asciz	"hashing_error"

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