	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cm36651_write_int_time
_cm36651_write_int_time:                ## @cm36651_write_int_time
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	24(%rdi), %r14
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_14
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_25
## %bb.2:
	movq	%rsi, %r12
	cmpl	$319999, %edx                   ## imm = 0x4E1FF
	jg	LBB0_5
## %bb.3:
	cmpl	$80000, %edx                    ## imm = 0x13880
	je	LBB0_4
## %bb.8:
	cmpl	$160000, %edx                   ## imm = 0x27100
	jne	LBB0_25
## %bb.9:
	movq	_CM36651_CS_IT2@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_14:
	movq	16(%r15), %rdi
	cmpl	$519, %edx                      ## imm = 0x207
	jg	LBB0_17
## %bb.15:
	cmpl	$320, %edx                      ## imm = 0x140
	je	LBB0_16
## %bb.20:
	cmpl	$420, %edx                      ## imm = 0x1A4
	jne	LBB0_25
## %bb.21:
	movq	_CM36651_PS_IT2@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_5:
	cmpl	$320000, %edx                   ## imm = 0x4E200
	je	LBB0_27
## %bb.6:
	cmpl	$640000, %edx                   ## imm = 0x9C400
	jne	LBB0_25
## %bb.7:
	movq	_CM36651_CS_IT4@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_17:
	cmpl	$520, %edx                      ## imm = 0x208
	je	LBB0_28
## %bb.18:
	cmpl	$640, %edx                      ## imm = 0x280
	jne	LBB0_25
## %bb.19:
	movq	_CM36651_PS_IT4@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_25:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_4:
	movq	_CM36651_CS_IT1@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_16:
	movq	_CM36651_PS_IT1@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_27:
	movq	_CM36651_CS_IT3@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %r13d
	movq	_CM36651_CS_CONF3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	4(%r12), %cl
	addb	%cl, %cl
	movl	%r13d, %edx
	sarl	%cl, %edx
	movq	%r14, %rdi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.13:
	movq	(%r15), %rax
	movslq	4(%r12), %rcx
	movl	%r13d, (%rax,%rcx,4)
	jmp	LBB0_26
LBB0_11:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_12
LBB0_28:
	movq	_CM36651_PS_IT3@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %r12d
	movq	_CM36651_PS_CONF1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_23
## %bb.24:
	movl	%r12d, 8(%r15)
	jmp	LBB0_26
LBB0_23:
	leaq	L_.str.1(%rip), %rsi
LBB0_12:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CM36651_CS_IT1,4,2             ## @CM36651_CS_IT1
	.comm	_CM36651_CS_IT2,4,2             ## @CM36651_CS_IT2
	.comm	_CM36651_CS_IT3,4,2             ## @CM36651_CS_IT3
	.comm	_CM36651_CS_IT4,4,2             ## @CM36651_CS_IT4
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CM36651_CS_CONF3,4,2           ## @CM36651_CS_CONF3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CS integration time write failed\n"

	.comm	_CM36651_PS_IT1,4,2             ## @CM36651_PS_IT1
	.comm	_CM36651_PS_IT2,4,2             ## @CM36651_PS_IT2
	.comm	_CM36651_PS_IT3,4,2             ## @CM36651_PS_IT3
	.comm	_CM36651_PS_IT4,4,2             ## @CM36651_PS_IT4
	.comm	_CM36651_PS_CONF1,4,2           ## @CM36651_PS_CONF1
L_.str.1:                               ## @.str.1
	.asciz	"PS integration time write failed\n"

	.no_dead_strip	_cm36651_write_int_time
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cm36651_write_int_time
_cm36651_write_int_time:                ; @cm36651_write_int_time
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x19, [x0, #24]
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_16
; %bb.2:
	mov	x21, x1
	mov	w8, #57855
	movk	w8, #4, lsl #16
	cmp	w2, w8
	b.gt	LBB0_10
; %bb.3:
	mov	w8, #14464
	movk	w8, #1, lsl #16
	cmp	w2, w8
	b.eq	LBB0_17
; %bb.4:
	mov	w8, #28928
	movk	w8, #2, lsl #16
	cmp	w2, w8
	b.ne	LBB0_16
; %bb.5:
Lloh0:
	adrp	x8, _CM36651_CS_IT2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CM36651_CS_IT2@GOTPAGEOFF]
	b	LBB0_20
