	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_run_osc                   ## -- Begin function acpi_run_osc
	.p2align	4, 0x90
_acpi_run_osc:                          ## @acpi_run_osc
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -208(%rbp)
	movaps	%xmm0, -192(%rbp)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, -208(%rbp)
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r15
	movl	%edi, %r14d
	movl	40(%rsi), %edi
	leaq	-176(%rbp), %r13
	movq	%r13, %rsi
	callq	_acpi_str_to_uuid
	movq	%rax, %rdi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_6
LBB0_2:
	movq	_AE_ERROR@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rbx
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.5:
	movq	%rbx, %rax
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%rbx), %eax
	movl	%eax, 8(%r15)
	movq	$0, 16(%r15)
	movl	$4, -224(%rbp)
	leaq	-112(%rbp), %rax
	movq	%rax, -216(%rbp)
	movq	_ACPI_TYPE_BUFFER@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -112(%rbp)
	movl	$16, -112(%rbp)
	movq	%r13, -104(%rbp)
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -96(%rbp)
	movl	(%r15), %edx
	movl	%edx, -96(%rbp)
	movq	%rcx, -80(%rbp)
	movl	24(%r15), %ecx
	movl	%ecx, %edx
	sarl	$2, %edx
	movl	%edx, -80(%rbp)
	movq	%rax, -64(%rbp)
	movl	%ecx, -64(%rbp)
	movq	32(%r15), %rax
	movq	%rax, -56(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-224(%rbp), %rdx
	leaq	-208(%rbp), %rcx
	movl	%r14d, %edi
	callq	_acpi_evaluate_object
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:
	cmpl	$0, -192(%rbp)
	je	LBB0_25
## %bb.8:
	movq	-200(%rbp), %rbx
	movq	(%rbx), %rdi
	cmpq	(%r12), %rdi
	jne	LBB0_22
## %bb.9:
	cmpl	%edi, 24(%r15)
	jne	LBB0_22
## %bb.10:
	movq	8(%rbx), %rax
	movl	(%rax), %r12d
	andl	$-2, %r12d
	je	LBB0_20
## %bb.11:
	movq	_OSC_REQUEST_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdx
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_acpi_print_osc_error
LBB0_13:
	movq	_OSC_INVALID_UUID_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdx
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_acpi_print_osc_error
LBB0_15:
	movq	_OSC_INVALID_REVISION_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_17
## %bb.16:
	leaq	L_.str.4(%rip), %rdx
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_acpi_print_osc_error
LBB0_17:
	movq	_OSC_CAPABILITIES_MASK_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_26
## %bb.18:
	movq	32(%r15), %rax
	movq	_OSC_QUERY_TYPE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_OSC_QUERY_ENABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	je	LBB0_28
## %bb.19:
	movl	(%rbx), %edi
LBB0_20:
	movl	%edi, 8(%r15)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_kmalloc
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_27
## %bb.21:
	movq	8(%rbx), %rsi
	movl	8(%r15), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movq	_AE_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_22:
	leaq	L_.str.1(%rip), %rdx
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_acpi_print_osc_error
	movq	_AE_TYPE@GOTPCREL(%rip), %rax
LBB0_23:
	movq	(%rax), %rbx
	movq	-200(%rbp), %rdi
	callq	_kfree
	movq	_AE_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_4
## %bb.24:
	movq	$0, 16(%r15)
	jmp	LBB0_4
LBB0_25:
	movq	_AE_NULL_OBJECT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_26:
	movq	_AE_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_27:
	movq	_AE_NO_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_28:
	movq	_AE_SUPPORT@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_AE_ERROR,8,3                   ## @AE_ERROR
	.comm	_ACPI_TYPE_BUFFER,8,3           ## @ACPI_TYPE_BUFFER
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_OSC"

	.comm	_AE_NULL_OBJECT,8,3             ## @AE_NULL_OBJECT
L_.str.1:                               ## @.str.1
	.asciz	"_OSC evaluation returned wrong type"

	.comm	_AE_TYPE,8,3                    ## @AE_TYPE
	.comm	_OSC_REQUEST_ERROR,4,2          ## @OSC_REQUEST_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"_OSC request failed"

	.comm	_OSC_INVALID_UUID_ERROR,4,2     ## @OSC_INVALID_UUID_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"_OSC invalid UUID"

	.comm	_OSC_INVALID_REVISION_ERROR,4,2 ## @OSC_INVALID_REVISION_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"_OSC invalid revision"

	.comm	_OSC_CAPABILITIES_MASK_ERROR,4,2 ## @OSC_CAPABILITIES_MASK_ERROR
	.comm	_OSC_QUERY_TYPE,8,3             ## @OSC_QUERY_TYPE
	.comm	_OSC_QUERY_ENABLE,4,2           ## @OSC_QUERY_ENABLE
	.comm	_AE_SUPPORT,8,3                 ## @AE_SUPPORT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_AE_NO_MEMORY,8,3               ## @AE_NO_MEMORY
	.comm	_AE_OK,8,3                      ## @AE_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_run_osc                   ; -- Begin function acpi_run_osc
	.p2align	2
_acpi_run_osc:                          ; @acpi_run_osc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
Lloh3:
	adrp	x22, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
	ldr	w8, [x22]
	str	w8, [sp]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #40]
	add	x21, sp, #56
	add	x1, sp, #56
	bl	_acpi_str_to_uuid
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_6
LBB0_2:
Lloh5:
	adrp	x8, _AE_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AE_ERROR@GOTPAGEOFF]
