	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi_core_init                  ## -- Begin function hfi_core_init
	.p2align	4, 0x90
_hfi_core_init:                         ## @hfi_core_init
	.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, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_CORE_INIT@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	cmpq	(%r13), %rax
	jge	LBB0_8
## %bb.1:
	leaq	20(%rbx), %r12
	movq	%r12, %rdi
	callq	_reinit_completion
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movq	_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	8(%rbx), %rax
	movq	_HFI_ERR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	(%r13), %rax
	movq	%rax, (%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CORE_INIT,8,3                  ## @CORE_INIT
	.comm	_TIMEOUT,4,2                    ## @TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_HFI_ERR_NONE,8,3               ## @HFI_ERR_NONE
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi_core_init                  ; -- Begin function hfi_core_init
	.p2align	2
_hfi_core_init:                         ; @hfi_core_init
	.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
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
Lloh0:
	adrp	x23, _CORE_INIT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CORE_INIT@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.1:
	add	x22, x20, #20
	mov	x0, x22
	bl	_reinit_completion
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.2:
Lloh2:
	adrp	x8, _TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _HFI_ERR_NONE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HFI_ERR_NONE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	mov	w21, #0
	ldr	x8, [x23]
	str	x8, [x20]
	b	LBB0_9
LBB0_5:
	mov	w21, #0
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CORE_INIT,8,3                  ; @CORE_INIT
	.comm	_TIMEOUT,4,2                    ; @TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_HFI_ERR_NONE,8,3               ; @HFI_ERR_NONE
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
