	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hexagon_encode_operand         ## -- Begin function hexagon_encode_operand
	.p2align	4, 0x90
_hexagon_encode_operand:                ## @hexagon_encode_operand
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movq	%r8, %r13
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movq	%rdi, %r15
	movq	(%rdx), %rdi
	callq	_strlen
	movq	%rax, %rbx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	setne	%sil
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	testq	%r13, %r13
	setne	%r8b
	movq	_HEXAGON_OPERAND_IS_SIGNED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movb	4(%r15), %r13b
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	andl	(%r15), %edx
	cmpl	$0, 16(%rbp)
	je	LBB0_7
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.2:
	movb	8(%r12), %al
	andb	$-127, %al
	cmpb	$-128, %al
	je	LBB0_5
## %bb.3:
	cmpb	$-127, %al
	jne	LBB0_7
## %bb.4:
	movsbl	%r13b, %edi
	movl	%r8d, %r15d
	movq	%rdx, %r13
	movb	%sil, -41(%rbp)                 ## 1-byte Spill
	callq	_TOLOWER
	jmp	LBB0_6
LBB0_5:
	movsbl	%r13b, %edi
	movl	%r8d, %r15d
	movq	%rdx, %r13
	movb	%sil, -41(%rbp)                 ## 1-byte Spill
	callq	_TOUPPER
LBB0_6:
	movb	-41(%rbp), %sil                 ## 1-byte Reload
	movq	%r13, %rdx
	movl	%r15d, %r8d
	movl	%eax, %r13d
LBB0_7:
	movq	24(%rbp), %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %ecx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.8:
	movq	$-1, %rax
	shlq	%cl, %rax
	notq	%rax
	testq	%r14, %rax
	je	LBB0_13
## %bb.9:
	testq	%r15, %r15
	je	LBB0_12
## %bb.10:
	leaq	_hexagon_encode_operand.buf(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_11
LBB0_13:
	andb	%sil, %r8b
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_HEXAGON_OPERAND_IS_LO16@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	movb	%r8b, -41(%rbp)                 ## 1-byte Spill
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	movq	%rdx, %r14
	callq	_HEXAGON_LO16
	jmp	LBB0_19
LBB0_15:
	movq	_HEXAGON_OPERAND_IS_HI16@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	movq	%rdx, %r14
	callq	_HEXAGON_HI16
	jmp	LBB0_19
LBB0_17:
	movq	_HEXAGON_OPERAND_IS_SUBSET@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_20
## %bb.18:
	movq	_HEXAGON_OPERAND_IS_PAIR@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rdx, %r14
	callq	_HEXAGON_SUBREGS_TO
LBB0_19:
	movq	%r14, %rdx
	movq	%rax, %r14
LBB0_20:
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	8(%rsi), %r15d
	addl	12(%rsi), %r15d
	leal	-1(%r15), %ecx
	movq	$-1, %rdi
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rdi
	movq	_HEXAGON_OPERAND_IS_NEGATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rsi), %eax
	movq	$-1, %rsi
	cmpl	$1, %eax
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rax
	sbbq	$-1, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, %ecx
	shlq	%cl, %rsi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)
	leaq	-64(%rbp), %rdi
	movl	%r15d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_hexagon_extend
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movb	-41(%rbp), %dil                 ## 1-byte Reload
	testb	%dil, %dil
	je	LBB0_22
## %bb.21:
	movq	-64(%rbp), %r14
	movq	%r14, %rsi
	shrq	$63, %rsi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	%rax, (%rdx)
LBB0_22:
	testl	%esi, %esi
	je	LBB0_29
## %bb.23:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r8
	notq	%r8
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %r14
	jl	LBB0_26
## %bb.24:
	cmpq	$-2, %rax
	jg	LBB0_33
## %bb.25:
	cmpq	%r8, %r14
	jle	LBB0_33
LBB0_26:
	movq	24(%rbp), %r15
	testq	%r15, %r15
	je	LBB0_12
