	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_copy_info                  ## -- Begin function agp_copy_info
	.p2align	4, 0x90
_agp_copy_info:                         ## @agp_copy_info
	.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	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	32(%r14), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 52(%rbx)
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movl	28(%r14), %eax
	movl	%eax, 40(%rbx)
	movl	(%r14), %eax
	movq	_AGPSTAT_MODE_3_0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	jne	LBB0_3
## %bb.4:
	movq	_AGP2_RESERVED_MASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_3:
	movq	_AGP3_RESERVED_MASK@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movl	24(%r14), %eax
	movl	%eax, 36(%rbx)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_agp_return_size
	movl	%eax, 32(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 28(%rbx)
	leaq	16(%r14), %rdi
	callq	_atomic_read
	movl	%eax, 24(%rbx)
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 16(%rbx)
	movq	$-1, 8(%rbx)
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NOT_SUPPORTED,4,2              ## @NOT_SUPPORTED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SUPPORTED,4,2                  ## @SUPPORTED
	.comm	_AGPSTAT_MODE_3_0,4,2           ## @AGPSTAT_MODE_3_0
	.comm	_AGP3_RESERVED_MASK,4,2         ## @AGP3_RESERVED_MASK
	.comm	_AGP2_RESERVED_MASK,4,2         ## @AGP2_RESERVED_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_copy_info                  ; -- Begin function agp_copy_info
	.p2align	2
_agp_copy_info:                         ; @agp_copy_info
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	cbz	x20, LBB0_2
; %bb.1:
	ldr	x8, [x20, #32]
	ldr	d0, [x8]
	str	d0, [x19, #48]
Lloh0:
	adrp	x8, _SUPPORTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUPPORTED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20, #28]
	stp	w9, w8, [x19, #40]
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _AGPSTAT_MODE_3_0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AGPSTAT_MODE_3_0@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _AGP2_RESERVED_MASK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AGP2_RESERVED_MASK@GOTPAGEOFF]
Lloh8:
	adrp	x11, _AGP3_RESERVED_MASK@GOTPAGE
Lloh9:
	ldr	x11, [x11, _AGP3_RESERVED_MASK@GOTPAGEOFF]
	tst	w9, w8
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19]
	ldr	w8, [x20, #24]
	str	w8, [x19, #36]
	bl	_agp_return_size
	ldr	w8, [x20, #20]
	stp	w8, w0, [x19, #28]
	add	x0, x20, #16
	bl	_atomic_read
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #24]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	stp	w9, w8, [x19, #16]
	mov	x8, #-1
	str	x8, [x19, #8]
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x8, _NOT_SUPPORTED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NOT_SUPPORTED@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #44]
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NOT_SUPPORTED,4,2              ; @NOT_SUPPORTED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SUPPORTED,4,2                  ; @SUPPORTED
	.comm	_AGPSTAT_MODE_3_0,4,2           ; @AGPSTAT_MODE_3_0
	.comm	_AGP3_RESERVED_MASK,4,2         ; @AGP3_RESERVED_MASK
	.comm	_AGP2_RESERVED_MASK,4,2         ; @AGP2_RESERVED_MASK
.subsections_via_symbols
