	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sgp_check_compat
_sgp_check_compat:                      ## @sgp_check_compat
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_SGP_VERS_GEN
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %rdx
	jmp	LBB0_2
LBB0_3:
	movq	%r15, %rdi
	callq	_SGP_VERS_PRODUCT
	movq	%rax, %r14
	movl	%ebx, %eax
	cmpq	%rax, %r14
	jne	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	callq	_SGP_VERS_RESERVED
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
LBB0_7:
	movq	%r15, %rdi
	callq	_SGP_VERS_ENG_BIT
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_4:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdx
LBB0_2:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_20:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_21:
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpq	$129, %r14
	je	LBB0_10
## %bb.11:
	cmpq	$128, %r14
	jne	LBB0_8
## %bb.12:
	movq	_supported_versions_sgpc3@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_supported_versions_sgp30@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_SGP_VERS_MAJOR
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_SGP_VERS_MINOR
	testq	%r12, %r12
	jle	LBB0_19
## %bb.14:
	addq	$8, %rbx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	addq	$16, %rbx
	decq	%r12
	je	LBB0_19
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	-8(%rbx), %r14
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpq	(%rbx), %rax
	jl	LBB0_18
## %bb.17:
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_19:
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"incompatible product generation %d != 0"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"sensor reports a different product: 0x%04hx\n"

L_.str.2:                               ## @.str.2
	.asciz	"reserved bit is set\n"

	.comm	_supported_versions_sgp30,8,3   ## @supported_versions_sgp30
	.comm	_supported_versions_sgpc3,8,3   ## @supported_versions_sgpc3
L_.str.3:                               ## @.str.3
	.asciz	"unsupported sgp version: %d.%d\n"

	.no_dead_strip	_sgp_check_compat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sgp_check_compat
_sgp_check_compat:                      ; @sgp_check_compat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_SGP_VERS_GEN
	cbz	x0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_2:
	mov	x0, x19
	bl	_SGP_VERS_PRODUCT
	mov	x20, x0
	cmp	x0, w21, uxtw
	b.ne	LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_SGP_VERS_RESERVED
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x19]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
LBB0_5:
	mov	x0, x19
	bl	_SGP_VERS_ENG_BIT
	cbnz	x0, LBB0_12
; %bb.6:
	cmp	x20, #129
	b.eq	LBB0_14
; %bb.7:
	cmp	x20, #128
	b.ne	LBB0_12
; %bb.8:
Lloh4:
	adrp	x8, _supported_versions_sgpc3@GOTPAGE
Lloh5:
	ldr	x8, [x8, _supported_versions_sgpc3@GOTPAGEOFF]
	b	LBB0_15
LBB0_9:
	ldr	x0, [x19]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x2, x20
LBB0_11:
	bl	_dev_err
LBB0_12:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	add	sp, sp, #64
	ret
LBB0_14:
Lloh11:
	adrp	x8, _supported_versions_sgp30@GOTPAGE
Lloh12:
	ldr	x8, [x8, _supported_versions_sgp30@GOTPAGEOFF]
LBB0_15:
	ldr	x22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x21, x0
	mov	x0, x19
	bl	_SGP_VERS_MAJOR
	mov	x20, x0
	mov	x0, x19
	bl	_SGP_VERS_MINOR
	cmp	x21, #1
	b.lt	LBB0_21
; %bb.16:
	add	x8, x22, #8
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x8, x8, #16
	subs	x21, x21, #1
	b.eq	LBB0_21
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldur	x9, [x8, #-8]
	cmp	x20, x9
	b.ne	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x9, [x8]
	cmp	x0, x9
	b.lt	LBB0_17
; %bb.20:
	mov	w0, #0
	b	LBB0_13
LBB0_21:
	ldr	x8, [x19]
	str	x0, [sp]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x8
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"incompatible product generation %d != 0"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"sensor reports a different product: 0x%04hx\n"

l_.str.2:                               ; @.str.2
	.asciz	"reserved bit is set\n"

	.comm	_supported_versions_sgp30,8,3   ; @supported_versions_sgp30
	.comm	_supported_versions_sgpc3,8,3   ; @supported_versions_sgpc3
l_.str.3:                               ; @.str.3
	.asciz	"unsupported sgp version: %d.%d\n"

	.no_dead_strip	_sgp_check_compat
.subsections_via_symbols
