	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_write_wantsignal
_test_write_wantsignal:                 ## @test_write_wantsignal
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_SHUT_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edx, %edi
	callq	_shutdown
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	movq	%rbx, %rdx
	callq	_err
LBB0_2:
	movq	%rbx, %rdi
	callq	_signal_setup
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_test_write
	xorl	%eax, %eax
	callq	_got_signal
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	movq	%rbx, %rdx
	callq	_errx
LBB0_4:
	movl	%r14d, %edi
	callq	_close
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SHUT_WR,4,2                    ## @SHUT_WR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: shutdown"

L_.str.1:                               ## @.str.1
	.asciz	"%s: write: didn't receive SIGPIPE"

	.no_dead_strip	_test_write_wantsignal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_write_wantsignal
_test_write_wantsignal:                 ; @test_write_wantsignal
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _SHUT_WR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SHUT_WR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_shutdown
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	mov	x2, x21
	bl	_err
LBB0_2:
	mov	x0, x21
	bl	_signal_setup
	mov	x0, x21
	mov	x1, x19
	bl	_test_write
	bl	_got_signal
	cbnz	w0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	mov	x2, x21
	bl	_errx
LBB0_4:
	mov	x0, x20
	bl	_close
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_close
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SHUT_WR,4,2                    ; @SHUT_WR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: shutdown"

l_.str.1:                               ; @.str.1
	.asciz	"%s: write: didn't receive SIGPIPE"

	.no_dead_strip	_test_write_wantsignal
.subsections_via_symbols
