	.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
	movl	$4312, %eax                     ## imm = 0x10D8
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	-4128(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_memset
	leaq	-4336(%rbp), %rdi
	movl	$1, %esi
	movl	$200, %edx
	callq	_memset
	movq	_O_RDWR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$600, %esi                      ## imm = 0x258
	callq	_lseek
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	leaq	-4336(%rbp), %rsi
	movl	%ebx, %edi
	movl	$200, %edx
	callq	_write
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	movl	%ebx, %edi
	callq	_fsync
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	$4096, %esi                     ## imm = 0x1000
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %r14
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	leaq	L_.str.5(%rip), %rbx
	movq	%rbx, %rdi
	callq	_unlink
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$438, %edx                      ## imm = 0x1B6
	xorl	%eax, %eax
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_10:
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_write
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:
	leaq	L_.str.7(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	addq	$4312, %rsp                     ## imm = 0x10D8
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test1.data"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.1:                               ## @.str.1
	.asciz	"opening file"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.2:                               ## @.str.2
	.asciz	"seeking"

L_.str.3:                               ## @.str.3
	.asciz	"writing ones"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.4:                               ## @.str.4
	.asciz	"mapping"

L_.str.5:                               ## @.str.5
	.asciz	"test1.scratch"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
L_.str.6:                               ## @.str.6
	.asciz	"creating scratch"

L_.str.7:                               ## @.str.7
	.asciz	"writing scratch"

.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:
	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	w9, #4320
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #224
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x0, sp, #216
	mov	w1, #0
	mov	w2, #4096
	bl	_memset
	add	x0, sp, #16
	mov	w1, #1
	mov	w2, #200
	bl	_memset
Lloh5:
	adrp	x21, _O_RDWR@GOTPAGE
Lloh6:
	ldr	x21, [x21, _O_RDWR@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
Lloh11:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #600
	bl	_lseek
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #200
	bl	_write
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	mov	x0, x19
	bl	_fsync
Lloh18:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh20:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh24:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	mov	w0, #0
	mov	w1, #4096
	mov	x4, x19
	mov	w5, #0
	bl	_mmap
	mov	x19, x0
Lloh27:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
Lloh32:
	adrp	x20, l_.str.5@PAGE
Lloh33:
	add	x20, x20, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_unlink
	ldr	w8, [x21]
Lloh34:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w8, #438
	str	x8, [sp]
	mov	x0, x20
	bl	_open
	mov	x20, x0
	tbz	w0, #31, LBB0_10
; %bb.9:
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4096
	bl	_write
	tbz	x0, #63, LBB0_12
; %bb.11:
Lloh39:
	adrp	x1, l_.str.7@PAGE
Lloh40:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_12:
	ldur	x8, [x29, #-40]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	w0, #0
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #224
	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
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test1.data"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.1:                               ; @.str.1
	.asciz	"opening file"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.2:                               ; @.str.2
	.asciz	"seeking"

l_.str.3:                               ; @.str.3
	.asciz	"writing ones"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.4:                               ; @.str.4
	.asciz	"mapping"

l_.str.5:                               ; @.str.5
	.asciz	"test1.scratch"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
l_.str.6:                               ; @.str.6
	.asciz	"creating scratch"

l_.str.7:                               ; @.str.7
	.asciz	"writing scratch"

.subsections_via_symbols
