	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb_smb_write
_smb_smb_write:                         ## @smb_smb_write
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rdi, %r14
	movl	%esi, -68(%rbp)
	cmpl	$0, (%rdx)
	je	LBB0_2
## %bb.1:
	movl	%esi, %ebx
	movq	%r14, %rdi
	callq	_SSTOVC
	movq	_SMB_CAP_LARGE_WRITEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_2
## %bb.10:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	%r13, %r9
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_smb_smb_writex                 ## TAILCALL
LBB0_2:
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_SSTOVC
	movl	(%rax), %eax
	movq	_SMB_HDRLEN@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	cmpl	$65551, %eax                    ## imm = 0x1000F
	movl	$65551, %edi                    ## imm = 0x1000F
	cmovll	%eax, %edi
	addl	$-16, %edi
	movl	(%r15), %esi
	callq	_min
	movl	%eax, %r12d
	movl	%eax, (%r15)
	movl	%eax, -60(%rbp)
	movq	%r14, %rdi
	callq	_SSTOCP
	movq	_SMB_COM_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-48(%rbp), %rcx
	movl	%eax, %edi
	movq	%r13, %rdx
	callq	_smb_rq_alloc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_smb_rq_getrequest
	movq	-48(%rbp), %rdi
	callq	_smb_rq_wstart
	movq	-56(%rbp), %rdi
	leaq	-68(%rbp), %rsi
	movq	_MB_MSYSTEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$4, %edx
	callq	_mb_put_mem
	movq	-56(%rbp), %rdi
	movl	%r12d, %esi
	callq	_mb_put_uint16le
	movq	-56(%rbp), %rdi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %esi
	callq	_mb_put_uint32le
	movq	-56(%rbp), %rbx
	movl	(%r14), %edi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_min
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mb_put_uint16le
	movq	-48(%rbp), %rdi
	callq	_smb_rq_wend
	movq	-48(%rbp), %rdi
	callq	_smb_rq_bstart
	movq	-56(%rbp), %rdi
	movq	_SMB_DT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mb_put_uint8
	movq	-56(%rbp), %rdi
	movl	%r12d, %esi
	callq	_mb_put_uint16le
	movq	-56(%rbp), %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_mb_put_uio
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movq	-48(%rbp), %rdi
	callq	_smb_rq_bend
	movq	-48(%rbp), %rdi
	callq	_smb_rq_simple
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	-48(%rbp), %rdi
	leaq	-88(%rbp), %rsi
	callq	_smb_rq_getreply
	movq	-88(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_md_get_uint8
	cmpl	$1, -64(%rbp)
	jne	LBB0_6
## %bb.7:
	movq	-88(%rbp), %rdi
	leaq	-60(%rbp), %rsi
	callq	_md_get_uint16le
	movl	-60(%rbp), %eax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	movq	_EBADRPC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movq	-48(%rbp), %rdi
	callq	_smb_rq_done
LBB0_9:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMB_CAP_LARGE_WRITEX,4,2       ## @SMB_CAP_LARGE_WRITEX
	.comm	_SMB_HDRLEN,4,2                 ## @SMB_HDRLEN
	.comm	_SMB_COM_WRITE,4,2              ## @SMB_COM_WRITE
	.comm	_MB_MSYSTEM,4,2                 ## @MB_MSYSTEM
	.comm	_SMB_DT_DATA,4,2                ## @SMB_DT_DATA
	.comm	_EBADRPC,4,2                    ## @EBADRPC
	.no_dead_strip	_smb_smb_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb_smb_write
_smb_smb_write:                         ; @smb_smb_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x5
	mov	x20, x4
	mov	x19, x3
	mov	x23, x2
	mov	x24, x0
	str	w1, [sp, #44]
	ldr	w8, [x2]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x21, x1
	mov	x0, x24
	bl	_SSTOVC
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x9, _SMB_CAP_LARGE_WRITEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SMB_CAP_LARGE_WRITEX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x23
	mov	x3, x19
	mov	x4, x20
	mov	x5, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_smb_smb_writex
LBB0_3:
	mov	x0, x24
	bl	_SSTOVC
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _SMB_HDRLEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SMB_HDRLEN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mov	w10, #15
	movk	w10, #1, lsl #16
	sub	w8, w8, w9
	cmp	w8, w10
	csel	w8, w8, w10, lt
	sub	w0, w8, #16
	ldr	w1, [x23]
	bl	_min
	mov	x21, x0
	str	w0, [x23]
	str	w0, [sp, #12]
	mov	x0, x24
	bl	_SSTOCP
Lloh6:
	adrp	x8, _SMB_COM_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMB_COM_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x3, sp, #32
	mov	x2, x22
	bl	_smb_rq_alloc
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.4:
	ldr	x0, [sp, #32]
	add	x1, sp, #24
	bl	_smb_rq_getrequest
	ldr	x0, [sp, #32]
	bl	_smb_rq_wstart
	ldr	x0, [sp, #24]
Lloh9:
	adrp	x8, _MB_MSYSTEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MB_MSYSTEM@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	add	x1, sp, #44
	mov	w2, #4
	bl	_mb_put_mem
	ldr	x0, [sp, #24]
	mov	x1, x21
	bl	_mb_put_uint16le
	ldr	x0, [sp, #24]
	ldr	w1, [x20, #4]
	bl	_mb_put_uint32le
	ldr	x22, [sp, #24]
	ldr	w0, [x20]
	mov	w1, #65535
	bl	_min
	mov	x1, x0
	mov	x0, x22
	bl	_mb_put_uint16le
	ldr	x0, [sp, #32]
	bl	_smb_rq_wend
	ldr	x0, [sp, #32]
	bl	_smb_rq_bstart
	ldr	x0, [sp, #24]
Lloh12:
	adrp	x8, _SMB_DT_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SMB_DT_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_mb_put_uint8
	ldr	x0, [sp, #24]
	mov	x1, x21
	bl	_mb_put_uint16le
	ldr	x0, [sp, #24]
	mov	x1, x20
	mov	x2, x21
	bl	_mb_put_uio
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	x0, [sp, #32]
	bl	_smb_rq_bend
	ldr	x0, [sp, #32]
	bl	_smb_rq_simple
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.6:
	ldr	x0, [sp, #32]
	add	x1, sp, #16
	bl	_smb_rq_getreply
	ldr	x0, [sp, #16]
	add	x1, sp, #8
	bl	_md_get_uint8
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.7:
	ldr	x0, [sp, #16]
	add	x1, sp, #12
	bl	_md_get_uint16le
	mov	w22, #0
	ldr	w8, [sp, #12]
	str	w8, [x19]
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _EBADRPC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBADRPC@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
LBB0_9:
	ldr	x0, [sp, #32]
	bl	_smb_rq_done
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SMB_CAP_LARGE_WRITEX,4,2       ; @SMB_CAP_LARGE_WRITEX
	.comm	_SMB_HDRLEN,4,2                 ; @SMB_HDRLEN
	.comm	_SMB_COM_WRITE,4,2              ; @SMB_COM_WRITE
	.comm	_MB_MSYSTEM,4,2                 ; @MB_MSYSTEM
	.comm	_SMB_DT_DATA,4,2                ; @SMB_DT_DATA
	.comm	_EBADRPC,4,2                    ; @EBADRPC
	.no_dead_strip	_smb_smb_write
.subsections_via_symbols
