	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function topstar_acpi_add
_topstar_acpi_add:                      ## @topstar_acpi_add
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_topstar_dmi_ids@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dmi_check_system
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_acpi_device_name
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_strcpy
	movq	%rbx, %rdi
	callq	_acpi_device_class
	movq	_TOPSTAR_LAPTOP_CLASS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	%eax, %edi
	callq	_strcpy
	movq	%r14, (%rbx)
	movq	%rbx, (%r14)
	movq	%r14, %rdi
	callq	_topstar_acpi_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	%r14, %rdi
	callq	_topstar_platform_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	%r14, %rdi
	callq	_topstar_input_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	_led_workaround@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.6:
	movq	%r14, %rdi
	callq	_topstar_led_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_topstar_input_exit
	movl	%r15d, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_topstar_platform_exit
LBB0_9:
	movq	%r14, %rdi
	callq	_topstar_acpi_exit
LBB0_10:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_topstar_dmi_ids,4,2            ## @topstar_dmi_ids
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Topstar TPSACPI"

	.comm	_TOPSTAR_LAPTOP_CLASS,8,3       ## @TOPSTAR_LAPTOP_CLASS
	.comm	_led_workaround,8,3             ## @led_workaround
	.no_dead_strip	_topstar_acpi_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function topstar_acpi_add
_topstar_acpi_add:                      ; @topstar_acpi_add
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x8, _topstar_dmi_ids@GOTPAGE
Lloh1:
	ldr	x8, [x8, _topstar_dmi_ids@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_dmi_check_system
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_acpi_device_name
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	mov	x0, x20
	bl	_acpi_device_class
Lloh8:
	adrp	x8, _TOPSTAR_LAPTOP_CLASS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TOPSTAR_LAPTOP_CLASS@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	bl	_strcpy
	str	x19, [x20]
	str	x20, [x19]
	mov	x0, x19
	bl	_topstar_acpi_init
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_topstar_platform_init
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_topstar_input_init
	mov	x20, x0
	cbz	w0, LBB0_9
LBB0_4:
	mov	x0, x19
	bl	_topstar_platform_exit
LBB0_5:
	mov	x0, x19
	bl	_topstar_acpi_exit
LBB0_6:
	mov	x0, x19
	bl	_kfree
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh14:
	adrp	x8, _led_workaround@GOTPAGE
Lloh15:
	ldr	x8, [x8, _led_workaround@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_topstar_led_init
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.11:
	mov	x0, x19
	bl	_topstar_input_exit
	b	LBB0_4
LBB0_12:
	mov	w20, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_topstar_dmi_ids,4,2            ; @topstar_dmi_ids
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Topstar TPSACPI"

	.comm	_TOPSTAR_LAPTOP_CLASS,8,3       ; @TOPSTAR_LAPTOP_CLASS
	.comm	_led_workaround,8,3             ; @led_workaround
	.no_dead_strip	_topstar_acpi_add
.subsections_via_symbols
