	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_resfile
_create_resfile:                        ## @create_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_S_IRGRP@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_S_IROTH@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.3:
	movl	%eax, %r13d
	movl	%eax, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movq	%r12, %rcx
	callq	_write_resfile
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_close
	testq	%r12, %r12
	jne	LBB0_8
	jmp	LBB0_9
LBB0_4:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movq	%r12, %rcx
	callq	_write_resfile
	jmp	LBB0_7
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	callq	_atf_libc_error
LBB0_7:
	movl	%eax, %ebx
	testq	%r12, %r12
	je	LBB0_9
LBB0_8:
	movq	%r12, %rdi
	callq	_atf_dynstr_fini
LBB0_9:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_check_fatal_error              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/stdout"

	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
L_.str.1:                               ## @.str.1
	.asciz	"/dev/stderr"

	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_S_IRGRP,4,2                    ## @S_IRGRP
	.comm	_S_IROTH,4,2                    ## @S_IROTH
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"Cannot create results file '%s'"

	.no_dead_strip	_create_resfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_resfile
_create_resfile:                        ; @create_resfile
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.2:
Lloh4:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _O_TRUNC@GOTPAGE
Lloh11:
	ldr	x10, [x10, _O_TRUNC@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh12:
	ldr	w9, [x10]
	orr	w1, w8, w9
Lloh13:
	adrp	x8, _S_IRUSR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _S_IRUSR@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _S_IRGRP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _S_IRGRP@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _S_IROTH@GOTPAGE
Lloh23:
	ldr	x9, [x9, _S_IROTH@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x22
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.3:
	mov	x23, x0
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_write_resfile
	mov	x20, x0
	mov	x0, x23
	bl	_close
	cbnz	x19, LBB0_7
	b	LBB0_8
LBB0_4:
Lloh25:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh27:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_write_resfile
	mov	x20, x0
	cbz	x19, LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_atf_dynstr_fini
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_check_fatal_error
LBB0_9:
Lloh29:
	adrp	x8, _errno@GOTPAGE
Lloh30:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x22
	bl	_atf_libc_error
	mov	x20, x0
	cbnz	x19, LBB0_7
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/stdout"

	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
l_.str.1:                               ; @.str.1
	.asciz	"/dev/stderr"

	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_S_IRGRP,4,2                    ; @S_IRGRP
	.comm	_S_IROTH,4,2                    ; @S_IROTH
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"Cannot create results file '%s'"

	.no_dead_strip	_create_resfile
.subsections_via_symbols
