	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pg_redirect
_pg_redirect:                           ## @pg_redirect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_scriptname@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpb	$0, (%rsi)
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_2:
	movq	(%rbx), %rdi
	movq	24(%rbx), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_4:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_6:
	movq	%r14, %rdi
	callq	_http_encode
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	movl	$46, %edi
	callq	_putchar
	movq	16(%rbx), %rdi
	callq	_http_encode
LBB0_8:
	leaq	L_str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_puts                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Status: 303 See Other\r\nLocation: /"

	.comm	_scriptname,8,3                 ## @scriptname
L_.str.1:                               ## @.str.1
	.asciz	"%s/"

L_str:                                  ## @str
	.asciz	"\r\nContent-Type: text/html; charset=utf-8\r\n\r"

	.no_dead_strip	_pg_redirect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pg_redirect
_pg_redirect:                           ; @pg_redirect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh2:
	adrp	x8, _scriptname@GOTPAGE
Lloh3:
	ldr	x8, [x8, _scriptname@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldrb	w9, [x8]
	cbz	w9, LBB0_2
; %bb.1:
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_2:
	ldr	x0, [x19]
	ldr	x8, [x19, #24]
	ldr	w1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19]
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.5:
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_6:
	mov	x0, x20
	bl	_http_encode
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.7:
	mov	w0, #46
	bl	_putchar
	ldr	x0, [x19, #16]
	bl	_http_encode
LBB0_8:
Lloh11:
	adrp	x0, l_str@PAGE
Lloh12:
	add	x0, x0, l_str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_puts
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Status: 303 See Other\r\nLocation: /"

	.comm	_scriptname,8,3                 ; @scriptname
l_.str.1:                               ; @.str.1
	.asciz	"%s/"

l_str:                                  ; @str
	.asciz	"\r\nContent-Type: text/html; charset=utf-8\r\n\r"

	.no_dead_strip	_pg_redirect
.subsections_via_symbols
