	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function attach_thermostat
_attach_thermostat:                     ## @attach_thermostat
	.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	_x@GOTPCREL(%rip), %r13
	cmpq	$0, 16(%r13)
	jne	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_read_reg
	movl	%eax, %r14d
	leal	-15361(%r14), %eax
	cmpl	$-9729, %eax                    ## imm = 0xD9FF
	jb	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	$2, %edx
	callq	_read_reg
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$3, %esi
	movl	$2, %edx
	callq	_read_reg
	testl	%r15d, %r15d
	js	LBB0_5
## %bb.3:
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_print_temp
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	callq	_print_temp
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	callq	_print_temp
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	movl	%r14d, (%r13)
	movl	%r12d, 4(%r13)
	movl	%r15d, 8(%r13)
	movq	%rbx, 16(%r13)
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_x,24,3                         ## @x
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DS1775 digital thermometer [@%02x]\n"

L_.str.1:                               ## @.str.1
	.asciz	"Temp: "

L_.str.2:                               ## @.str.2
	.asciz	"  Hyst: "

L_.str.3:                               ## @.str.3
	.asciz	"  OS: "

L_.str.4:                               ## @.str.4
	.asciz	"\n"

	.no_dead_strip	_attach_thermostat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function attach_thermostat
_attach_thermostat:                     ; @attach_thermostat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x23, _x@GOTPAGE
Lloh1:
	ldr	x23, [x23, _x@GOTPAGEOFF]
	ldr	x8, [x23, #16]
	cbnz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	mov	w2, #2
	bl	_read_reg
	mov	w8, #-15361
	mov	w9, #-9729
	add	w8, w0, w8
	cmp	w8, w9
	b.lo	LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #2
	mov	w2, #2
	bl	_read_reg
	mov	x21, x0
	mov	x0, x19
	mov	w1, #3
	mov	w2, #2
	bl	_read_reg
	tbnz	w21, #31, LBB0_5
; %bb.3:
	mov	x22, x0
	tbnz	w0, #31, LBB0_5
; %bb.4:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_print_temp
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_print_temp
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x22
	bl	_print_temp
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printk
	stp	w20, w22, [x23]
	str	w21, [x23, #8]
	str	x19, [x23, #16]
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_x,24,3                         ; @x
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DS1775 digital thermometer [@%02x]\n"

l_.str.1:                               ; @.str.1
	.asciz	"Temp: "

l_.str.2:                               ; @.str.2
	.asciz	"  Hyst: "

l_.str.3:                               ; @.str.3
	.asciz	"  OS: "

l_.str.4:                               ; @.str.4
	.asciz	"\n"

	.no_dead_strip	_attach_thermostat
.subsections_via_symbols
