	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_smbus_cmi_add_cap
_acpi_smbus_cmi_add_cap:                ## @acpi_smbus_cmi_add_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	movq	16(%rdi), %rax
	movq	24(%rdi), %r14
	movl	8(%rax), %esi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_1
## %bb.9:
	movq	16(%r12), %rax
	movl	4(%rax), %esi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	16(%r12), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_acpi_handle_debug
	jmp	LBB0_14
LBB0_1:
	movq	16(%r12), %rax
	movq	24(%r12), %rdi
	movl	8(%rax), %esi
	xorl	%r15d, %r15d
	leaq	-56(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_evaluate_object
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	16(%r12), %rax
	movl	8(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_acpi_handle_err
	jmp	LBB0_3
LBB0_10:
	movl	$1, 4(%r12)
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_12:
	movl	$1, 8(%r12)
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_4:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	(%rax), %rax
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	(%rax), %rdx
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_7
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_acpi_handle_debug
	movq	-56(%rbp), %rdi
	callq	_kfree
	movl	$1, (%r12)
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_acpi_handle_err
	movq	-56(%rbp), %rdi
	callq	_kfree
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to evaluate %s: %i\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ACPI_TYPE_PACKAGE,8,3          ## @ACPI_TYPE_PACKAGE
L_.str.1:                               ## @.str.1
	.asciz	"Invalid argument type\n"

	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
L_.str.2:                               ## @.str.2
	.asciz	"SMBus CMI Version %x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unsupported CMI method: %s\n"

	.no_dead_strip	_acpi_smbus_cmi_add_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_smbus_cmi_add_cap
_acpi_smbus_cmi_add_cap:                ; @acpi_smbus_cmi_add_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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	stp	x8, xzr, [sp, #24]
	str	wzr, [sp, #40]
	ldp	x8, x20, [x0, #16]
	ldr	w1, [x8, #8]
	mov	x0, x21
	bl	_strcmp
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w1, [x8, #4]
	mov	x0, x21
	bl	_strcmp
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w1, [x8]
	mov	x0, x21
	bl	_strcmp
	cbz	w0, LBB0_7
; %bb.3:
	str	x21, [sp]
Lloh3:
	adrp	x1, l_.str.3@PAGE
Lloh4:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_acpi_handle_debug
	mov	w0, #0
	b	LBB0_14
LBB0_4:
	ldp	x8, x0, [x19, #16]
	ldr	w1, [x8, #8]
	add	x3, sp, #24
	mov	x2, #0
	bl	_acpi_evaluate_object
	mov	x21, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #8]
	stp	x8, x21, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_acpi_handle_err
	b	LBB0_13
LBB0_6:
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_14
LBB0_7:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_14
LBB0_8:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_12
; %bb.9:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_acpi_handle_debug
	ldr	x0, [sp, #24]
	bl	_kfree
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_14
LBB0_12:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_acpi_handle_err
	ldr	x0, [sp, #24]
	bl	_kfree
LBB0_13:
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to evaluate %s: %i\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ACPI_TYPE_PACKAGE,8,3          ; @ACPI_TYPE_PACKAGE
l_.str.1:                               ; @.str.1
	.asciz	"Invalid argument type\n"

	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
l_.str.2:                               ; @.str.2
	.asciz	"SMBus CMI Version %x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unsupported CMI method: %s\n"

	.no_dead_strip	_acpi_smbus_cmi_add_cap
.subsections_via_symbols
