	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menelaus_set_mmc_slot          ## -- Begin function menelaus_set_mmc_slot
	.p2align	4, 0x90
_menelaus_set_mmc_slot:                 ## @menelaus_set_mmc_slot
	.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
	movl	%edi, %r12d
	leal	-3(%r12), %eax
	cmpl	$-3, %eax
	jbe	LBB0_1
## %bb.2:
	movl	%edx, %r14d
	cmpl	$3, %edx
	jl	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_3:
	movl	%ecx, %r13d
	movl	%esi, %r15d
	movq	_the_menelaus@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_mutex_lock
	movq	_MENELAUS_MCT_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_menelaus_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_20
## %bb.4:
	cmpl	$1, %r12d
	jne	LBB0_8
## %bb.5:
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.6:
	orl	$80, %ebx
	jmp	LBB0_11
LBB0_8:
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.9:
	orl	$160, %ebx
	jmp	LBB0_11
LBB0_7:
	andl	$-81, %ebx
	jmp	LBB0_11
LBB0_10:
	andl	$-161, %ebx
LBB0_11:
	movq	_MENELAUS_MCT_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_menelaus_write_reg
	testl	%eax, %eax
	js	LBB0_19
## %bb.12:
	movq	_MENELAUS_MCT_CTRL3@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_menelaus_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_20
## %bb.13:
	cmpl	$1, %r12d
	jne	LBB0_16
## %bb.14:
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.15:
	orl	$1, %ebx
	jmp	LBB0_18
LBB0_16:
	movq	_MENELAUS_MCT_CTRL2@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_menelaus_read_reg
	andl	$-4, %eax
	orl	%eax, %r14d
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_menelaus_write_reg
	testl	%eax, %eax
	jns	LBB0_18
	jmp	LBB0_19
LBB0_17:
	andl	$-2, %ebx
LBB0_18:
	andl	$-13, %ebx
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_menelaus_write_reg
LBB0_19:
	movl	%eax, %ebx
LBB0_20:
	movq	_the_menelaus@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_mutex_unlock
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_the_menelaus,8,3               ## @the_menelaus
	.comm	_MENELAUS_MCT_CTRL2,4,2         ## @MENELAUS_MCT_CTRL2
	.comm	_MENELAUS_MCT_CTRL3,4,2         ## @MENELAUS_MCT_CTRL3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menelaus_set_mmc_slot          ; -- Begin function menelaus_set_mmc_slot
	.p2align	2
_menelaus_set_mmc_slot:                 ; @menelaus_set_mmc_slot
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	w8, w0, #3
	cmn	w8, #3
	b.ls	LBB0_2
; %bb.1:
	mov	x20, x2
	cmp	w2, #3
	b.lt	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_12
LBB0_3:
	mov	x23, x3
	mov	x21, x1
	mov	x22, x0
Lloh3:
	adrp	x24, _the_menelaus@GOTPAGE
Lloh4:
	ldr	x24, [x24, _the_menelaus@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_mutex_lock
Lloh5:
	adrp	x25, _MENELAUS_MCT_CTRL2@GOTPAGE
Lloh6:
	ldr	x25, [x25, _MENELAUS_MCT_CTRL2@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_menelaus_read_reg
	mov	x19, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:
	mov	w8, #-161
	and	w8, w19, w8
	mov	w9, #160
	orr	w9, w19, w9
	cmp	w23, #0
	csel	w8, w8, w9, eq
	mov	w9, #-81
	and	w9, w19, w9
	mov	w10, #80
	orr	w10, w19, w10
	cmp	w23, #0
	csel	w9, w9, w10, eq
	cmp	w22, #1
	csel	w1, w8, w9, ne
	ldr	w0, [x25]
	bl	_menelaus_write_reg
	tbnz	w0, #31, LBB0_10
; %bb.5:
Lloh7:
	adrp	x23, _MENELAUS_MCT_CTRL3@GOTPAGE
Lloh8:
	ldr	x23, [x23, _MENELAUS_MCT_CTRL3@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_menelaus_read_reg
	mov	x19, x0
	tbnz	w0, #31, LBB0_11
; %bb.6:
	cmp	w22, #1
	b.ne	LBB0_8
; %bb.7:
	and	w8, w19, #0xfffffffe
	orr	w9, w19, #0x1
	cmp	w21, #0
	csel	w19, w8, w9, eq
	b	LBB0_9
LBB0_8:
	ldr	w0, [x25]
	bl	_menelaus_read_reg
	and	w8, w0, #0xfffffffc
	orr	w1, w8, w20
	ldr	w0, [x25]
	bl	_menelaus_write_reg
	tbnz	w0, #31, LBB0_10
LBB0_9:
	and	w1, w19, #0xfffffff3
	ldr	w0, [x23]
	bl	_menelaus_write_reg
LBB0_10:
	mov	x19, x0
LBB0_11:
	ldr	x0, [x24]
	bl	_mutex_unlock
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_the_menelaus,8,3               ; @the_menelaus
	.comm	_MENELAUS_MCT_CTRL2,4,2         ; @MENELAUS_MCT_CTRL2
	.comm	_MENELAUS_MCT_CTRL3,4,2         ; @MENELAUS_MCT_CTRL3
.subsections_via_symbols