LBB0_6:
	ldr	x0, [x20, #16]
	cmp	w2, #519
	b.gt	LBB0_13
; %bb.7:
	cmp	w2, #320
	b.eq	LBB0_18
; %bb.8:
	cmp	w2, #420
	b.ne	LBB0_16
; %bb.9:
Lloh2:
	adrp	x8, _CM36651_PS_IT2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CM36651_PS_IT2@GOTPAGEOFF]
	b	LBB0_24
LBB0_10:
	mov	w8, #57856
	movk	w8, #4, lsl #16
	cmp	w2, w8
	b.eq	LBB0_19
; %bb.11:
	mov	w8, #50176
	movk	w8, #9, lsl #16
	cmp	w2, w8
	b.ne	LBB0_16
; %bb.12:
Lloh4:
	adrp	x8, _CM36651_CS_IT4@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CM36651_CS_IT4@GOTPAGEOFF]
	b	LBB0_20
LBB0_13:
	cmp	w2, #520
	b.eq	LBB0_23
; %bb.14:
	cmp	w2, #640
	b.ne	LBB0_16
; %bb.15:
Lloh6:
	adrp	x8, _CM36651_PS_IT4@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CM36651_PS_IT4@GOTPAGEOFF]
	b	LBB0_24
LBB0_16:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_28
LBB0_17:
Lloh11:
	adrp	x8, _CM36651_CS_IT1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CM36651_CS_IT1@GOTPAGEOFF]
	b	LBB0_20
LBB0_18:
Lloh13:
	adrp	x8, _CM36651_PS_IT1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CM36651_PS_IT1@GOTPAGEOFF]
	b	LBB0_24
LBB0_19:
Lloh15:
	adrp	x8, _CM36651_CS_IT3@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CM36651_CS_IT3@GOTPAGEOFF]
LBB0_20:
	ldr	w23, [x8]
Lloh17:
	adrp	x8, _CM36651_CS_CONF3@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CM36651_CS_CONF3@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w8, [x21, #4]
	lsl	w8, w8, #1
	asr	w2, w23, w8
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	mov	x22, x0
	tbnz	w0, #31, LBB0_22
; %bb.21:
	ldr	x8, [x20]
	ldrsw	x9, [x21, #4]
	str	w23, [x8, x9, lsl #2]
	b	LBB0_28
LBB0_22:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_27
LBB0_23:
Lloh22:
	adrp	x8, _CM36651_PS_IT3@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CM36651_PS_IT3@GOTPAGEOFF]
LBB0_24:
	ldr	w21, [x8]
Lloh24:
	adrp	x8, _CM36651_PS_CONF1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CM36651_PS_CONF1@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_i2c_smbus_write_byte_data
	mov	x22, x0
	tbnz	w0, #31, LBB0_26
; %bb.25:
	str	w21, [x20, #8]
	b	LBB0_28
LBB0_26:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_27:
	mov	x0, x19
	bl	_dev_err
LBB0_28:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_CM36651_CS_IT1,4,2             ; @CM36651_CS_IT1
	.comm	_CM36651_CS_IT2,4,2             ; @CM36651_CS_IT2
	.comm	_CM36651_CS_IT3,4,2             ; @CM36651_CS_IT3
	.comm	_CM36651_CS_IT4,4,2             ; @CM36651_CS_IT4
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CM36651_CS_CONF3,4,2           ; @CM36651_CS_CONF3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CS integration time write failed\n"

	.comm	_CM36651_PS_IT1,4,2             ; @CM36651_PS_IT1
	.comm	_CM36651_PS_IT2,4,2             ; @CM36651_PS_IT2
	.comm	_CM36651_PS_IT3,4,2             ; @CM36651_PS_IT3
	.comm	_CM36651_PS_IT4,4,2             ; @CM36651_PS_IT4
	.comm	_CM36651_PS_CONF1,4,2           ; @CM36651_PS_CONF1
l_.str.1:                               ; @.str.1
	.asciz	"PS integration time write failed\n"

	.no_dead_strip	_cm36651_write_int_time
.subsections_via_symbols
