	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_program_cac_config_registers
_si_program_cac_config_registers:       ## @si_program_cac_config_registers
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.1:
	movq	%rsi, %r14
	movl	(%rsi), %edi
	cmpl	$-1, %edi
	je	LBB0_13
## %bb.2:
	xorl	%ebx, %ebx
	movq	_SMC_CG_IND_START@GOTPCREL(%rip), %r15
	movq	_SMC_CG_IND_END@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_WREG32
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	20(%r14), %edi
	addq	$20, %r14
	cmpl	$-1, %edi
	je	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$128, 4(%r14)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	(%r15), %edi
	cmpl	(%r12), %edi
	jge	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_RREG32_SMC
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	_RREG32
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %eax
	movl	12(%r14), %ebx
	movzbl	16(%r14), %ecx
	shll	%cl, %ebx
	xorl	%eax, %ebx
	andl	8(%r14), %ebx
	xorl	%eax, %ebx
	cmpl	$128, 4(%r14)
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	addl	(%r15), %edi
	cmpl	(%r12), %edi
	jge	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %esi
	callq	_WREG32_SMC
	jmp	LBB0_12
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMC_CG_IND_START,4,2           ## @SMC_CG_IND_START
	.comm	_SMC_CG_IND_END,4,2             ## @SMC_CG_IND_END
	.no_dead_strip	_si_program_cac_config_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_program_cac_config_registers
_si_program_cac_config_registers:       ; @si_program_cac_config_registers
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x1, LBB0_14
; %bb.1:
	mov	x19, x1
	ldr	w0, [x1]
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.2:
	mov	w20, #0
Lloh0:
	adrp	x21, _SMC_CG_IND_START@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SMC_CG_IND_START@GOTPAGEOFF]
Lloh2:
	adrp	x22, _SMC_CG_IND_END@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SMC_CG_IND_END@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	mov	x1, x20
	bl	_WREG32
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #20]!
	cmn	w0, #1
	b.eq	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x22]
	add	w0, w8, w0
	cmp	w0, w9
	b.ge	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_RREG32_SMC
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_RREG32
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x20, x0
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	w9, w8, [x19, #4]
	bic	w10, w20, w8
	ldp	w11, w12, [x19, #12]
	lsl	w11, w11, w12
	and	w8, w11, w8
	orr	w20, w8, w10
	cmp	w9, #128
	b.ne	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x19]
	ldr	w10, [x22]
	add	w0, w9, w8
	cmp	w0, w10
	b.ge	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x20
	bl	_WREG32_SMC
	b	LBB0_4
LBB0_13:
	mov	w0, #0
	b	LBB0_15
LBB0_14:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMC_CG_IND_START,4,2           ; @SMC_CG_IND_START
	.comm	_SMC_CG_IND_END,4,2             ; @SMC_CG_IND_END
	.no_dead_strip	_si_program_cac_config_registers
.subsections_via_symbols
