	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function searchgid
_searchgid:                             ## @searchgid
	.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
	xorl	%eax, %eax
	callq	_getuid
	cmpb	$0, _searchgid._searched(%rip)
	je	LBB0_1
## %bb.11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%eax, %r14d
	movb	$1, _searchgid._searched(%rip)
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_BINARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	$436, %edx                      ## imm = 0x1B4
	callq	_open
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	callq	_failure
	xorl	%edi, %edi
	testl	%r15d, %r15d
	setg	%dil
	callq	_assert
	leaq	-48(%rbp), %rsi
	movl	%r15d, %edi
	callq	_fstat
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movq	-48(%rbp), %rax
	movq	__default_gid@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	movq	__invalid_gid@GOTPCREL(%rip), %r13
	movl	$-1, (%r13)
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_fchown
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rbx), %eax
	cmpl	$9999, %ebx                     ## imm = 0x270F
	movl	%eax, %ebx
	jb	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	%ebx, (%r13)
LBB0_5:
	movq	__alt_gid@GOTPCREL(%rip), %r13
	movl	$-1, (%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	leal	1(%rbx), %eax
	cmpl	$9999, %ebx                     ## imm = 0x270F
	movl	%eax, %ebx
	jae	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%r12), %ebx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r15d, %edi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_fchown
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, (%r13)
LBB0_10:
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_searchgid._searched,1,2 ## @searchgid._searched
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_gid"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_BINARY,4,2                   ## @O_BINARY
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't create a file for gid testing."

	.comm	__default_gid,8,3               ## @_default_gid
	.comm	__invalid_gid,4,2               ## @_invalid_gid
	.comm	__alt_gid,4,2                   ## @_alt_gid
	.no_dead_strip	_searchgid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function searchgid
_searchgid:                             ; @searchgid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	bl	_getuid
	adrp	x8, _searchgid._searched@PAGE
	ldrb	w9, [x8, _searchgid._searched@PAGEOFF]
	tbz	w9, #0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	mov	x19, x0
	mov	w21, #1
Lloh0:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
	strb	w21, [x8, _searchgid._searched@PAGEOFF]
Lloh2:
	ldr	w8, [x9]
Lloh3:
	adrp	x9, _O_BINARY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_BINARY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #436
	bl	_open
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_failure
	cmp	w20, #0
	cset	w0, gt
	bl	_assert
	add	x1, sp, #8
	mov	x0, x20
	bl	_fstat
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [sp, #8]
Lloh10:
	adrp	x22, __default_gid@GOTPAGE
Lloh11:
	ldr	x22, [x22, __default_gid@GOTPAGEOFF]
	str	x8, [x22]
Lloh12:
	adrp	x23, __invalid_gid@GOTPAGE
Lloh13:
	ldr	x23, [x23, __invalid_gid@GOTPAGEOFF]
	mov	w8, #-1
	str	w8, [x23]
	mov	w24, #9999
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_fchown
	cbnz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w21, #1
	cmp	w21, w24
	mov	x21, x8
	b.lo	LBB0_3
	b	LBB0_6
LBB0_5:
	str	w21, [x23]
LBB0_6:
	mov	w21, #0
Lloh14:
	adrp	x23, __alt_gid@GOTPAGE
Lloh15:
	ldr	x23, [x23, __alt_gid@GOTPAGEOFF]
	mov	w8, #-1
	str	w8, [x23]
	mov	w24, #9999
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w8, w21, #1
	cmp	w21, w24
	mov	x21, x8
	b.hs	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w21, w8
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_fchown
	cbnz	x0, LBB0_7
; %bb.10:
	str	w21, [x23]
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_close
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_searchgid._searched,1,2 ; @searchgid._searched
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_gid"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_BINARY,4,2                   ; @O_BINARY
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't create a file for gid testing."

	.comm	__default_gid,8,3               ; @_default_gid
	.comm	__invalid_gid,4,2               ; @_invalid_gid
	.comm	__alt_gid,4,2                   ; @_alt_gid
	.no_dead_strip	_searchgid
.subsections_via_symbols
