	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ishtp_hid_link_ready_wait      ## -- Begin function ishtp_hid_link_ready_wait
	.p2align	4, 0x90
_ishtp_hid_link_ready_wait:             ## @ishtp_hid_link_ready_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%r14d, %r14d
	cmpq	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_hid_ishtp_trace
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	cmpq	$0, (%rbx)
	sete	%sil
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_interruptible_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_hid_ishtp_trace
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_hid_ishtp_trace
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wait for link ready\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"link not ready\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"link ready\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ishtp_hid_link_ready_wait      ; -- Begin function ishtp_hid_link_ready_wait
	.p2align	2
_ishtp_hid_link_ready_wait:             ; @ishtp_hid_link_ready_wait
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hid_ishtp_trace
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w1, eq
Lloh2:
	adrp	x8, _HZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	add	w2, w8, w8, lsl #2
	bl	_wait_event_interruptible_timeout
	cbz	w0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_hid_ishtp_trace
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_hid_ishtp_trace
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wait for link ready\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"link not ready\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"link ready\n"

.subsections_via_symbols
