	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function child
_child:                                 ## @child
	.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
	movl	$1, %edi
	callq	_sleep
	movq	_NLINES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.1:
	xorl	%r14d, %r14d
	movq	_O_WRONLY@GOTPCREL(%rip), %r13
	movq	_O_APPEND@GOTPCREL(%rip), %r15
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_close
	movl	$1, %edi
	callq	_sleep
	incl	%r14d
	movq	_NLINES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FILENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	orl	(%r13), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_write
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_err
	jmp	LBB0_6
LBB0_7:
	xorl	%edi, %edi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.comm	_NLINES,4,2                     ## @NLINES
	.comm	_FILENAME,4,2                   ## @FILENAME
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_APPEND,4,2                   ## @O_APPEND
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open()"

L_.str.1:                               ## @.str.1
	.asciz	"foo\n"

L_.str.2:                               ## @.str.2
	.asciz	"write()"

	.no_dead_strip	_child
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function child
_child:                                 ; @child
	.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	w0, #1
	bl	_sleep
Lloh0:
	adrp	x23, _NLINES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NLINES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w24, #0
Lloh2:
	adrp	x25, _FILENAME@GOTPAGE
Lloh3:
	ldr	x25, [x25, _FILENAME@GOTPAGEOFF]
Lloh4:
	adrp	x26, _O_WRONLY@GOTPAGE
Lloh5:
	ldr	x26, [x26, _O_WRONLY@GOTPAGEOFF]
Lloh6:
	adrp	x27, _O_APPEND@GOTPAGE
Lloh7:
	ldr	x27, [x27, _O_APPEND@GOTPAGEOFF]
Lloh8:
	adrp	x19, l_.str@PAGE
Lloh9:
	add	x19, x19, l_.str@PAGEOFF
Lloh10:
	adrp	x28, _EXIT_FAILURE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _EXIT_FAILURE@GOTPAGEOFF]
Lloh12:
	adrp	x20, l_.str.1@PAGE
Lloh13:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh14:
	adrp	x21, l_.str.2@PAGE
Lloh15:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_close
	mov	w0, #1
	bl	_sleep
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w1, w9, w8
	mov	w2, #420
	bl	_open
	mov	x22, x0
	tbz	w0, #31, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x28]
	mov	x1, x19
	bl	_err
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x20
	mov	w2, #4
	bl	_write
	tbz	w0, #31, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x28]
	mov	x1, x21
	bl	_err
	b	LBB0_2
LBB0_7:
	mov	w0, #0
	bl	__exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_NLINES,4,2                     ; @NLINES
	.comm	_FILENAME,4,2                   ; @FILENAME
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_APPEND,4,2                   ; @O_APPEND
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open()"

l_.str.1:                               ; @.str.1
	.asciz	"foo\n"

l_.str.2:                               ; @.str.2
	.asciz	"write()"

	.no_dead_strip	_child
.subsections_via_symbols
