	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hp03_update_temp_pressure
_hp03_update_temp_pressure:             ## @hp03_update_temp_pressure
	.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
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	16(%rdi), %r15
	movl	12(%rdi), %edi
	movq	_HP03_EEPROM_CX_OFFSET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-112(%rbp), %rdx
	movl	$72, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	8(%r14), %edi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movq	_HP03_ADC_READ_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hp03_get_temp_pressure
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_HP03_ADC_READ_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hp03_get_temp_pressure
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.9:
	movl	8(%r14), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movl	-112(%rbp), %r8d
	movl	-104(%rbp), %r9d
	shll	$8, %r8d
	orl	-108(%rbp), %r8d
	shll	$8, %r9d
	orl	-100(%rbp), %r9d
	movl	-96(%rbp), %r15d
	shll	$8, %r15d
	orl	-92(%rbp), %r15d
	movl	-88(%rbp), %esi
	shll	$8, %esi
	orl	-84(%rbp), %esi
	movl	-80(%rbp), %ecx
	shll	$8, %ecx
	orl	-76(%rbp), %ecx
	movl	-72(%rbp), %eax
	shll	$8, %eax
	orl	-68(%rbp), %eax
	movl	-64(%rbp), %r10d
	shll	$8, %r10d
	orl	-60(%rbp), %r10d
	rolw	$8, %bx
	movzwl	%bx, %edx
	rolw	$8, %r12w
	movzwl	%r12w, %edi
	xorl	%r11d, %r11d
	subl	%ecx, %edi
	setl	%r11b
	movl	%edi, %ebx
	sarl	$7, %ebx
	imull	%ebx, %ebx
	imull	-56(%rbp,%r11,4), %ebx
	movb	-48(%rbp), %cl
	sarl	%cl, %ebx
	subl	%ebx, %edi
	addl	$-1024, %esi                    ## imm = 0xFC00
	imull	%edi, %esi
	sarl	$14, %esi
	addl	%r9d, %esi
	imull	%edi, %r15d
	sarl	$10, %r15d
	addl	%r8d, %r15d
	addl	$-7168, %edx                    ## imm = 0xE400
	imull	%r15d, %edx
	sarl	$14, %edx
	shll	$2, %esi
	subl	%esi, %edx
	imull	$100, %edx, %ecx
	sarl	$5, %ecx
	leal	(%r10,%r10,4), %edx
	leal	(%rcx,%rdx,2), %ecx
	movl	%ecx, (%r14)
	imull	%edi, %eax
	sarl	$16, %eax
	movb	-44(%rbp), %cl
	sarl	%cl, %edi
	subl	%edi, %eax
	addl	$250, %eax
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %ebx
LBB0_6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	8(%r14), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_10
## %bb.8:
	movl	%ebx, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HP03_EEPROM_CX_OFFSET,4,2      ## @HP03_EEPROM_CX_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read EEPROM (reg=%02x)\n"

	.comm	_HP03_ADC_READ_PRESSURE,4,2     ## @HP03_ADC_READ_PRESSURE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read pressure\n"

	.comm	_HP03_ADC_READ_TEMP,4,2         ## @HP03_ADC_READ_TEMP
L_.str.2:                               ## @.str.2
	.asciz	"Failed to read temperature\n"

	.no_dead_strip	_hp03_update_temp_pressure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hp03_update_temp_pressure
_hp03_update_temp_pressure:             ; @hp03_update_temp_pressure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x21, [x0, #16]
	ldr	w0, [x0, #12]
Lloh3:
	adrp	x22, _HP03_EEPROM_CX_OFFSET@GOTPAGE
Lloh4:
	ldr	x22, [x22, _HP03_EEPROM_CX_OFFSET@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #16
	mov	w3, #72
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w0, [x19, #8]
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
Lloh5:
	adrp	x8, _HP03_ADC_READ_PRESSURE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HP03_ADC_READ_PRESSURE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hp03_get_temp_pressure
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh8:
	adrp	x8, _HP03_ADC_READ_TEMP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HP03_ADC_READ_TEMP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hp03_get_temp_pressure
	mov	x22, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	ldp	w8, w9, [sp, #16]
	orr	w8, w9, w8, lsl #8
	ldp	w9, w10, [sp, #24]
	orr	w9, w10, w9, lsl #8
	ldp	w10, w11, [sp, #32]
	orr	w10, w11, w10, lsl #8
	ldp	w11, w12, [sp, #40]
	orr	w11, w12, w11, lsl #8
	ldp	w12, w13, [sp, #48]
	orr	w12, w13, w12, lsl #8
	ldp	w13, w14, [sp, #56]
	orr	w13, w14, w13, lsl #8
	ldp	w14, w15, [sp, #64]
	orr	w14, w15, w14, lsl #8
	rev	w15, w20
	rev	w16, w22
	lsr	w16, w16, #16
	add	x17, sp, #16
	add	x0, x17, #56
	add	x17, x17, #60
	subs	w12, w16, w12
	csel	x16, x17, x0, lt
	ldr	w16, [x16]
	asr	w17, w12, #7
	mul	w17, w17, w17
	mul	w16, w17, w16
	ldp	w17, w0, [sp, #80]
	asr	w16, w16, w17
	sub	w12, w12, w16
	sub	w11, w11, #1024
	mul	w11, w12, w11
	add	w9, w9, w11, asr #14
	mul	w10, w10, w12
	add	w8, w8, w10, asr #10
	mov	w10, #-7168
	add	w10, w10, w15, lsr #16
	mul	w8, w8, w10
	asr	w8, w8, #14
	sub	w8, w8, w9, lsl #2
	mov	w9, #100
	mul	w8, w8, w9
	mov	w9, #10
	mul	w9, w14, w9
	add	w8, w9, w8, asr #5
	mul	w9, w13, w12
	asr	w9, w9, #16
	asr	w10, w12, w0
	sub	w9, w9, w10
	add	w9, w9, #250
	stp	w8, w9, [x19]
	mov	w20, #0
	b	LBB0_8
LBB0_4:
	mov	x20, x0
	ldr	w8, [x22]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_8
LBB0_5:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x20, x22
LBB0_7:
	mov	x0, x21
	bl	_dev_err
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_HP03_EEPROM_CX_OFFSET,4,2      ; @HP03_EEPROM_CX_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read EEPROM (reg=%02x)\n"

	.comm	_HP03_ADC_READ_PRESSURE,4,2     ; @HP03_ADC_READ_PRESSURE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read pressure\n"

	.comm	_HP03_ADC_READ_TEMP,4,2         ; @HP03_ADC_READ_TEMP
l_.str.2:                               ; @.str.2
	.asciz	"Failed to read temperature\n"

	.no_dead_strip	_hp03_update_temp_pressure
.subsections_via_symbols
