	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_check_revision
_cpcap_check_revision:                  ## @cpcap_check_revision
	.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
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movl	8(%r14), %esi
	leaq	-56(%rbp), %rdx
	callq	_cpcap_get_vendor
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	(%r14), %rdi
	movl	8(%r14), %esi
	leaq	-48(%rbp), %rdx
	callq	_cpcap_get_revision
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	(%r14), %r15
	movq	-56(%rbp), %rax
	movq	_CPCAP_VENDOR_ST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r12
	cmoveq	%rax, %r12
	movq	-48(%rbp), %rdi
	callq	_CPCAP_REVISION_MAJOR
	movl	%eax, %r13d
	movq	-48(%rbp), %rdi
	callq	_CPCAP_REVISION_MINOR
	movq	-48(%rbp), %r9
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dev_info
	movq	-48(%rbp), %rax
	movq	_CPCAP_REVISION_2_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %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	"CPCAP vendor: %s rev: %i.%i (%x)\n"

	.comm	_CPCAP_VENDOR_ST,8,3            ## @CPCAP_VENDOR_ST
L_.str.1:                               ## @.str.1
	.asciz	"ST"

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

	.comm	_CPCAP_REVISION_2_1,8,3         ## @CPCAP_REVISION_2_1
L_.str.3:                               ## @.str.3
	.asciz	"Please add old CPCAP revision support as needed\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_cpcap_check_revision
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_check_revision
_cpcap_check_revision:                  ; @cpcap_check_revision
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	ldr	x0, [x0]
	ldr	w1, [x19, #8]
	add	x2, sp, #40
	bl	_cpcap_get_vendor
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	add	x2, sp, #32
	bl	_cpcap_get_revision
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	x20, [x19]
	ldp	x0, x8, [sp, #32]
Lloh0:
	adrp	x9, _CPCAP_VENDOR_ST@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CPCAP_VENDOR_ST@GOTPAGEOFF]
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, l_.str.1@PAGE
Lloh6:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	x8, x9
	csel	x22, x11, x10, eq
	bl	_CPCAP_REVISION_MAJOR
	mov	x21, x0
	ldr	x0, [sp, #32]
	bl	_CPCAP_REVISION_MINOR
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [sp, #32]
	stp	x0, x8, [sp, #16]
	stp	x22, x21, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	ldr	x8, [sp, #32]
Lloh9:
	adrp	x9, _CPCAP_REVISION_2_1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CPCAP_REVISION_2_1@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.3:
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CPCAP vendor: %s rev: %i.%i (%x)\n"

	.comm	_CPCAP_VENDOR_ST,8,3            ; @CPCAP_VENDOR_ST
l_.str.1:                               ; @.str.1
	.asciz	"ST"

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

	.comm	_CPCAP_REVISION_2_1,8,3         ; @CPCAP_REVISION_2_1
l_.str.3:                               ; @.str.3
	.asciz	"Please add old CPCAP revision support as needed\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_cpcap_check_revision
.subsections_via_symbols
