	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serverworks_agp_enable
_serverworks_agp_enable:                ## @serverworks_agp_enable
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_serverworks_private@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_PCI_AGP_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	leaq	-28(%rbp), %rdx
	callq	_pci_read_config_dword
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_agp_collect_device_status
                                        ## kill: def $eax killed $eax def $rax
	andl	$-281, %eax                     ## imm = 0xFEE7
	leal	256(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %edi
	movq	_PCI_AGP_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_pci_write_config_dword
	movl	-28(%rbp), %edi
	xorl	%esi, %esi
	callq	_agp_device_command
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_serverworks_private,4,2        ## @serverworks_private
	.comm	_PCI_AGP_STATUS,8,3             ## @PCI_AGP_STATUS
	.comm	_PCI_AGP_COMMAND,8,3            ## @PCI_AGP_COMMAND
	.no_dead_strip	_serverworks_agp_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serverworks_agp_enable
_serverworks_agp_enable:                ; @serverworks_agp_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _serverworks_private@GOTPAGE
Lloh1:
	ldr	x21, [x21, _serverworks_private@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _PCI_AGP_STATUS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCI_AGP_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_agp_collect_device_status
	and	w8, w0, #0xffffffe7
	orr	w2, w8, #0x100
	str	w2, [sp, #12]
	ldr	w0, [x21]
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _PCI_AGP_COMMAND@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_AGP_COMMAND@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_pci_write_config_dword
	ldr	w0, [sp, #12]
	mov	w1, #0
	bl	_agp_device_command
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_serverworks_private,4,2        ; @serverworks_private
	.comm	_PCI_AGP_STATUS,8,3             ; @PCI_AGP_STATUS
	.comm	_PCI_AGP_COMMAND,8,3            ; @PCI_AGP_COMMAND
	.no_dead_strip	_serverworks_agp_enable
.subsections_via_symbols
