	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_device
_test_device:                           ## @test_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	leaq	-24(%rbp), %rdi
	movl	%ebx, %esi
	callq	_av_hwdevice_ctx_create
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	%ebx, %ecx
	jne	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	-24(%rbp), %rdi
	movq	%r14, %rsi
	callq	_test_derivation
	movl	%eax, %ebx
	leaq	-24(%rbp), %rdi
	callq	_av_buffer_unref
	jmp	LBB0_5
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %ebx
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	leaq	-24(%rbp), %rdi
	callq	_av_buffer_unref
	movl	$-1, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create %s device: %d.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Device created as type %d has type %d.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Device type %s successfully created.\n"

	.no_dead_strip	_test_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_device
_test_device:                           ; @test_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
	mov	x20, x0
	add	x0, sp, #24
	mov	x1, x20
	bl	_av_hwdevice_ctx_create
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [sp, #24]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _stderr@GOTPAGE
Lloh1:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.2:
	str	x19, [sp]
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	ldr	x0, [sp, #24]
	mov	x1, x19
	bl	_test_derivation
	mov	x19, x0
	add	x0, sp, #24
	bl	_av_buffer_unref
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, _stderr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	x19, x0, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	mov	w19, #1
	b	LBB0_5
LBB0_4:
	stp	x20, x8, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	add	x0, sp, #24
	bl	_av_buffer_unref
	mov	w19, #-1
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create %s device: %d.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Device created as type %d has type %d.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Device type %s successfully created.\n"

	.no_dead_strip	_test_device
.subsections_via_symbols
