	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menelaus_set_vdcdc             ## -- Begin function menelaus_set_vdcdc
	.p2align	4, 0x90
_menelaus_set_vdcdc:                    ## @menelaus_set_vdcdc
	.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
	movl	%edi, %eax
	andl	$-2, %eax
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.1:
	movl	%esi, %ebx
	cmpl	$2, %edi
	jne	LBB0_2
## %bb.3:
	movq	_vdcdc2_vtg@GOTPCREL(%rip), %r14
	testl	%ebx, %ebx
	je	LBB0_5
LBB0_7:
	movq	_vdcdc_values@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_menelaus_get_vtg_value
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	$3, %ecx
	jmp	LBB0_6
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_vdcdc3_vtg@GOTPCREL(%rip), %r14
	testl	%ebx, %ebx
	jne	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_menelaus_set_voltage           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_vdcdc2_vtg,4,2                 ## @vdcdc2_vtg
	.comm	_vdcdc3_vtg,4,2                 ## @vdcdc3_vtg
	.comm	_vdcdc_values,4,2               ## @vdcdc_values
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menelaus_set_vdcdc             ; -- Begin function menelaus_set_vdcdc
	.p2align	2
_menelaus_set_vdcdc:                    ; @menelaus_set_vdcdc
	.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
	and	w8, w0, #0xfffffffe
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x8, _vdcdc3_vtg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vdcdc3_vtg@GOTPAGEOFF]
Lloh2:
	adrp	x9, _vdcdc2_vtg@GOTPAGE
Lloh3:
	ldr	x9, [x9, _vdcdc2_vtg@GOTPAGEOFF]
	cmp	w0, #2
	csel	x20, x9, x8, eq
	cbz	w1, LBB0_5
; %bb.2:
Lloh4:
	adrp	x8, _vdcdc_values@GOTPAGE
Lloh5:
	ldr	x8, [x8, _vdcdc_values@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_menelaus_get_vtg_value
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	mov	w3, #3
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_5:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
LBB0_6:
	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
	b	_menelaus_set_voltage
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_vdcdc2_vtg,4,2                 ; @vdcdc2_vtg
	.comm	_vdcdc3_vtg,4,2                 ; @vdcdc3_vtg
	.comm	_vdcdc_values,4,2               ; @vdcdc_values
.subsections_via_symbols
