	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_error
_test_error:                            ## @test_error
	.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	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_mock_fence
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_EIO@GOTPCREL(%rip), %r12
	subl	(%r12), %ebx
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_dma_fence_set_error
	movq	%r14, %rdi
	callq	_dma_fence_get_status
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%r14, %rdi
	callq	_dma_fence_signal
	movq	%r14, %rdi
	callq	_dma_fence_get_status
	xorl	%ebx, %ebx
	addl	(%r12), %eax
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_dma_fence_get_status
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_6:
	movl	%r15d, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_dma_fence_put
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fence unexpectedly has error status before signal\n"

L_.str.1:                               ## @.str.1
	.asciz	"Fence not reporting error status, got %d\n"

	.no_dead_strip	_test_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_error
_test_error:                            ; @test_error
	.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
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bl	_mock_fence
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	neg	w19, w19
Lloh3:
	adrp	x21, _EIO@GOTPAGE
Lloh4:
	ldr	x21, [x21, _EIO@GOTPAGEOFF]
	ldr	w8, [x21]
	neg	w1, w8
	bl	_dma_fence_set_error
	mov	x0, x20
	bl	_dma_fence_get_status
	cbz	w0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_3:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_9
LBB0_4:
	mov	x0, x20
	bl	_dma_fence_signal
	mov	x0, x20
	bl	_dma_fence_get_status
	ldr	w8, [x21]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.5:
	mov	w19, #0
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	bl	_dma_fence_get_status
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_pr_err
LBB0_8:
	mov	x0, x20
	bl	_dma_fence_put
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fence unexpectedly has error status before signal\n"

l_.str.1:                               ; @.str.1
	.asciz	"Fence not reporting error status, got %d\n"

	.no_dead_strip	_test_error
.subsections_via_symbols
