	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpm_wtx
_tpm_wtx:                               ## @tpm_wtx
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_number_of_wtx@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	incl	%edx
	movl	%edx, (%rax)
	movl	(%rdi), %edi
	movq	_TPM_MAX_WTX_PACKAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	_TPM_VL_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wait_and_send
	movq	_TPM_CTRL_WTX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wait_and_send
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wait_and_send
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wait_and_send
	movq	_TPM_WTX_MSLEEP_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_number_of_wtx,4,2              ## @number_of_wtx
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Granting WTX (%02d / %02d)\n"

	.comm	_TPM_MAX_WTX_PACKAGES,4,2       ## @TPM_MAX_WTX_PACKAGES
	.comm	_TPM_VL_VER,4,2                 ## @TPM_VL_VER
	.comm	_TPM_CTRL_WTX,4,2               ## @TPM_CTRL_WTX
	.comm	_TPM_WTX_MSLEEP_TIME,4,2        ## @TPM_WTX_MSLEEP_TIME
	.no_dead_strip	_tpm_wtx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpm_wtx
_tpm_wtx:                               ; @tpm_wtx
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _number_of_wtx@GOTPAGE
Lloh1:
	ldr	x8, [x8, _number_of_wtx@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w2, w9, #1
	str	w2, [x8]
	ldr	w0, [x0]
Lloh2:
	adrp	x8, _TPM_MAX_WTX_PACKAGES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TPM_MAX_WTX_PACKAGES@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
Lloh7:
	adrp	x8, _TPM_VL_VER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TPM_VL_VER@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wait_and_send
Lloh10:
	adrp	x8, _TPM_CTRL_WTX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TPM_CTRL_WTX@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wait_and_send
	mov	x0, x19
	mov	w1, #0
	bl	_wait_and_send
	mov	x0, x19
	mov	w1, #0
	bl	_wait_and_send
Lloh13:
	adrp	x8, _TPM_WTX_MSLEEP_TIME@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TPM_WTX_MSLEEP_TIME@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_msleep
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_number_of_wtx,4,2              ; @number_of_wtx
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Granting WTX (%02d / %02d)\n"

	.comm	_TPM_MAX_WTX_PACKAGES,4,2       ; @TPM_MAX_WTX_PACKAGES
	.comm	_TPM_VL_VER,4,2                 ; @TPM_VL_VER
	.comm	_TPM_CTRL_WTX,4,2               ; @TPM_CTRL_WTX
	.comm	_TPM_WTX_MSLEEP_TIME,4,2        ; @TPM_WTX_MSLEEP_TIME
	.no_dead_strip	_tpm_wtx
.subsections_via_symbols
