	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_get_bios                ## -- Begin function radeon_get_bios
	.p2align	4, 0x90
_radeon_get_bios:                       ## @radeon_get_bios
	.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	%rdi, %rbx
	callq	_radeon_atrm_get_bios
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_radeon_acpi_vfct_bios
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	callq	_igp_read_bios_from_vram
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_radeon_read_bios
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_radeon_read_disabled_bios
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	(%rax), %esi
	movl	4(%rax), %edx
	cmpl	$85, %esi
	jne	LBB0_9
## %bb.8:
	cmpl	$170, %edx
	jne	LBB0_9
## %bb.12:
	movl	$24, %edi
	callq	_RBIOS16
	leal	20(%rax), %edi
	callq	_RBIOS8
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_INFO
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_printk
LBB0_10:
	movq	(%rbx), %rdi
	callq	_kfree
LBB0_11:
	movq	$0, (%rbx)
	xorl	%r14d, %r14d
LBB0_18:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	$72, %edi
	callq	_RBIOS16
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	je	LBB0_10
## %bb.15:
	shlq	$32, %rax
	movabsq	$17179869184, %r15              ## imm = 0x400000000
	addq	%rax, %r15
	movq	%r15, %rdi
	sarq	$30, %rdi
	addq	(%rbx), %rdi
	leaq	L_.str.3(%rip), %r12
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcmp
	movl	$1, %r14d
	movl	$1, %ecx
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	sarq	$32, %r15
	shlq	$2, %r15
	addq	(%rbx), %r15
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_memcmp
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.6(%rip), %r12
	cmoveq	%rax, %r12
LBB0_17:
	movl	%ecx, 12(%rbx)
	leaq	L_.str.5(%rip), %rdi
	movq	%r12, %rsi
	callq	_DRM_DEBUG
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to locate a BIOS ROM\n"

L_.str.1:                               ## @.str.1
	.asciz	"BIOS signature incorrect %x %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Not an x86 BIOS ROM, not using.\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"MOTA"

L_.str.5:                               ## @.str.5
	.asciz	"%sBIOS detected\n"

L_.str.6:                               ## @.str.6
	.asciz	"COM"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_get_bios                ; -- Begin function radeon_get_bios
	.p2align	2
_radeon_get_bios:                       ; @radeon_get_bios
	.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
	mov	x19, x0
	bl	_radeon_atrm_get_bios
	cbnz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_radeon_acpi_vfct_bios
	cbnz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_igp_read_bios_from_vram
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_radeon_read_bios
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_radeon_read_disabled_bios
	cbz	w0, LBB0_10
LBB0_5:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.6:
	ldp	w1, w2, [x8]
	cmp	w1, #85
	b.ne	LBB0_11
; %bb.7:
	cmp	w2, #170
	b.ne	LBB0_11
; %bb.8:
	mov	w0, #24
	bl	_RBIOS16
	add	w0, w0, #20
	bl	_RBIOS8
	cbz	w0, LBB0_15
; %bb.9:
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_INFO
	b	LBB0_12
LBB0_10:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_13
LBB0_11:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
LBB0_12:
	ldr	x0, [x19]
	bl	_kfree
LBB0_13:
	mov	w0, #0
	str	xzr, [x19]
LBB0_14:
	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
LBB0_15:
	mov	w0, #72
	bl	_RBIOS16
	str	w0, [x19, #8]
	cbz	w0, LBB0_12
; %bb.16:
	ldr	x8, [x19]
	mov	x9, #17179869184
	add	x21, x9, x0, lsl #32
	add	x0, x8, x21, asr #30
Lloh6:
	adrp	x20, l_.str.3@PAGE
Lloh7:
	add	x20, x20, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	w2, #4
	bl	_memcmp
	cbz	w0, LBB0_18
; %bb.17:
	asr	x8, x21, #32
	ldr	x9, [x19]
	add	x0, x9, x8, lsl #2
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #4
	bl	_memcmp
	cmp	w0, #0
	cset	w8, eq
Lloh10:
	adrp	x9, l_.str.6@PAGE
Lloh11:
	add	x9, x9, l_.str.6@PAGEOFF
	csel	x20, x20, x9, eq
	b	LBB0_19
LBB0_18:
	mov	w8, #1
LBB0_19:
	str	w8, [x19, #12]
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	bl	_DRM_DEBUG
	mov	w0, #1
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to locate a BIOS ROM\n"

l_.str.1:                               ; @.str.1
	.asciz	"BIOS signature incorrect %x %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Not an x86 BIOS ROM, not using.\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"MOTA"

l_.str.5:                               ; @.str.5
	.asciz	"%sBIOS detected\n"

l_.str.6:                               ; @.str.6
	.asciz	"COM"

.subsections_via_symbols
