	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emit_addimm_and_set_flags      ## -- Begin function emit_addimm_and_set_flags
	.p2align	4, 0x90
_emit_addimm_and_set_flags:             ## @emit_addimm_and_set_flags
	.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	%esi, %r14d
	movl	%edi, %r12d
	leal	65535(%r12), %eax
	xorl	%edi, %edi
	cmpl	$131071, %eax                   ## imm = 0x1FFFF
	setb	%dil
	callq	_assert
	leaq	-44(%rbp), %rsi
	movl	%r12d, %edi
	callq	_genimm
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rbx
	movl	(%rax,%rbx,4), %edx
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movl	%r12d, %ecx
	callq	_assem_debug
	movl	%ebx, %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_rd_rn_rm
	movl	%eax, %edi
	orl	-44(%rbp), %edi
LBB0_2:
	orl	$-493879296, %edi               ## imm = 0xE2900000
	jmp	LBB0_6
LBB0_3:
	movl	%r12d, %r15d
	negl	%r15d
	leaq	-44(%rbp), %rsi
	movl	%r15d, %edi
	callq	_genimm
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%edx, %esi
	movl	%r12d, %ecx
	callq	_assem_debug
	movl	%r14d, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_rd_rn_rm
	movl	%eax, %edi
	orl	-44(%rbp), %edi
LBB0_5:
	orl	$-498073600, %edi               ## imm = 0xE2500000
LBB0_6:
	callq	_output_w32
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_regname@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movslq	%r14d, %rbx
	movl	(%rax,%rbx,4), %edx
	testl	%r12d, %r12d
	js	LBB0_9
## %bb.8:
	movl	%r12d, %ecx
	andl	$65280, %ecx                    ## imm = 0xFF00
	leaq	L_.str.3(%rip), %rdi
	movl	%edx, %esi
	callq	_assem_debug
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movzbl	%r12b, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movl	%r15d, %ecx
	callq	_assem_debug
	shrl	$8, %r12d
	movl	%r14d, %edi
	movl	%r14d, %esi
	movl	%r12d, %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	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_rd_rn_imm_shift
	movl	%eax, %edi
	jmp	LBB0_2
LBB0_9:
	movl	%r15d, %ecx
	andl	$65280, %ecx                    ## imm = 0xFF00
	leaq	L_.str.2(%rip), %rdi
	movl	%edx, %esi
	callq	_assem_debug
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movzbl	%r15b, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%edx, %esi
	movl	%ebx, %ecx
	callq	_assem_debug
	sarl	$8, %r15d
	movl	%r14d, %edi
	movl	%r14d, %esi
	movl	%r15d, %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_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adds %s,%s,#%d\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"sub %s,%s,#%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"add %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_and_set_flags      ; -- Begin function emit_addimm_and_set_flags
	.p2align	2
_emit_addimm_and_set_flags:             ; @emit_addimm_and_set_flags
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w8, #65535
	mov	w9, #131071
	add	w8, w0, w8
	cmp	w8, w9
	cset	w0, lo
	bl	_assert
	add	x1, sp, #12
	mov	x0, x20
	bl	_genimm
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _regname@GOTPAGE
Lloh1:
	ldr	x8, [x8, _regname@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8, w19, sxtw #2]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x1
	mov	x3, x20
	bl	_assem_debug
	mov	x0, x19
	mov	x1, x19
	mov	w2, #0
	bl	_rd_rn_rm
	ldr	w8, [sp, #12]
	orr	w8, w0, w8
	mov	w9, #-498073600
	add	w9, w9, #1024, lsl #12          ; =4194304
	orr	w0, w8, w9
	b	LBB0_7
LBB0_2:
	mov	w22, #-498073600
	neg	w21, w20
	add	x1, sp, #12
	mov	x0, x21
	bl	_genimm
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _regname@GOTPAGE
Lloh6:
	ldr	x8, [x8, _regname@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w1, [x8, w19, sxtw #2]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x1
	mov	x3, x20
	bl	_assem_debug
	mov	x0, x19
	mov	x1, x19
	mov	w2, #0
	bl	_rd_rn_rm
	ldr	w8, [sp, #12]
	orr	w8, w0, w8
	orr	w0, w8, w22
	b	LBB0_7
LBB0_4:
Lloh10:
	adrp	x23, _regname@GOTPAGE
Lloh11:
	ldr	x23, [x23, _regname@GOTPAGEOFF]
	ldr	x8, [x23]
	sxtw	x24, w19
	ldr	w1, [x8, w19, sxtw #2]
	tbnz	w20, #31, LBB0_6
; %bb.5:
	and	w3, w20, #0xff00
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x1
	bl	_assem_debug
	ldr	x8, [x23]
	ldr	w1, [x8, x24, lsl #2]
	and	w21, w20, #0xff
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x1
	mov	x3, x21
	bl	_assem_debug
	lsr	w2, w20, #8
	mov	x0, x19
	mov	x1, x19
	mov	w3, #8
	bl	_rd_rn_imm_shift
	add	w8, w22, #768, lsl #12          ; =3145728
	orr	w0, w0, w8
	bl	_output_w32
	mov	x0, x19
	mov	x1, x19
	mov	x2, x21
	mov	w3, #0
	bl	_rd_rn_imm_shift
	add	w8, w22, #1024, lsl #12         ; =4194304
	orr	w0, w0, w8
	b	LBB0_7
LBB0_6:
	and	w3, w21, #0xff00
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x1
	bl	_assem_debug
	ldr	x8, [x23]
	ldr	w1, [x8, x24, lsl #2]
	and	w20, w21, #0xff
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x1
	mov	x3, x20
	bl	_assem_debug
	asr	w2, w21, #8
	mov	x0, x19
	mov	x1, x19
	mov	w3, #8
	bl	_rd_rn_imm_shift
	sub	w8, w22, #256, lsl #12          ; =1048576
	orr	w0, w0, w8
	bl	_output_w32
	mov	x0, x19
	mov	x1, x19
	mov	x2, x20
	mov	w3, #0
	bl	_rd_rn_imm_shift
	orr	w0, w0, w22
LBB0_7:
	bl	_output_w32
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adds %s,%s,#%d\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"sub %s,%s,#%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"add %s,%s,#%d\n"

.subsections_via_symbols
