	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_nci_enable_se               ## -- Begin function st_nci_enable_se
	.p2align	4, 0x90
_st_nci_enable_se:                      ## @st_nci_enable_se
	.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	%esi, %r14d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	_ST_NCI_SE_MODE_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_st_nci_control_se
	movl	%eax, %ebx
	movq	_ST_NCI_ESE_HOST_ID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_st_nci_se_get_atr
	movq	_ST_NCI_APDU_READER_GATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ST_NCI_EVT_SE_SOFT_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_nci_hci_send_event
	movl	%eax, %ebx
LBB0_2:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jns	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_nfc_remove_se
	movl	%ebx, %eax
LBB0_4:
	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	"st_nci_enable_se\n"

	.comm	_ST_NCI_SE_MODE_ON,4,2          ## @ST_NCI_SE_MODE_ON
	.comm	_ST_NCI_ESE_HOST_ID,4,2         ## @ST_NCI_ESE_HOST_ID
	.comm	_ST_NCI_APDU_READER_GATE,4,2    ## @ST_NCI_APDU_READER_GATE
	.comm	_ST_NCI_EVT_SE_SOFT_RESET,4,2   ## @ST_NCI_EVT_SE_SOFT_RESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_nci_enable_se               ; -- Begin function st_nci_enable_se
	.p2align	2
_st_nci_enable_se:                      ; @st_nci_enable_se
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
Lloh2:
	adrp	x8, _ST_NCI_SE_MODE_ON@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ST_NCI_SE_MODE_ON@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_st_nci_control_se
	mov	x21, x0
Lloh5:
	adrp	x8, _ST_NCI_ESE_HOST_ID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ST_NCI_ESE_HOST_ID@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_st_nci_se_get_atr
Lloh8:
	adrp	x8, _ST_NCI_APDU_READER_GATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ST_NCI_APDU_READER_GATE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ST_NCI_EVT_SE_SOFT_RESET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ST_NCI_EVT_SE_SOFT_RESET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, #0
	mov	w4, #0
	bl	_nci_hci_send_event
	mov	x21, x0
LBB0_2:
	tbnz	w21, #31, LBB0_4
; %bb.3:
	mov	w21, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20]
	mov	x1, x19
	bl	_nfc_remove_se
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"st_nci_enable_se\n"

	.comm	_ST_NCI_SE_MODE_ON,4,2          ; @ST_NCI_SE_MODE_ON
	.comm	_ST_NCI_ESE_HOST_ID,4,2         ; @ST_NCI_ESE_HOST_ID
	.comm	_ST_NCI_APDU_READER_GATE,4,2    ; @ST_NCI_APDU_READER_GATE
	.comm	_ST_NCI_EVT_SE_SOFT_RESET,4,2   ; @ST_NCI_EVT_SE_SOFT_RESET
.subsections_via_symbols
