	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssip_pn_open
_ssip_pn_open:                          ## @ssip_pn_open
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %edi
	callq	_to_hsi_client
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_hsi_client_drvdata
	movq	%rax, %r14
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_hsi_claim_port
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_ssip_port_event@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hsi_register_port_event
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_hsi_setup
	movq	_SSIP_WAKETEST_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	addq	$8, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_ssi_waketest
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	_HANDSHAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	%r15, %rdi
	callq	_ssip_send_bootinfo_req_cmd
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SSI port already claimed\n"

	.comm	_ssip_port_event,4,2            ## @ssip_port_event
L_.str.1:                               ## @.str.1
	.asciz	"Register HSI port event failed (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Configuring SSI port\n"

	.comm	_SSIP_WAKETEST_FLAG,4,2         ## @SSIP_WAKETEST_FLAG
	.comm	_HANDSHAKE,4,2                  ## @HANDSHAKE
	.no_dead_strip	_ssip_pn_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssip_pn_open
_ssip_pn_open:                          ; @ssip_pn_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w0, [x0]
	bl	_to_hsi_client
	mov	x19, x0
	bl	_hsi_client_drvdata
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1
	bl	_hsi_claim_port
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _ssip_port_event@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ssip_port_event@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hsi_register_port_event
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x0, x19
	bl	_hsi_setup
Lloh5:
	adrp	x8, _SSIP_WAKETEST_FLAG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSIP_WAKETEST_FLAG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	_test_and_set_bit
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_ssi_waketest
LBB0_4:
	mov	x0, x20
	bl	_spin_lock_bh
Lloh8:
	adrp	x8, _HANDSHAKE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HANDSHAKE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	x0, x19
	bl	_ssip_send_bootinfo_req_cmd
	mov	w21, #0
	b	LBB0_8
LBB0_5:
	mov	x21, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x21, x0
	str	x21, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_err
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SSI port already claimed\n"

	.comm	_ssip_port_event,4,2            ; @ssip_port_event
l_.str.1:                               ; @.str.1
	.asciz	"Register HSI port event failed (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Configuring SSI port\n"

	.comm	_SSIP_WAKETEST_FLAG,4,2         ; @SSIP_WAKETEST_FLAG
	.comm	_HANDSHAKE,4,2                  ; @HANDSHAKE
	.no_dead_strip	_ssip_pn_open
.subsections_via_symbols
