	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d11_get_closest_match        ## -- Begin function d3d11_get_closest_match
	.p2align	4, 0x90
_d3d11_get_closest_match:               ## @d3d11_get_closest_match
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -64(%rbp)
	movq	_DXGI_FORMAT_UNKNOWN@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -56(%rbp)
	movq	%rsi, %rdi
	callq	_dxgi_get_format_fallback_list
	testq	%rax, %rax
	leaq	-64(%rbp), %rbx
	cmovneq	%rax, %rbx
	movq	(%rbx), %rsi
	cmpq	(%r13), %rsi
	je	LBB0_6
## %bb.1:
	leaq	-68(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rsi
	addq	$8, %rbx
	cmpq	(%r13), %rsi
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%r15, %rdx
	callq	_D3D11CheckFormatSupport
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-68(%rbp), %eax
	notl	%eax
	testl	%eax, %r14d
	jne	LBB0_5
## %bb.4:
	movq	(%rbx), %rsi
LBB0_6:
	movq	%rsi, %rdi
	callq	_assert
	movq	(%rbx), %rax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DXGI_FORMAT_UNKNOWN,8,3        ## @DXGI_FORMAT_UNKNOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d11_get_closest_match        ; -- Begin function d3d11_get_closest_match
	.p2align	2
_d3d11_get_closest_match:               ; @d3d11_get_closest_match
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x22, _DXGI_FORMAT_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DXGI_FORMAT_UNKNOWN@GOTPAGEOFF]
	ldr	x8, [x22]
	stp	x1, x8, [sp, #8]
	mov	x0, x1
	bl	_dxgi_get_format_fallback_list
	add	x8, sp, #8
	cmp	x0, #0
	csel	x21, x8, x0, eq
	ldr	x1, [x21]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x21, #8]!
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	cmp	x1, x8
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x2, sp, #4
	mov	x0, x20
	bl	_D3D11CheckFormatSupport
	bl	_SUCCEEDED
	cbz	x0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #4]
	bics	wzr, w19, w8
	b.ne	LBB0_1
; %bb.5:
	ldr	x1, [x21]
LBB0_6:
	mov	x0, x1
	bl	_assert
	ldr	x0, [x21]
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DXGI_FORMAT_UNKNOWN,8,3        ; @DXGI_FORMAT_UNKNOWN
.subsections_via_symbols
