	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_cap
_set_cap:                               ## @set_cap
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %rbx
	callq	_to_acpi_device
	movq	(%rax), %r13
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movl	$1, -80(%rbp)
	leaq	-56(%rbp), %rax
	movq	%rax, -72(%rbp)
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	-48(%rbp), %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, -48(%rbp)
	cmpq	24(%r13), %rax
	ja	LBB0_3
## %bb.2:
	cmpq	32(%r13), %rax
	jb	LBB0_3
## %bb.4:
	movq	%rax, -56(%rbp)
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	16(%r13), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-80(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	callq	_acpi_evaluate_integer
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rax
	movq	%rax, (%r13)
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_EXCEPTION
	jmp	LBB0_3
LBB0_8:
	cmpq	$0, -64(%rbp)
	je	LBB0_9
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%r12d, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_TYPE_INTEGER,4,2          ## @ACPI_TYPE_INTEGER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_SHL"

	.comm	_AE_INFO,4,2                    ## @AE_INFO
L_.str.1:                               ## @.str.1
	.asciz	"Evaluating _SHL"

	.no_dead_strip	_set_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_cap
_set_cap:                               ; @set_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	bl	_to_acpi_device
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x8]
	mov	w8, #1
	str	w8, [sp, #24]
	add	x8, sp, #40
	stp	x8, x9, [sp, #32]
	add	x2, sp, #16
	mov	x0, x20
	mov	w1, #10
	bl	_kstrtoul
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	x0, [sp, #16]
	mov	w1, #1000
	bl	_DIV_ROUND_CLOSEST
	str	x0, [sp, #16]
	ldr	x8, [x22, #24]
	cmp	x0, x8
	b.hi	LBB0_8
; %bb.2:
	ldr	x8, [x22, #32]
	cmp	x0, x8
	b.lo	LBB0_8
; %bb.3:
	str	x0, [sp, #40]
	add	x20, x22, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #24
	add	x3, sp, #8
	bl	_acpi_evaluate_integer
	mov	x21, x0
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	x8, [sp, #16]
	str	x8, [x22]
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x21
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_EXCEPTION
	b	LBB0_8
LBB0_7:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_10
LBB0_8:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	mov	x0, x19
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_TYPE_INTEGER,4,2          ; @ACPI_TYPE_INTEGER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_SHL"

	.comm	_AE_INFO,4,2                    ; @AE_INFO
l_.str.1:                               ; @.str.1
	.asciz	"Evaluating _SHL"

	.no_dead_strip	_set_cap
.subsections_via_symbols
