	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_nci_discover_se             ## -- Begin function st_nci_discover_se
	.p2align	4, 0x90
_st_nci_discover_se:                    ## @st_nci_discover_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_nci_get_drvdata
	movq	%rax, %r14
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	%rbx, %rdi
	callq	_st_nci_hci_network_init
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	_ST_NCI_FACTORY_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	_test_bit
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_13
## %bb.2:
	movq	(%r14), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_3
## %bb.4:
	movq	_ST_NCI_UICC_HOST_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -32(%rbp)
	movl	$1, %r8d
	cmpq	$0, (%rax)
	jne	LBB0_5
	jmp	LBB0_6
LBB0_3:
	xorl	%r8d, %r8d
	cmpq	$0, (%rax)
	je	LBB0_10
LBB0_5:
	movq	_ST_NCI_ESE_HOST_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r8d, %ecx
	incl	%r8d
	movl	%eax, -32(%rbp,%rcx,4)
LBB0_6:
	movq	_NCI_HCI_ADMIN_GATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NCI_HCI_ADMIN_PARAM_WHITELIST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_nci_hci_set_param
	movq	_NCI_HCI_ANY_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.7:
	movq	(%r14), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.9:
	movl	(%rbx), %edi
	movq	_ST_NCI_UICC_HOST_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NFC_SE_UICC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_nfc_add_se
	movq	(%r14), %rax
	movl	$1, %r8d
LBB0_10:
	cmpq	$0, (%rax)
	je	LBB0_12
LBB0_11:
	movl	(%rbx), %edi
	movq	_ST_NCI_ESE_HOST_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NFC_SE_EMBEDDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_nfc_add_se
	movl	$1, %r8d
LBB0_12:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	sete	%al
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	xorl	%r8d, %r8d
	cmpq	$0, (%rax)
	jne	LBB0_11
	jmp	LBB0_12
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"st_nci_discover_se\n"

	.comm	_ST_NCI_FACTORY_MODE,4,2        ## @ST_NCI_FACTORY_MODE
	.comm	_ST_NCI_UICC_HOST_ID,4,2        ## @ST_NCI_UICC_HOST_ID
	.comm	_ST_NCI_ESE_HOST_ID,4,2         ## @ST_NCI_ESE_HOST_ID
	.comm	_NCI_HCI_ADMIN_GATE,4,2         ## @NCI_HCI_ADMIN_GATE
	.comm	_NCI_HCI_ADMIN_PARAM_WHITELIST,4,2 ## @NCI_HCI_ADMIN_PARAM_WHITELIST
	.comm	_NCI_HCI_ANY_OK,4,2             ## @NCI_HCI_ANY_OK
	.comm	_NFC_SE_UICC,4,2                ## @NFC_SE_UICC
	.comm	_NFC_SE_EMBEDDED,4,2            ## @NFC_SE_EMBEDDED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_nci_discover_se             ; -- Begin function st_nci_discover_se
	.p2align	2
_st_nci_discover_se:                    ; @st_nci_discover_se
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_nci_get_drvdata
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x19
	bl	_st_nci_hci_network_init
	cbnz	w0, LBB0_13
; %bb.1:
Lloh5:
	adrp	x8, _ST_NCI_FACTORY_MODE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ST_NCI_FACTORY_MODE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_13
LBB0_3:
	ldr	x8, [x20]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.4:
Lloh8:
	adrp	x9, _ST_NCI_UICC_HOST_ID@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ST_NCI_UICC_HOST_ID@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	str	w9, [sp]
	ldr	x8, [x8]
	mov	w4, #1
	cbnz	x8, LBB0_6
	b	LBB0_7
LBB0_5:
	mov	w4, #0
	ldr	x10, [x8]
	cbz	x10, LBB0_10
LBB0_6:
Lloh11:
	adrp	x8, _ST_NCI_ESE_HOST_ID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ST_NCI_ESE_HOST_ID@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	x9, sp
	str	w8, [x9, w4, uxtw #2]
	add	w4, w4, #1
LBB0_7:
Lloh14:
	adrp	x8, _NCI_HCI_ADMIN_GATE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NCI_HCI_ADMIN_GATE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _NCI_HCI_ADMIN_PARAM_WHITELIST@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NCI_HCI_ADMIN_PARAM_WHITELIST@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x3, sp
	mov	x0, x19
	bl	_nci_hci_set_param
Lloh20:
	adrp	x8, _NCI_HCI_ANY_OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NCI_HCI_ANY_OK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.8:
	ldr	x8, [x20]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_10
; %bb.9:
	ldr	w0, [x19]
Lloh23:
	adrp	x8, _ST_NCI_UICC_HOST_ID@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ST_NCI_UICC_HOST_ID@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _NFC_SE_UICC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NFC_SE_UICC@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	bl	_nfc_add_se
	ldr	x8, [x20]
	mov	w9, #1
LBB0_10:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w0, [x19]
Lloh29:
	adrp	x8, _ST_NCI_ESE_HOST_ID@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ST_NCI_ESE_HOST_ID@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _NFC_SE_EMBEDDED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NFC_SE_EMBEDDED@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	bl	_nfc_add_se
	mov	w9, #1
LBB0_12:
	cmp	w9, #0
	cset	w0, eq
LBB0_13:
	ldr	x8, [sp, #8]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"st_nci_discover_se\n"

	.comm	_ST_NCI_FACTORY_MODE,4,2        ; @ST_NCI_FACTORY_MODE
	.comm	_ST_NCI_UICC_HOST_ID,4,2        ; @ST_NCI_UICC_HOST_ID
	.comm	_ST_NCI_ESE_HOST_ID,4,2         ; @ST_NCI_ESE_HOST_ID
	.comm	_NCI_HCI_ADMIN_GATE,4,2         ; @NCI_HCI_ADMIN_GATE
	.comm	_NCI_HCI_ADMIN_PARAM_WHITELIST,4,2 ; @NCI_HCI_ADMIN_PARAM_WHITELIST
	.comm	_NCI_HCI_ANY_OK,4,2             ; @NCI_HCI_ANY_OK
	.comm	_NFC_SE_UICC,4,2                ; @NFC_SE_UICC
	.comm	_NFC_SE_EMBEDDED,4,2            ; @NFC_SE_EMBEDDED
.subsections_via_symbols
