	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emit_addimm                    ## -- Begin function emit_addimm
	.p2align	4, 0x90
_emit_addimm:                           ## @emit_addimm
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	movl	%edi, %r15d
	xorl	%edi, %edi
	cmpl	$16, %r15d
	setb	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$16, %r14d
	setb	%dil
	callq	_assert
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	leal	65535(%rbx), %eax
	xorl	%edi, %edi
	cmpl	$131071, %eax                   ## imm = 0x1FFFF
	setb	%dil
	callq	_assert
	leaq	-44(%rbp), %rsi
	movl	%ebx, %edi
	callq	_genimm
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r14d, %ecx
	movl	(%rax,%rcx,4), %esi
	movl	%r15d, %ecx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %ecx
	callq	_assem_debug
	movl	%r14d, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_rd_rn_rm
	movl	%eax, %edi
	orl	-44(%rbp), %edi
LBB0_3:
	orl	$-494927872, %edi               ## imm = 0xE2800000
	jmp	LBB0_9
LBB0_4:
	cmpl	%r14d, %r15d
	je	LBB0_10
## %bb.5:
	movl	%r15d, %edi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_emit_mov                       ## TAILCALL
LBB0_6:
	movl	%ebx, %r12d
	negl	%r12d
	leaq	-44(%rbp), %rsi
	movl	%r12d, %edi
	callq	_genimm
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r14d, %ecx
	movl	(%rax,%rcx,4), %esi
	movl	%r15d, %ecx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %ecx
	callq	_assem_debug
	movl	%r14d, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_rd_rn_rm
	movl	%eax, %edi
	orl	-44(%rbp), %edi
LBB0_8:
	orl	$-499122176, %edi               ## imm = 0xE2400000
LBB0_9:
	callq	_output_w32
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r14d, %r13d
	movl	(%rax,%r13,4), %esi
	movl	%r15d, %ecx
	movl	(%rax,%rcx,4), %edx
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.12:
	movl	%ebx, %ecx
	andl	$65280, %ecx                    ## imm = 0xFF00
	leaq	L_.str(%rip), %rdi
	callq	_assem_debug
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edx
	movzbl	%bl, %r12d
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movl	%r12d, %ecx
	callq	_assem_debug
	shrl	$8, %ebx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	$8, %ecx
	callq	_rd_rn_imm_shift
	orl	$-494927872, %eax               ## imm = 0xE2800000
	movl	%eax, %edi
	callq	_output_w32
	movl	%r14d, %edi
	movl	%r14d, %esi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_rd_rn_imm_shift
	movl	%eax, %edi
	jmp	LBB0_3
LBB0_13:
	movl	%r12d, %ecx
	andl	$65280, %ecx                    ## imm = 0xFF00
	leaq	L_.str.1(%rip), %rdi
	callq	_assem_debug
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edx
	movzbl	%r12b, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%edx, %esi
	movl	%ebx, %ecx
	callq	_assem_debug
	sarl	$8, %r12d
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	$8, %ecx
	callq	_rd_rn_imm_shift
	orl	$-499122176, %eax               ## imm = 0xE2400000
	movl	%eax, %edi
	callq	_output_w32
	movl	%r14d, %edi
	movl	%r14d, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_rd_rn_imm_shift
	movl	%eax, %edi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"add %s,%s,#%d\n"

	.comm	_regname,8,3                    ## @regname
L_.str.1:                               ## @.str.1
	.asciz	"sub %s,%s,#%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emit_addimm                    ; -- Begin function emit_addimm
	.p2align	2
_emit_addimm:                           ; @emit_addimm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	cmp	w0, #16
	cset	w0, lo
	bl	_assert
	cmp	w19, #16
	cset	w0, lo
	bl	_assert
	cbz	w21, LBB0_3
; %bb.1:
	mov	w8, #65535
	mov	w9, #131071
	add	w8, w21, w8
	cmp	w8, w9
	cset	w0, lo
	bl	_assert
	add	x1, sp, #12
	mov	x0, x21
	bl	_genimm
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _regname@GOTPAGE
Lloh1:
	ldr	x8, [x8, _regname@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8, w19, uxtw #2]
	ldr	w2, [x8, w20, uxtw #2]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x21
	bl	_assem_debug
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_rd_rn_rm
	ldr	w8, [sp, #12]
	orr	w8, w0, w8
	mov	w9, #-499122176
	add	w9, w9, #1024, lsl #12          ; =4194304
	orr	w0, w8, w9
	b	LBB0_10
LBB0_3:
	cmp	w20, w19
	b.eq	LBB0_11
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_emit_mov
LBB0_5:
	mov	w24, #-499122176
	neg	w22, w21
	add	x1, sp, #12
	mov	x0, x22
	bl	_genimm
	cbz	x0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _regname@GOTPAGE
Lloh6:
	ldr	x8, [x8, _regname@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w1, [x8, w19, uxtw #2]
	ldr	w2, [x8, w20, uxtw #2]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_assem_debug
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_rd_rn_rm
	ldr	w8, [sp, #12]
	orr	w8, w0, w8
	orr	w0, w8, w24
	b	LBB0_10
LBB0_7:
Lloh10:
	adrp	x25, _regname@GOTPAGE
Lloh11:
	ldr	x25, [x25, _regname@GOTPAGEOFF]
	ldr	x8, [x25]
	mov	w23, w19
	ldr	w1, [x8, w19, uxtw #2]
	ldr	w2, [x8, w20, uxtw #2]
	tbnz	w21, #31, LBB0_9
; %bb.8:
	and	w3, w21, #0xff00
Lloh12:
	adrp	x22, l_.str@PAGE
Lloh13:
	add	x22, x22, l_.str@PAGEOFF
	mov	x0, x22
	bl	_assem_debug
	ldr	x8, [x25]
	ldr	w1, [x8, x23, lsl #2]
	and	w23, w21, #0xff
	mov	x0, x22
	mov	x2, x1
	mov	x3, x23
	bl	_assem_debug
	lsr	w2, w21, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #8
	bl	_rd_rn_imm_shift
	add	w20, w24, #1024, lsl #12        ; =4194304
	orr	w0, w0, w20
	bl	_output_w32
	mov	x0, x19
	mov	x1, x19
	mov	x2, x23
	mov	w3, #0
	bl	_rd_rn_imm_shift
	orr	w0, w0, w20
	b	LBB0_10
LBB0_9:
	and	w3, w22, #0xff00
Lloh14:
	adrp	x21, l_.str.1@PAGE
Lloh15:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_assem_debug
	ldr	x8, [x25]
	ldr	w1, [x8, x23, lsl #2]
	and	w23, w22, #0xff
	mov	x0, x21
	mov	x2, x1
	mov	x3, x23
	bl	_assem_debug
	asr	w2, w22, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #8
	bl	_rd_rn_imm_shift
	orr	w0, w0, w24
	bl	_output_w32
	mov	x0, x19
	mov	x1, x19
	mov	x2, x23
	mov	w3, #0
	bl	_rd_rn_imm_shift
	orr	w0, w0, w24
LBB0_10:
	bl	_output_w32
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add %s,%s,#%d\n"

	.comm	_regname,8,3                    ; @regname
l_.str.1:                               ; @.str.1
	.asciz	"sub %s,%s,#%d\n"

.subsections_via_symbols
