	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_card
_update_card:                           ## @update_card
	.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	%rdx, %r14
	movl	%esi, %ebx
	movl	%edi, %r12d
	testl	%esi, %esi
	je	LBB0_1
## %bb.4:
	movq	_RP_ALLOW_STDIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_read_passphrase
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_2
## %bb.5:
	movl	$-1, %ebx
	jmp	LBB0_8
LBB0_1:
	xorl	%r15d, %r15d
LBB0_2:
	testq	%r15, %r15
	leaq	L_.str.1(%rip), %rcx
	cmovneq	%r15, %rcx
	movq	_lifetime@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_confirm@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_ssh_update_card
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	testl	%ebx, %ebx
	leaq	L_.str.7(%rip), %rcx
	leaq	L_.str.6(%rip), %rbx
	cmoveq	%rcx, %rbx
	movl	%eax, %edi
	callq	_ssh_err
	leaq	L_.str.5(%rip), %rsi
	movl	%r12d, %edi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %ebx
	jmp	LBB0_7
LBB0_3:
	testl	%ebx, %ebx
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r12d, %edi
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_7:
	movq	%r15, %rdi
	callq	_free
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter passphrase for PKCS#11: "

	.comm	_RP_ALLOW_STDIN,4,2             ## @RP_ALLOW_STDIN
L_.str.1:                               ## @.str.1
	.space	1

	.comm	_lifetime,4,2                   ## @lifetime
	.comm	_confirm,4,2                    ## @confirm
	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"Card %s: %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"added"

L_.str.4:                               ## @.str.4
	.asciz	"removed"

L_.str.5:                               ## @.str.5
	.asciz	"Could not %s card \"%s\": %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"add"

L_.str.7:                               ## @.str.7
	.asciz	"remove"

	.no_dead_strip	_update_card
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_card
_update_card:                           ; @update_card
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	mov	x22, x0
	cbz	w1, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _RP_ALLOW_STDIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RP_ALLOW_STDIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_read_passphrase
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.2:
	mov	w19, #-1
	b	LBB0_8
LBB0_3:
	mov	x20, #0
LBB0_4:
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x20, #0
	csel	x3, x8, x20, eq
Lloh7:
	adrp	x8, _lifetime@GOTPAGE
Lloh8:
	ldr	x8, [x8, _lifetime@GOTPAGEOFF]
Lloh9:
	ldr	w4, [x8]
Lloh10:
	adrp	x8, _confirm@GOTPAGE
Lloh11:
	ldr	x8, [x8, _confirm@GOTPAGEOFF]
Lloh12:
	ldr	w5, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	bl	_ssh_update_card
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	cbz	w0, LBB0_6
; %bb.5:
Lloh16:
	adrp	x8, l_.str.6@PAGE
Lloh17:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh18:
	adrp	x9, l_.str.7@PAGE
Lloh19:
	add	x9, x9, l_.str.7@PAGEOFF
	cmp	w21, #0
	csel	x21, x9, x8, eq
	bl	_ssh_err
	str	x0, [sp]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	mov	x3, x19
	bl	_fprintf
	mov	w19, #-1
	b	LBB0_7
LBB0_6:
Lloh22:
	adrp	x8, l_.str.3@PAGE
Lloh23:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh24:
	adrp	x9, l_.str.4@PAGE
Lloh25:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	w21, #0
	csel	x2, x9, x8, eq
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x3, x19
	bl	_fprintf
	mov	w19, #0
LBB0_7:
	mov	x0, x20
	bl	_free
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter passphrase for PKCS#11: "

	.comm	_RP_ALLOW_STDIN,4,2             ; @RP_ALLOW_STDIN
l_.str.1:                               ; @.str.1
	.space	1

	.comm	_lifetime,4,2                   ; @lifetime
	.comm	_confirm,4,2                    ; @confirm
	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"Card %s: %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"added"

l_.str.4:                               ; @.str.4
	.asciz	"removed"

l_.str.5:                               ; @.str.5
	.asciz	"Could not %s card \"%s\": %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"add"

l_.str.7:                               ; @.str.7
	.asciz	"remove"

	.no_dead_strip	_update_card
.subsections_via_symbols
