	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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
	movq	%rsi, %rbx
	movq	_OFF_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	cmpl	$2, %edi
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rdi
	callq	_usage
LBB0_2:
	movq	_SIGXFSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_sigxfsz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sigset
	movq	8(%rbx), %rdi
	callq	_strdup
	movq	%rax, %r14
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movl	%eax, %ebx
	decq	%r15
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	leaq	-29(%rbp), %rsi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_write
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_10
## %bb.11:
	leaq	-29(%rbp), %rsi
	movl	$1, %r15d
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.15:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_16
LBB0_12:
	movq	_errno@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_EFBIG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:
	leaq	L_str.7(%rip), %rdi
	callq	_puts
	xorl	%r15d, %r15d
	jmp	LBB0_16
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
LBB0_4:
	callq	_perror
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_16:
	movq	%r14, %rdi
	callq	_unlink
	movq	%r14, %rdi
	callq	_free
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	leaq	L_.str.5(%rip), %rdi
	callq	_perror
	movl	(%rbx), %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_OFF_MAX,8,3                    ## @OFF_MAX
	.comm	_SIGXFSZ,4,2                    ## @SIGXFSZ
	.comm	_sigxfsz,4,2                    ## @sigxfsz
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create testfile"

	.comm	_errno,4,2                      ## @errno
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.1:                               ## @.str.1
	.asciz	"Failed to seek to end of testfile"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to write to end of file"

	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
L_.str.3:                               ## @.str.3
	.asciz	"Failed to seek to end of file"

	.comm	_EFBIG,4,2                      ## @EFBIG
L_.str.5:                               ## @.str.5
	.asciz	"Did not receive EFBIG"

L_str:                                  ## @str
	.asciz	"write completed successfully, test failed"

L_str.7:                                ## @str.7
	.asciz	"write errno=EFBIG: success"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, _OFF_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OFF_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	cmp	w0, #2
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x19]
	bl	_usage
LBB0_2:
Lloh3:
	adrp	x8, _SIGXFSZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGXFSZ@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _sigxfsz@GOTPAGE
Lloh7:
	ldr	x8, [x8, _sigxfsz@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_sigset
	ldr	x0, [x19, #8]
	bl	_strdup
	mov	x19, x0
Lloh9:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_open
	tbnz	w0, #31, LBB0_10
; %bb.3:
	mov	x20, x0
	sub	x1, x21, #1
Lloh15:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_lseek
	tbnz	x0, #63, LBB0_11
; %bb.4:
	add	x1, sp, #11
	mov	x0, x20
	mov	w2, #1
	bl	_write
	tbnz	w0, #31, LBB0_12
; %bb.5:
Lloh18:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_lseek
	tbnz	x0, #63, LBB0_13
; %bb.6:
	add	x1, sp, #11
	mov	x0, x20
	mov	w2, #1
	bl	_write
	tbnz	w0, #31, LBB0_8
; %bb.7:
Lloh21:
	adrp	x0, l_str@PAGE
Lloh22:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w20, #1
	b	LBB0_15
LBB0_8:
Lloh23:
	adrp	x20, _errno@GOTPAGE
Lloh24:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh25:
	adrp	x9, _EFBIG@GOTPAGE
Lloh26:
	ldr	x9, [x9, _EFBIG@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.9:
Lloh28:
	adrp	x0, l_str.7@PAGE
Lloh29:
	add	x0, x0, l_str.7@PAGEOFF
	bl	_puts
	mov	w20, #0
	b	LBB0_15
LBB0_10:
Lloh30:
	adrp	x0, l_.str@PAGE
Lloh31:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_11:
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh36:
	adrp	x0, l_.str.3@PAGE
Lloh37:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_14:
	bl	_perror
Lloh38:
	adrp	x8, _errno@GOTPAGE
Lloh39:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh40:
	ldr	w20, [x8]
LBB0_15:
	mov	x0, x19
	bl	_unlink
	mov	x0, x19
	bl	_free
	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_16:
Lloh41:
	adrp	x0, l_.str.5@PAGE
Lloh42:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
	ldr	w20, [x20]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_OFF_MAX,8,3                    ; @OFF_MAX
	.comm	_SIGXFSZ,4,2                    ; @SIGXFSZ
	.comm	_sigxfsz,4,2                    ; @sigxfsz
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create testfile"

	.comm	_errno,4,2                      ; @errno
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.1:                               ; @.str.1
	.asciz	"Failed to seek to end of testfile"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to write to end of file"

	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
l_.str.3:                               ; @.str.3
	.asciz	"Failed to seek to end of file"

	.comm	_EFBIG,4,2                      ; @EFBIG
l_.str.5:                               ; @.str.5
	.asciz	"Did not receive EFBIG"

l_str:                                  ; @str
	.asciz	"write completed successfully, test failed"

l_str.7:                                ; @str.7
	.asciz	"write errno=EFBIG: success"

.subsections_via_symbols
