	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait
_wait:                                  ## @wait
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_TPM_MAX_TRIES@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	$0, %ebx
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	$1, %r14d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	xorl	%ebx, %ebx
	movq	_STAT@GOTPCREL(%rip), %r15
	movq	_TPM_MSLEEP_TIME@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_tpm_data_in
	testl	%r14d, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	callq	_msleep
	incl	%ebx
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	(%r13), %eax
LBB0_5:
	cmpl	%eax, %ebx
	movl	$0, %eax
	jne	LBB0_11
## %bb.6:
	movq	_STAT_XFE@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_8:
	movq	_STAT_RDA@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_10
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TPM_MAX_TRIES,4,2              ## @TPM_MAX_TRIES
	.comm	_STAT,4,2                       ## @STAT
	.comm	_TPM_MSLEEP_TIME,4,2            ## @TPM_MSLEEP_TIME
	.comm	_STAT_XFE,4,2                   ## @STAT_XFE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout in wait(STAT_XFE)\n"

	.comm	_STAT_RDA,4,2                   ## @STAT_RDA
L_.str.1:                               ## @.str.1
	.asciz	"Timeout in wait(STAT_RDA)\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait
_wait:                                  ; @wait
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _TPM_MAX_TRIES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TPM_MAX_TRIES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w21, #0
	mov	w8, #1
	lsl	w23, w8, w20
Lloh2:
	adrp	x24, _STAT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _STAT@GOTPAGEOFF]
Lloh4:
	adrp	x25, _TPM_MSLEEP_TIME@GOTPAGE
Lloh5:
	ldr	x25, [x25, _TPM_MSLEEP_TIME@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_tpm_data_in
	tst	w0, w23
	b.ne	LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x25]
	bl	_msleep
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	cmp	w21, w8
	b.ne	LBB0_12
LBB0_6:
Lloh6:
	adrp	x8, _STAT_XFE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STAT_XFE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_8:
Lloh11:
	adrp	x8, _STAT_RDA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STAT_RDA@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.9:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_10:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_11:
	ldr	w8, [x22]
	cmp	w21, w8
	b.eq	LBB0_6
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_TPM_MAX_TRIES,4,2              ; @TPM_MAX_TRIES
	.comm	_STAT,4,2                       ; @STAT
	.comm	_TPM_MSLEEP_TIME,4,2            ; @TPM_MSLEEP_TIME
	.comm	_STAT_XFE,4,2                   ; @STAT_XFE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout in wait(STAT_XFE)\n"

	.comm	_STAT_RDA,4,2                   ; @STAT_RDA
l_.str.1:                               ; @.str.1
	.asciz	"Timeout in wait(STAT_RDA)\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_wait
.subsections_via_symbols
