	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_discovery_get_gfx_info  ## -- Begin function amdgpu_discovery_get_gfx_info
	.p2align	4, 0x90
_amdgpu_discovery_get_gfx_info:         ## @amdgpu_discovery_get_gfx_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	64(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	(%rbx), %rax
	movq	_GC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_le16_to_cpu
	movq	%rax, %r12
	movl	64(%rax,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, (%r14)
	movl	60(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movl	56(%r12,%rbx), %edi
	callq	_le32_to_cpu
	addl	%r15d, %eax
	addl	%eax, %eax
	movl	%eax, 4(%r14)
	movl	4(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 8(%r14)
	movl	52(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 12(%r14)
	movl	48(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 16(%r14)
	movl	44(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 20(%r14)
	movl	40(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 24(%r14)
	movl	36(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 28(%r14)
	movl	32(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 32(%r14)
	movl	28(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 36(%r14)
	movl	24(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 48(%r14)
	movl	20(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 52(%r14)
	movl	16(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 56(%r14)
	movl	12(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 60(%r14)
	movl	8(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movl	4(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	movl	%eax, 40(%r14)
	movl	(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, 44(%r14)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ip discovery uninitialized\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GC,8,3                         ## @GC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_discovery_get_gfx_info  ; -- Begin function amdgpu_discovery_get_gfx_info
	.p2align	2
_amdgpu_discovery_get_gfx_info:         ; @amdgpu_discovery_get_gfx_info
	.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
	ldr	x20, [x0, #64]
	cbz	x20, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _GC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	bl	_le16_to_cpu
	add	x21, x0, x20
	ldr	w0, [x21, #64]
	bl	_le32_to_cpu
	str	w0, [x19]
	ldr	w0, [x21, #60]
	bl	_le32_to_cpu
	mov	x20, x0
	ldr	w0, [x21, #56]
	bl	_le32_to_cpu
	add	w8, w0, w20
	lsl	w8, w8, #1
	str	w8, [x19, #4]
	ldr	w0, [x21, #4]
	bl	_le32_to_cpu
	str	w0, [x19, #8]
	ldr	w0, [x21, #52]
	bl	_le32_to_cpu
	str	w0, [x19, #12]
	ldr	w0, [x21, #48]
	bl	_le32_to_cpu
	str	w0, [x19, #16]
	ldr	w0, [x21, #44]
	bl	_le32_to_cpu
	str	w0, [x19, #20]
	ldr	w0, [x21, #40]
	bl	_le32_to_cpu
	str	w0, [x19, #24]
	ldr	w0, [x21, #36]
	bl	_le32_to_cpu
	str	w0, [x19, #28]
	ldr	w0, [x21, #32]
	bl	_le32_to_cpu
	str	w0, [x19, #32]
	ldr	w0, [x21, #28]
	bl	_le32_to_cpu
	str	w0, [x19, #36]
	ldr	w0, [x21, #24]
	bl	_le32_to_cpu
	str	w0, [x19, #48]
	ldr	w0, [x21, #20]
	bl	_le32_to_cpu
	str	w0, [x19, #52]
	ldr	w0, [x21, #16]
	bl	_le32_to_cpu
	str	w0, [x19, #56]
	ldr	w0, [x21, #12]
	bl	_le32_to_cpu
	str	w0, [x19, #60]
	ldr	w0, [x21, #8]
	bl	_le32_to_cpu
	mov	x20, x0
	ldr	w0, [x21, #4]
	bl	_le32_to_cpu
	sdiv	w8, w20, w0
	str	w8, [x19, #40]
	ldr	w0, [x21]
	bl	_le32_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #44]
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ip discovery uninitialized\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GC,8,3                         ; @GC
.subsections_via_symbols
