	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_byd_detect                     ## -- Begin function byd_detect
	.p2align	4, 0x90
_byd_detect:                            ## @byd_detect
	.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	%esi, %r15d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	16(%rdi), %rbx
	movaps	L___const.byd_detect.param(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_PSMOUSE_CMD_SETRES@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	movl	$-1, %r12d
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movl	(%r13), %edx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_10
## %bb.2:
	movl	(%r13), %edx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movl	(%r13), %edx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	movq	_PSMOUSE_CMD_GETINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:
	cmpl	$3, -60(%rbp)
	jne	LBB0_7
## %bb.6:
	cmpl	$100, -56(%rbp)
	jne	LBB0_7
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_psmouse_dbg
	xorl	%r12d, %r12d
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r14)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_10
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.byd_detect.param
L___const.byd_detect.param:
	.long	3                               ## 0x3
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_PSMOUSE_CMD_SETRES,4,2         ## @PSMOUSE_CMD_SETRES
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ## @PSMOUSE_CMD_GETINFO
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BYD touchpad detected\n"

L_.str.1:                               ## @.str.1
	.asciz	"BYD"

L_.str.2:                               ## @.str.2
	.asciz	"TouchPad"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_byd_detect                     ; -- Begin function byd_detect
	.p2align	2
_byd_detect:                            ; @byd_detect
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	adrp	x8, l___const.byd_detect.param@PAGE
	add	x8, x8, l___const.byd_detect.param@PAGEOFF
	add	x21, x0, #16
	ldr	q0, [x8]
	str	q0, [sp]
Lloh3:
	adrp	x22, _PSMOUSE_CMD_SETRES@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PSMOUSE_CMD_SETRES@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x1, sp
	mov	x0, x21
	bl	_ps2_command
	cbnz	x0, LBB0_5
; %bb.1:
	ldr	w2, [x22]
	mov	x1, sp
	mov	x0, x21
	bl	_ps2_command
	cbnz	x0, LBB0_5
; %bb.2:
	ldr	w2, [x22]
	mov	x1, sp
	mov	x0, x21
	bl	_ps2_command
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	w2, [x22]
	mov	x1, sp
	mov	x0, x21
	bl	_ps2_command
	cbnz	x0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _PSMOUSE_CMD_GETINFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PSMOUSE_CMD_GETINFO@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x1, sp
	mov	x0, x21
	bl	_ps2_command
	cbz	x0, LBB0_8
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldr	x8, [sp, #24]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %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:
	ldr	w8, [sp, #4]
	cmp	w8, #3
	b.ne	LBB0_12
; %bb.9:
	ldr	w8, [sp, #8]
	cmp	w8, #100
	b.ne	LBB0_12
; %bb.10:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
	mov	w0, #0
	cbz	w20, LBB0_6
; %bb.11:
Lloh13:
	adrp	x8, l_.str.1@PAGE
Lloh14:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh15:
	adrp	x9, l_.str.2@PAGE
Lloh16:
	add	x9, x9, l_.str.2@PAGEOFF
	stp	x8, x9, [x19]
	b	LBB0_6
LBB0_12:
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.byd_detect.param
l___const.byd_detect.param:
	.long	3                               ; 0x3
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_PSMOUSE_CMD_SETRES,4,2         ; @PSMOUSE_CMD_SETRES
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ; @PSMOUSE_CMD_GETINFO
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BYD touchpad detected\n"

l_.str.1:                               ; @.str.1
	.asciz	"BYD"

l_.str.2:                               ; @.str.2
	.asciz	"TouchPad"

.subsections_via_symbols
