	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function slot_set
_slot_set:                              ## @slot_set
	.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
	cmpl	$5, %edi
	jne	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	8(%rsi), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	8(%rbx), %rsi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_5
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %r13
	movl	$0, (%r13)
	movq	16(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_strtol
	movq	%rax, %r14
	movq	-48(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_10
## %bb.7:
	cmpl	$0, (%r13)
	jne	LBB0_10
## %bb.8:
	testq	%r14, %r14
	js	LBB0_10
## %bb.9:
	movq	_UINT16_MAX@GOTPCREL(%rip), %r12
	cmpq	(%r12), %r14
	jg	LBB0_10
## %bb.11:
	movl	$0, (%r13)
	movq	24(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_strtol
	movq	%rax, %r15
	movq	-48(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_15
## %bb.12:
	cmpl	$0, (%r13)
	jne	LBB0_15
## %bb.13:
	testq	%r15, %r15
	js	LBB0_15
## %bb.14:
	cmpq	(%r12), %r15
	jg	LBB0_15
## %bb.16:
	movl	$0, (%r13)
	movq	32(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_strtoul
	movq	%rax, %r12
	movq	-48(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_19
## %bb.17:
	cmpl	$0, (%r13)
	jne	LBB0_19
## %bb.18:
	movq	_UINT32_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	ja	LBB0_19
## %bb.20:
	movq	_mps_unit@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mps_open
	testl	%eax, %eax
	js	LBB0_21
## %bb.22:
	movl	%eax, %ebx
	movl	%eax, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_mps_set_slot_status
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	movl	%ebx, %edi
	callq	_close
	movl	$1, %ebx
	jmp	LBB0_25
LBB0_10:
	movq	16(%rbx), %rsi
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_4
LBB0_15:
	movq	24(%rbx), %rsi
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_4
LBB0_19:
	movq	32(%rbx), %rsi
	leaq	L_.str.5(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	callq	_warnx
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	(%r13), %ebx
	leaq	L_.str.6(%rip), %rdi
	callq	_warn
	jmp	LBB0_25
LBB0_24:
	movl	%ebx, %edi
	callq	_close
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%ebx, %ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incorrect number of arguments"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"status"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid argument '%s', expecting 'status'"

	.comm	_errno,4,2                      ## @errno
	.comm	_UINT16_MAX,8,3                 ## @UINT16_MAX
L_.str.3:                               ## @.str.3
	.asciz	"Invalid enclosure handle argument '%s'"

L_.str.4:                               ## @.str.4
	.asciz	"Invalid slot argument '%s'"

	.comm	_UINT32_MAX,8,3                 ## @UINT32_MAX
L_.str.5:                               ## @.str.5
	.asciz	"Invalid status argument '%s'"

	.comm	_mps_unit,4,2                   ## @mps_unit
L_.str.6:                               ## @.str.6
	.asciz	"mps_open"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to set status"

L_str:                                  ## @str
	.asciz	"Successfully set slot status"

	.no_dead_strip	_slot_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function slot_set
_slot_set:                              ; @slot_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	cmp	w0, #5
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x1
	ldr	x0, [x1, #8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_warnx
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
LBB0_5:
	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
	add	sp, sp, #80
	ret
LBB0_6:
Lloh9:
	adrp	x23, _errno@GOTPAGE
Lloh10:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	str	wzr, [x23]
	ldr	x0, [x19, #16]
	add	x1, sp, #8
	mov	w2, #0
	bl	_strtol
	ldr	x8, [sp, #8]
	ldrb	w8, [x8]
	ldr	w9, [x23]
	cmp	w8, #0
	ccmp	w9, #0, #0, eq
	b.ne	LBB0_19
; %bb.7:
	mov	x20, x0
	tbnz	x0, #63, LBB0_19
; %bb.8:
Lloh11:
	adrp	x22, _UINT16_MAX@GOTPAGE
Lloh12:
	ldr	x22, [x22, _UINT16_MAX@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x20, x8
	b.gt	LBB0_19
; %bb.9:
	str	wzr, [x23]
	ldr	x0, [x19, #24]
	add	x1, sp, #8
	mov	w2, #0
	bl	_strtol
	ldr	x8, [sp, #8]
	ldrb	w8, [x8]
	cbnz	w8, LBB0_20
; %bb.10:
	ldr	w8, [x23]
	cbnz	w8, LBB0_20
; %bb.11:
	mov	x21, x0
	tbnz	x0, #63, LBB0_20
; %bb.12:
	ldr	x8, [x22]
	cmp	x21, x8
	b.gt	LBB0_20
; %bb.13:
	str	wzr, [x23]
	ldr	x0, [x19, #32]
	add	x1, sp, #8
	mov	w2, #0
	bl	_strtoul
	ldr	x8, [sp, #8]
	ldrb	w8, [x8]
	cbnz	w8, LBB0_21
; %bb.14:
	ldr	w8, [x23]
	cbnz	w8, LBB0_21
; %bb.15:
	mov	x22, x0
Lloh13:
	adrp	x8, _UINT32_MAX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _UINT32_MAX@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.hi	LBB0_21
; %bb.16:
Lloh16:
	adrp	x8, _mps_unit@GOTPAGE
Lloh17:
	ldr	x8, [x8, _mps_unit@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_mps_open
	tbnz	w0, #31, LBB0_22
; %bb.17:
	mov	x19, x0
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_mps_set_slot_status
	cbz	x0, LBB0_23
; %bb.18:
Lloh19:
	adrp	x0, l_.str.7@PAGE
Lloh20:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_warnx
	mov	x0, x19
	bl	_close
	mov	w19, #1
	b	LBB0_5
LBB0_19:
	ldr	x8, [x19, #16]
	str	x8, [sp]
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_20:
	ldr	x8, [x19, #24]
	str	x8, [sp]
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_4
LBB0_21:
	ldr	x8, [x19, #32]
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.5@PAGE
Lloh26:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_4
LBB0_22:
	ldr	w19, [x23]
Lloh27:
	adrp	x0, l_.str.6@PAGE
Lloh28:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_warn
	b	LBB0_5
LBB0_23:
	mov	x0, x19
	bl	_close
Lloh29:
	adrp	x0, l_str@PAGE
Lloh30:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w19, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incorrect number of arguments"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"status"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid argument '%s', expecting 'status'"

	.comm	_errno,4,2                      ; @errno
	.comm	_UINT16_MAX,8,3                 ; @UINT16_MAX
l_.str.3:                               ; @.str.3
	.asciz	"Invalid enclosure handle argument '%s'"

l_.str.4:                               ; @.str.4
	.asciz	"Invalid slot argument '%s'"

	.comm	_UINT32_MAX,8,3                 ; @UINT32_MAX
l_.str.5:                               ; @.str.5
	.asciz	"Invalid status argument '%s'"

	.comm	_mps_unit,4,2                   ; @mps_unit
l_.str.6:                               ; @.str.6
	.asciz	"mps_open"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to set status"

l_str:                                  ; @str
	.asciz	"Successfully set slot status"

	.no_dead_strip	_slot_set
.subsections_via_symbols
