	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p54_get_survey
_p54_get_survey:                        ## @p54_get_survey
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r13
	cmpl	%esi, (%r13)
	jle	LBB0_6
## %bb.1:
	movq	%rdx, %r14
	movslq	%esi, %r15
	movq	24(%r13), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	cmpl	%esi, (%rax)
	jne	LBB0_8
## %bb.3:
	movq	%rdi, %rbx
	leaq	16(%r13), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_p54_wait_for_stats
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.4:
	shlq	$2, %r15
	addq	8(%r13), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcpy
	cmpq	$0, (%r14)
	je	LBB0_11
## %bb.5:
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
	jmp	LBB0_9
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_8:
	shlq	$2, %r15
	addq	8(%r13), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcpy
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	$100, %edi
	callq	_msleep
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SURVEY_INFO_IN_USE,4,2         ## @SURVEY_INFO_IN_USE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MAX_TRIES,4,2                  ## @MAX_TRIES
	.no_dead_strip	_p54_get_survey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p54_get_survey
_p54_get_survey:                        ; @p54_get_survey
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x22, [x0]
	ldr	w8, [x22]
	cmp	w8, w1
	b.le	LBB0_6
; %bb.1:
	mov	x19, x2
	sxtw	x23, w1
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_8
; %bb.3:
	mov	x20, x0
	add	x21, x22, #16
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	bl	_p54_wait_for_stats
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbnz	w20, LBB0_9
; %bb.4:
	ldr	x8, [x22, #8]
	add	x1, x8, x23, lsl #2
	mov	x0, x19
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.5:
	mov	w20, #0
Lloh0:
	adrp	x8, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_9
LBB0_6:
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_8:
	ldr	x8, [x22, #8]
	add	x1, x8, x23, lsl #2
	mov	x0, x19
	mov	w2, #16
	bl	_memcpy
	mov	w20, #0
LBB0_9:
	mov	x0, x20
	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_10:
	mov	w0, #100
	bl	_msleep
Lloh5:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SURVEY_INFO_IN_USE,4,2         ; @SURVEY_INFO_IN_USE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MAX_TRIES,4,2                  ; @MAX_TRIES
	.no_dead_strip	_p54_get_survey
.subsections_via_symbols
