	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_card_handler
_select_card_handler:                   ## @select_card_handler
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	testl	%esi, %esi
	je	LBB0_9
## %bb.1:
	movq	%rdi, %r12
	movl	%esi, %eax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, (%r12,%rbx)
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$24, %rbx
	cmpq	%rbx, %rax
	jne	LBB0_2
LBB0_9:
	movq	%r14, %rdi
	callq	_debugstr_a
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_FIXME
LBB0_10:
	movq	_PCI_DEVICE_NONE@GOTPCREL(%rip), %r13
LBB0_11:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	16(%r12,%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	_PCI_DEVICE_NONE@GOTPCREL(%rip), %r13
	cmpl	$0, 4(%r12,%rbx)
	je	LBB0_11
## %bb.4:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12,%rbx), %rax
	movl	4(%rax,%r13), %esi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movl	4(%r12,%rbx), %eax
	addq	$8, %r13
	cmpq	%rax, %r15
	jb	LBB0_5
	jmp	LBB0_10
LBB0_6:
	addq	8(%r12,%rbx), %r13
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Applying card selector \"%s\".\n"

	.comm	_PCI_DEVICE_NONE,4,2            ## @PCI_DEVICE_NONE
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't find a suitable card selector for GL vendor %04x (using GL_RENDERER %s)\n"

	.no_dead_strip	_select_card_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_card_handler
_select_card_handler:                   ; @select_card_handler
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	cbz	w1, LBB0_4
; %bb.1:
	mov	w8, w1
	add	x21, x0, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x21, #-8]
	cmp	w9, w20
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #24
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_4:
	mov	x0, x19
	bl	_debugstr_a
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_FIXME
LBB0_5:
Lloh2:
	adrp	x20, _PCI_DEVICE_NONE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _PCI_DEVICE_NONE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x20]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w1, [x21, #8]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldur	w8, [x21, #-4]
	cbz	w8, LBB0_5
; %bb.8:
	mov	x22, #0
	mov	x23, #0
Lloh6:
	adrp	x20, _PCI_DEVICE_NONE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PCI_DEVICE_NONE@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x8, x8, x22
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_strstr
	cbnz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	ldur	w8, [x21, #-4]
	add	x22, x22, #8
	cmp	x23, x8
	b.lo	LBB0_9
	b	LBB0_6
LBB0_11:
	ldr	x8, [x21]
	add	x20, x8, x22
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Applying card selector \"%s\".\n"

	.comm	_PCI_DEVICE_NONE,4,2            ; @PCI_DEVICE_NONE
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't find a suitable card selector for GL vendor %04x (using GL_RENDERER %s)\n"

	.no_dead_strip	_select_card_handler
.subsections_via_symbols
