	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_str_toupper                    ## -- Begin function str_toupper
	.p2align	4, 0x90
_str_toupper:                           ## @str_toupper
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rdx, %rdi
	callq	_lc_ctype_is_c
	testq	%rax, %rax
	je	LBB0_3
## %bb.19:
	movq	%r12, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_asc_toupper                    ## TAILCALL
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_18
LBB0_3:
	movq	_DEFAULT_COLLATION_OID@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_5
## %bb.4:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_OidIsValid
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_INDETERMINATE_COLLATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_errmsg
	leaq	L_.str.2(%rip), %rdi
	callq	_errhint
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_7:
	movq	%rbx, %rdi
	callq	_pg_newlocale_from_collation
	movq	%rax, %r15
LBB0_8:
	xorl	%eax, %eax
	callq	_pg_database_encoding_max_length
	cmpq	$2, %rax
	jb	LBB0_15
## %bb.9:
	leaq	1(%r14), %rbx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shrq	$3, %rax
	cmpq	%rax, %rbx
	jbe	LBB0_11
## %bb.10:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_11:
	leaq	(,%rbx,8), %rdi
	callq	_palloc
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	movq	%r15, %r8
	callq	_char2wchar
	movq	(%r13), %rdi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	callq	_towupper
	movq	%rax, (%r13,%rbx,8)
	movq	8(%r13,%rbx,8), %rdi
	incq	%rbx
	testq	%rdi, %rdi
	jne	LBB0_12
LBB0_14:
	xorl	%eax, %eax
	callq	_pg_database_encoding_max_length
	imulq	%rax, %rbx
	incq	%rbx
	movq	%rbx, %rdi
	callq	_palloc
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_wchar2char
	movq	%r13, %rdi
	callq	_pfree
	jmp	LBB0_18
LBB0_15:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pnstrdup
	movq	%rax, %r14
	movb	(%rax), %al
	testb	%al, %al
	je	LBB0_18
## %bb.16:
	movq	%r14, %rbx
	incq	%rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movzbl	%al, %edi
	callq	_pg_toupper
	movb	%al, -1(%rbx)
	movzbl	(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_17
LBB0_18:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_COLLATION_OID,8,3      ## @DEFAULT_COLLATION_OID
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INDETERMINATE_COLLATION,4,2 ## @ERRCODE_INDETERMINATE_COLLATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not determine which collation to use for %s function"

L_.str.1:                               ## @.str.1
	.asciz	"upper()"

L_.str.2:                               ## @.str.2
	.asciz	"Use the COLLATE clause to set the collation explicitly."

	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ## @ERRCODE_OUT_OF_MEMORY
L_.str.3:                               ## @.str.3
	.asciz	"out of memory"

	.comm	_COLLPROVIDER_ICU,8,3           ## @COLLPROVIDER_ICU
	.comm	_u_strToUpper,4,2               ## @u_strToUpper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_str_toupper                    ; -- Begin function str_toupper
	.p2align	2
_str_toupper:                           ; @str_toupper
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x2
	bl	_lc_ctype_is_c
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	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	_asc_toupper
LBB0_3:
	mov	x19, #0
	b	LBB0_20
LBB0_4:
Lloh0:
	adrp	x8, _DEFAULT_COLLATION_OID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_COLLATION_OID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_6
; %bb.5:
	mov	x21, #0
	b	LBB0_9
LBB0_6:
	mov	x0, x21
	bl	_OidIsValid
	cbnz	w0, LBB0_8
; %bb.7:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _ERRCODE_INDETERMINATE_COLLATION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERRCODE_INDETERMINATE_COLLATION@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_errcode
Lloh9:
	adrp	x8, l_.str.1@PAGE
Lloh10:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_8:
	mov	x0, x21
	bl	_pg_newlocale_from_collation
	mov	x21, x0
LBB0_9:
	bl	_pg_database_encoding_max_length
	cmp	x0, #2
	b.lo	LBB0_15
; %bb.10:
	add	x23, x19, #1
Lloh15:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh17:
	ldrsw	x8, [x8]
	cmp	x23, x8, lsr #3
	b.ls	LBB0_12
; %bb.11:
Lloh18:
	adrp	x8, _ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w22, [x8]
Lloh21:
	adrp	x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_errcode
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_12:
	lsl	x0, x23, #3
	bl	_palloc
	mov	x22, x0
	mov	x1, x23
	mov	x2, x20
	mov	x3, x19
	mov	x4, x21
	bl	_char2wchar
	ldr	x0, [x22]
	cbz	x0, LBB0_18
; %bb.13:
	mov	x19, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x20, x22, x19, lsl #3
	bl	_towupper
	str	x0, [x20]
	add	x19, x19, #1
	ldr	x0, [x20, #8]
	cbnz	x0, LBB0_14
	b	LBB0_19
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_pnstrdup
	mov	x19, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_20
; %bb.16:
	add	x20, x19, #1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	and	w0, w8, #0xff
	bl	_pg_toupper
	sturb	w0, [x20, #-1]
	ldrb	w8, [x20], #1
	cbnz	w8, LBB0_17
	b	LBB0_20
LBB0_18:
	mov	x19, #0
LBB0_19:
	bl	_pg_database_encoding_max_length
	orr	x8, xzr, #0x1
	madd	x20, x0, x19, x8
	mov	x0, x20
	bl	_palloc
	mov	x19, x0
	mov	x1, x22
	mov	x2, x20
	mov	x3, x21
	bl	_wchar2char
	mov	x0, x22
	bl	_pfree
LBB0_20:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_COLLATION_OID,8,3      ; @DEFAULT_COLLATION_OID
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INDETERMINATE_COLLATION,4,2 ; @ERRCODE_INDETERMINATE_COLLATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not determine which collation to use for %s function"

l_.str.1:                               ; @.str.1
	.asciz	"upper()"

l_.str.2:                               ; @.str.2
	.asciz	"Use the COLLATE clause to set the collation explicitly."

	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ; @ERRCODE_OUT_OF_MEMORY
l_.str.3:                               ; @.str.3
	.asciz	"out of memory"

	.comm	_COLLPROVIDER_ICU,8,3           ; @COLLPROVIDER_ICU
	.comm	_u_strToUpper,4,2               ; @u_strToUpper
.subsections_via_symbols
