	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_scratch_get             ## -- Begin function radeon_scratch_get
	.p2align	4, 0x90
_radeon_scratch_get:                    ## @radeon_scratch_get
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	8(%rdi), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx,%rcx,4)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_2
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movl	$0, (%rdx,%rcx,4)
	movq	16(%rdi), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%rsi)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_scratch_get             ; -- Begin function radeon_scratch_get
	.p2align	2
_radeon_scratch_get:                    ; @radeon_scratch_get
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x9, #0
	ldr	x10, [x0, #8]
	lsl	x8, x8, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9]
	cbnz	w11, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #4
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_5:
	str	wzr, [x10, x9]
	ldr	x10, [x0, #16]
	ldr	w9, [x10, x9]
	str	w9, [x1]
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
