	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gr_lock                        ## -- Begin function gr_lock
	.p2align	4, 0x90
_gr_lock:                               ## @gr_lock
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_group_file@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpb	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	_O_RDONLY@GOTPCREL(%rip), %r14
	movq	_O_NONBLOCK@GOTPCREL(%rip), %r15
	movq	_O_CLOEXEC@GOTPCREL(%rip), %r12
	movq	_lockfd@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	orl	(%r14), %esi
	orl	(%r12), %esi
	xorl	%edx, %edx
	callq	_flopen
	movl	%eax, (%r13)
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	leaq	L_.str(%rip), %rsi
	callq	_errx
	jmp	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_fstat
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_err
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -48(%rbp)
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	callq	_close
	movl	$-1, (%r13)
	movq	_group_file@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	jmp	LBB0_3
LBB0_11:
	movl	(%r13), %eax
	jmp	LBB0_12
LBB0_1:
	movl	$-1, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_group_file,8,3                 ## @group_file
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_lockfd,4,2                     ## @lockfd
	.comm	_errno,8,3                      ## @errno
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"the group file is busy"

L_.str.1:                               ## @.str.1
	.asciz	"could not lock the group file: "

L_.str.2:                               ## @.str.2
	.asciz	"fstat() failed: "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gr_lock                        ; -- Begin function gr_lock
	.p2align	2
_gr_lock:                               ; @gr_lock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x23, _group_file@GOTPAGE
Lloh1:
	ldr	x23, [x23, _group_file@GOTPAGEOFF]
	ldr	x0, [x23]
	ldrb	w8, [x0]
	mov	w19, #-1
	cbz	w8, LBB0_11
; %bb.1:
Lloh2:
	adrp	x24, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	adrp	x25, _O_NONBLOCK@GOTPAGE
Lloh5:
	ldr	x25, [x25, _O_NONBLOCK@GOTPAGEOFF]
Lloh6:
	adrp	x27, _O_CLOEXEC@GOTPAGE
Lloh7:
	ldr	x27, [x27, _O_CLOEXEC@GOTPAGEOFF]
Lloh8:
	adrp	x26, _lockfd@GOTPAGE
Lloh9:
	ldr	x26, [x26, _lockfd@GOTPAGEOFF]
Lloh10:
	adrp	x21, l_.str.1@PAGE
Lloh11:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh12:
	adrp	x28, _errno@GOTPAGE
Lloh13:
	ldr	x28, [x28, _errno@GOTPAGEOFF]
Lloh14:
	adrp	x20, _EWOULDBLOCK@GOTPAGE
Lloh15:
	ldr	x20, [x20, _EWOULDBLOCK@GOTPAGEOFF]
Lloh16:
	adrp	x22, l_.str.2@PAGE
Lloh17:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w8, w9, w8
	ldr	w9, [x27]
	orr	w1, w8, w9
	mov	w2, #0
	bl	_flopen
	str	w0, [x26]
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x28]
	ldr	x9, [x20]
	mov	w0, #1
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x21
	bl	_err
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	add	x1, sp, #8
	bl	_fstat
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	mov	x1, x22
	bl	_err
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	bl	_close
	str	w19, [x26]
	ldr	x0, [x23]
	b	LBB0_2
LBB0_10:
	ldr	w19, [x26]
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_group_file,8,3                 ; @group_file
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_lockfd,4,2                     ; @lockfd
	.comm	_errno,8,3                      ; @errno
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"the group file is busy"

l_.str.1:                               ; @.str.1
	.asciz	"could not lock the group file: "

l_.str.2:                               ; @.str.2
	.asciz	"fstat() failed: "

.subsections_via_symbols