LBB0_3:
	ldr	x21, [x8]
LBB0_4:
	ldur	x8, [x29, #-40]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.5:
	mov	x0, x21
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_6:
	ldr	w8, [x22]
	str	w8, [x19, #8]
	str	xzr, [x19, #16]
	mov	w8, #4
	str	w8, [sp, #40]
	sub	x8, x29, #104
	str	x8, [sp, #48]
Lloh10:
	adrp	x22, _ACPI_TYPE_BUFFER@GOTPAGE
Lloh11:
	ldr	x22, [x22, _ACPI_TYPE_BUFFER@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w9, #16
	stp	x8, x21, [x29, #-104]
	stur	w9, [x29, #-104]
Lloh12:
	adrp	x9, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w10, [x19]
	stur	x9, [x29, #-88]
	stur	x9, [x29, #-72]
	ldr	w9, [x19, #24]
	asr	w11, w9, #2
	stur	w10, [x29, #-88]
	stur	w11, [x29, #-72]
	ldr	x10, [x19, #32]
	stp	x8, x10, [x29, #-56]
	stur	w9, [x29, #-56]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #40
	mov	x3, sp
	mov	x0, x20
	bl	_acpi_evaluate_object
	mov	x21, x0
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_4
; %bb.7:
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_25
; %bb.8:
	ldr	x21, [sp, #8]
	ldr	x0, [x21]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_22
; %bb.9:
	ldr	w8, [x19, #24]
	cmp	w8, w0
	b.ne	LBB0_22
; %bb.10:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	ands	w22, w8, #0xfffffffe
	b.eq	LBB0_20
; %bb.11:
Lloh17:
	adrp	x8, _OSC_REQUEST_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OSC_REQUEST_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_13
; %bb.12:
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_acpi_print_osc_error
LBB0_13:
Lloh22:
	adrp	x8, _OSC_INVALID_UUID_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _OSC_INVALID_UUID_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.14:
Lloh25:
	adrp	x2, l_.str.3@PAGE
Lloh26:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_acpi_print_osc_error
LBB0_15:
Lloh27:
	adrp	x8, _OSC_INVALID_REVISION_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OSC_INVALID_REVISION_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_17
; %bb.16:
Lloh30:
	adrp	x2, l_.str.4@PAGE
Lloh31:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_acpi_print_osc_error
LBB0_17:
Lloh32:
	adrp	x8, _OSC_CAPABILITIES_MASK_ERROR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _OSC_CAPABILITIES_MASK_ERROR@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_26
; %bb.18:
	ldr	x8, [x19, #32]
Lloh35:
	adrp	x9, _OSC_QUERY_TYPE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _OSC_QUERY_TYPE@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh38:
	adrp	x9, _OSC_QUERY_ENABLE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _OSC_QUERY_ENABLE@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_28
; %bb.19:
	ldr	w0, [x21]
LBB0_20:
	str	w0, [x19, #8]
Lloh41:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_kmalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_27
; %bb.21:
	ldr	x1, [x21, #8]
	ldr	w2, [x19, #8]
	bl	_memcpy
Lloh44:
	adrp	x8, _AE_OK@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh46:
	adrp	x2, l_.str.1@PAGE
Lloh47:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_acpi_print_osc_error
Lloh48:
	adrp	x8, _AE_TYPE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _AE_TYPE@GOTPAGEOFF]
LBB0_23:
	ldr	x21, [x8]
	ldr	x0, [sp, #8]
	bl	_kfree
Lloh50:
	adrp	x8, _AE_OK@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh52:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_4
; %bb.24:
	str	xzr, [x19, #16]
	b	LBB0_4
LBB0_25:
Lloh53:
	adrp	x8, _AE_NULL_OBJECT@GOTPAGE
Lloh54:
	ldr	x8, [x8, _AE_NULL_OBJECT@GOTPAGEOFF]
	b	LBB0_3
LBB0_26:
Lloh55:
	adrp	x8, _AE_ERROR@GOTPAGE
Lloh56:
	ldr	x8, [x8, _AE_ERROR@GOTPAGEOFF]
	b	LBB0_23
LBB0_27:
Lloh57:
	adrp	x8, _AE_NO_MEMORY@GOTPAGE
Lloh58:
	ldr	x8, [x8, _AE_NO_MEMORY@GOTPAGEOFF]
	b	LBB0_23
LBB0_28:
Lloh59:
	adrp	x8, _AE_SUPPORT@GOTPAGE
Lloh60:
	ldr	x8, [x8, _AE_SUPPORT@GOTPAGEOFF]
	b	LBB0_23
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_AE_ERROR,8,3                   ; @AE_ERROR
	.comm	_ACPI_TYPE_BUFFER,8,3           ; @ACPI_TYPE_BUFFER
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_OSC"

	.comm	_AE_NULL_OBJECT,8,3             ; @AE_NULL_OBJECT
l_.str.1:                               ; @.str.1
	.asciz	"_OSC evaluation returned wrong type"

	.comm	_AE_TYPE,8,3                    ; @AE_TYPE
	.comm	_OSC_REQUEST_ERROR,4,2          ; @OSC_REQUEST_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"_OSC request failed"

	.comm	_OSC_INVALID_UUID_ERROR,4,2     ; @OSC_INVALID_UUID_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"_OSC invalid UUID"

	.comm	_OSC_INVALID_REVISION_ERROR,4,2 ; @OSC_INVALID_REVISION_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"_OSC invalid revision"

	.comm	_OSC_CAPABILITIES_MASK_ERROR,4,2 ; @OSC_CAPABILITIES_MASK_ERROR
	.comm	_OSC_QUERY_TYPE,8,3             ; @OSC_QUERY_TYPE
	.comm	_OSC_QUERY_ENABLE,4,2           ; @OSC_QUERY_ENABLE
	.comm	_AE_SUPPORT,8,3                 ; @AE_SUPPORT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_AE_NO_MEMORY,8,3               ; @AE_NO_MEMORY
	.comm	_AE_OK,8,3                      ; @AE_OK
.subsections_via_symbols
