	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ccs811_start_sensor_application
_ccs811_start_sensor_application:       ## @ccs811_start_sensor_application
	.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
	movq	%rdi, %r14
	movq	_CCS811_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movq	_CCS811_STATUS_FW_MODE_APPLICATION@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	testl	%eax, (%r15)
	jne	LBB0_9
## %bb.2:
	movq	_CCS811_STATUS_APP_VALID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_CCS811_STATUS_APP_VALID_LOADED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_7
## %bb.3:
	movq	_CCS811_APP_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_i2c_smbus_write_byte
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movq	_CCS811_STATUS_FW_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	cmpl	(%r15), %ecx
	je	LBB0_9
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CCS811_STATUS,4,2              ## @CCS811_STATUS
	.comm	_CCS811_STATUS_FW_MODE_APPLICATION,4,2 ## @CCS811_STATUS_FW_MODE_APPLICATION
	.comm	_CCS811_STATUS_APP_VALID_MASK,4,2 ## @CCS811_STATUS_APP_VALID_MASK
	.comm	_CCS811_STATUS_APP_VALID_LOADED,4,2 ## @CCS811_STATUS_APP_VALID_LOADED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CCS811_APP_START,4,2           ## @CCS811_APP_START
	.comm	_CCS811_STATUS_FW_MODE_MASK,4,2 ## @CCS811_STATUS_FW_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Application failed to start. Sensor is still in boot mode.\n"

	.no_dead_strip	_ccs811_start_sensor_application
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ccs811_start_sensor_application
_ccs811_start_sensor_application:       ; @ccs811_start_sensor_application
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x21, _CCS811_STATUS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CCS811_STATUS@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #31, LBB0_9
; %bb.1:
Lloh2:
	adrp	x20, _CCS811_STATUS_FW_MODE_APPLICATION@GOTPAGE
Lloh3:
	ldr	x20, [x20, _CCS811_STATUS_FW_MODE_APPLICATION@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
Lloh4:
	adrp	x8, _CCS811_STATUS_APP_VALID_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CCS811_STATUS_APP_VALID_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh7:
	adrp	x9, _CCS811_STATUS_APP_VALID_LOADED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _CCS811_STATUS_APP_VALID_LOADED@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.4:
Lloh10:
	adrp	x8, _CCS811_APP_START@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CCS811_APP_START@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_write_byte
	tbnz	w0, #31, LBB0_9
; %bb.5:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #31, LBB0_9
; %bb.6:
Lloh13:
	adrp	x8, _CCS811_STATUS_FW_MODE_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CCS811_STATUS_FW_MODE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w8, w8, w0
	ldr	w9, [x20]
	cmp	w8, w9
	b.eq	LBB0_2
; %bb.7:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_8:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CCS811_STATUS,4,2              ; @CCS811_STATUS
	.comm	_CCS811_STATUS_FW_MODE_APPLICATION,4,2 ; @CCS811_STATUS_FW_MODE_APPLICATION
	.comm	_CCS811_STATUS_APP_VALID_MASK,4,2 ; @CCS811_STATUS_APP_VALID_MASK
	.comm	_CCS811_STATUS_APP_VALID_LOADED,4,2 ; @CCS811_STATUS_APP_VALID_LOADED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CCS811_APP_START,4,2           ; @CCS811_APP_START
	.comm	_CCS811_STATUS_FW_MODE_MASK,4,2 ; @CCS811_STATUS_FW_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Application failed to start. Sensor is still in boot mode.\n"

	.no_dead_strip	_ccs811_start_sensor_application
.subsections_via_symbols
