	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pollux_finish                  ## -- Begin function pollux_finish
	.p2align	4, 0x90
_pollux_finish:                         ## @pollux_finish
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_timer_cleanup
	xorl	%eax, %eax
	callq	_unset_ram_timings
	movq	_saved_video_regs@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	$16472, %edi                    ## imm = 0x4058
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_restore_multiple_regs
	movq	(%r14), %rax
	movl	4(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	$17496, %edi                    ## imm = 0x4458
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_restore_multiple_regs
	movq	_memregl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orl	$16, 16472(%rax)
	orb	$16, 17496(%rax)
	movq	_battdev@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	js	LBB0_2
## %bb.1:
	callq	_close
LBB0_2:
	movq	_mixerdev@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	js	LBB0_4
## %bb.3:
	callq	_close
LBB0_4:
	movq	_memregs@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$131072, %esi                   ## imm = 0x20000
	callq	_munmap
	movq	_memdev@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_close                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_saved_video_regs,8,3           ## @saved_video_regs
	.comm	_memregl,8,3                    ## @memregl
	.comm	_battdev,8,3                    ## @battdev
	.comm	_mixerdev,8,3                   ## @mixerdev
	.comm	_memregs,8,3                    ## @memregs
	.comm	_memdev,8,3                     ## @memdev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pollux_finish                  ; -- Begin function pollux_finish
	.p2align	2
_pollux_finish:                         ; @pollux_finish
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_timer_cleanup
	bl	_unset_ram_timings
Lloh0:
	adrp	x20, _saved_video_regs@GOTPAGE
Lloh1:
	ldr	x20, [x20, _saved_video_regs@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w19, [x8]
	mov	x0, x19
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	w21, #16472
	mov	w0, #16472
	mov	x1, x19
	bl	_restore_multiple_regs
	ldr	x8, [x20]
	ldr	w19, [x8, #4]
	mov	x0, x19
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	w0, #17496
	mov	x1, x19
	bl	_restore_multiple_regs
Lloh2:
	adrp	x8, _memregl@GOTPAGE
Lloh3:
	ldr	x8, [x8, _memregl@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x8, x8, x21
	ldr	w9, [x8]
	orr	w9, w9, #0x10
	str	w9, [x8]
	ldr	w9, [x8, #1024]
	orr	w9, w9, #0x10
	str	w9, [x8, #1024]
Lloh5:
	adrp	x8, _battdev@GOTPAGE
Lloh6:
	ldr	x8, [x8, _battdev@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x8]
	tbnz	x0, #63, LBB0_2
; %bb.1:
	bl	_close
LBB0_2:
Lloh8:
	adrp	x8, _mixerdev@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mixerdev@GOTPAGEOFF]
Lloh10:
	ldr	x0, [x8]
	tbnz	x0, #63, LBB0_4
; %bb.3:
	bl	_close
LBB0_4:
Lloh11:
	adrp	x8, _memregs@GOTPAGE
Lloh12:
	ldr	x8, [x8, _memregs@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
	mov	w1, #131072
	bl	_munmap
Lloh14:
	adrp	x8, _memdev@GOTPAGE
Lloh15:
	ldr	x8, [x8, _memdev@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_close
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_saved_video_regs,8,3           ; @saved_video_regs
	.comm	_memregl,8,3                    ; @memregl
	.comm	_battdev,8,3                    ; @battdev
	.comm	_mixerdev,8,3                   ; @mixerdev
	.comm	_memregs,8,3                    ; @memregs
	.comm	_memdev,8,3                     ; @memdev
.subsections_via_symbols
