	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_update_card                ## -- Begin function ssh_update_card
	.p2align	4, 0x90
_ssh_update_card:                       ## @ssh_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, %r12d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%edi, %r13d
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	orl	%r8d, %r15d
	jne	LBB0_1
## %bb.2:
	movq	_SSH_AGENTC_ADD_SMARTCARD_KEY@GOTPCREL(%rip), %rax
	testl	%esi, %esi
	je	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED@GOTPCREL(%rip), %rax
	testl	%esi, %esi
	jne	LBB0_5
LBB0_4:
	movq	_SSH_AGENTC_REMOVE_SMARTCARD_KEY@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
	movl	%ebx, -44(%rbp)
	xorl	%eax, %eax
	callq	_sshbuf_new
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_sshbuf_put_u8
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_sshbuf_put_cstring
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.9:
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_sshbuf_put_cstring
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_10
LBB0_15:
	movq	%r14, %rdi
	callq	_sshbuf_free
	jmp	LBB0_16
LBB0_6:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_encode_constraints
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
LBB0_12:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movq	%r14, %rdx
	callq	_ssh_request_reply
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_sshbuf_get_u8
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movl	-44(%rbp), %edi
	callq	_decode_reply
	movl	%eax, %r13d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED,4,2 ## @SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED
	.comm	_SSH_AGENTC_ADD_SMARTCARD_KEY,4,2 ## @SSH_AGENTC_ADD_SMARTCARD_KEY
	.comm	_SSH_AGENTC_REMOVE_SMARTCARD_KEY,4,2 ## @SSH_AGENTC_REMOVE_SMARTCARD_KEY
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_update_card                ; -- Begin function ssh_update_card
	.p2align	2
_ssh_update_card:                       ; @ssh_update_card
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x25, x2
	mov	x20, x0
	orr	w26, w5, w4
Lloh0:
	adrp	x8, _SSH_AGENTC_REMOVE_SMARTCARD_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_AGENTC_REMOVE_SMARTCARD_KEY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED@GOTPAGEOFF]
Lloh4:
	adrp	x10, _SSH_AGENTC_ADD_SMARTCARD_KEY@GOTPAGE
Lloh5:
	ldr	x10, [x10, _SSH_AGENTC_ADD_SMARTCARD_KEY@GOTPAGEOFF]
	cmp	w26, #0
	csel	x9, x10, x9, eq
	cmp	w1, #0
	csel	x8, x8, x9, eq
	ldr	w24, [x8]
	str	w24, [sp, #12]
	bl	_sshbuf_new
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x1, x24
	bl	_sshbuf_put_u8
	mov	x24, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x25
	bl	_sshbuf_put_cstring
	mov	x24, x0
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x23
	bl	_sshbuf_put_cstring
	mov	x24, x0
	cbz	w0, LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_sshbuf_free
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
LBB0_6:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	cbz	w26, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	w3, #0
	bl	_encode_constraints
	mov	x24, x0
	cbnz	w0, LBB0_4
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x19
	bl	_ssh_request_reply
	mov	x24, x0
	cbnz	w0, LBB0_4
; %bb.10:
	add	x1, sp, #12
	mov	x0, x19
	bl	_sshbuf_get_u8
	mov	x24, x0
	cbnz	w0, LBB0_4
; %bb.11:
	ldr	w0, [sp, #12]
	bl	_decode_reply
	mov	x24, x0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED,4,2 ; @SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED
	.comm	_SSH_AGENTC_ADD_SMARTCARD_KEY,4,2 ; @SSH_AGENTC_ADD_SMARTCARD_KEY
	.comm	_SSH_AGENTC_REMOVE_SMARTCARD_KEY,4,2 ; @SSH_AGENTC_REMOVE_SMARTCARD_KEY
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols
