	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_setuidgid                  ## -- Begin function h2o_setuidgid
	.p2align	4, 0x90
_h2o_setuidgid:                         ## @h2o_setuidgid
	.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	$65576, %eax                    ## imm = 0x10028
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_errno@GOTPCREL(%rip), %r15
	movq	$0, (%r15)
	leaq	-65600(%rbp), %rsi
	leaq	-65568(%rbp), %rdx
	leaq	-65576(%rbp), %r8
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_getpwnam_r
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_h2o_perror
	jmp	LBB0_12
LBB0_2:
	movq	-65576(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	8(%rax), %rdi
	callq	_setgid
	movq	-65576(%rbp), %rcx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	8(%rcx), %ebx
	movq	(%r15), %rdi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
LBB0_11:
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_h2o_error_printf
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_h2o_error_printf
	jmp	LBB0_12
LBB0_6:
	movl	16(%rcx), %edi
	movq	8(%rcx), %rsi
	callq	_initgroups
	movq	-65576(%rbp), %rcx
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	8(%rcx), %r14d
	movl	16(%rcx), %ebx
	movq	(%r15), %rdi
	callq	_strerror
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_h2o_error_printf
LBB0_12:
	movl	$-1, %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$65576, %rsp                    ## imm = 0x10028
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%rcx), %rdi
	callq	_setuid
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	-65576(%rbp), %rax
	movl	(%rax), %ebx
	movq	(%r15), %rdi
	callq	_strerror
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getpwnam_r"

L_.str.1:                               ## @.str.1
	.asciz	"unknown user:%s\n"

L_.str.2:                               ## @.str.2
	.asciz	"setgid(%d) failed:%s\n"

L_.str.3:                               ## @.str.3
	.asciz	"initgroups(%s, %d) failed:%s\n"

L_.str.4:                               ## @.str.4
	.asciz	"setuid(%d) failed:%s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_setuidgid                  ; -- Begin function h2o_setuidgid
	.p2align	2
_h2o_setuidgid:                         ; @h2o_setuidgid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	mov	w9, #64
	movk	w9, #1, lsl #16
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #16, lsl #12            ; =65536
	sub	sp, sp, #64
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh5:
	adrp	x20, _errno@GOTPAGE
Lloh6:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	str	xzr, [x20]
	add	x1, sp, #32
	add	x2, sp, #56
	add	x4, sp, #24
	mov	w3, #65536
	bl	_getpwnam_r
	cbz	x0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_h2o_perror
	b	LBB0_11
LBB0_2:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x0, [x8, #8]
	bl	_setgid
	ldr	x8, [sp, #24]
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x19, [x8, #8]
	ldr	x0, [x20]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_5:
	str	x19, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_6:
	ldr	w0, [x8, #16]
	ldr	x1, [x8, #8]
	bl	_initgroups
	ldr	x8, [sp, #24]
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x19, [x8, #8]
	ldr	x0, [x20]
	ldr	w20, [x8, #16]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp, #8]
	str	x20, [sp]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	x0, [x8]
	bl	_setuid
	cbz	x0, LBB0_12
; %bb.9:
	ldr	x8, [sp, #24]
	ldr	x19, [x8]
	ldr	x0, [x20]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_10:
	bl	_h2o_error_printf
LBB0_11:
	mov	w0, #-1
LBB0_12:
	ldur	x8, [x29, #-40]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	add	sp, sp, #16, lsl #12            ; =65536
	add	sp, sp, #64
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getpwnam_r"

l_.str.1:                               ; @.str.1
	.asciz	"unknown user:%s\n"

l_.str.2:                               ; @.str.2
	.asciz	"setgid(%d) failed:%s\n"

l_.str.3:                               ; @.str.3
	.asciz	"initgroups(%s, %d) failed:%s\n"

l_.str.4:                               ; @.str.4
	.asciz	"setuid(%d) failed:%s\n"

.subsections_via_symbols
