	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_resfile
_write_resfile:                         ## @write_resfile
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movl	%edi, -196(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$-1, %edx
	sete	%al
	testq	%rcx, %rcx
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_INV
	movq	%rbx, -192(%rbp)
	movq	%rbx, -216(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_strlen
	movl	%eax, -184(%rbp)
	testq	%r15, %r15
	movq	%r15, -208(%rbp)                ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	cmpl	$-1, %r14d
	je	LBB0_3
## %bb.4:
	leaq	-112(%rbp), %rdi
	movq	%rdi, -176(%rbp)
	leaq	L_.str(%rip), %rdx
	movl	$64, %esi
	movl	%r14d, %ecx
	callq	_snprintf
	movl	%eax, -168(%rbp)
	movl	$2, %r13d
	jmp	LBB0_5
LBB0_1:
	movl	$1, %r13d
	jmp	LBB0_6
LBB0_3:
	movl	$1, %r13d
LBB0_5:
	movl	%r13d, %ebx
	shlq	$4, %rbx
	leaq	_write_resfile.CS(%rip), %rax
	movq	%rax, -192(%rbp,%rbx)
	movl	$2, -184(%rbp,%rbx)
	movq	%r15, %rdi
	callq	_atf_dynstr_cstring
	movq	%rax, -176(%rbp,%rbx)
	movq	%rax, %rdi
	callq	_strlen
	addl	$2, %r13d
	movl	%eax, -168(%rbp,%rbx)
LBB0_6:
	movl	%r13d, %eax
	shlq	$4, %rax
	leaq	_write_resfile.NL(%rip), %rcx
	movq	%rcx, -192(%rbp,%rax)
	incl	%r13d
	movl	$1, -184(%rbp,%rax)
	leaq	-192(%rbp), %r14
	movq	_errno@GOTPCREL(%rip), %r15
	movq	_EINTR@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	-196(%rbp), %edi                ## 4-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_writev
	movq	(%r15), %rbx
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	(%r12), %rbx
	je	LBB0_7
LBB0_9:
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_atf_no_error
	jmp	LBB0_15
LBB0_11:
	movq	-208(%rbp), %rdi                ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.13:
	callq	_atf_dynstr_cstring
	movq	%rax, %rcx
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.2(%rip), %rcx
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	-216(%rbp), %rdx                ## 8-byte Reload
	callq	_atf_libc_error
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
_write_resfile.NL:                      ## @write_resfile.NL
	.asciz	"\n"

_write_resfile.CS:                      ## @write_resfile.CS
	.asciz	": "

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d)"

	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write results file; result %s, reason %s"

L_.str.2:                               ## @.str.2
	.asciz	"null"

	.no_dead_strip	_write_resfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_resfile
_write_resfile:                         ; @write_resfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	cmn	w2, #1
	ccmp	x3, #0, #0, ne
	cset	w0, ne
	bl	_INV
	str	x19, [sp, #8]
	mov	x0, x19
	bl	_strlen
	str	w0, [sp, #16]
	mov	w24, #1
	cbz	x20, LBB0_3
; %bb.1:
	cmn	w22, #1
	b.eq	LBB0_4
; %bb.2:
	add	x8, sp, #88
	str	x8, [sp, #24]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #88
	mov	w1, #64
	mov	x3, x22
	bl	_snprintf
	str	w0, [sp, #32]
	mov	w22, #2
	b	LBB0_5
LBB0_3:
	mov	w8, #1
	b	LBB0_6
LBB0_4:
	mov	w22, #1
LBB0_5:
	add	x23, sp, #8
	add	x8, x23, w22, uxtw #4
Lloh5:
	adrp	x9, _write_resfile.CS@PAGE
Lloh6:
	add	x9, x9, _write_resfile.CS@PAGEOFF
	str	x9, [x8]
	add	w25, w22, #1
	mov	w9, #2
	str	w9, [x8, #8]
	mov	x0, x20
	bl	_atf_dynstr_cstring
	add	x23, x23, w25, uxtw #4
	str	x0, [x23]
	bl	_strlen
	add	w8, w22, #2
	str	w0, [x23, #8]
LBB0_6:
	add	x9, sp, #8
	add	x9, x9, w8, uxtw #4
Lloh7:
	adrp	x10, _write_resfile.NL@PAGE
Lloh8:
	add	x10, x10, _write_resfile.NL@PAGEOFF
	str	x10, [x9]
	add	w23, w8, #1
	str	w24, [x9, #8]
Lloh9:
	adrp	x24, _errno@GOTPAGE
Lloh10:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
Lloh11:
	adrp	x25, _EINTR@GOTPAGE
Lloh12:
	ldr	x25, [x25, _EINTR@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x23
	bl	_writev
	ldr	x22, [x24]
	ldr	x8, [x25]
	cmn	w0, #1
	ccmp	x22, x8, #0, eq
	b.eq	LBB0_7
; %bb.8:
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.9:
	bl	_atf_no_error
	b	LBB0_14
LBB0_10:
	cbz	x20, LBB0_12
; %bb.11:
	mov	x0, x20
	bl	_atf_dynstr_cstring
	mov	x3, x0
	b	LBB0_13
LBB0_12:
Lloh13:
	adrp	x3, l_.str.2@PAGE
Lloh14:
	add	x3, x3, l_.str.2@PAGEOFF
LBB0_13:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x19
	bl	_atf_libc_error
LBB0_14:
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
_write_resfile.NL:                      ; @write_resfile.NL
	.asciz	"\n"

_write_resfile.CS:                      ; @write_resfile.CS
	.asciz	": "

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d)"

	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write results file; result %s, reason %s"

l_.str.2:                               ; @.str.2
	.asciz	"null"

	.no_dead_strip	_write_resfile
.subsections_via_symbols
