	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pdu_send                       ## -- Begin function pdu_send
	.p2align	4, 0x90
_pdu_send:                              ## @pdu_send
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$0, -84(%rbp)
	movq	24(%rdi), %r15
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	sete	%dil
	callq	_assert
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_pdu_set_data_segment_length
	movq	16(%rbx), %rax
	movq	%rax, -72(%rbp)
	movl	$4, -80(%rbp)
	movl	(%rbx), %r14d
	testl	%r14d, %r14d
	jle	LBB0_1
## %bb.2:
	movq	8(%rbx), %rax
	movq	%rax, -56(%rbp)
	movl	%r14d, -64(%rbp)
	addl	$4, %r14d
	movq	%rbx, %rdi
	callq	_pdu_padding
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	$4, %rax
	setb	%dil
	callq	_assert
	leaq	-84(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	%ebx, -48(%rbp)
	addl	%ebx, %r14d
	movl	$3, %edx
	jmp	LBB0_5
LBB0_1:
	movl	$1, %edx
	movl	$4, %r14d
	jmp	LBB0_5
LBB0_3:
	movl	$2, %edx
LBB0_5:
	movl	(%r15), %edi
	leaq	-80(%rbp), %rsi
	callq	_writev
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.9:
	cmpl	%r14d, %ebx
	je	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_log_errx
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	callq	_timed_out
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_log_errx
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_log_err
	cmpl	%r14d, %ebx
	jne	LBB0_10
	jmp	LBB0_11
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"exiting due to timeout"

L_.str.1:                               ## @.str.1
	.asciz	"writev"

L_.str.2:                               ## @.str.2
	.asciz	"short write"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pdu_send                       ; -- Begin function pdu_send
	.p2align	2
_pdu_send:                              ; @pdu_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	wzr, [sp, #4]
	ldr	x21, [x0, #24]
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w1, [x19]
	mov	x0, x19
	bl	_pdu_set_data_segment_length
	ldr	x8, [x19, #16]
	str	x8, [sp, #16]
	mov	w20, #4
	str	w20, [sp, #8]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x19, #8]
	str	x9, [sp, #32]
	str	w8, [sp, #24]
	add	w20, w8, #4
	mov	x0, x19
	bl	_pdu_padding
	cbz	x0, LBB0_4
; %bb.2:
	mov	x19, x0
	cmp	x0, #4
	cset	w0, lo
	bl	_assert
	add	x8, sp, #4
	str	x8, [sp, #48]
	str	w19, [sp, #40]
	add	w20, w20, w19
	mov	w2, #3
	b	LBB0_5
LBB0_3:
	mov	w2, #1
	b	LBB0_5
LBB0_4:
	mov	w2, #2
LBB0_5:
	ldr	w0, [x21]
	add	x1, sp, #8
	bl	_writev
	mov	x19, x0
	tbnz	w0, #31, LBB0_10
; %bb.6:
	cmp	w19, w20
	b.eq	LBB0_8
LBB0_7:
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.9:
	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
	add	sp, sp, #112
	ret
LBB0_10:
	bl	_timed_out
	cbz	x0, LBB0_12
; %bb.11:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_12:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_log_err
	cmp	w19, w20
	b.ne	LBB0_7
	b	LBB0_8
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"exiting due to timeout"

l_.str.1:                               ; @.str.1
	.asciz	"writev"

l_.str.2:                               ; @.str.2
	.asciz	"short write"

.subsections_via_symbols
