	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmux_remove
_gmux_remove:                           ## @gmux_remove
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_pnp_get_drvdata
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_vga_switcheroo_unregister_handler
	movq	%rbx, %rdi
	callq	_gmux_disable_interrupts
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	callq	_acpi_disable_gpe
	movl	20(%rbx), %edi
	movq	_ACPI_DEVICE_NOTIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_gmux_notify_handler@GOTPCREL(%rip), %rdx
	callq	_acpi_remove_notify_handler
LBB0_2:
	movl	16(%rbx), %edi
	callq	_backlight_device_unregister
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_release_region
	movq	_apple_gmux_data@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%eax, %eax
	callq	_acpi_video_register
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_apple_bl_register              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_DEVICE_NOTIFY,4,2         ## @ACPI_DEVICE_NOTIFY
	.comm	_gmux_notify_handler,4,2        ## @gmux_notify_handler
	.comm	_apple_gmux_data,8,3            ## @apple_gmux_data
	.no_dead_strip	_gmux_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmux_remove
_gmux_remove:                           ; @gmux_remove
	.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
	bl	_pnp_get_drvdata
	mov	x19, x0
	bl	_vga_switcheroo_unregister_handler
	mov	x0, x19
	bl	_gmux_disable_interrupts
	ldr	x1, [x19]
	tbnz	x1, #63, LBB0_2
; %bb.1:
	mov	x0, #0
	bl	_acpi_disable_gpe
	ldr	w0, [x19, #20]
Lloh0:
	adrp	x8, _ACPI_DEVICE_NOTIFY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_DEVICE_NOTIFY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, _gmux_notify_handler@GOTPAGE
Lloh4:
	ldr	x2, [x2, _gmux_notify_handler@GOTPAGEOFF]
	bl	_acpi_remove_notify_handler
LBB0_2:
	ldr	w0, [x19, #16]
	bl	_backlight_device_unregister
	ldp	w1, w0, [x19, #8]
	bl	_release_region
Lloh5:
	adrp	x8, _apple_gmux_data@GOTPAGE
Lloh6:
	ldr	x8, [x8, _apple_gmux_data@GOTPAGEOFF]
Lloh7:
	str	xzr, [x8]
	mov	x0, x19
	bl	_kfree
	bl	_acpi_video_register
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_apple_bl_register
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_DEVICE_NOTIFY,4,2         ; @ACPI_DEVICE_NOTIFY
	.comm	_gmux_notify_handler,4,2        ; @gmux_notify_handler
	.comm	_apple_gmux_data,8,3            ; @apple_gmux_data
	.no_dead_strip	_gmux_remove
.subsections_via_symbols
