	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_sdma_init_microcode
_cik_sdma_init_microcode:               ## @cik_sdma_init_microcode
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movl	(%r14), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_reltable.cik_sdma_init_microcode(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmpl	$0, 8(%r14)
	jg	LBB0_4
	jmp	LBB0_12
LBB0_1:
	xorl	%eax, %eax
	callq	_BUG
                                        ## implicit-def: $rax
                                        ## kill: killed $rax
	cmpl	$0, 8(%r14)
	jle	LBB0_12
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	subq	$1, %r15
	leaq	L_.str.7(%rip), %rdx
	leaq	L_.str.6(%rip), %rax
	cmovbq	%rax, %rdx
	leaq	-80(%rbp), %r13
	movq	%r13, %rdi
	movl	$30, %esi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_snprintf
	movq	16(%r14), %rdi
	addq	%rbx, %rdi
	movl	24(%r14), %edx
	movq	%r13, %rsi
	callq	_request_firmware
	testl	%eax, %eax
	jne	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx), %rdi
	callq	_amdgpu_ucode_validate
	movl	%eax, %r13d
	incq	%r12
	movslq	8(%r14), %rax
	addq	$8, %rbx
	cmpq	%rax, %r12
	jl	LBB0_5
## %bb.11:
	testl	%r13d, %r13d
	jne	LBB0_7
LBB0_12:
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_6:
	movl	%eax, %r13d
LBB0_7:
	leaq	L_.str.8(%rip), %rdi
	leaq	-80(%rbp), %rsi
	callq	_pr_err
	cmpl	$0, 8(%r14)
	jle	LBB0_13
## %bb.8:
	movq	16(%r14), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx,8), %rdi
	callq	_release_firmware
	movq	16(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	8(%r14), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_9
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

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

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

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

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

L_.str.5:                               ## @.str.5
	.asciz	"mullins"

L_.str.6:                               ## @.str.6
	.asciz	"amdgpu/%s_sdma.bin"

L_.str.7:                               ## @.str.7
	.asciz	"amdgpu/%s_sdma1.bin"

L_.str.8:                               ## @.str.8
	.asciz	"cik_sdma: Failed to load firmware \"%s\"\n"

	.no_dead_strip	_cik_sdma_init_microcode
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.cik_sdma_init_microcode
l_reltable.cik_sdma_init_microcode:
	.long	L_.str.5-l_reltable.cik_sdma_init_microcode
	.long	L_.str.3-l_reltable.cik_sdma_init_microcode
	.long	L_.str.4-l_reltable.cik_sdma_init_microcode
	.long	L_.str.2-l_reltable.cik_sdma_init_microcode
	.long	L_.str.1-l_reltable.cik_sdma_init_microcode

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cik_sdma_init_microcode
_cik_sdma_init_microcode:               ; @cik_sdma_init_microcode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hs	LBB0_2
; %bb.1:
Lloh5:
	adrp	x9, l_switch.table.cik_sdma_init_microcode@PAGE
Lloh6:
	add	x9, x9, l_switch.table.cik_sdma_init_microcode@PAGEOFF
	ldr	x21, [x9, w8, sxtw #3]
	b	LBB0_3
LBB0_2:
	bl	_BUG
                                        ; implicit-def: $x21
LBB0_3:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x22, #0
	mov	x23, #0
	mov	x24, #0
Lloh7:
	adrp	x25, l_.str.7@PAGE
Lloh8:
	add	x25, x25, l_.str.7@PAGEOFF
Lloh9:
	adrp	x26, l_.str.6@PAGE
Lloh10:
	add	x26, x26, l_.str.6@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x23, #0
	csel	x2, x26, x25, eq
	add	x0, sp, #10
	mov	w1, #30
	mov	x3, x21
	bl	_snprintf
	ldr	x8, [x19, #16]
	add	x0, x8, x22
	ldr	w2, [x19, #24]
	add	x1, sp, #10
	bl	_request_firmware
	cbnz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x22]
	bl	_amdgpu_ucode_validate
	add	x24, x24, #1
	ldrsw	x8, [x19, #8]
	sub	x23, x23, #1
	add	x22, x22, #8
	cmp	x24, x8
	b.lt	LBB0_5
; %bb.7:
	mov	x20, x0
	cbnz	w0, LBB0_10
	b	LBB0_13
LBB0_8:
	mov	w20, #0
	b	LBB0_13
LBB0_9:
	mov	x20, x0
LBB0_10:
Lloh11:
	adrp	x0, l_.str.8@PAGE
Lloh12:
	add	x0, x0, l_.str.8@PAGEOFF
	add	x1, sp, #10
	bl	_pr_err
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x21, #0
	ldr	x8, [x19, #16]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	lsl	x22, x21, #3
	ldr	x0, [x8, x22]
	bl	_release_firmware
	ldr	x8, [x19, #16]
	str	xzr, [x8, x22]
	add	x21, x21, #1
	ldrsw	x9, [x19, #8]
	cmp	x21, x9
	b.lt	LBB0_12
LBB0_13:
	ldr	x8, [sp, #40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

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

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

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

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

l_.str.5:                               ; @.str.5
	.asciz	"mullins"

l_.str.6:                               ; @.str.6
	.asciz	"amdgpu/%s_sdma.bin"

l_.str.7:                               ; @.str.7
	.asciz	"amdgpu/%s_sdma1.bin"

l_.str.8:                               ; @.str.8
	.asciz	"cik_sdma: Failed to load firmware \"%s\"\n"

	.no_dead_strip	_cik_sdma_init_microcode
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cik_sdma_init_microcode
l_switch.table.cik_sdma_init_microcode:
	.quad	l_.str.5
	.quad	l_.str.3
	.quad	l_.str.4
	.quad	l_.str.2
	.quad	l_.str.1

.subsections_via_symbols
