	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atom_parse              ## -- Begin function amdgpu_atom_parse
	.p2align	4, 0x90
_amdgpu_atom_parse:                     ## @amdgpu_atom_parse
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, 24(%rax)
	movq	%r14, 16(%rax)
	xorl	%edi, %edi
	callq	_CU16
	movq	_ATOM_BIOS_MAGIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.2:
	movq	_ATOM_ATI_MAGIC_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CSTR
	movq	%rax, %r14
	movq	_ATOM_ATI_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strlen
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
LBB0_6:
	xorl	%eax, %eax
	callq	_pr_info
	movq	%r15, %rdi
	callq	_kfree
LBB0_7:
	xorl	%r15d, %r15d
LBB0_8:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_ATOM_ROM_TABLE_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_CU16
	movl	%eax, %r14d
	movq	_ATOM_ROM_MAGIC_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r14d, %edi
	callq	_CSTR
	movq	%rax, %r12
	movq	_ATOM_ROM_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strlen
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_11:
	movslq	%r14d, %rbx
	movq	_ATOM_ROM_CMD_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	_CU16
	movl	%eax, (%r15)
	movq	_ATOM_ROM_DATA_PTR@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_CU16
	movl	%eax, 4(%r15)
	movslq	%eax, %rdi
	movq	_ATOM_DATA_IIO_PTR@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_CU16
                                        ## kill: def $eax killed $eax def $rax
	leal	4(%rax), %esi
	movq	%r15, %rdi
	callq	_atom_index_iio
	cmpl	$0, 12(%r15)
	je	LBB0_14
## %bb.12:
	movq	_ATOM_ROM_PART_NUMBER_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_CU16
	testl	%eax, %eax
	movl	$128, %edi
	cmovnel	%eax, %edi
	callq	_CSTR
	cmpb	$0, (%rax)
	je	LBB0_8
