	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_loopback_write_open            ## -- Begin function loopback_write_open
	.p2align	4, 0x90
_loopback_write_open:                   ## @loopback_write_open
	.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	(%rdi), %rbx
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.2:
	leaq	-48(%rbp), %rdi
	callq	_time
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	movl	$9999, %esi                     ## imm = 0x270F
	callq	_get_random_num
	leaq	8(%rbx), %r15
	movl	4(%r13), %edx
	movq	_LOOPBACK_FILE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	-48(%rbp), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %r9d
	callq	_hc_asprintf
	leaq	12(%rbx), %rdi
	movl	8(%rbx), %esi
	leaq	L_.str.1(%rip), %rdx
	callq	_hc_fopen
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	$1, 4(%rbx)
	jmp	LBB0_5
LBB0_3:
	movl	(%r15), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_event_log_error
	movl	$-1, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s.%d_%u"

	.comm	_LOOPBACK_FILE,4,2              ## @LOOPBACK_FILE
L_.str.1:                               ## @.str.1
	.asciz	"ab"

L_.str.2:                               ## @.str.2
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_loopback_write_open            ; -- Begin function loopback_write_open
	.p2align	2
_loopback_write_open:                   ; @loopback_write_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x21, [x0]
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	w8, [x22]
	cbz	w8, LBB0_4
; %bb.2:
	add	x0, sp, #8
	bl	_time
	mov	w0, #0
	mov	w1, #9999
	bl	_get_random_num
	mov	x5, x0
	add	x20, x21, #8
	ldr	w2, [x22, #4]
Lloh0:
	adrp	x8, _LOOPBACK_FILE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOOPBACK_FILE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	ldr	w4, [sp, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_hc_asprintf
	add	x0, x21, #12
	ldr	w1, [x21, #8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_hc_fopen
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x21, #4]
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w20, [x20]
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_event_log_error
	mov	w0, #-1
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s.%d_%u"

	.comm	_LOOPBACK_FILE,4,2              ; @LOOPBACK_FILE
l_.str.1:                               ; @.str.1
	.asciz	"ab"

l_.str.2:                               ; @.str.2
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
