// File: rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_atomic_func_op(unsigned int, unsigned int, char const*, unsigned int, unsigned int, bool, unsigned int, unsigned int, bool, bool, unsigned int)
void CompilerMSL::emit_atomic_func_op(uint32_t result_type, uint32_t result_id, const char *op, uint32_t mem_order_1,
                                      uint32_t mem_order_2, bool has_mem_order_2, uint32_t obj, uint32_t op1,
                                      bool op1_is_pointer, bool op1_is_literal, uint32_t op2)
{
	forced_temporaries.insert(result_id);

	string exp = string(op) + "(";

	auto &type = expression_type(obj);
	exp += "(volatile ";
	auto *var = maybe_get_backing_variable(obj);
	if (!var)
		SPIRV_CROSS_THROW("No backing variable for atomic operation.");
	exp += get_argument_address_space(*var);
	exp += " atomic_";
	exp += type_to_glsl(type);
	exp += "*)";

	exp += "&";
	exp += to_enclosed_expression(obj);

	bool is_atomic_compare_exchange_strong = op1_is_pointer && op1;

	if (is_atomic_compare_exchange_strong)
	{
		assert(strcmp(op, "atomic_compare_exchange_weak_explicit") == 0);
		assert(op2);
		assert(has_mem_order_2);
		exp += ", &";
		exp += to_name(result_id);
		exp += ", ";
		exp += to_expression(op2);
		exp += ", ";
		exp += get_memory_order(mem_order_1);
		exp += ", ";
		exp += get_memory_order(mem_order_2);
		exp += ")";

		// MSL only supports the weak atomic compare exchange,
		// so emit a CAS loop here.
		statement(variable_decl(type, to_name(result_id)), ";");
		statement("do");
		begin_scope();
		statement(to_name(result_id), " = ", to_expression(op1), ";");
		end_scope_decl(join("while (!", exp, ")"));
		set<SPIRExpression>(result_id, to_name(result_id), result_type, true);
	}
	else
	{
		assert(strcmp(op, "atomic_compare_exchange_weak_explicit") != 0);
		if (op1)
		{
			if (op1_is_literal)
				exp += join(", ", op1);
			else
				exp += ", " + to_expression(op1);
		}
		if (op2)
			exp += ", " + to_expression(op2);

		exp += string(", ") + get_memory_order(mem_order_1);
		if (has_mem_order_2)
			exp += string(", ") + get_memory_order(mem_order_2);

		exp += ")";
		emit_op(result_type, result_id, exp, false);
	}

	flush_all_atomic_capable_variables();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x400, %rsp            # imm = 0x400
movq %rcx, -0x390(%rbp)
movl %edx, -0x384(%rbp)
movl %esi, %r10d
movq -0x390(%rbp), %rsi
movq %rdi, %r11
movl -0x384(%rbp), %edi
movl 0x38(%rbp), %eax
movb 0x30(%rbp), %al
movb 0x28(%rbp), %cl
movl 0x20(%rbp), %edx
movl 0x18(%rbp), %edx
movb 0x10(%rbp), %dl
movq %r11, -0x8(%rbp)
movl %r10d, -0xc(%rbp)
movl %edi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
andb $0x1, %dl
movb %dl, -0x21(%rbp)
andb $0x1, %cl
movb %cl, -0x22(%rbp)
andb $0x1, %al
movb %al, -0x23(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x380(%rbp)
addq $0x228, %rdi            # imm = 0x228
leaq -0x10(%rbp), %rsi
callq 0x2e890
movq %rax, -0x38(%rbp)
movb %dl, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x378(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x7650
movq -0x378(%rbp), %rsi
movq -0x370(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x7520
jmp 0xfe17b
leaq 0x4f1ab(%rip), %rdx     # 0x14d32d
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x11910
jmp 0xfe191
leaq -0x78(%rbp), %rdi
callq 0x7708
leaq -0x79(%rbp), %rdi
callq 0x73d0
movq -0x380(%rbp), %rdi
movl 0x18(%rbp), %esi
callq 0x1f760
movq %rax, -0x398(%rbp)
jmp 0xfe1bb
movq -0x398(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq 0x4ead3(%rip), %rsi     # 0x14cca3
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe1db
movq -0x380(%rbp), %rdi
movl 0x18(%rbp), %esi
callq 0x1fa90
movq %rax, -0x3a0(%rbp)
jmp 0xfe1f3
movq -0x3a0(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
jne 0xfe33f
movb $0x1, -0xc2(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x3b0(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x7650
movq -0x3a8(%rbp), %rdx
leaq 0x4ea66(%rip), %rsi     # 0x14ccae
leaq -0xc0(%rbp), %rdi
callq 0x7520
jmp 0xfe256
movq -0x3b0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x9c50
jmp 0xfe26b
movq -0x3b0(%rbp), %rdi
movb $0x0, -0xc2(%rbp)
leaq 0xafb58(%rip), %rsi     # 0x1addd8
leaq -0xf45f7(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xfedb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfe2c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x7708
leaq -0x79(%rbp), %rdi
callq 0x73d0
jmp 0xfedad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfe317
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x7708
leaq -0xc1(%rbp), %rdi
callq 0x73d0
testb $0x1, -0xc2(%rbp)
jne 0xfe32e
jmp 0xfe33a
movq -0x3b0(%rbp), %rdi
callq 0x72c0
jmp 0xfeda4
movq -0x380(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0xf34c0
jmp 0xfe35b
leaq -0x58(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x7470
jmp 0xfe36d
leaq -0xe8(%rbp), %rdi
callq 0x7708
leaq 0x4e958(%rip), %rsi     # 0x14ccd8
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe38b
movq -0x380(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq (%rsi), %rax
movq 0x98(%rax), %rax
leaq -0x108(%rbp), %rdi
xorl %ecx, %ecx
callq *%rax
jmp 0xfe3b0
leaq -0x58(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x7470
jmp 0xfe3c2
leaq -0x108(%rbp), %rdi
callq 0x7708
leaq 0x4563e(%rip), %rsi     # 0x143a13
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe3e0
leaq 0x4e9e2(%rip), %rsi     # 0x14cdc9
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe3f2
movq -0x380(%rbp), %rsi
movl 0x18(%rbp), %edx
leaq -0x128(%rbp), %rdi
callq 0x72630
jmp 0xfe40a
leaq -0x58(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x7470
jmp 0xfe41c
leaq -0x128(%rbp), %rdi
callq 0x7708
xorl %eax, %eax
testb $0x1, -0x22(%rbp)
movb %al, -0x3b1(%rbp)
je 0xfe443
cmpl $0x0, 0x20(%rbp)
setne %al
movb %al, -0x3b1(%rbp)
movb -0x3b1(%rbp), %al
andb $0x1, %al
movb %al, -0x129(%rbp)
testb $0x1, -0x129(%rbp)
je 0xfe957
movq -0x18(%rbp), %rdi
leaq 0x4e54d(%rip), %rsi     # 0x14c9b6
callq 0x7540
cmpl $0x0, %eax
jne 0xfe478
jmp 0xfe500
leaq 0x4e862(%rip), %rdi     # 0x14cce1
leaq 0x4c639(%rip), %rsi     # 0x14aabf
movl $0xa44, %edx            # imm = 0xA44
leaq 0x4e888(%rip), %rcx     # 0x14cd1a
callq 0x7260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
cmpl $0x0, 0x38(%rbp)
je 0xfe508
jmp 0xfe527
leaq 0x4e8a4(%rip), %rdi     # 0x14cdb3
leaq 0x4c5a9(%rip), %rsi     # 0x14aabf
movl $0xa45, %edx            # imm = 0xA45
leaq 0x4e7f8(%rip), %rcx     # 0x14cd1a
callq 0x7260
testb $0x1, -0x21(%rbp)
je 0xfe52f
jmp 0xfe54e
leaq 0x4e881(%rip), %rdi     # 0x14cdb7
leaq 0x4c582(%rip), %rsi     # 0x14aabf
movl $0xa46, %edx            # imm = 0xA46
leaq 0x4e7d1(%rip), %rcx     # 0x14cd1a
callq 0x7260
leaq 0x4e872(%rip), %rsi     # 0x14cdc7
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe560
movq -0x380(%rbp), %rsi
movl -0x10(%rbp), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x150(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0xfe581
leaq -0x58(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x7470
jmp 0xfe593
leaq -0x150(%rbp), %rdi
callq 0x7708
leaq 0x45fe9(%rip), %rsi     # 0x14458f
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe5b1
movq -0x380(%rbp), %rsi
movl 0x38(%rbp), %edx
leaq -0x170(%rbp), %rdi
callq 0x71b50
jmp 0xfe5c9
leaq -0x58(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x7470
jmp 0xfe5db
leaq -0x170(%rbp), %rdi
callq 0x7708
leaq 0x45fa1(%rip), %rsi     # 0x14458f
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe5f9
movq -0x380(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xff5a0
movq %rax, -0x3c0(%rbp)
jmp 0xfe611
movq -0x3c0(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe623
leaq 0x45f65(%rip), %rsi     # 0x14458f
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe635
movq -0x380(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0xff5a0
movq %rax, -0x3c8(%rbp)
jmp 0xfe64d
movq -0x3c8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe65f
leaq 0x46893(%rip), %rsi     # 0x144ef9
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfe671
movq -0x380(%rbp), %rsi
movq -0x98(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movl -0x10(%rbp), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x1b0(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0xfe6a0
movq -0x3d0(%rbp), %rdx
movq -0x380(%rbp), %rsi
movq (%rsi), %rax
movq 0xc8(%rax), %rax
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rcx
xorl %r8d, %r8d
callq *%rax
jmp 0xfe6cd
movq -0x380(%rbp), %rdi
leaq 0x4a9cb(%rip), %rdx     # 0x1490a6
leaq -0x190(%rbp), %rsi
callq 0xf270
jmp 0xfe6e9
leaq -0x190(%rbp), %rdi
callq 0x7708
leaq -0x1b0(%rbp), %rdi
callq 0x7708
movq -0x380(%rbp), %rdi
leaq 0x43633(%rip), %rsi     # 0x141d42
callq 0xa8e60
jmp 0xfe716
movq -0x380(%rbp), %rdi
callq 0x5c200
jmp 0xfe724
movq -0x380(%rbp), %rsi
movl -0x10(%rbp), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x1d0(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0xfe745
movq -0x380(%rbp), %rsi
movl 0x20(%rbp), %edx
leaq -0x1f0(%rbp), %rdi
callq 0x71b50
jmp 0xfe75d
movq -0x380(%rbp), %rdi
leaq 0x4a8a4(%rip), %rdx     # 0x14900f
leaq 0x4a934(%rip), %r8      # 0x1490a6
leaq -0x1d0(%rbp), %rsi
leaq -0x1f0(%rbp), %rcx
callq 0xa51b0
jmp 0xfe787
leaq -0x1f0(%rbp), %rdi
callq 0x7708
leaq -0x1d0(%rbp), %rdi
callq 0x7708
leaq 0x4e625(%rip), %rsi     # 0x14cdcb
leaq 0x4674c(%rip), %rcx     # 0x144ef9
leaq -0x210(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x116cc0
jmp 0xfe7bf
movq -0x380(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x61240
jmp 0xfe7d4
leaq -0x210(%rbp), %rdi
callq 0x7708
movq -0x380(%rbp), %rsi
movl -0x10(%rbp), %edx
movl %edx, -0x3d4(%rbp)
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x230(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0xfe807
movl -0x3d4(%rbp), %esi
movq -0x380(%rbp), %rdi
movb $0x1, -0x231(%rbp)
leaq -0x230(%rbp), %rdx
leaq -0xc(%rbp), %rcx
leaq -0x231(%rbp), %r8
callq 0xa2780
jmp 0xfe834
leaq -0x230(%rbp), %rdi
callq 0x7708
jmp 0xfed84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfe8bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x7708
leaq -0x1b0(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfe900
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x7708
leaq -0x1d0(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq -0x18(%rbp), %rdi
leaq 0x4e054(%rip), %rsi     # 0x14c9b6
callq 0x7540
cmpl $0x0, %eax
je 0xfe96e
jmp 0xfe98d
leaq 0x4e45f(%rip), %rdi     # 0x14cdd4
leaq 0x4c143(%rip), %rsi     # 0x14aabf
movl $0xa5c, %edx            # imm = 0xA5C
leaq 0x4e392(%rip), %rcx     # 0x14cd1a
callq 0x7260
cmpl $0x0, 0x20(%rbp)
je 0xfeaa1
testb $0x1, -0x23(%rbp)
je 0xfe9fc
leaq 0x45beb(%rip), %rsi     # 0x14458f
leaq -0x258(%rbp), %rdi
leaq 0x20(%rbp), %rdx
callq 0xa6f20
jmp 0xfe9b6
leaq -0x58(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x7470
jmp 0xfe9c8
leaq -0x258(%rbp), %rdi
callq 0x7708
jmp 0xfea9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
movq -0x380(%rbp), %rsi
movl 0x20(%rbp), %edx
leaq -0x298(%rbp), %rdi
callq 0x71b50
jmp 0xfea14
leaq 0x45b74(%rip), %rsi     # 0x14458f
leaq -0x278(%rbp), %rdi
leaq -0x298(%rbp), %rdx
callq 0xa6db0
jmp 0xfea30
leaq -0x58(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x7470
jmp 0xfea42
leaq -0x278(%rbp), %rdi
callq 0x7708
leaq -0x298(%rbp), %rdi
callq 0x7708
jmp 0xfea9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfea8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x7708
leaq -0x298(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
jmp 0xfeaa1
cmpl $0x0, 0x38(%rbp)
je 0xfeb4e
movq -0x380(%rbp), %rsi
movl 0x38(%rbp), %edx
leaq -0x2d8(%rbp), %rdi
callq 0x71b50
jmp 0xfeac3
leaq 0x45ac5(%rip), %rsi     # 0x14458f
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rdx
callq 0xa6db0
jmp 0xfeadf
leaq -0x58(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x7470
jmp 0xfeaf1
leaq -0x2b8(%rbp), %rdi
callq 0x7708
leaq -0x2d8(%rbp), %rdi
callq 0x7708
jmp 0xfeb4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfeb3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x7708
leaq -0x2d8(%rbp), %rdi
callq 0x7708
jmp 0xfeda4
leaq -0x319(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x7650
movq -0x3e0(%rbp), %rdx
leaq 0x45a20(%rip), %rsi     # 0x14458f
leaq -0x318(%rbp), %rdi
callq 0x7520
jmp 0xfeb7d
movq -0x380(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xff5a0
movq %rax, -0x3e8(%rbp)
jmp 0xfeb95
movq -0x3e8(%rbp), %rdx
leaq -0x2f8(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x11910
jmp 0xfebb1
leaq -0x58(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x7470
jmp 0xfebc3
leaq -0x2f8(%rbp), %rdi
callq 0x7708
leaq -0x318(%rbp), %rdi
callq 0x7708
leaq -0x319(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x21(%rbp)
je 0xfed52
leaq -0x361(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x7650
movq -0x3f0(%rbp), %rdx
leaq 0x4597d(%rip), %rsi     # 0x14458f
leaq -0x360(%rbp), %rdi
callq 0x7520
jmp 0xfec20
movq -0x380(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0xff5a0
movq %rax, -0x3f8(%rbp)
jmp 0xfec38
movq -0x3f8(%rbp), %rdx
leaq -0x340(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0x11910
jmp 0xfec54
leaq -0x58(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0x7470
jmp 0xfec66
leaq -0x340(%rbp), %rdi
callq 0x7708
leaq -0x360(%rbp), %rdi
callq 0x7708
leaq -0x361(%rbp), %rdi
callq 0x73d0
jmp 0xfed52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfece1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfecd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x7708
leaq -0x318(%rbp), %rdi
callq 0x7708
leaq -0x319(%rbp), %rdi
callq 0x73d0
jmp 0xfeda4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfed44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xfed38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x7708
leaq -0x360(%rbp), %rdi
callq 0x7708
leaq -0x361(%rbp), %rdi
callq 0x73d0
jmp 0xfeda4
leaq 0x461a0(%rip), %rsi     # 0x144ef9
leaq -0x58(%rbp), %rdi
callq 0x7340
jmp 0xfed64
movq -0x380(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
leaq -0x58(%rbp), %rcx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x784f0
jmp 0xfed82
jmp 0xfed84
movq -0x380(%rbp), %rdi
callq 0x1ffa0
jmp 0xfed92
leaq -0x58(%rbp), %rdi
callq 0x7708
addq $0x400, %rsp            # imm = 0x400
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x7708
movq -0x88(%rbp), %rdi
callq 0x7640
nopl (%rax)