	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function trylocks
_trylocks:                              ## @trylocks
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_getpid
	movl	%eax, %edi
	callq	_srand48
	movq	_lockfile@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %esi
	callq	_printf
	movq	_nlocks@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.3:
	movq	_filesize@GOTPCREL(%rip), %r14
	leaq	-64(%rbp), %r15
	movq	_sleeptime@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_F_SETLKW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movq	%r15, %rdx
	callq	_fcntl
	movl	(%r12), %edi
	callq	_usleep
	testq	%rax, %rax
	js	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r13d
	movq	_nlocks@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_random_uint32
	cltd
	idivl	(%r14)
	movl	%edx, -64(%rbp)
	xorl	%eax, %eax
	callq	_random_uint32
	cltd
	idivl	(%r14)
	movl	%edx, -60(%rbp)
	xorl	%eax, %eax
	callq	_random_uint32
	cltq
	imulq	$1431655766, %rax, %rcx         ## imm = 0x55555556
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	subl	%ecx, %eax
	cmpl	$2, %eax
	ja	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cltq
	leaq	l_switch.table.trylocks(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_8
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_printf
	movl	%ebx, %edi
	callq	_close
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lockfile,4,2                   ## @lockfile
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"%d: start\n"

	.comm	_nlocks,4,2                     ## @nlocks
	.comm	_filesize,4,2                   ## @filesize
	.comm	_F_RDLCK,4,2                    ## @F_RDLCK
	.comm	_F_WRLCK,4,2                    ## @F_WRLCK
	.comm	_F_UNLCK,4,2                    ## @F_UNLCK
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_F_SETLKW,4,2                   ## @F_SETLKW
	.comm	_sleeptime,4,2                  ## @sleeptime
L_.str.2:                               ## @.str.2
	.asciz	"usleep"

L_.str.3:                               ## @.str.3
	.asciz	"%d: done\n"

	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_errno,8,3                      ## @errno
	.no_dead_strip	_trylocks
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.trylocks
l_switch.table.trylocks:
	.quad	_F_RDLCK
	.quad	_F_WRLCK
	.quad	_F_UNLCK

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function trylocks
_trylocks:                              ; @trylocks
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x0
	bl	_getpid
	bl	_srand48
Lloh0:
	adrp	x19, _lockfile@GOTPAGE
Lloh1:
	ldr	x19, [x19, _lockfile@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	mov	x1, x21
	bl	_printf
Lloh9:
	adrp	x22, _nlocks@GOTPAGE
Lloh10:
	ldr	x22, [x22, _nlocks@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	w23, #0
Lloh11:
	adrp	x24, _filesize@GOTPAGE
Lloh12:
	ldr	x24, [x24, _filesize@GOTPAGEOFF]
	mov	w25, #21846
	movk	w25, #21845, lsl #16
Lloh13:
	adrp	x26, l_switch.table.trylocks@PAGE
Lloh14:
	add	x26, x26, l_switch.table.trylocks@PAGEOFF
Lloh15:
	adrp	x27, _SEEK_SET@GOTPAGE
Lloh16:
	ldr	x27, [x27, _SEEK_SET@GOTPAGEOFF]
Lloh17:
	adrp	x28, _F_SETLKW@GOTPAGE
Lloh18:
	ldr	x28, [x28, _F_SETLKW@GOTPAGEOFF]
Lloh19:
	adrp	x19, _sleeptime@GOTPAGE
Lloh20:
	ldr	x19, [x19, _sleeptime@GOTPAGEOFF]
Lloh21:
	adrp	x21, l_.str.2@PAGE
Lloh22:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27]
	str	w8, [sp, #24]
	ldr	w1, [x28]
	add	x2, sp, #16
	mov	x0, x20
	bl	_fcntl
	ldr	w0, [x19]
	bl	_usleep
	tbnz	x0, #63, LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w23, w23, #1
	ldr	w8, [x22]
	cmp	w23, w8
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	bl	_random_uint32
	ldr	w8, [x24]
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
	str	w8, [sp, #16]
	bl	_random_uint32
	ldr	w8, [x24]
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
	str	w8, [sp, #20]
	bl	_random_uint32
	smull	x8, w0, w25
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	add	w8, w8, w8, lsl #1
	sub	w8, w0, w8
	cmp	w8, #2
	b.hi	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [sp, #28]
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #1
	mov	x1, x21
	bl	_err
	b	LBB0_5
LBB0_9:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_printf
	mov	x0, x20
	bl	_close
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_lockfile,4,2                   ; @lockfile
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"%d: start\n"

	.comm	_nlocks,4,2                     ; @nlocks
	.comm	_filesize,4,2                   ; @filesize
	.comm	_F_RDLCK,4,2                    ; @F_RDLCK
	.comm	_F_WRLCK,4,2                    ; @F_WRLCK
	.comm	_F_UNLCK,4,2                    ; @F_UNLCK
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_F_SETLKW,4,2                   ; @F_SETLKW
	.comm	_sleeptime,4,2                  ; @sleeptime
l_.str.2:                               ; @.str.2
	.asciz	"usleep"

l_.str.3:                               ; @.str.3
	.asciz	"%d: done\n"

	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_errno,8,3                      ; @errno
	.no_dead_strip	_trylocks
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.trylocks
l_switch.table.trylocks:
	.quad	_F_RDLCK
	.quad	_F_WRLCK
	.quad	_F_UNLCK

.subsections_via_symbols
