	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_flopen_lock_child         ## -- Begin function test_flopen_lock_child
	.p2align	4, 0x90
_test_flopen_lock_child:                ## @test_flopen_lock_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rdi
	callq	_unlink
	movq	_O_RDWR@GOTPCREL(%rip), %r15
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$416, %edx                      ## imm = 0x1A0
	xorl	%eax, %eax
	callq	_flopen
	movl	%eax, -28(%rbp)
	cmpl	$0, -28(%rbp)
	js	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %r14d
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.3:
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.4:
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_select
	xorl	%edi, %edi
	callq	__exit
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movq	%rax, %rbx
	jmp	LBB0_9
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movq	%rax, %rbx
LBB0_6:
	movl	-28(%rbp), %edi
	callq	_close
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_flopen
	movl	%eax, -32(%rbp)
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.7:
	movl	-32(%rbp), %edi
	callq	_close
	leaq	L_.str.1(%rip), %rbx
LBB0_8:
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_kill
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	_unlink
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_flopen_lock_child"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_errno,4,2                      ## @errno
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.1:                               ## @.str.1
	.asciz	"second open succeeded"

	.comm	_SIGINT,4,2                     ## @SIGINT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_flopen_lock_child         ; -- Begin function test_flopen_lock_child
	.p2align	2
_test_flopen_lock_child:                ; @test_flopen_lock_child
	.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
Lloh0:
	adrp	x19, l_.str@PAGE
Lloh1:
	add	x19, x19, l_.str@PAGEOFF
	mov	x0, x19
	bl	_unlink
Lloh2:
	adrp	x21, _O_RDWR@GOTPAGE
Lloh3:
	ldr	x21, [x21, _O_RDWR@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh4:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w8, #416
	str	x8, [sp]
	mov	x0, x19
	bl	_flopen
	str	w0, [sp, #12]
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_4
; %bb.1:
	bl	_fork
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.2:
	cbz	w19, LBB0_10
; %bb.3:
	mov	x20, #0
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_strerror
	mov	x20, x0
	b	LBB0_9
LBB0_5:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_strerror
	mov	x20, x0
LBB0_6:
	ldr	w0, [sp, #12]
	bl	_close
	ldr	w8, [x21]
Lloh13:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_flopen
	str	w0, [sp, #8]
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [sp, #8]
	bl	_close
Lloh18:
	adrp	x20, l_.str.1@PAGE
Lloh19:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_8:
Lloh20:
	adrp	x8, _SIGINT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kill
LBB0_9:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_unlink
	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
	add	sp, sp, #64
	ret
LBB0_10:
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_select
	mov	w0, #0
	bl	__exit
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_flopen_lock_child"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_errno,4,2                      ; @errno
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.1:                               ; @.str.1
	.asciz	"second open succeeded"

	.comm	_SIGINT,4,2                     ; @SIGINT
.subsections_via_symbols
