	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_stub
_test_stub:                             ## @test_stub
	.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	%rbx
	subq	$520, %rsp                      ## imm = 0x208
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	leaq	-544(%rbp), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.1:
	leaq	-544(%rbp), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_dma_fence_get_stub
	movq	%rax, -544(%rbp,%rbx,8)
	movq	%rax, %rdi
	callq	_dma_fence_is_signaled
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
## %bb.5:
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	jne	LBB0_7
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	testl	%ebx, %ebx
	je	LBB0_9
LBB0_7:
	movl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-552(%rbp,%rbx,8), %rdi
	callq	_dma_fence_put
	decq	%rbx
	jne	LBB0_8
LBB0_9:
	movl	%r14d, %ebx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	addq	$520, %rsp                      ## imm = 0x208
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Obtained unsignaled stub fence!\n"

	.no_dead_strip	_test_stub
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_stub
_test_stub:                             ; @test_stub
	.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
	sub	sp, sp, #528
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	add	x21, sp, #8
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, #0
	neg	w19, w19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_dma_fence_get_stub
	str	x0, [x21, x20, lsl #3]
	bl	_dma_fence_is_signaled
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	x20, w0, sxtw
	b.lt	LBB0_2
; %bb.4:
	mov	w19, #0
	cbnz	w20, LBB0_7
	b	LBB0_9
LBB0_5:
	mov	w19, #0
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	cbz	w20, LBB0_9
LBB0_7:
	lsl	x20, x20, #3
	add	x8, sp, #8
	sub	x21, x8, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21, x20]
	bl	_dma_fence_put
	subs	x20, x20, #8
	b.ne	LBB0_8
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	add	sp, sp, #528
	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
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Obtained unsignaled stub fence!\n"

	.no_dead_strip	_test_stub
.subsections_via_symbols