## %bb.13:
	movq	%rax, %r14
	leaq	L_.str.3(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_pr_info
	movl	8(%r15), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_strlcpy
	jmp	LBB0_8
LBB0_14:
	movq	%r15, %rdi
	callq	_amdgpu_atom_destroy
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ATOM_BIOS_MAGIC,4,2            ## @ATOM_BIOS_MAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid BIOS magic\n"

	.comm	_ATOM_ATI_MAGIC_PTR,4,2         ## @ATOM_ATI_MAGIC_PTR
	.comm	_ATOM_ATI_MAGIC,4,2             ## @ATOM_ATI_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"Invalid ATI magic\n"

	.comm	_ATOM_ROM_TABLE_PTR,8,3         ## @ATOM_ROM_TABLE_PTR
	.comm	_ATOM_ROM_MAGIC_PTR,4,2         ## @ATOM_ROM_MAGIC_PTR
	.comm	_ATOM_ROM_MAGIC,4,2             ## @ATOM_ROM_MAGIC
L_.str.2:                               ## @.str.2
	.asciz	"Invalid ATOM magic\n"

	.comm	_ATOM_ROM_CMD_PTR,8,3           ## @ATOM_ROM_CMD_PTR
	.comm	_ATOM_ROM_DATA_PTR,8,3          ## @ATOM_ROM_DATA_PTR
	.comm	_ATOM_DATA_IIO_PTR,8,3          ## @ATOM_DATA_IIO_PTR
	.comm	_ATOM_ROM_PART_NUMBER_PTR,8,3   ## @ATOM_ROM_PART_NUMBER_PTR
L_.str.3:                               ## @.str.3
	.asciz	"ATOM BIOS: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atom_parse              ; -- Begin function amdgpu_atom_parse
	.p2align	2
_amdgpu_atom_parse:                     ; @amdgpu_atom_parse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	stp	x20, x21, [x19, #16]
	mov	x0, #0
	bl	_CU16
Lloh3:
	adrp	x8, _ATOM_BIOS_MAGIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATOM_BIOS_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _ATOM_ATI_MAGIC_PTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATOM_ATI_MAGIC_PTR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_CSTR
	mov	x20, x0
Lloh9:
	adrp	x8, _ATOM_ATI_MAGIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATOM_ATI_MAGIC@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_strncmp
	cbz	x0, LBB0_8
; %bb.3:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_pr_info
	mov	x0, x19
	bl	_kfree
LBB0_6:
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
LBB0_8:
Lloh16:
	adrp	x8, _ATOM_ROM_TABLE_PTR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATOM_ROM_TABLE_PTR@GOTPAGEOFF]
Lloh18:
	ldr	x0, [x8]
	bl	_CU16
	mov	x20, x0
Lloh19:
	adrp	x8, _ATOM_ROM_MAGIC_PTR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ATOM_ROM_MAGIC_PTR@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	add	w0, w8, w0
	bl	_CSTR
	mov	x21, x0
Lloh22:
	adrp	x8, _ATOM_ROM_MAGIC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ATOM_ROM_MAGIC@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_10
; %bb.9:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_10:
	sxtw	x20, w20
Lloh27:
	adrp	x8, _ATOM_ROM_CMD_PTR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ATOM_ROM_CMD_PTR@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	add	x0, x8, x20
	bl	_CU16
	str	w0, [x19]
Lloh30:
	adrp	x8, _ATOM_ROM_DATA_PTR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ATOM_ROM_DATA_PTR@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	add	x0, x8, x20
	bl	_CU16
	str	w0, [x19, #4]
Lloh33:
	adrp	x8, _ATOM_DATA_IIO_PTR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ATOM_DATA_IIO_PTR@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	add	x0, x8, w0, sxtw
	bl	_CU16
	add	w1, w0, #4
	mov	x0, x19
	bl	_atom_index_iio
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_13
; %bb.11:
Lloh36:
	adrp	x8, _ATOM_ROM_PART_NUMBER_PTR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ATOM_ROM_PART_NUMBER_PTR@GOTPAGEOFF]
Lloh38:
	ldr	x0, [x8]
	bl	_CU16
	mov	w8, #128
	cmp	w0, #0
	csel	w0, w8, w0, eq
	bl	_CSTR
	ldrb	w8, [x0]
	cbz	w8, LBB0_7
; %bb.12:
	mov	x20, x0
	str	x0, [sp]
Lloh39:
	adrp	x0, l_.str.3@PAGE
Lloh40:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	w2, #4
	bl	_strlcpy
	b	LBB0_7
LBB0_13:
	mov	x0, x19
	bl	_amdgpu_atom_destroy
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ATOM_BIOS_MAGIC,4,2            ; @ATOM_BIOS_MAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid BIOS magic\n"

	.comm	_ATOM_ATI_MAGIC_PTR,4,2         ; @ATOM_ATI_MAGIC_PTR
	.comm	_ATOM_ATI_MAGIC,4,2             ; @ATOM_ATI_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"Invalid ATI magic\n"

	.comm	_ATOM_ROM_TABLE_PTR,8,3         ; @ATOM_ROM_TABLE_PTR
	.comm	_ATOM_ROM_MAGIC_PTR,4,2         ; @ATOM_ROM_MAGIC_PTR
	.comm	_ATOM_ROM_MAGIC,4,2             ; @ATOM_ROM_MAGIC
l_.str.2:                               ; @.str.2
	.asciz	"Invalid ATOM magic\n"

	.comm	_ATOM_ROM_CMD_PTR,8,3           ; @ATOM_ROM_CMD_PTR
	.comm	_ATOM_ROM_DATA_PTR,8,3          ; @ATOM_ROM_DATA_PTR
	.comm	_ATOM_DATA_IIO_PTR,8,3          ; @ATOM_DATA_IIO_PTR
	.comm	_ATOM_ROM_PART_NUMBER_PTR,8,3   ; @ATOM_ROM_PART_NUMBER_PTR
l_.str.3:                               ; @.str.3
	.asciz	"ATOM BIOS: %s\n"

.subsections_via_symbols
