	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_io_wreg                 ## -- Begin function amdgpu_io_wreg
	.p2align	4, 0x90
_amdgpu_io_wreg:                        ## @amdgpu_io_wreg
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_CHIP_VEGA10@GOTPCREL(%rip), %r12
	testl	%esi, %esi
	jne	LBB0_3
## %bb.1:
	movq	(%r12), %rax
	cmpq	%rax, (%rbx)
	jl	LBB0_3
## %bb.2:
	movl	%r15d, 8(%rbx)
LBB0_3:
	leal	(,%r14,4), %edi
	movq	16(%rbx), %rax
	cmpl	12(%rbx), %edi
	jl	LBB0_5
## %bb.4:
	movq	_mmMM_INDEX@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %rsi
	callq	_iowrite32
	movq	16(%rbx), %rax
	movq	_mmMM_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	shll	$2, %edi
LBB0_5:
	movslq	%edi, %rsi
	addq	%rax, %rsi
	movl	%r15d, %edi
	callq	_iowrite32
	cmpl	$1, %r14d
	jne	LBB0_8
## %bb.6:
	movq	(%r12), %rax
	cmpq	%rax, (%rbx)
	jl	LBB0_8
## %bb.7:
	cmpl	$356396, 8(%rbx)                ## imm = 0x5702C
	jne	LBB0_8
## %bb.9:
	movl	$500, %edi                      ## imm = 0x1F4
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_udelay                         ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_VEGA10,8,3                ## @CHIP_VEGA10
	.comm	_mmMM_INDEX,4,2                 ## @mmMM_INDEX
	.comm	_mmMM_DATA,4,2                  ## @mmMM_DATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_io_wreg                 ; -- Begin function amdgpu_io_wreg
	.p2align	2
_amdgpu_io_wreg:                        ; @amdgpu_io_wreg
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _CHIP_VEGA10@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CHIP_VEGA10@GOTPAGEOFF]
	cbnz	w1, LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.lt	LBB0_3
; %bb.2:
	str	w21, [x19, #8]
LBB0_3:
	lsl	w0, w20, #2
	ldr	w9, [x19, #12]
	ldr	x8, [x19, #16]
	cmp	w0, w9
	b.lt	LBB0_5
; %bb.4:
Lloh2:
	adrp	x9, _mmMM_INDEX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _mmMM_INDEX@GOTPAGEOFF]
Lloh4:
	ldrsw	x9, [x9]
	add	x1, x8, x9, lsl #2
	bl	_iowrite32
	ldr	x8, [x19, #16]
Lloh5:
	adrp	x9, _mmMM_DATA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _mmMM_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w0, w9, #2
LBB0_5:
	add	x1, x8, w0, sxtw
	mov	x0, x21
	bl	_iowrite32
	cmp	w20, #1
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.lt	LBB0_9
; %bb.7:
	ldr	w8, [x19, #8]
	sub	w8, w8, #87, lsl #12            ; =356352
	cmp	w8, #44
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #500
	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
	b	_udelay
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_VEGA10,8,3                ; @CHIP_VEGA10
	.comm	_mmMM_INDEX,4,2                 ; @mmMM_INDEX
	.comm	_mmMM_DATA,4,2                  ; @mmMM_DATA
.subsections_via_symbols
