	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function therm_pm72_attach
_therm_pm72_attach:                     ## @therm_pm72_attach
	.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, %r12
	movq	_driver_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_state@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_state_detached@GOTPCREL(%rip), %rdx
	movq	_state_attaching@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rcx, (%r14)
	jmp	LBB0_3
LBB0_2:
	cmpq	%rcx, %rax
	jne	LBB0_23
LBB0_3:
	movq	_u3_0@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	jne	LBB0_8
## %bb.4:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
LBB0_8:
	movq	_u3_1@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_11
## %bb.9:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	_k2@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_18
## %bb.12:
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_18
## %bb.13:
	movq	%r12, (%rbx)
	leaq	L_.str.5(%rip), %rdi
	callq	_DBG
	cmpq	$0, (%r15)
	je	LBB0_18
## %bb.14:
	movq	_rackmac@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.15:
	xorl	%eax, %eax
	callq	_create_control_loops
	jmp	LBB0_16
LBB0_5:
	movq	%r12, (%r15)
	leaq	L_.str.1(%rip), %rdi
	callq	_DBG
	movq	_k2@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	_rackmac@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_18
LBB0_7:
	xorl	%eax, %eax
	callq	_create_control_loops
	movq	%r15, %rbx
	jmp	LBB0_16
LBB0_10:
	movq	%r12, (%rbx)
	leaq	L_.str.3(%rip), %rdi
	callq	_DBG
	xorl	%eax, %eax
	callq	_attach_fcu
LBB0_16:
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	$0, (%rbx)
LBB0_18:
	cmpq	$0, (%r15)
	je	LBB0_23
## %bb.19:
	movq	_u3_1@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_23
## %bb.20:
	movq	_k2@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_22
## %bb.21:
	movq	_rackmac@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_23
LBB0_22:
	leaq	L_.str.6(%rip), %rdi
	callq	_DBG
	movq	_state_attached@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
	callq	_start_control_loops
LBB0_23:
	movq	_driver_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_driver_lock,4,2                ## @driver_lock
	.comm	_state,8,3                      ## @state
	.comm	_state_detached,8,3             ## @state_detached
	.comm	_state_attaching,8,3            ## @state_attaching
	.comm	_u3_0,8,3                       ## @u3_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"u3 0"

L_.str.1:                               ## @.str.1
	.asciz	"found U3-0\n"

	.comm	_k2,8,3                         ## @k2
	.comm	_rackmac,8,3                    ## @rackmac
	.comm	_u3_1,8,3                       ## @u3_1
L_.str.2:                               ## @.str.2
	.asciz	"u3 1"

L_.str.3:                               ## @.str.3
	.asciz	"found U3-1, attaching FCU\n"

L_.str.4:                               ## @.str.4
	.asciz	"mac-io 0"

L_.str.5:                               ## @.str.5
	.asciz	"Found K2\n"

L_.str.6:                               ## @.str.6
	.asciz	"everything up, starting control loops\n"

	.comm	_state_attached,8,3             ## @state_attached
	.no_dead_strip	_therm_pm72_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function therm_pm72_attach
_therm_pm72_attach:                     ; @therm_pm72_attach
	.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	x19, x0
Lloh0:
	adrp	x0, _driver_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _driver_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x20, _state@GOTPAGE
Lloh3:
	ldr	x20, [x20, _state@GOTPAGEOFF]
Lloh4:
	adrp	x9, _state_detached@GOTPAGE
Lloh5:
	ldr	x9, [x9, _state_detached@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh6:
	ldr	x10, [x9]
Lloh7:
	adrp	x9, _state_attaching@GOTPAGE
Lloh8:
	ldr	x9, [x9, _state_attaching@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x10
	b.ne	LBB0_2
; %bb.1:
	str	x9, [x20]
	b	LBB0_3
LBB0_2:
	cmp	x8, x9
	b.ne	LBB0_22
LBB0_3:
Lloh10:
	adrp	x22, _u3_0@GOTPAGE
Lloh11:
	ldr	x22, [x22, _u3_0@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh12:
	adrp	x23, _u3_1@GOTPAGE
Lloh13:
	ldr	x23, [x23, _u3_1@GOTPAGEOFF]
Lloh14:
	adrp	x21, _k2@GOTPAGE
Lloh15:
	ldr	x21, [x21, _k2@GOTPAGEOFF]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_13
LBB0_5:
	ldr	x8, [x23]
	cbnz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x19]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_16
LBB0_7:
	ldr	x8, [x21]
	cbnz	x8, LBB0_18
; %bb.8:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_18
; %bb.9:
	str	x19, [x21]
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DBG
	ldr	x8, [x22]
	cbz	x8, LBB0_18
; %bb.10:
Lloh24:
	adrp	x8, _rackmac@GOTPAGE
Lloh25:
	ldr	x8, [x8, _rackmac@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.11:
	bl	_create_control_loops
	cbz	x0, LBB0_18
; %bb.12:
Lloh27:
	adrp	x8, _k2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _k2@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
	str	x19, [x22]
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DBG
	ldr	x8, [x21]
Lloh31:
	adrp	x9, _rackmac@GOTPAGE
Lloh32:
	ldr	x9, [x9, _rackmac@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, #0, #4, eq
	b.ne	LBB0_18
; %bb.14:
	bl	_create_control_loops
	cbz	x0, LBB0_18
; %bb.15:
Lloh34:
	adrp	x8, _u3_0@GOTPAGE
Lloh35:
	ldr	x8, [x8, _u3_0@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
	str	x19, [x23]
Lloh36:
	adrp	x0, l_.str.3@PAGE
Lloh37:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DBG
	bl	_attach_fcu
	mov	x8, x23
	cbz	x0, LBB0_18
LBB0_17:
	str	xzr, [x8]
LBB0_18:
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_22
; %bb.19:
	ldr	x8, [x21]
	cbnz	x8, LBB0_21
; %bb.20:
Lloh38:
	adrp	x8, _rackmac@GOTPAGE
Lloh39:
	ldr	x8, [x8, _rackmac@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	cbnz	x8, LBB0_22
LBB0_21:
Lloh41:
	adrp	x0, l_.str.6@PAGE
Lloh42:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DBG
Lloh43:
	adrp	x8, _state_attached@GOTPAGE
Lloh44:
	ldr	x8, [x8, _state_attached@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	str	x8, [x20]
	bl	_start_control_loops
LBB0_22:
Lloh46:
	adrp	x0, _driver_lock@GOTPAGE
Lloh47:
	ldr	x0, [x0, _driver_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_driver_lock,4,2                ; @driver_lock
	.comm	_state,8,3                      ; @state
	.comm	_state_detached,8,3             ; @state_detached
	.comm	_state_attaching,8,3            ; @state_attaching
	.comm	_u3_0,8,3                       ; @u3_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"u3 0"

l_.str.1:                               ; @.str.1
	.asciz	"found U3-0\n"

	.comm	_k2,8,3                         ; @k2
	.comm	_rackmac,8,3                    ; @rackmac
	.comm	_u3_1,8,3                       ; @u3_1
l_.str.2:                               ; @.str.2
	.asciz	"u3 1"

l_.str.3:                               ; @.str.3
	.asciz	"found U3-1, attaching FCU\n"

l_.str.4:                               ; @.str.4
	.asciz	"mac-io 0"

l_.str.5:                               ; @.str.5
	.asciz	"Found K2\n"

l_.str.6:                               ; @.str.6
	.asciz	"everything up, starting control loops\n"

	.comm	_state_attached,8,3             ; @state_attached
	.no_dead_strip	_therm_pm72_attach
.subsections_via_symbols
