	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msi_wmi_query_block
_msi_wmi_query_block:                   ## @msi_wmi_query_block
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, %esi
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	$0, -32(%rbp)
	movl	$0, -24(%rbp)
	movq	_MSIWMI_BIOS_GUID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rdx
	callq	_wmi_query_block
	movq	-40(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rsi
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_2
## %bb.4:
	movl	%esi, (%r14)
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_2:
	movq	_ACPI_TYPE_BUFFER@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	cmpq	(%rax), %rsi
	cmovel	%esi, %edx
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_3:
	movq	%rbx, %rdi
	callq	_kfree
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_MSIWMI_BIOS_GUID,4,2           ## @MSIWMI_BIOS_GUID
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"query block returned object type: %d - buffer length:%d\n"

	.comm	_ACPI_TYPE_BUFFER,8,3           ## @ACPI_TYPE_BUFFER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_msi_wmi_query_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msi_wmi_query_block
_msi_wmi_query_block:                   ; @msi_wmi_query_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x1, x0
Lloh0:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	stp	x8, xzr, [sp, #8]
	str	wzr, [sp, #24]
Lloh3:
	adrp	x8, _MSIWMI_BIOS_GUID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSIWMI_BIOS_GUID@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x2, sp, #8
	bl	_wmi_query_block
	ldr	x19, [sp, #8]
	cbz	x19, LBB0_4
; %bb.1:
	ldr	x1, [x19]
Lloh6:
	adrp	x8, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_3
; %bb.2:
	str	w1, [x20]
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _ACPI_TYPE_BUFFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ACPI_TYPE_BUFFER@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x1, x8
	csel	w2, w1, wzr, eq
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_4:
	mov	x0, x19
	bl	_kfree
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_MSIWMI_BIOS_GUID,4,2           ; @MSIWMI_BIOS_GUID
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"query block returned object type: %d - buffer length:%d\n"

	.comm	_ACPI_TYPE_BUFFER,8,3           ; @ACPI_TYPE_BUFFER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_msi_wmi_query_block
.subsections_via_symbols
