	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scard_verify_pin
_scard_verify_pin:                      ## @scard_verify_pin
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_SIM_CMD_VERIFY_CHV1@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -53(%rbp)
	movq	$0, -52(%rbp)
	movl	$0, -44(%rbp)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %r15d
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_os_strlen
	cmpl	$8, %eax
	jg	LBB0_6
## %bb.2:
	movq	(%r14), %rax
	movq	_SCARD_USIM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_USIM_CLA@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -53(%rbp)
LBB0_4:
	leaq	-48(%rbp), %r15
	movq	%rbx, %rdi
	callq	_os_strlen
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_os_memcpy
	movq	%rbx, %rdi
	callq	_os_strlen
	cltq
	leaq	(%rax,%rbp), %r15
	addq	$-48, %r15
	movq	%rbx, %rdi
	callq	_os_strlen
	movl	$8, %edx
	subl	%eax, %edx
	movq	%r15, %rdi
	movl	$255, %esi
	callq	_os_memset
	movq	$3, -64(%rbp)
	leaq	-53(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	leaq	-64(%rbp), %r8
	movq	%r14, %rdi
	movl	$13, %edx
	callq	_scard_transmit
	movq	_SCARD_S_SUCCESS@GOTPCREL(%rip), %rcx
	movl	$-2, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	cmpq	$2, -64(%rbp)
	setne	%al
	cmpb	$-112, -56(%rbp)
	setne	%cl
	orb	%al, %cl
	cmpb	$0, -55(%rbp)
	setne	%al
	orb	%cl, %al
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %rsi
	movzbl	%al, %eax
	movl	%eax, %r15d
	negl	%r15d
	testb	%al, %al
	cmovneq	%rcx, %rsi
	cmovneq	_MSG_WARNING@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_wpa_printf
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r15d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SIM_CMD_VERIFY_CHV1,1,0        ## @SIM_CMD_VERIFY_CHV1
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCARD: verifying PIN"

	.comm	_SCARD_USIM,8,3                 ## @SCARD_USIM
	.comm	_USIM_CLA,1,0                   ## @USIM_CLA
	.comm	_SCARD_S_SUCCESS,8,3            ## @SCARD_S_SUCCESS
	.comm	_MSG_WARNING,4,2                ## @MSG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"SCARD: PIN verification failed"

L_.str.2:                               ## @.str.2
	.asciz	"SCARD: PIN verified successfully"

	.no_dead_strip	_scard_verify_pin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scard_verify_pin
_scard_verify_pin:                      ; @scard_verify_pin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	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, #24]
Lloh3:
	adrp	x8, _SIM_CMD_VERIFY_CHV1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIM_CMD_VERIFY_CHV1@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [sp, #11]
	stur	xzr, [sp, #12]
	stur	wzr, [sp, #20]
Lloh5:
	adrp	x22, _MSG_DEBUG@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	cbz	x20, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_os_strlen
	cmp	w0, #8
	b.le	LBB0_5
LBB0_2:
	mov	w19, #-1
LBB0_3:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _SCARD_USIM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SCARD_USIM@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh15:
	adrp	x8, _USIM_CLA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _USIM_CLA@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [sp, #11]
LBB0_7:
	add	x8, sp, #11
	add	x21, x8, #5
	mov	x0, x20
	bl	_os_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_os_memcpy
	mov	x0, x20
	bl	_os_strlen
	add	x21, x21, w0, sxtw
	mov	x0, x20
	bl	_os_strlen
	mov	w8, #8
	sub	w2, w8, w0
	mov	x0, x21
	mov	w1, #255
	bl	_os_memset
	mov	w8, #3
	str	x8, [sp]
	add	x1, sp, #11
	add	x3, sp, #8
	mov	x4, sp
	mov	x0, x19
	mov	w2, #13
	bl	_scard_transmit
Lloh17:
	adrp	x8, _SCARD_S_SUCCESS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SCARD_S_SUCCESS@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [sp]
	cmp	x8, #2
	ldrb	w8, [sp, #8]
	mov	w9, #144
	ccmp	w8, w9, #0, eq
	ldrb	w8, [sp, #9]
	ccmp	w8, #0, #0, eq
	cset	w8, ne
Lloh20:
	adrp	x9, l_.str.2@PAGE
Lloh21:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh22:
	adrp	x10, l_.str.1@PAGE
Lloh23:
	add	x10, x10, l_.str.1@PAGEOFF
	csel	x1, x10, x9, ne
	sbfx	w19, w8, #0, #1
Lloh24:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
	csel	x8, x8, x22, ne
	ldr	w0, [x8]
	bl	_wpa_printf
	b	LBB0_3
LBB0_9:
	mov	w19, #-2
	b	LBB0_3
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SIM_CMD_VERIFY_CHV1,1,0        ; @SIM_CMD_VERIFY_CHV1
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCARD: verifying PIN"

	.comm	_SCARD_USIM,8,3                 ; @SCARD_USIM
	.comm	_USIM_CLA,1,0                   ; @USIM_CLA
	.comm	_SCARD_S_SUCCESS,8,3            ; @SCARD_S_SUCCESS
	.comm	_MSG_WARNING,4,2                ; @MSG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"SCARD: PIN verification failed"

l_.str.2:                               ; @.str.2
	.asciz	"SCARD: PIN verified successfully"

	.no_dead_strip	_scard_verify_pin
.subsections_via_symbols
