	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_device_type
_test_device_type:                      ## @test_device_type
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_av_hwdevice_get_type_name
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_av_hwdevice_find_type_by_name
	cmpl	%r14d, %eax
	jne	LBB0_3
## %bb.4:
	xorl	%r15d, %r15d
	movl	%r14d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_test_device
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	jne	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %r15d
LBB0_8:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_test_devices@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_20
## %bb.9:
	xorl	%r12d, %r12d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r12
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %r12
	movq	_test_devices@GOTPCREL(%rip), %rbx
	jge	LBB0_20
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	(%rbx), %rdi
	movq	%r12, %r15
	shlq	$4, %r15
	cmpl	%r14d, (%rdi,%r15)
	jne	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rdi,%r15), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rdx
	movq	_test_devices@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	8(%rax,%r15), %rax
	movq	(%rax,%r13,8), %rcx
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	(%rbx), %rdi
	movq	8(%rdi,%r15), %rax
	movq	8(%rax,%r13,8), %rdx
	incq	%r13
	testq	%rdx, %rdx
	je	LBB0_19
LBB0_13:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_test_device
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=2
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	_test_devices@GOTPCREL(%rip), %rbx
	jmp	LBB0_18
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	movq	%rbx, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_14:
	movl	%r12d, %eax
	movl	%r13d, %ecx
	movq	_stderr@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movq	_test_devices@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rax
	movq	8(%rdx,%rax), %rax
	movq	(%rax,%rcx,8), %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_20:
	xorl	%eax, %eax
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	sete	%al
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No name available for device type %d.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Type %d maps to name %s maps to type %d.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Test failed for %s with default options.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Test passed for %s with default options.\n"

	.comm	_test_devices,8,3               ## @test_devices
L_.str.4:                               ## @.str.4
	.asciz	"Test failed for %s with device %s.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Test passed for %s with device %s.\n"

	.no_dead_strip	_test_device_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_device_type
_test_device_type:                      ; @test_device_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_av_hwdevice_get_type_name
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_av_hwdevice_find_type_by_name
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w20
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	mov	x3, #0
	mov	w4, #0
	bl	_test_device
	tbnz	w0, #31, LBB0_7
; %bb.3:
	cbz	w0, LBB0_8
; %bb.4:
	mov	w22, #0
	b	LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_20
LBB0_6:
Lloh5:
	adrp	x8, _stderr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	x19, x0, [sp, #8]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	b	LBB0_20
LBB0_7:
Lloh10:
	adrp	x8, _stderr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_8:
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	mov	w22, #1
LBB0_9:
Lloh20:
	adrp	x23, _test_devices@GOTPAGE
Lloh21:
	ldr	x23, [x23, _test_devices@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.10:
	mov	x24, #0
Lloh22:
	adrp	x25, _stderr@GOTPAGE
Lloh23:
	ldr	x25, [x25, _stderr@GOTPAGEOFF]
Lloh24:
	adrp	x21, l_.str.5@PAGE
Lloh25:
	add	x21, x21, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x24, x24, #1
	bl	_FF_ARRAY_ELEMS
	cmp	x24, w0, sxtw
	b.ge	LBB0_22
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	ldr	x0, [x23]
	lsl	x8, x24, #4
	ldr	w8, [x0, x8]
	cmp	w8, w20
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x8, x0, x24, lsl #4
	ldr	x8, [x8, #8]
	ldr	x2, [x8]
	cbz	x2, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x26, #0
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	ldr	x0, [x23]
	add	x8, x0, x24, lsl #4
	ldr	x8, [x8, #8]
	add	x8, x8, x26, lsl #3
	add	x26, x26, #1
	ldr	x2, [x8, #8]
	cbz	x2, LBB0_11
LBB0_16:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	mov	x1, x19
	mov	x3, #0
	mov	w4, #0
	bl	_test_device
	tbnz	w0, #31, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	cbnz	w0, LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=2
	ldr	w0, [x25]
	ldr	x8, [x23]
	add	x8, x8, x24, lsl #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x26, lsl #3]
	stp	x19, x8, [sp]
	mov	x1, x21
	bl	_fprintf
	add	w22, w22, #1
	b	LBB0_15
LBB0_19:
	ldr	w0, [x25]
	ldr	x8, [x23]
	add	x8, x8, w24, uxtw #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8, w26, uxtw #3]
	stp	x19, x8, [sp]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_20:
	bl	_fprintf
	mov	w0, #-1
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
	cmp	w22, #0
	cset	w0, eq
	b	LBB0_21
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No name available for device type %d.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Type %d maps to name %s maps to type %d.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Test failed for %s with default options.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Test passed for %s with default options.\n"

	.comm	_test_devices,8,3               ; @test_devices
l_.str.4:                               ; @.str.4
	.asciz	"Test failed for %s with device %s.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Test passed for %s with device %s.\n"

	.no_dead_strip	_test_device_type
.subsections_via_symbols
