	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wmi_create_device
_wmi_create_device:                     ## @wmi_create_device
	.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	$24, %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, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movq	_ACPI_WMI_EVENT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_wmi_type_event@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r13)
	jmp	LBB0_11
LBB0_2:
	movq	_ACPI_WMI_METHOD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_wmi_type_method@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r13)
	leaq	44(%r13), %rdi
	callq	_mutex_init
LBB0_11:
	leaq	16(%r13), %rbx
	movq	_wmi_bus_type@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r13)
	movq	%r14, 16(%r13)
	movl	4(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_set_name
	movq	%rbx, %rdi
	callq	_device_initialize
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rsi
	leaq	-45(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strcpy
	movl	40(%r13), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_strncat
	movl	(%r12), %edi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_get_subobj_info
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	leaq	-45(%rbp), %rdx
	movq	%r14, %rdi
	callq	_dev_warn
	jmp	LBB0_12
LBB0_6:
	movq	_wmi_type_data@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r13)
	movq	-56(%rbp), %rdi
	movq	(%rdi), %rax
	movq	_ACPI_TYPE_METHOD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	cmpq	$0, 8(%rdi)
	jne	LBB0_9
LBB0_8:
	movl	$1, (%r13)
LBB0_9:
	callq	_kfree
	leaq	L_.str.2(%rip), %rsi
	leaq	-45(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strcpy
	movl	40(%r13), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_strncat
	movl	(%r12), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_get_subobj_info
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movl	$1, 8(%r13)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_WMI_EVENT,4,2             ## @ACPI_WMI_EVENT
	.comm	_wmi_type_event,4,2             ## @wmi_type_event
	.comm	_ACPI_WMI_METHOD,4,2            ## @ACPI_WMI_METHOD
	.comm	_wmi_type_method,4,2            ## @wmi_type_method
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WQ"

L_.str.1:                               ## @.str.1
	.asciz	"%s data block query control method not found\n"

	.comm	_wmi_type_data,4,2              ## @wmi_type_data
	.comm	_ACPI_TYPE_METHOD,8,3           ## @ACPI_TYPE_METHOD
L_.str.2:                               ## @.str.2
	.asciz	"WS"

	.comm	_wmi_bus_type,4,2               ## @wmi_bus_type
L_.str.3:                               ## @.str.3
	.asciz	"%pUL"

	.no_dead_strip	_wmi_create_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wmi_create_device
_wmi_create_device:                     ; @wmi_create_device
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _ACPI_WMI_EVENT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ACPI_WMI_EVENT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _wmi_type_event@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wmi_type_event@GOTPAGEOFF]
	str	x8, [x19, #32]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x9, _ACPI_WMI_METHOD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ACPI_WMI_METHOD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _wmi_type_method@GOTPAGE
Lloh9:
	ldr	x8, [x8, _wmi_type_method@GOTPAGEOFF]
	str	x8, [x19, #32]
	add	x0, x19, #44
	bl	_mutex_init
LBB0_4:
Lloh10:
	adrp	x8, _wmi_bus_type@GOTPAGE
Lloh11:
	ldr	x8, [x8, _wmi_bus_type@GOTPAGEOFF]
	stp	x20, x8, [x19, #16]!
	ldr	w2, [x21, #4]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_set_name
	mov	x0, x19
	bl	_device_initialize
	mov	w23, #0
LBB0_5:
	mov	x0, x23
	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:
	mov	x22, x3
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #3
	bl	_strcpy
	ldr	w1, [x19, #40]
	add	x0, sp, #3
	mov	w2, #2
	bl	_strncat
	ldr	w0, [x22]
	add	x1, sp, #3
	add	x2, sp, #8
	bl	_get_subobj_info
	cbz	w0, LBB0_8
; %bb.7:
	mov	x23, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #3
	mov	x0, x20
	bl	_dev_warn
	b	LBB0_5
LBB0_8:
Lloh18:
	adrp	x8, _wmi_type_data@GOTPAGE
Lloh19:
	ldr	x8, [x8, _wmi_type_data@GOTPAGEOFF]
	str	x8, [x19, #32]
	ldr	x0, [sp, #8]
	ldr	x8, [x0]
Lloh20:
	adrp	x9, _ACPI_TYPE_METHOD@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ACPI_TYPE_METHOD@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_11
LBB0_10:
	mov	w8, #1
	str	w8, [x19]
LBB0_11:
	bl	_kfree
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #3
	bl	_strcpy
	ldr	w1, [x19, #40]
	add	x0, sp, #3
	mov	w2, #2
	bl	_strncat
	ldr	w0, [x22]
	add	x1, sp, #3
	mov	x2, #0
	bl	_get_subobj_info
	cbnz	w0, LBB0_4
; %bb.12:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_WMI_EVENT,4,2             ; @ACPI_WMI_EVENT
	.comm	_wmi_type_event,4,2             ; @wmi_type_event
	.comm	_ACPI_WMI_METHOD,4,2            ; @ACPI_WMI_METHOD
	.comm	_wmi_type_method,4,2            ; @wmi_type_method
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WQ"

l_.str.1:                               ; @.str.1
	.asciz	"%s data block query control method not found\n"

	.comm	_wmi_type_data,4,2              ; @wmi_type_data
	.comm	_ACPI_TYPE_METHOD,8,3           ; @ACPI_TYPE_METHOD
l_.str.2:                               ; @.str.2
	.asciz	"WS"

	.comm	_wmi_bus_type,4,2               ; @wmi_bus_type
l_.str.3:                               ; @.str.3
	.asciz	"%pUL"

	.no_dead_strip	_wmi_create_device
.subsections_via_symbols