## %bb.27:
	leaq	_hexagon_encode_operand.buf(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_28
LBB0_29:
	testl	%r15d, %r15d
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	je	LBB0_33
## %bb.30:
	notq	%r8
	cmpq	%r8, %r14
	jbe	LBB0_33
## %bb.31:
	movq	24(%rbp), %r15
	testq	%r15, %r15
	je	LBB0_12
## %bb.32:
	leaq	_hexagon_encode_operand.buf(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
LBB0_28:
	xorl	%eax, %eax
	callq	_sprintf
LBB0_11:
	leaq	_hexagon_encode_operand.buf(%rip), %rax
	movq	%rax, (%r15)
LBB0_12:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	testb	%dil, %dil
	jne	LBB0_35
## %bb.34:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movb	8(%rax), %cl
	sarq	%cl, %r14
LBB0_35:
	xorl	%r15d, %r15d
	jmp	LBB0_36
LBB0_39:                                ##   in Loop: Header=BB0_36 Depth=1
	incl	%r15d
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movsbl	-1(%rax,%rbx), %edi
	decq	%rbx
	callq	_ISSPACE
	testl	%eax, %eax
	jne	LBB0_36
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	(%r12), %rax
	cmpb	%r13b, (%rax,%rbx)
	jne	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	(%rsi), %eax
	movl	%r14d, %edx
	andl	$1, %edx
	movl	%r15d, %ecx
	shlq	%cl, %rdx
	btrl	%r15d, %eax
	orl	%eax, %edx
	movl	%edx, (%rsi)
	sarq	%r14
	jmp	LBB0_39
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_hexagon_encode_operand.buf,500,4 ## @hexagon_encode_operand.buf
	.comm	_HEXAGON_OPERAND_IS_SIGNED,4,2  ## @HEXAGON_OPERAND_IS_SIGNED
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"low %d bits of immediate %ld must be zero"

	.comm	_HEXAGON_OPERAND_IS_LO16,4,2    ## @HEXAGON_OPERAND_IS_LO16
	.comm	_HEXAGON_OPERAND_IS_HI16,4,2    ## @HEXAGON_OPERAND_IS_HI16
	.comm	_HEXAGON_OPERAND_IS_SUBSET,4,2  ## @HEXAGON_OPERAND_IS_SUBSET
	.comm	_HEXAGON_OPERAND_IS_PAIR,4,2    ## @HEXAGON_OPERAND_IS_PAIR
	.comm	_HEXAGON_OPERAND_IS_NEGATIVE,4,2 ## @HEXAGON_OPERAND_IS_NEGATIVE
L_.str.1:                               ## @.str.1
	.asciz	"value %ld out of range: %ld-%ld"

L_.str.2:                               ## @.str.2
	.asciz	"value %lu out of range: %lu-%lu"

	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hexagon_encode_operand         ; -- Begin function hexagon_encode_operand
	.p2align	2
_hexagon_encode_operand:                ; @hexagon_encode_operand
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x26, x7
	mov	x22, x6
	mov	x24, x5
	mov	x27, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x25, x0
	ldr	x0, [x2]
	bl	_strlen
	mov	x23, x0
	str	x27, [sp, #24]                  ; 8-byte Folded Spill
	cmp	x27, #0
	ccmp	w24, #0, #4, ne
	cset	w10, ne
	ldr	w27, [x25]
Lloh0:
	adrp	x8, _HEXAGON_OPERAND_IS_SIGNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEXAGON_OPERAND_IS_SIGNED@GOTPAGEOFF]
Lloh2:
	ldr	w28, [x8]
	ldrb	w24, [x25, #4]
Lloh3:
	adrp	x8, _FALSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	str	w10, [sp, #36]                  ; 4-byte Folded Spill
	cbz	w22, LBB0_7
; %bb.1:
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.2:
	ldr	w8, [x20, #8]
	mov	w9, #129
	and	w8, w8, w9
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.4:
	sxtb	w0, w24
	bl	_TOLOWER
	b	LBB0_6
LBB0_5:
	sxtb	w0, w24
	bl	_TOUPPER
LBB0_6:
	mov	x24, x0
LBB0_7:
	ldr	w2, [x25, #8]
	cmp	w2, #0
	mov	x8, #-1
	lsl	x8, x8, x2
	bic	x8, x19, x8
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_10
; %bb.8:
	and	w27, w28, w27
	ldr	w8, [x25]
Lloh5:
	adrp	x9, _HEXAGON_OPERAND_IS_LO16@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HEXAGON_OPERAND_IS_LO16@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	str	x26, [sp, #16]                  ; 8-byte Folded Spill
	b.eq	LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_HEXAGON_LO16
	b	LBB0_16
LBB0_10:
	cbz	x26, LBB0_30
; %bb.11:
Lloh8:
	adrp	x0, _hexagon_encode_operand.buf@PAGE
Lloh9:
	add	x0, x0, _hexagon_encode_operand.buf@PAGEOFF
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x19
	b	LBB0_29
LBB0_12:
Lloh12:
	adrp	x9, _HEXAGON_OPERAND_IS_HI16@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HEXAGON_OPERAND_IS_HI16@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_HEXAGON_HI16
	b	LBB0_16
LBB0_14:
Lloh15:
	adrp	x9, _HEXAGON_OPERAND_IS_SUBSET@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HEXAGON_OPERAND_IS_SUBSET@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.15:
Lloh18:
	adrp	x9, _HEXAGON_OPERAND_IS_PAIR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HEXAGON_OPERAND_IS_PAIR@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	and	w1, w9, w8
	mov	x0, x19
	bl	_HEXAGON_SUBREGS_TO
LBB0_16:
	mov	x19, x0
LBB0_17:
	ldp	w9, w8, [x25, #8]
	add	w22, w9, w8
	sub	w8, w22, #1
	mov	x9, #-1
	lsl	x26, x9, x8
	ldr	w8, [x25]
Lloh21:
	adrp	x9, _HEXAGON_OPERAND_IS_NEGATIVE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HEXAGON_OPERAND_IS_NEGATIVE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	cinc	x28, x26, ne
	str	x19, [sp, #40]
	add	x0, sp, #40
	mov	x1, x22
	mov	x2, x27
	bl	_hexagon_extend
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	cbz	w9, LBB0_19
; %bb.18:
	ldr	x19, [sp, #40]
	lsr	x27, x19, #63
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x0, [x8]
LBB0_19:
	cbz	w27, LBB0_25
; %bb.20:
	mvn	x8, x26
	cmp	x19, x28
	b.lt	LBB0_23
; %bb.21:
	cmn	x26, #2
	b.gt	LBB0_31
; %bb.22:
	cmp	x19, x8
	b.le	LBB0_31
LBB0_23:
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	cbz	x26, LBB0_30
; %bb.24:
	str	x8, [sp]
Lloh24:
	adrp	x0, _hexagon_encode_operand.buf@PAGE
Lloh25:
	add	x0, x0, _hexagon_encode_operand.buf@PAGEOFF
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	mov	x3, x28
	b	LBB0_29
LBB0_25:
	cbz	w22, LBB0_31
; %bb.26:
	mov	x8, #-1
	lsl	x8, x8, x22
	mvn	x8, x8
	cmp	x19, x8
	b.ls	LBB0_31
; %bb.27:
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	cbz	x26, LBB0_30
; %bb.28:
	str	x8, [sp]
Lloh28:
	adrp	x0, _hexagon_encode_operand.buf@PAGE
Lloh29:
	add	x0, x0, _hexagon_encode_operand.buf@PAGEOFF
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	mov	w3, #0
LBB0_29:
	bl	_sprintf
Lloh32:
	adrp	x8, _hexagon_encode_operand.buf@PAGE
Lloh33:
	add	x8, x8, _hexagon_encode_operand.buf@PAGEOFF
	str	x8, [x26]
LBB0_30:
Lloh34:
	adrp	x8, _FALSE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_31:
	tbnz	w9, #0, LBB0_33
; %bb.32:
	ldr	w8, [x25, #8]
	asr	x19, x19, x8
LBB0_33:
	mov	w22, #0
	mov	w25, #1
	b	LBB0_35
LBB0_34:                                ;   in Loop: Header=BB0_35 Depth=1
	add	w22, w22, #1
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x8, x8, x23
	sub	x23, x23, #1
	ldursb	w0, [x8, #-1]
	bl	_ISSPACE
	cbnz	w0, LBB0_35
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	x8, [x20]
	ldrb	w8, [x8, x23]
	cmp	w8, w24, uxtb
	b.ne	LBB0_34
; %bb.37:                               ;   in Loop: Header=BB0_35 Depth=1
	lsl	w8, w25, w22
	ldr	w9, [x21]
	bic	w8, w9, w8
	and	x9, x19, #0x1
	lsl	x9, x9, x22
	orr	w8, w8, w9
	str	w8, [x21]
	asr	x19, x19, #1
	b	LBB0_34
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_hexagon_encode_operand.buf,500,0 ; @hexagon_encode_operand.buf
	.comm	_HEXAGON_OPERAND_IS_SIGNED,4,2  ; @HEXAGON_OPERAND_IS_SIGNED
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"low %d bits of immediate %ld must be zero"

	.comm	_HEXAGON_OPERAND_IS_LO16,4,2    ; @HEXAGON_OPERAND_IS_LO16
	.comm	_HEXAGON_OPERAND_IS_HI16,4,2    ; @HEXAGON_OPERAND_IS_HI16
	.comm	_HEXAGON_OPERAND_IS_SUBSET,4,2  ; @HEXAGON_OPERAND_IS_SUBSET
	.comm	_HEXAGON_OPERAND_IS_PAIR,4,2    ; @HEXAGON_OPERAND_IS_PAIR
	.comm	_HEXAGON_OPERAND_IS_NEGATIVE,4,2 ; @HEXAGON_OPERAND_IS_NEGATIVE
l_.str.1:                               ; @.str.1
	.asciz	"value %ld out of range: %ld-%ld"

l_.str.2:                               ; @.str.2
	.asciz	"value %lu out of range: %lu-%lu"

	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
