	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_agent_sign                 ## -- Begin function ssh_agent_sign
	.p2align	4, 0x90
_ssh_agent_sign:                        ## @ssh_agent_sign
	.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
	movq	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, (%rdx)
	movq	$0, (%rcx)
	movq	_SSH_KEY_MAX_SIGN_DATA_SIZE@GOTPCREL(%rip), %rax
	cmpq	%r9, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_19
LBB0_2:
	movq	%r9, %r13
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rsi, %r15
	movl	%edi, -72(%rbp)                 ## 4-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_sshbuf_new
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	16(%rbp), %rsi
	movq	%r15, %rdi
	callq	_agent_encode_alg
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	_SSH2_AGENTC_SIGN_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_sshbuf_put_u8
	movq	%r12, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.5:
	movq	%r15, %rdi
	movq	%rdx, %rsi
	movq	%rdx, %r15
	callq	_sshkey_puts
	movq	%r15, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.6:
	movq	%rdx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_sshbuf_put_string
	movq	%r15, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.7:
	movq	%rdx, %rdi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	callq	_sshbuf_put_u32
	movq	%r15, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.8:
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	movq	%rdx, %rsi
	movq	%r15, %rdx
	callq	_ssh_request_reply
	movq	%r15, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.9:
	leaq	-64(%rbp), %rsi
	movq	%rdx, %rdi
	callq	_sshbuf_get_u8
	movq	%r15, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.10:
	movq	%rdx, %r14
	movq	-64(%rbp), %rdi
	callq	_agent_failed
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	_SSH_ERR_AGENT_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_3:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_19
LBB0_13:
	movq	-64(%rbp), %rax
	movq	_SSH2_AGENT_SIGN_RESPONSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.15:
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_sshbuf_get_string
	movq	%r14, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:
	movq	-56(%rbp), %rdi
	movq	-48(%rbp), %rsi
	movq	%rdx, %r14
	movq	16(%rbp), %rdx
	callq	_sshkey_check_sigtype
	movq	%r14, %rdx
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movq	-56(%rbp), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-48(%rbp), %rax
	movq	%rax, (%rbx)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	xorl	%r12d, %r12d
	jmp	LBB0_18
LBB0_14:
	movq	_SSH_ERR_INVALID_FORMAT@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %r12d
	movq	%r14, %rdx
LBB0_18:
	movq	-56(%rbp), %rdi
	movq	-48(%rbp), %rsi
	movq	%rdx, %rbx
	callq	_freezero
	movq	%rbx, %rdi
	callq	_sshbuf_free
LBB0_19:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_KEY_MAX_SIGN_DATA_SIZE,8,3 ## @SSH_KEY_MAX_SIGN_DATA_SIZE
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSH2_AGENTC_SIGN_REQUEST,4,2   ## @SSH2_AGENTC_SIGN_REQUEST
	.comm	_SSH_ERR_AGENT_FAILURE,4,2      ## @SSH_ERR_AGENT_FAILURE
	.comm	_SSH2_AGENT_SIGN_RESPONSE,8,3   ## @SSH2_AGENT_SIGN_RESPONSE
	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ## @SSH_ERR_INVALID_FORMAT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_agent_sign                 ; -- Begin function ssh_agent_sign
	.p2align	2
_ssh_agent_sign:                        ; @ssh_agent_sign
	.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
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #8]
	str	xzr, [x2]
	str	xzr, [x3]
Lloh0:
	adrp	x8, _SSH_KEY_MAX_SIGN_DATA_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_KEY_MAX_SIGN_DATA_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x5
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	b	LBB0_19
LBB0_2:
	mov	x22, x6
	mov	x25, x5
	mov	x26, x4
	mov	x20, x3
	mov	x21, x2
	mov	x27, x1
	mov	x24, x0
	bl	_sshbuf_new
	cbz	x0, LBB0_11
; %bb.3:
	mov	x19, x0
	mov	x0, x27
	mov	x1, x22
	bl	_agent_encode_alg
	mov	x28, x0
Lloh6:
	adrp	x8, _SSH2_AGENTC_SIGN_REQUEST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSH2_AGENTC_SIGN_REQUEST@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sshbuf_put_u8
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.4:
	mov	x0, x27
	mov	x1, x19
	bl	_sshkey_puts
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.5:
	mov	x0, x19
	mov	x1, x26
	mov	x2, x25
	bl	_sshbuf_put_string
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.6:
	mov	x0, x19
	mov	x1, x28
	bl	_sshbuf_put_u32
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.7:
	mov	x0, x24
	mov	x1, x19
	mov	x2, x19
	bl	_ssh_request_reply
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.8:
	add	x1, sp, #16
	mov	x0, x19
	bl	_sshbuf_get_u8
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.9:
	ldr	x0, [sp, #16]
	bl	_agent_failed
	cbz	x0, LBB0_12
; %bb.10:
Lloh9:
	adrp	x8, _SSH_ERR_AGENT_FAILURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSH_ERR_AGENT_FAILURE@GOTPAGEOFF]
	b	LBB0_17
LBB0_11:
Lloh11:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	b	LBB0_19
LBB0_12:
	ldr	x8, [sp, #16]
Lloh14:
	adrp	x9, _SSH2_AGENT_SIGN_RESPONSE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SSH2_AGENT_SIGN_RESPONSE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.13:
	add	x1, sp, #24
	add	x2, sp, #8
	mov	x0, x19
	bl	_sshbuf_get_string
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.14:
	ldr	x0, [sp, #24]
	ldr	x1, [sp, #8]
	mov	x2, x22
	bl	_sshkey_check_sigtype
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.15:
	ldr	x8, [sp, #24]
	str	x8, [x21]
	ldr	x8, [sp, #8]
	str	x8, [x20]
	str	xzr, [sp, #24]
	str	xzr, [sp, #8]
	b	LBB0_18
LBB0_16:
Lloh17:
	adrp	x8, _SSH_ERR_INVALID_FORMAT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SSH_ERR_INVALID_FORMAT@GOTPAGEOFF]
LBB0_17:
	ldr	w23, [x8]
LBB0_18:
	ldr	x0, [sp, #24]
	ldr	x1, [sp, #8]
	bl	_freezero
	mov	x0, x19
	bl	_sshbuf_free
LBB0_19:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_KEY_MAX_SIGN_DATA_SIZE,8,3 ; @SSH_KEY_MAX_SIGN_DATA_SIZE
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSH2_AGENTC_SIGN_REQUEST,4,2   ; @SSH2_AGENTC_SIGN_REQUEST
	.comm	_SSH_ERR_AGENT_FAILURE,4,2      ; @SSH_ERR_AGENT_FAILURE
	.comm	_SSH2_AGENT_SIGN_RESPONSE,8,3   ; @SSH2_AGENT_SIGN_RESPONSE
	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ; @SSH_ERR_INVALID_FORMAT
.subsections_via_symbols
