	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st95hf_select_protocol
_st95hf_select_protocol:                ## @st95hf_select_protocol
	.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, %rbx
	movq	8(%rdi), %r14
	cmpl	$128, %esi
	je	LBB0_13
## %bb.1:
	cmpl	$129, %esi
	je	LBB0_9
## %bb.2:
	cmpl	$130, %esi
	jne	LBB0_15
## %bb.3:
	movl	$130, (%rbx)
	movq	_CMD_ISO14443A_PROTOCOL_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_st95hf_send_recv_cmd
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_13:
	movl	$128, (%rbx)
	movq	_CMD_ISO15693_PROTOCOL_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_st95hf_send_recv_cmd
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
LBB0_9:
	movl	$129, (%rbx)
	movq	_CMD_ISO14443B_PROTOCOL_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_st95hf_send_recv_cmd
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_dev_err
	movl	%r12d, %r15d
	jmp	LBB0_16
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_6:
	movq	%rbx, %rdi
	callq	_secondary_configuration_type4a
	testl	%eax, %eax
	je	LBB0_16
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_11:
	movl	$50000, %edi                    ## imm = 0xC350
	movl	$60000, %esi                    ## imm = 0xEA60
	callq	_usleep_range
	movq	%rbx, %rdi
	callq	_secondary_configuration_type4b
	testl	%eax, %eax
	je	LBB0_16
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	movl	%ebx, %r15d
LBB0_16:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_ISO14443A_PROTOCOL_SELECT,4,2 ## @CMD_ISO14443A_PROTOCOL_SELECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"protocol sel, err = 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"type a secondary config, err = 0x%x\n"

	.comm	_CMD_ISO14443B_PROTOCOL_SELECT,4,2 ## @CMD_ISO14443B_PROTOCOL_SELECT
L_.str.2:                               ## @.str.2
	.asciz	"protocol sel send, err = 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"type b secondary config, err = 0x%x\n"

	.comm	_CMD_ISO15693_PROTOCOL_SELECT,4,2 ## @CMD_ISO15693_PROTOCOL_SELECT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_st95hf_select_protocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st95hf_select_protocol
_st95hf_select_protocol:                ; @st95hf_select_protocol
	.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	x21, x0
	ldr	x19, [x0, #8]
	cmp	w1, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w1, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w1, #130
	b.ne	LBB0_10
; %bb.3:
	mov	w8, #130
	str	w8, [x21]
Lloh0:
	adrp	x8, _CMD_ISO14443A_PROTOCOL_SELECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_ISO14443A_PROTOCOL_SELECT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	x3, #0
	mov	w4, #1
	bl	_st95hf_send_recv_cmd
	cbz	w0, LBB0_12
; %bb.4:
	mov	x20, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
	mov	w8, #128
	str	w8, [x21]
Lloh5:
	adrp	x8, _CMD_ISO15693_PROTOCOL_SELECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CMD_ISO15693_PROTOCOL_SELECT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	x3, #0
	mov	w4, #1
	bl	_st95hf_send_recv_cmd
	mov	x20, x0
	cbnz	w0, LBB0_8
	b	LBB0_11
LBB0_6:
	mov	w8, #129
	str	w8, [x21]
Lloh8:
	adrp	x8, _CMD_ISO14443B_PROTOCOL_SELECT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMD_ISO14443B_PROTOCOL_SELECT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	x3, #0
	mov	w4, #1
	bl	_st95hf_send_recv_cmd
	cbz	w0, LBB0_14
; %bb.7:
	mov	x20, x0
LBB0_8:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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
LBB0_12:
	mov	x0, x21
	bl	_secondary_configuration_type4a
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.13:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_14:
	mov	w0, #50000
	mov	w1, #60000
	bl	_usleep_range
	mov	x0, x21
	bl	_secondary_configuration_type4b
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.15:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_ISO14443A_PROTOCOL_SELECT,4,2 ; @CMD_ISO14443A_PROTOCOL_SELECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"protocol sel, err = 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"type a secondary config, err = 0x%x\n"

	.comm	_CMD_ISO14443B_PROTOCOL_SELECT,4,2 ; @CMD_ISO14443B_PROTOCOL_SELECT
l_.str.2:                               ; @.str.2
	.asciz	"protocol sel send, err = 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"type b secondary config, err = 0x%x\n"

	.comm	_CMD_ISO15693_PROTOCOL_SELECT,4,2 ; @CMD_ISO15693_PROTOCOL_SELECT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_st95hf_select_protocol
.subsections_via_symbols
