	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotLoadItemWeights             ## -- Begin function BotLoadItemWeights
	.p2align	4, 0x90
_BotLoadItemWeights:                    ## @BotLoadItemWeights
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_BotGoalStateFromHandle
	movq	_BLERR_CANNOTLOADITEMWEIGHTS@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_ReadWeightConfig
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_itemconfig@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%esi, %esi
	je	LBB0_5
## %bb.4:
	movl	%eax, %edi
	callq	_ItemWeightIndex
	movl	%eax, 4(%rbx)
	movq	_BLERR_NOERROR@GOTPCREL(%rip), %r15
	jmp	LBB0_5
LBB0_2:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	_PRT_FATAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
LBB0_5:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLERR_CANNOTLOADITEMWEIGHTS,4,2 ## @BLERR_CANNOTLOADITEMWEIGHTS
	.comm	_botimport,8,3                  ## @botimport
	.comm	_PRT_FATAL,4,2                  ## @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't load weights\n"

	.comm	_itemconfig,4,2                 ## @itemconfig
	.comm	_BLERR_NOERROR,4,2              ## @BLERR_NOERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotLoadItemWeights             ; -- Begin function BotLoadItemWeights
	.p2align	2
_BotLoadItemWeights:                    ; @BotLoadItemWeights
	.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	x20, x1
	bl	_BotGoalStateFromHandle
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_ReadWeightConfig
	str	w0, [x19]
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _itemconfig@GOTPAGE
Lloh1:
	ldr	x8, [x8, _itemconfig@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	cbz	w1, LBB0_5
; %bb.3:
	bl	_ItemWeightIndex
	str	w0, [x19, #4]
Lloh3:
	adrp	x8, _BLERR_NOERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BLERR_NOERROR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _botimport@GOTPAGE
Lloh6:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _PRT_FATAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PRT_FATAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x9]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
LBB0_5:
Lloh13:
	adrp	x8, _BLERR_CANNOTLOADITEMWEIGHTS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLERR_CANNOTLOADITEMWEIGHTS@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_BLERR_CANNOTLOADITEMWEIGHTS,4,2 ; @BLERR_CANNOTLOADITEMWEIGHTS
	.comm	_botimport,8,3                  ; @botimport
	.comm	_PRT_FATAL,4,2                  ; @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't load weights\n"

	.comm	_itemconfig,4,2                 ; @itemconfig
	.comm	_BLERR_NOERROR,4,2              ; @BLERR_NOERROR
.subsections_via_symbols
