	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function optimize_imm
_optimize_imm:                          ## @optimize_imm
	.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
	movq	_i@GOTPCREL(%rip), %r14
	movl	4(%r14), %ebx
	testl	%ebx, %ebx
	jle	LBB0_12
## %bb.1:
	movq	8(%r14), %rcx
	incq	%rbx
	movq	_Imm@GOTPCREL(%rip), %r15
	movq	_Imm16@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_smallest_imm_type
	movq	8(%r14), %rcx
	orl	%eax, (%rcx,%r13,4)
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	decq	%rbx
	cmpq	$1, %rbx
	jbe	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %r13d
	movl	(%rcx,%r13,4), %edx
	testl	%edx, (%r15)
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r14), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax), %esi
	cmpl	$131, %esi
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$130, %esi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$132, %esi
	jne	LBB0_11
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rax), %edi
	testl	%edx, (%r12)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$65535, %edi                    ## imm = 0xFFFF
	ja	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movswl	%di, %edi
	movl	%edi, 4(%rax)
	jmp	LBB0_10
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_i,40,3                         ## @i
	.comm	_Reg,4,2                        ## @Reg
	.comm	_Reg8,4,2                       ## @Reg8
	.comm	_Reg16,4,2                      ## @Reg16
	.comm	_Reg32,4,2                      ## @Reg32
	.comm	_Reg64,4,2                      ## @Reg64
	.comm	_flag_code,8,3                  ## @flag_code
	.comm	_CODE_16BIT,8,3                 ## @CODE_16BIT
	.comm	_DATA_PREFIX,8,3                ## @DATA_PREFIX
	.comm	_Imm,4,2                        ## @Imm
	.comm	_Imm32,4,2                      ## @Imm32
	.comm	_Imm64,4,2                      ## @Imm64
	.comm	_Imm16,4,2                      ## @Imm16
	.comm	_Imm32S,4,2                     ## @Imm32S
	.comm	_Imm8,4,2                       ## @Imm8
	.comm	_Imm8S,4,2                      ## @Imm8S
	.comm	_current_templates,8,3          ## @current_templates
	.no_dead_strip	_optimize_imm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function optimize_imm
_optimize_imm:                          ; @optimize_imm
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x19, _i@GOTPAGE
Lloh1:
	ldr	x19, [x19, _i@GOTPAGEOFF]
	ldr	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
	ldr	x8, [x19, #8]
	add	x20, x9, #1
Lloh2:
	adrp	x21, _Imm@GOTPAGE
Lloh3:
	ldr	x21, [x21, _Imm@GOTPAGEOFF]
Lloh4:
	adrp	x22, _Imm16@GOTPAGE
Lloh5:
	ldr	x22, [x22, _Imm16@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_smallest_imm_type
	ldr	x8, [x19, #8]
	lsl	x9, x23, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, w0
	str	w10, [x8, x9]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x20, x20, #1
	cmp	x20, #1
	b.ls	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w23, w20, #2
	ldr	w10, [x8, w23, uxtw #2]
	ldr	w9, [x21]
	tst	w9, w10
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #24]
	ldr	x9, [x9, x23, lsl #3]
	ldr	w11, [x9]
	cmp	w11, #131
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w11, #130
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w11, #132
	b.ne	LBB0_3
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	and	w8, w8, w10
	ldr	w0, [x9, #4]
	cmp	w8, #0
	lsr	w8, w0, #16
	ccmp	w8, #0, #0, ne
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	sxth	w0, w0
	str	w0, [x9, #4]
	b	LBB0_2
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	_abort
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_i,40,3                         ; @i
	.comm	_Reg,4,2                        ; @Reg
	.comm	_Reg8,4,2                       ; @Reg8
	.comm	_Reg16,4,2                      ; @Reg16
	.comm	_Reg32,4,2                      ; @Reg32
	.comm	_Reg64,4,2                      ; @Reg64
	.comm	_flag_code,8,3                  ; @flag_code
	.comm	_CODE_16BIT,8,3                 ; @CODE_16BIT
	.comm	_DATA_PREFIX,8,3                ; @DATA_PREFIX
	.comm	_Imm,4,2                        ; @Imm
	.comm	_Imm32,4,2                      ; @Imm32
	.comm	_Imm64,4,2                      ; @Imm64
	.comm	_Imm16,4,2                      ; @Imm16
	.comm	_Imm32S,4,2                     ; @Imm32S
	.comm	_Imm8,4,2                       ; @Imm8
	.comm	_Imm8S,4,2                      ; @Imm8S
	.comm	_current_templates,8,3          ; @current_templates
	.no_dead_strip	_optimize_imm
.subsections_via_symbols
