	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpm_store_ppi_request
_tpm_store_ppi_request:                 ## @tpm_store_ppi_request
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PPI_VERSION_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	xorps	%xmm0, %xmm0
	movups	%xmm0, -144(%rbp)
	movq	$0, -128(%rbp)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -152(%rbp)
	movl	$4, -168(%rbp)
	movq	_TPM_PPI_FN_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-112(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_ppi_assign_params
	movq	%rbx, -160(%rbp)
	movq	_ACPI_TYPE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ACPI_ROOT_OBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ACPI_UINT32_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ppi_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_tpm_device_name@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-116(%rbp), %r9
	callq	_acpi_walk_namespace
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	-116(%rbp), %edi
	movq	_ACPI_TYPE_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	leaq	-168(%rbp), %rdx
	leaq	-152(%rbp), %rcx
	callq	_acpi_evaluate_object_typed
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	-152(%rbp), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r13, %rbx
	movq	%r13, %rdi
	callq	_strncpy
	movq	-152(%rbp), %rdi
	callq	_kfree
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -144(%rbp)
	movq	$0, -152(%rbp)
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_strcmp
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.7:
	movq	_TPM_PPI_FN_SUBREQ@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_TPM_PPI_FN_SUBREQ2@GOTPCREL(%rip), %rax
LBB0_8:
	movq	%r14, %r13
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	movl	$1, -64(%rbp)
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -184(%rbp)
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_11
LBB0_9:
	movl	$4, -64(%rbp)
	leaq	L_.str.3(%rip), %rsi
LBB0_11:
	leaq	-184(%rbp), %r14
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_sscanf
	movq	%r14, -56(%rbp)
	movl	-116(%rbp), %edi
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	leaq	-168(%rbp), %rdx
	leaq	-152(%rbp), %rcx
	callq	_acpi_evaluate_object_typed
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_12
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.18:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-152(%rbp), %rdi
	movl	(%rdi), %eax
	cmpl	$1, %eax
	je	LBB0_19
## %bb.13:
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_19:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_16:
	callq	_kfree
	jmp	LBB0_17
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PPI_VERSION_LEN,4,2            ## @PPI_VERSION_LEN
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_TPM_PPI_FN_VERSION,4,2         ## @TPM_PPI_FN_VERSION
	.comm	_ACPI_TYPE_DEVICE,4,2           ## @ACPI_TYPE_DEVICE
	.comm	_ACPI_ROOT_OBJECT,4,2           ## @ACPI_ROOT_OBJECT
	.comm	_ACPI_UINT32_MAX,4,2            ## @ACPI_UINT32_MAX
	.comm	_ppi_callback,4,2               ## @ppi_callback
	.comm	_tpm_device_name,4,2            ## @tpm_device_name
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_DSM"

	.comm	_ACPI_TYPE_STRING,4,2           ## @ACPI_TYPE_STRING
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"1.1"

	.comm	_TPM_PPI_FN_SUBREQ,4,2          ## @TPM_PPI_FN_SUBREQ
	.comm	_TPM_PPI_FN_SUBREQ2,4,2         ## @TPM_PPI_FN_SUBREQ2
L_.str.2:                               ## @.str.2
	.asciz	"1.2"

	.comm	_ACPI_TYPE_BUFFER,4,2           ## @ACPI_TYPE_BUFFER
L_.str.3:                               ## @.str.3
	.asciz	"%d"

	.comm	_ACPI_TYPE_INTEGER,4,2          ## @ACPI_TYPE_INTEGER
L_.str.4:                               ## @.str.4
	.asciz	"%llu"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_tpm_store_ppi_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpm_store_ppi_request
_tpm_store_ppi_request:                 ; @tpm_store_ppi_request
	.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, #144
	mov	x19, x3
	mov	x20, x2
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	x22, _PPI_VERSION_LEN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PPI_VERSION_LEN@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w8, w8, #1
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	stp	xzr, xzr, [x29, #-160]
Lloh7:
	adrp	x23, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh8:
	ldr	x23, [x23, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
	ldrsw	x8, [x23]
	stp	x8, xzr, [x29, #-176]
	mov	w8, #4
	stur	w8, [x29, #-144]
Lloh9:
	adrp	x8, _TPM_PPI_FN_VERSION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TPM_PPI_FN_VERSION@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	sub	x24, x29, #120
	sub	x0, x29, #120
	bl	_ppi_assign_params
	stur	x24, [x29, #-136]
Lloh12:
	adrp	x8, _ACPI_TYPE_DEVICE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ACPI_TYPE_DEVICE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _ACPI_ROOT_OBJECT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ACPI_ROOT_OBJECT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _ACPI_UINT32_MAX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ACPI_UINT32_MAX@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x8, _ppi_callback@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ppi_callback@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
Lloh24:
	adrp	x8, _tpm_device_name@GOTPAGE
Lloh25:
	ldr	x8, [x8, _tpm_device_name@GOTPAGEOFF]
Lloh26:
	ldr	w4, [x8]
	sub	x5, x29, #124
	bl	_acpi_walk_namespace
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_2
; %bb.1:
Lloh27:
	adrp	x8, _ENXIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	ldur	w0, [x29, #-124]
Lloh29:
	adrp	x8, _ACPI_TYPE_STRING@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ACPI_TYPE_STRING@GOTPAGEOFF]
Lloh31:
	ldr	w4, [x8]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	sub	x2, x29, #144
	sub	x3, x29, #176
	bl	_acpi_evaluate_object_typed
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_7
; %bb.3:
	ldur	x8, [x29, #-176]
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_strncpy
	ldur	x0, [x29, #-176]
	bl	_kfree
	ldr	w8, [x23]
	stur	w8, [x29, #-168]
	stur	xzr, [x29, #-176]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcmp
Lloh36:
	adrp	x8, _TPM_PPI_FN_SUBREQ@GOTPAGE
Lloh37:
	ldr	x8, [x8, _TPM_PPI_FN_SUBREQ@GOTPAGEOFF]
Lloh38:
	adrp	x9, _TPM_PPI_FN_SUBREQ2@GOTPAGE
Lloh39:
	ldr	x9, [x9, _TPM_PPI_FN_SUBREQ2@GOTPAGEOFF]
	cmn	w0, #1
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	stur	w8, [x29, #-88]
Lloh40:
	adrp	x1, l_.str.2@PAGE
Lloh41:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_strcmp
Lloh42:
	adrp	x21, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh43:
	ldr	x21, [x21, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #1
	stur	w8, [x29, #-72]
	ldr	w8, [x21]
	stur	w8, [x29, #-192]
Lloh44:
	adrp	x1, l_.str.4@PAGE
Lloh45:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_5:
	mov	w8, #4
	stur	w8, [x29, #-72]
Lloh46:
	adrp	x1, l_.str.3@PAGE
Lloh47:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_6:
	sub	x22, x29, #192
	sub	x2, x29, #192
	mov	x0, x20
	bl	_sscanf
	stur	x22, [x29, #-64]
	ldur	w0, [x29, #-124]
	ldr	w4, [x21]
Lloh48:
	adrp	x1, l_.str@PAGE
Lloh49:
	add	x1, x1, l_.str@PAGEOFF
	sub	x2, x29, #144
	sub	x3, x29, #176
	bl	_acpi_evaluate_object_typed
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_11
LBB0_7:
Lloh50:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh52:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh53:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.10:
	mov	x0, x19
	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_11:
	ldur	x0, [x29, #-176]
	ldr	w8, [x0]
	cmp	w8, #1
	b.eq	LBB0_14
; %bb.12:
	cbz	w8, LBB0_16
; %bb.13:
Lloh55:
	adrp	x8, _EFAULT@GOTPAGE
Lloh56:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh57:
	adrp	x8, _EPERM@GOTPAGE
Lloh58:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_16:
	bl	_kfree
	b	LBB0_9
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_PPI_VERSION_LEN,4,2            ; @PPI_VERSION_LEN
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_TPM_PPI_FN_VERSION,4,2         ; @TPM_PPI_FN_VERSION
	.comm	_ACPI_TYPE_DEVICE,4,2           ; @ACPI_TYPE_DEVICE
	.comm	_ACPI_ROOT_OBJECT,4,2           ; @ACPI_ROOT_OBJECT
	.comm	_ACPI_UINT32_MAX,4,2            ; @ACPI_UINT32_MAX
	.comm	_ppi_callback,4,2               ; @ppi_callback
	.comm	_tpm_device_name,4,2            ; @tpm_device_name
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_DSM"

	.comm	_ACPI_TYPE_STRING,4,2           ; @ACPI_TYPE_STRING
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"1.1"

	.comm	_TPM_PPI_FN_SUBREQ,4,2          ; @TPM_PPI_FN_SUBREQ
	.comm	_TPM_PPI_FN_SUBREQ2,4,2         ; @TPM_PPI_FN_SUBREQ2
l_.str.2:                               ; @.str.2
	.asciz	"1.2"

	.comm	_ACPI_TYPE_BUFFER,4,2           ; @ACPI_TYPE_BUFFER
l_.str.3:                               ; @.str.3
	.asciz	"%d"

	.comm	_ACPI_TYPE_INTEGER,4,2          ; @ACPI_TYPE_INTEGER
l_.str.4:                               ; @.str.4
	.asciz	"%llu"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_tpm_store_ppi_request
.subsections_via_symbols
