	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib0090_get_temperature
_dib0090_get_temperature:               ## @dib0090_get_temperature
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rsi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	movl	$19, %esi
	callq	_dib0090_write_reg
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_dib0090_write_reg
	movl	$131, (%r14)
	movq	_TEMP_CAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 24(%rbx)
	movq	16(%rbx), %rax
	movl	$15, %r14d
	cmpl	$0, (%rax)
	jne	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	movl	$35, %esi
	callq	_dib0090_read_reg
	orl	$16384, %eax                    ## imm = 0x4000
	movq	%rbx, %rdi
	movl	$35, %esi
	movl	%eax, %edx
	callq	_dib0090_write_reg
	jmp	LBB0_9
LBB0_4:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_5:
	movq	%rbx, %rdi
	callq	_dib0090_get_slow_adc_val
	subl	8(%rbx), %eax
	imull	$180, %eax, %esi
	sarl	$8, %esi
	leal	55(%rsi), %eax
	movl	%eax, 28(%rbx)
	addl	$25, %esi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_dprintk
	movl	$128, (%r14)
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_dib0090_get_slow_adc_val
	movl	%eax, 8(%rbx)
	movl	$-769, %edx                     ## imm = 0xFCFF
	andl	4(%rbx), %edx
	orl	$512, %edx                      ## imm = 0x200
	movq	%rbx, %rdi
	movl	$19, %esi
	callq	_dib0090_write_reg
	movl	$129, (%r14)
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_dib0090_read_reg
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, (%rbx)
	andl	$-2041, %eax                    ## imm = 0xF807
	leal	64(%rax), %edx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_dib0090_write_reg
	movq	%rbx, %rdi
	movl	$19, %esi
	callq	_dib0090_read_reg
	movl	%eax, 4(%rbx)
	orl	$768, %eax                      ## imm = 0x300
	movq	%rbx, %rdi
	movl	$19, %esi
	movl	%eax, %edx
	callq	_dib0090_write_reg
	movl	$130, (%r14)
LBB0_8:
	movl	$15, %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"temperature: %d C\n"

	.comm	_TEMP_CAL,4,2                   ## @TEMP_CAL
	.no_dead_strip	_dib0090_get_temperature
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib0090_get_temperature
_dib0090_get_temperature:               ; @dib0090_get_temperature
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x1]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w2, [x20, #4]
	mov	x0, x20
	mov	w1, #19
	bl	_dib0090_write_reg
	ldr	w2, [x20]
	mov	x0, x20
	mov	w1, #16
	bl	_dib0090_write_reg
	mov	w8, #131
	str	w8, [x19]
Lloh2:
	adrp	x8, _TEMP_CAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TEMP_CAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x20, #24]
	bic	w8, w9, w8
	str	w8, [x20, #24]
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	cbnz	w8, LBB0_9
; %bb.3:
	mov	x0, x20
	mov	w1, #35
	bl	_dib0090_read_reg
	orr	w2, w0, #0x4000
	mov	x0, x20
	mov	w1, #35
	bl	_dib0090_write_reg
	b	LBB0_9
LBB0_4:
	mov	w0, #0
	b	LBB0_10
LBB0_5:
	mov	x0, x20
	bl	_dib0090_get_slow_adc_val
	ldr	w8, [x20, #8]
	sub	w8, w0, w8
	mov	w9, #180
	mul	w8, w8, w9
	asr	w8, w8, #8
	add	w9, w8, #55
	str	w9, [x20, #28]
	add	w1, w8, #25
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	w8, #128
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	bl	_dib0090_get_slow_adc_val
	str	w0, [x20, #8]
	ldr	w8, [x20, #4]
	and	w8, w8, #0xfffffcff
	orr	w2, w8, #0x200
	mov	x0, x20
	mov	w1, #19
	bl	_dib0090_write_reg
	mov	w8, #129
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	mov	w1, #16
	bl	_dib0090_read_reg
	str	w0, [x20]
	and	w8, w0, #0xfffff807
	orr	w2, w8, #0x40
	mov	x0, x20
	mov	w1, #16
	bl	_dib0090_write_reg
	mov	x0, x20
	mov	w1, #19
	bl	_dib0090_read_reg
	str	w0, [x20, #4]
	orr	w2, w0, #0x300
	mov	x0, x20
	mov	w1, #19
	bl	_dib0090_write_reg
	mov	w8, #130
LBB0_8:
	str	w8, [x19]
LBB0_9:
	mov	w0, #15
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"temperature: %d C\n"

	.comm	_TEMP_CAL,4,2                   ; @TEMP_CAL
	.no_dead_strip	_dib0090_get_temperature
.subsections_via_symbols
