	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grabpgrp                       ## -- Begin function grabpgrp
	.p2align	4, 0x90
_grabpgrp:                              ## @grabpgrp
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, %r15d
	movl	$100, %ebx
	movq	_SIGTTIN@GOTPCREL(%rip), %r12
	movl	$-1, %r13d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_tcgetpgrp
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	xorl	%esi, %esi
	leaq	-48(%rbp), %r14
	movq	%r14, %rdx
	callq	_sigaction
	movl	(%r12), %edi
	movq	_SIG_DFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movl	(%r12), %esi
	xorl	%edi, %edi
	callq	_kill
	movl	(%r12), %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_sigaction
	decq	%rbx
	jne	LBB0_1
## %bb.5:
	movq	_EPERM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_6
LBB0_3:
	xorl	%r13d, %r13d
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGTTIN,4,2                    ## @SIGTTIN
	.comm	_SIG_DFL,4,2                    ## @SIG_DFL
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grabpgrp                       ; -- Begin function grabpgrp
	.p2align	2
_grabpgrp:                              ; @grabpgrp
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w21, #100
Lloh0:
	adrp	x22, _SIGTTIN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SIGTTIN@GOTPAGEOFF]
Lloh2:
	adrp	x23, _SIG_DFL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SIG_DFL@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_tcgetpgrp
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, w19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x22]
	add	x2, sp, #8
	mov	x1, #0
	bl	_sigaction
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_signal
	ldr	w1, [x22]
	mov	w0, #0
	bl	_kill
	ldr	w0, [x22]
	add	x1, sp, #8
	mov	x2, #0
	bl	_sigaction
	subs	x21, x21, #1
	b.ne	LBB0_1
; %bb.4:
Lloh4:
	adrp	x8, _EPERM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _errno@GOTPAGE
Lloh8:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
	mov	w0, #-1
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGTTIN,4,2                    ; @SIGTTIN
	.comm	_SIG_DFL,4,2                    ; @SIG_DFL
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
