	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_atr
_parse_atr:                             ## @parse_atr
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %ecx
	leaq	L_.str(%rip), %rdx
	xorl	%r15d, %r15d
	movl	$3, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_DEBUGP
	cmpl	$2, (%rbx)
	jg	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdx
	movl	$5, %edi
	movq	%rbx, %rsi
	jmp	LBB0_16
LBB0_2:
	movq	8(%rbx), %rax
	leaq	28(%rbx), %rsi
	cmpl	$63, (%rax)
	movq	_IS_INVREV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_4
## %bb.3:
	callq	_set_bit
	jmp	LBB0_5
LBB0_4:
	callq	_clear_bit
LBB0_5:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movl	4(%rax), %r12d
	movabsq	$73014444032, %rax              ## imm = 0x1100000000
	movq	%rax, 16(%rcx)
	movb	$1, %r15b
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %eax
	andl	$16, %eax
	cmpb	$1, %r15b
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 20(%rbx)
	movl	$5, %edi
	movq	%rbx, %rsi
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	callq	_DEBUGP
	movq	%rbx, %rsi
	movl	%r15d, %ebx
	movb	$2, %r15b
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	cmpb	$2, %r15b
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$17, 20(%rsi)
	movb	$3, %r15b
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %ecx
	andl	$240, %ecx
	movl	$5, %edi
	leaq	L_.str.3(%rip), %rdx
	xorl	%eax, %eax
	callq	_DEBUGP
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %eax
	shrl	$4, %eax
	andl	$1, %eax
	movl	%r12d, %ecx
	shrl	$5, %ecx
	andl	$1, %ecx
	btl	$6, %r12d
	adcl	%eax, %ecx
	btl	$7, %r12d
	adcl	%ecx, %r13d
	movq	8(%rsi), %rax
	movl	%r14d, %ecx
	movzbl	%cl, %r14d
	testb	$-128, %r12b
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%r13d, %ecx
	movl	(%rax,%rcx,4), %r12d
	testb	$15, %r12b
	leaq	L_.str.4(%rip), %rdx
	leaq	L_.str.5(%rip), %rax
	cmoveq	%rax, %rdx
	movl	$1, %eax
	cmovnel	%eax, %r14d
	movzbl	%bl, %ebx
	cmovel	%eax, %ebx
	movl	$5, %edi
	xorl	%eax, %eax
	callq	_DEBUGP
                                        ## kill: def $r14b killed $r14b killed $r14 def $r14d
	jmp	LBB0_6
LBB0_14:
	movl	%ecx, %r12d
	movl	4(%rax), %r8d
	andl	$15, %r8d
	leaq	L_.str.6(%rip), %rdx
	xorl	%r15d, %r15d
	movl	$5, %edi
	movl	%r13d, %ecx
	movl	%r14d, %r9d
	xorl	%eax, %eax
	callq	_DEBUGP
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rax
	movl	4(%rax), %eax
	andl	$15, %eax
	addl	%r13d, %r14d
	addl	%r14d, %eax
	incl	%eax
	cmpl	(%rsi), %eax
	jne	LBB0_15
## %bb.17:
	testb	%bl, %bl
	je	LBB0_18
## %bb.20:
	movq	_IS_ANY_T0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_set_bit
	testb	%r12b, %r12b
	je	LBB0_23
## %bb.21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, 24(%rax)
	jmp	LBB0_22
LBB0_15:
	leaq	L_.str.7(%rip), %rdx
	movl	$5, %edi
LBB0_16:
	xorl	%eax, %eax
	callq	_DEBUGP
	jmp	LBB0_24
LBB0_18:
	testb	%r12b, %r12b
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_23
## %bb.19:
	movl	$0, 24(%rsi)
	movl	$1, 16(%rsi)
LBB0_22:
	movq	_IS_ANY_T1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
LBB0_23:
	movl	$1, %r15d
LBB0_24:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-> parse_atr: dev->atr_len = %i\n"

L_.str.1:                               ## @.str.1
	.asciz	"parse_atr: atr_len < 3\n"

	.comm	_IS_INVREV,4,2                  ## @IS_INVREV
L_.str.2:                               ## @.str.2
	.asciz	"Card says FiDi is 0x%.2x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Yi=%.2x\n"

L_.str.4:                               ## @.str.4
	.asciz	"card is capable of T=1\n"

L_.str.5:                               ## @.str.5
	.asciz	"card is capable of T=0\n"

L_.str.6:                               ## @.str.6
	.asciz	"ix=%d noHist=%d any_t1=%d\n"

L_.str.7:                               ## @.str.7
	.asciz	"length error\n"

	.comm	_IS_ANY_T0,4,2                  ## @IS_ANY_T0
	.comm	_IS_ANY_T1,4,2                  ## @IS_ANY_T1
	.comm	_IS_BAD_CSUM,4,2                ## @IS_BAD_CSUM
	.comm	_i,8,3                          ## @i
	.no_dead_strip	_parse_atr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function parse_atr
lCPI0_0:
	.long	0                               ; 0x0
	.long	17                              ; 0x11
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_parse_atr:                             ; @parse_atr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0]
	str	x8, [sp]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #3
	mov	x1, x19
	bl	_DEBUGP
	ldr	w8, [x19]
	cmp	w8, #2
	b.gt	LBB0_2
