	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_keyboard_dideviceinstanceA
_fill_keyboard_dideviceinstanceA:       ## @fill_keyboard_dideviceinstanceA
	.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, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	(%rdi), %r13d
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movq	%r14, %rdx
	callq	_TRACE
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	leaq	-72(%rbp), %rdi
	movl	$32, %r12d
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	%r13d, -72(%rbp)
	movq	_GUID_SysKeyboard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rax, -56(%rbp)
	cmpl	$2048, %r15d                    ## imm = 0x800
	jl	LBB0_1
## %bb.2:
	movq	_DI8DEVTYPE_KEYBOARD@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DIDEVTYPE_KEYBOARD@GOTPCREL(%rip), %rax
LBB0_3:
	shll	$8, %ebx
	orl	(%rax), %ebx
	movl	%ebx, -68(%rbp)
	movl	-60(%rbp), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	movl	-64(%rbp), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcpy
	cmpl	$32, %r13d
	cmovbl	%r13d, %r12d
	movq	%r14, %rdi
	leaq	-72(%rbp), %rsi
	movl	%r12d, %edx
	callq	_memcpy
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d %p\n"

	.comm	_GUID_SysKeyboard,8,3           ## @GUID_SysKeyboard
	.comm	_DI8DEVTYPE_KEYBOARD,4,2        ## @DI8DEVTYPE_KEYBOARD
	.comm	_DIDEVTYPE_KEYBOARD,4,2         ## @DIDEVTYPE_KEYBOARD
L_.str.1:                               ## @.str.1
	.asciz	"Keyboard"

L_.str.2:                               ## @.str.2
	.asciz	"Wine Keyboard"

	.no_dead_strip	_fill_keyboard_dideviceinstanceA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_keyboard_dideviceinstanceA
_fill_keyboard_dideviceinstanceA:       ; @fill_keyboard_dideviceinstanceA
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w22, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_TRACE
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	mov	w23, #32
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	w22, [sp]
Lloh2:
	adrp	x8, _GUID_SysKeyboard@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GUID_SysKeyboard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stp	x8, x8, [sp, #16]
Lloh5:
	adrp	x8, _DI8DEVTYPE_KEYBOARD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DI8DEVTYPE_KEYBOARD@GOTPAGEOFF]
Lloh7:
	adrp	x9, _DIDEVTYPE_KEYBOARD@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DIDEVTYPE_KEYBOARD@GOTPAGEOFF]
	cmp	w20, #2047
	csel	x8, x8, x9, gt
	ldr	w8, [x8]
	orr	w8, w8, w19, lsl #8
	str	w8, [sp, #4]
	ldr	w0, [sp, #12]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
	ldr	w0, [sp, #8]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcpy
	cmp	w22, #32
	csel	w2, w22, w23, lo
	mov	x1, sp
	mov	x0, x21
	bl	_memcpy
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d %p\n"

	.comm	_GUID_SysKeyboard,8,3           ; @GUID_SysKeyboard
	.comm	_DI8DEVTYPE_KEYBOARD,4,2        ; @DI8DEVTYPE_KEYBOARD
	.comm	_DIDEVTYPE_KEYBOARD,4,2         ; @DIDEVTYPE_KEYBOARD
l_.str.1:                               ; @.str.1
	.asciz	"Keyboard"

l_.str.2:                               ; @.str.2
	.asciz	"Wine Keyboard"

	.no_dead_strip	_fill_keyboard_dideviceinstanceA
.subsections_via_symbols
