	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_driver_load             ## -- Begin function radeon_driver_load
	.p2align	4, 0x90
_radeon_driver_load:                    ## @radeon_driver_load
	.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, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, 8(%r15)
	movq	%rbx, (%rax)
	movq	_RADEON_FAMILY_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%rbx, %rax
	addq	$-128, %rax
	cmpq	$11, %rax
	ja	LBB0_4
## %bb.3:
	movq	_RADEON_HAS_HIERZ@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	%rbx, (%r14)
LBB0_4:
	movl	(%r15), %edi
	callq	_pci_set_master
	movq	%r15, %rdi
	callq	_drm_pci_device_is_agp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_RADEON_IS_AGP@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_6:
	movl	(%r15), %edi
	callq	_pci_is_pcie
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	movq	_RADEON_IS_PCI@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_RADEON_IS_PCIE@GOTPCREL(%rip), %rax
LBB0_9:
	movslq	(%rax), %rax
	orq	%rax, (%r14)
	movl	(%r15), %edi
	movl	$2, %esi
	callq	_pci_resource_start
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	$2, %esi
	callq	_pci_resource_len
	movq	__DRM_REGISTERS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	__DRM_READ_ONLY@GOTPCREL(%rip), %rdx
	movq	__DRM_DRIVER@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	orl	(%rdx), %r8d
	movq	%r14, %r9
	addq	$8, %r9
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_drm_addmap
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_drm_vblank_init
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_radeon_driver_unload
	jmp	LBB0_13
LBB0_12:
	movq	(%r14), %rax
	movq	_RADEON_IS_AGP@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	_RADEON_IS_PCIE@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	testq	%rdx, %rax
	leaq	L_.str.3(%rip), %rdx
	leaq	L_.str.2(%rip), %rdi
	cmoveq	%rdx, %rdi
	testq	%rcx, %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rdi, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RADEON_FAMILY_MASK,8,3         ## @RADEON_FAMILY_MASK
	.comm	_RADEON_HAS_HIERZ,8,3           ## @RADEON_HAS_HIERZ
	.comm	_RADEON_IS_AGP,4,2              ## @RADEON_IS_AGP
	.comm	_RADEON_IS_PCIE,4,2             ## @RADEON_IS_PCIE
	.comm	_RADEON_IS_PCI,4,2              ## @RADEON_IS_PCI
	.comm	__DRM_REGISTERS,4,2             ## @_DRM_REGISTERS
	.comm	__DRM_READ_ONLY,4,2             ## @_DRM_READ_ONLY
	.comm	__DRM_DRIVER,4,2                ## @_DRM_DRIVER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s card detected\n"

L_.str.1:                               ## @.str.1
	.asciz	"AGP"

L_.str.2:                               ## @.str.2
	.asciz	"PCIE"

L_.str.3:                               ## @.str.3
	.asciz	"PCI"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_driver_load             ; -- Begin function radeon_driver_load
	.p2align	2
_radeon_driver_load:                    ; @radeon_driver_load
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	str	x0, [x19, #8]
	str	x21, [x0]
Lloh3:
	adrp	x8, _RADEON_FAMILY_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RADEON_FAMILY_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x8, x8, x21
	sub	x8, x8, #128
	cmp	x8, #11
	b.hi	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _RADEON_HAS_HIERZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RADEON_HAS_HIERZ@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	orr	x8, x8, x21
	str	x8, [x20]
LBB0_3:
	ldr	w0, [x19]
	bl	_pci_set_master
	mov	x0, x19
	bl	_drm_pci_device_is_agp
Lloh9:
	adrp	x23, _RADEON_IS_AGP@GOTPAGE
Lloh10:
	ldr	x23, [x23, _RADEON_IS_AGP@GOTPAGEOFF]
	mov	x8, x23
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19]
	bl	_pci_is_pcie
Lloh11:
	adrp	x8, _RADEON_IS_PCIE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RADEON_IS_PCIE@GOTPAGEOFF]
Lloh13:
	adrp	x9, _RADEON_IS_PCI@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RADEON_IS_PCI@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_5:
	ldrsw	x8, [x8]
	ldr	x9, [x20]
	orr	x8, x9, x8
	mov	x21, x20
	str	x8, [x21], #8
	ldr	w0, [x19]
	mov	w1, #2
	bl	_pci_resource_start
	mov	x22, x0
	ldr	w0, [x19]
	mov	w1, #2
	bl	_pci_resource_len
	mov	x2, x0
Lloh15:
	adrp	x8, __DRM_REGISTERS@GOTPAGE
Lloh16:
	ldr	x8, [x8, __DRM_REGISTERS@GOTPAGEOFF]
Lloh17:
	adrp	x9, __DRM_READ_ONLY@GOTPAGE
Lloh18:
	ldr	x9, [x9, __DRM_READ_ONLY@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
Lloh20:
	ldr	w8, [x9]
Lloh21:
	adrp	x9, __DRM_DRIVER@GOTPAGE
Lloh22:
	ldr	x9, [x9, __DRM_DRIVER@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, x19
	mov	x1, x22
	mov	x5, x21
	bl	_drm_addmap
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.6:
	mov	x0, x19
	mov	w1, #2
	bl	_drm_vblank_init
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_radeon_driver_unload
	b	LBB0_10
LBB0_8:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_9:
	ldr	x8, [x20]
Lloh27:
	adrp	x9, _RADEON_IS_PCIE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _RADEON_IS_PCIE@GOTPAGEOFF]
	ldrsw	x10, [x23]
Lloh29:
	ldrsw	x9, [x9]
Lloh30:
	adrp	x11, l_.str.2@PAGE
Lloh31:
	add	x11, x11, l_.str.2@PAGEOFF
Lloh32:
	adrp	x12, l_.str.3@PAGE
Lloh33:
	add	x12, x12, l_.str.3@PAGEOFF
	tst	x8, x9
	csel	x9, x12, x11, eq
Lloh34:
	adrp	x11, l_.str.1@PAGE
Lloh35:
	add	x11, x11, l_.str.1@PAGEOFF
	tst	x8, x10
	csel	x1, x9, x11, eq
Lloh36:
	adrp	x0, l_.str@PAGE
Lloh37:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
LBB0_10:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RADEON_FAMILY_MASK,8,3         ; @RADEON_FAMILY_MASK
	.comm	_RADEON_HAS_HIERZ,8,3           ; @RADEON_HAS_HIERZ
	.comm	_RADEON_IS_AGP,4,2              ; @RADEON_IS_AGP
	.comm	_RADEON_IS_PCIE,4,2             ; @RADEON_IS_PCIE
	.comm	_RADEON_IS_PCI,4,2              ; @RADEON_IS_PCI
	.comm	__DRM_REGISTERS,4,2             ; @_DRM_REGISTERS
	.comm	__DRM_READ_ONLY,4,2             ; @_DRM_READ_ONLY
	.comm	__DRM_DRIVER,4,2                ; @_DRM_DRIVER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s card detected\n"

l_.str.1:                               ; @.str.1
	.asciz	"AGP"

l_.str.2:                               ; @.str.2
	.asciz	"PCIE"

l_.str.3:                               ; @.str.3
	.asciz	"PCI"

.subsections_via_symbols