; %bb.1:
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _IS_INVREV@GOTPAGE
Lloh5:
	ldr	x9, [x9, _IS_INVREV@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x9]
	add	x1, x19, #28
	cmp	w8, #63
	str	x1, [sp, #24]                   ; 8-byte Folded Spill
	b.ne	LBB0_4
; %bb.3:
	bl	_set_bit
	b	LBB0_5
LBB0_4:
	bl	_clear_bit
LBB0_5:
	mov	w23, #0
	mov	w24, #0
	ldr	x8, [x19, #8]
	ldr	w26, [x8, #4]
Lloh7:
	adrp	x21, l_.str.3@PAGE
Lloh8:
	add	x21, x21, l_.str.3@PAGEOFF
	mov	w28, #1
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #16]
Lloh11:
	adrp	x27, l_.str.4@PAGE
Lloh12:
	add	x27, x27, l_.str.4@PAGEOFF
Lloh13:
	adrp	x20, l_.str.5@PAGE
Lloh14:
	add	x20, x20, l_.str.5@PAGEOFF
Lloh15:
	adrp	x22, l_.str.2@PAGE
Lloh16:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	w25, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	and	w8, w26, #0x10
	cmp	w28, #1
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	w8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #8]
	str	w8, [x19, #20]
	str	x8, [sp]
	mov	w0, #5
	mov	x1, x19
	mov	x2, x22
	bl	_DEBUGP
	mov	w28, #2
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	w28, #2
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	w8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #17
	str	w8, [x19, #20]
	mov	w28, #3
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	and	w8, w26, #0xf0
	str	x8, [sp]
	mov	w0, #5
	mov	x1, x19
	mov	x2, x21
	bl	_DEBUGP
	ubfx	w8, w26, #4, #1
	ubfx	w9, w26, #5, #1
	ubfx	w10, w26, #6, #1
	add	w8, w8, w9
	add	w8, w8, w10
	ubfx	w9, w26, #7, #1
	add	w8, w8, w9
	add	w25, w8, w25
	ldr	x8, [x19, #8]
	tbz	w26, #7, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w26, [x8, w25, uxtw #2]
	tst	w26, #0xf
	csel	x2, x20, x27, eq
	csinc	w23, w23, wzr, eq
	csinc	w24, w24, wzr, ne
	mov	w0, #5
	mov	x1, x19
	bl	_DEBUGP
	b	LBB0_6
LBB0_14:
	ldr	w8, [x8, #4]
	and	w8, w8, #0xf
	and	x9, x23, #0xff
	stp	x8, x9, [sp, #8]
	str	x25, [sp]
Lloh17:
	adrp	x2, l_.str.6@PAGE
Lloh18:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	w0, #5
	mov	x1, x19
	bl	_DEBUGP
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	and	w8, w8, #0xf
	add	w9, w25, w23, uxtb
	add	w8, w9, w8
	add	w8, w8, #1
	ldr	w9, [x19]
	cmp	w8, w9
	b.ne	LBB0_18
; %bb.15:
	tst	w24, #0xff
	b.eq	LBB0_20
; %bb.16:
Lloh19:
	adrp	x8, _IS_ANY_T0@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IS_ANY_T0@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
	mov	x1, x20
	bl	_set_bit
	tst	w23, #0xff
	b.eq	LBB0_23
; %bb.17:
	str	wzr, [x19, #24]
	b	LBB0_22
LBB0_18:
Lloh22:
	adrp	x2, l_.str.7@PAGE
Lloh23:
	add	x2, x2, l_.str.7@PAGEOFF
LBB0_19:
	mov	w0, #5
	mov	x1, x19
	bl	_DEBUGP
	mov	w0, #0
	b	LBB0_24
LBB0_20:
	mov	w0, #1
	tst	w23, #0xff
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
	b.eq	LBB0_24
; %bb.21:
	str	wzr, [x19, #24]
	str	w0, [x19, #16]
LBB0_22:
Lloh24:
	adrp	x8, _IS_ANY_T1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IS_ANY_T1@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
LBB0_23:
	mov	w0, #1
LBB0_24:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-> parse_atr: dev->atr_len = %i\n"

l_.str.1:                               ; @.str.1
	.asciz	"parse_atr: atr_len < 3\n"

	.comm	_IS_INVREV,4,2                  ; @IS_INVREV
l_.str.2:                               ; @.str.2
	.asciz	"Card says FiDi is 0x%.2x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Yi=%.2x\n"

l_.str.4:                               ; @.str.4
	.asciz	"card is capable of T=1\n"

l_.str.5:                               ; @.str.5
	.asciz	"card is capable of T=0\n"

l_.str.6:                               ; @.str.6
	.asciz	"ix=%d noHist=%d any_t1=%d\n"

l_.str.7:                               ; @.str.7
	.asciz	"length error\n"

	.comm	_IS_ANY_T0,4,2                  ; @IS_ANY_T0
	.comm	_IS_ANY_T1,4,2                  ; @IS_ANY_T1
	.comm	_IS_BAD_CSUM,4,2                ; @IS_BAD_CSUM
	.comm	_i,8,3                          ; @i
	.no_dead_strip	_parse_atr
.subsections_via_symbols
