	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_core
_write_core:                            ## @write_core
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movl	%edi, %r12d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	$0, (%rcx)
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rax
	movq	_errno@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_8 Depth 2
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_IOV_MAX@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rax
	movl	%eax, %ebx
	cmovael	%ecx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r13), %rsi
	movl	%r12d, %edi
	movl	%ebx, %edx
	callq	_writev
	movl	%eax, %r14d
	movq	(%r15), %rcx
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_EINTR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_3
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %r14d
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rax
	movl	(%rax), %edx
	cmpl	%edx, %r14d
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	subl	%edx, %r14d
	decq	%rcx
	decl	%ebx
	movl	4(%rax), %edx
	addq	$4, %rax
	cmpl	%edx, %r14d
	jg	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	movq	(%r13), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	addq	$4, %rax
	movq	%rax, (%r13)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	decq	%rax
	movq	%rax, (%rcx)
	cmpl	$1, %ebx
	je	LBB0_1
	jmp	LBB0_13
LBB0_15:
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_13
	jmp	LBB0_14
LBB0_12:
	movslq	%r14d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOV_MAX,4,2                    ## @IOV_MAX
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.no_dead_strip	_write_core
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_core
_write_core:                            ; @write_core
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	str	xzr, [x3]
	ldr	x8, [x2]
Lloh0:
	adrp	x25, _IOV_MAX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IOV_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x26, _errno@GOTPAGE
Lloh3:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
Lloh4:
	adrp	x27, _EINTR@GOTPAGE
Lloh5:
	ldr	x27, [x27, _EINTR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_7 Depth 2
	cbz	x8, LBB0_14
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrsw	x9, [x25]
	cmp	x8, x9
	csel	w23, w8, w9, lo
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x21]
	mov	x0, x22
	mov	x2, x23
	bl	_writev
	ldr	x8, [x26]
	ldr	x9, [x27]
	cmn	w0, #1
	ccmp	x8, x9, #0, eq
	b.eq	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x24, x0
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x21]
	ldr	w9, [x8]
	cmp	w24, w9
	b.le	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x10, [x20]
LBB0_7:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w24, w24, w9
	ldr	w9, [x8, #4]!
	sub	x10, x10, #1
	sub	w23, w23, #1
	cmp	w24, w9
	b.gt	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	str	x8, [x21]
	str	x10, [x20]
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmp	w23, #0
	cset	w0, gt
	bl	_assert
	ldr	x8, [x21]
	ldr	w9, [x8]
	cmp	w9, w24
	b.ne	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	add	x8, x8, #4
	str	x8, [x21]
	ldr	x8, [x20]
	sub	x8, x8, #1
	str	x8, [x20]
	cmp	w23, #1
	b.eq	LBB0_1
	b	LBB0_14
LBB0_11:
Lloh6:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.12:
	mov	w0, #-1
	b	LBB0_15
LBB0_13:
	sxtw	x8, w24
	str	x8, [x19]
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IOV_MAX,4,2                    ; @IOV_MAX
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.no_dead_strip	_write_core
.subsections_via_symbols
