	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_combios_get_primary_dac_info ## -- Begin function radeon_combios_get_primary_dac_info
	.p2align	4, 0x90
_radeon_combios_get_primary_dac_info:   ## @radeon_combios_get_primary_dac_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	movq	8(%r12), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	_COMBIOS_CRT_INFO_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_combios_get_table_offset
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_RBIOS8
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	2(%rbx), %r14
	movq	%r14, %rdi
	callq	_RBIOS8
	movl	%eax, %r13d
	andl	$15, %r13d
	testb	$2, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_RBIOS8
	shrl	$4, %eax
	andl	$15, %eax
	movl	%r13d, %ecx
	shll	$8, %ecx
	movl	%eax, %edx
	jmp	LBB0_6
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	addq	$3, %rbx
	movq	%rbx, %rdi
	callq	_RBIOS8
	movl	%eax, %ecx
	andl	$15, %ecx
	movl	%r13d, %eax
	shll	$8, %eax
	movl	%ecx, %edx
LBB0_6:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	orl	%eax, %ecx
	movl	%ecx, (%r15)
	testl	%edx, %edx
	setne	%al
	testl	%r13d, %r13d
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
LBB0_7:
	movq	(%r12), %rcx
	movl	(%rcx), %edx
	cmpl	$20813, %edx                    ## imm = 0x514D
	je	LBB0_11
## %bb.8:
	cmpl	$20825, %edx                    ## imm = 0x5159
	jne	LBB0_13
## %bb.9:
	cmpl	$5963, 4(%rcx)                  ## imm = 0x174B
	jne	LBB0_13
## %bb.10:
	cmpl	$31784, 8(%rcx)                 ## imm = 0x7C28
	jne	LBB0_13
	jmp	LBB0_14
LBB0_11:
	cmpl	$5963, 4(%rcx)                  ## imm = 0x174B
	jne	LBB0_13
## %bb.12:
	cmpl	$29001, 8(%rcx)                 ## imm = 0x7149
	je	LBB0_14
LBB0_13:
	testl	%eax, %eax
	jne	LBB0_15
LBB0_14:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_radeon_legacy_get_primary_dac_info_from_table
LBB0_15:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_COMBIOS_CRT_INFO_TABLE,4,2     ## @COMBIOS_CRT_INFO_TABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_combios_get_primary_dac_info ; -- Begin function radeon_combios_get_primary_dac_info
	.p2align	2
_radeon_combios_get_primary_dac_info:   ; @radeon_combios_get_primary_dac_info
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x21, [x0]
	ldr	x19, [x21, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_16
; %bb.1:
Lloh3:
	adrp	x8, _COMBIOS_CRT_INFO_TABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _COMBIOS_CRT_INFO_TABLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_combios_get_table_offset
	cbz	x0, LBB0_4
; %bb.2:
	mov	x22, x0
	bl	_RBIOS8
	mov	x24, x0
	add	x23, x22, #2
	mov	x0, x23
	bl	_RBIOS8
	and	w25, w0, #0xf
	tbnz	w24, #1, LBB0_5
; %bb.3:
	mov	x0, x23
	bl	_RBIOS8
	ubfx	w9, w0, #4, #4
	lsl	w8, w25, #8
	mov	x10, x9
	b	LBB0_6
LBB0_4:
	mov	w8, #0
	b	LBB0_7
LBB0_5:
	add	x0, x22, #3
	bl	_RBIOS8
	and	w8, w0, #0xf
	lsl	w9, w25, #8
	mov	x10, x8
LBB0_6:
	orr	w8, w9, w8
	str	w8, [x20]
	cmp	w10, #0
	ccmp	w25, #0, #4, ne
	cset	w8, ne
LBB0_7:
	ldr	x9, [x21]
	ldr	w10, [x9]
	mov	w11, #20813
	cmp	w10, w11
	b.eq	LBB0_11
; %bb.8:
	mov	w11, #20825
	cmp	w10, w11
	b.ne	LBB0_14
; %bb.9:
	ldr	w10, [x9, #4]
	mov	w11, #5963
	cmp	w10, w11
	b.ne	LBB0_14
; %bb.10:
	ldr	w9, [x9, #8]
	mov	w10, #31784
	b	LBB0_13
LBB0_11:
	ldr	w10, [x9, #4]
	mov	w11, #5963
	cmp	w10, w11
	b.ne	LBB0_14
; %bb.12:
	ldr	w9, [x9, #8]
	mov	w10, #29001
LBB0_13:
	cmp	w9, w10
	ccmp	w8, #0, #4, ne
	b.eq	LBB0_15
	b	LBB0_16
LBB0_14:
	cbnz	w8, LBB0_16
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_legacy_get_primary_dac_info_from_table
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_COMBIOS_CRT_INFO_TABLE,4,2     ; @COMBIOS_CRT_INFO_TABLE
.subsections_via_symbols
