LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/shellaes128v1d5n64/ref/shellaes.c
// Function: shellaesEnc
void shellaesEnc(const u8 key[], const u8 nonce[], const u8 ad[], unsigned long long int adlen, const u8 p[], unsigned long long int ptlen, u8 c[], unsigned long long int ctlen){

    u8 tag[16];


    if(ptlen<16){
        /*plaintext is shorter than one block*/
        shellaesEnc_short(key, nonce, ad, adlen, p, ptlen, c, tag);
    }
    else if (ptlen%16==0){
        /*plaintext is multiple blocks long */
        shellaesEnc_fb(key, nonce, ad, adlen, p, ptlen, c, tag);
    }
    else{
         /*plaintext is longer than one block, and has a length that is not a mutiple of block length */
        shellaesEnc_nfb(key, nonce, ad, adlen, p, ptlen, c, tag);
    }

    /*append the tag to ciphertext*/
    memcpy(c+ptlen, tag, 16);

    /*
    printf("the ciphertext and the tag is \n");
    printf_byte_string(c, ctlen);
    */
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq 0x30(%rsp), %r14
movq %rsp, %rax
cmpq $0xf, %r9
ja 0x6dc0
movq %rbx, %r9
pushq %rax
pushq %r14
callq 0x2120
jmp 0x6dda
movq %rbx, %r9
testb $0xf, %bl
je 0x6dd2
pushq %rax
pushq %r14
callq 0x2230
jmp 0x6dda
pushq %rax
pushq %r14
callq 0x2250
addq $0x10, %rsp
vmovaps (%rsp), %xmm0
vmovups %xmm0, (%r14,%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/shellaes128v1d5n64/ref/shellaes.c
// Function: shellaesDec
int shellaesDec(const u8 key[], const u8 nonce[], const u8 ad[], unsigned long long int adlen, const u8 c[], unsigned long long int ctlen, u8 p[], unsigned long long int ptlen){

    u8 tag[16];
    int flag;

    memcpy(tag, c+ptlen, 16);

    if(ptlen<16){
        /*plaintext is shorter than one block*/
        flag=shellaesDec_short(key, nonce, ad, adlen, c, ptlen, p, tag);
    }
    else if (ptlen%16==0){
        /*plaintext is multiple blocks long */
        flag=shellaesDecVef_fb(key, nonce, ad, adlen, c, ptlen, p, tag);
    }
    else{
        /*plaintext is longer than one block, and has a length that is not a mutiple of block length */
        flag=shellaesDec_nfb(key, nonce, ad, adlen, c, ptlen, p, tag);
    }

    return flag;
}

// Assembly:
subq $0x18, %rsp
movq 0x28(%rsp), %r9
movq 0x20(%rsp), %rax
vmovups (%r8,%r9), %xmm0
vmovaps %xmm0, (%rsp)
movq %rsp, %r10
cmpq $0xf, %r9
ja 0x6e1d
pushq %r10
pushq %rax
callq 0x20d0
jmp 0x6e35
testb $0xf, %r9b
je 0x6e2d
pushq %r10
pushq %rax
callq 0x2110
jmp 0x6e35
pushq %r10
pushq %rax
callq 0x2100
addq $0x10, %rsp
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/main.c
// Function: main
int main() 
{
	//初始化mpu6050的dmp
	ms_open();
	do{
		ms_update();
		printf("yaw = %2.1f\tpitch = %2.1f\troll = %2.1f\ttemperature = %2.1f\tcompass = %2.1f, %2.1f, %2.1f\n",
		 ypr[YAW], ypr[PITCH], ypr[ROLL], temp, compass[0], compass[1], compass[2]);
		delay_ms(5);
	}while(1);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x1500
leaq 0x8cf4(%rip), %r14      # 0xa184
leaq 0x8cf9(%rip), %r15      # 0xa190
leaq 0x8d0e(%rip), %r12      # 0xa1ac
leaq 0x4b5f(%rip), %rbx      # 0x6004
callq 0x17fd
xorps %xmm0, %xmm0
cvtss2sd (%r14), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%r14), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x8(%r14), %xmm2
xorps %xmm3, %xmm3
cvtss2sd (%r15), %xmm3
xorps %xmm4, %xmm4
cvtss2sd (%r12), %xmm4
xorps %xmm5, %xmm5
cvtss2sd 0x4(%r12), %xmm5
xorps %xmm6, %xmm6
cvtss2sd 0x8(%r12), %xmm6
movq %rbx, %rdi
movb $0x7, %al
callq 0x1040
movl $0x1388, %edi           # imm = 0x1388
callq 0x10e0
jmp 0x14a5
nop
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/sensor.c
// Function: GetGravity(VectorFloat*, Quaternion*)
uint8_t GetGravity(VectorFloat *v, Quaternion *q) {
	v -> x = 2 * (q -> x*q -> z - q -> w*q -> y);
	v -> y = 2 * (q -> w*q -> x + q -> y*q -> z);
	v -> z = q -> w*q -> w - q -> x*q -> x - q -> y*q -> y + q -> z*q -> z;
	return 0;
}

// Assembly:
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm2
movss 0xc(%rsi), %xmm1
movss 0x8(%rsi), %xmm3
movaps %xmm3, %xmm4
mulss %xmm0, %xmm4
movaps %xmm2, %xmm5
mulss %xmm1, %xmm5
subss %xmm4, %xmm5
addss %xmm5, %xmm5
movss %xmm5, (%rdi)
movaps %xmm1, %xmm4
mulss %xmm3, %xmm4
movaps %xmm0, %xmm5
mulss %xmm2, %xmm5
addss %xmm4, %xmm5
addss %xmm5, %xmm5
movss %xmm5, 0x4(%rdi)
mulss %xmm2, %xmm2
mulss %xmm0, %xmm0
subss %xmm2, %xmm0
mulss %xmm3, %xmm3
subss %xmm3, %xmm0
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x8(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/sensor.c
// Function: GetYawPitchRoll(float*, Quaternion*, VectorFloat*)
uint8_t GetYawPitchRoll(float *data, Quaternion *q, VectorFloat *gravity) {
	// yaw: (about Z axis)
	data[0] = atan2(2*q -> x*q -> y - 2*q -> w*q -> z, 2*q -> w*q -> w + 2*q -> x*q -> x - 1);
	// pitch: (nose up/down, about Y axis)
	data[1] = atan(gravity -> x / sqrt(gravity -> y*gravity -> y + gravity -> z*gravity -> z));
	// roll: (tilt left/right, about X axis)
	data[2] = atan(gravity -> y / sqrt(gravity -> x*gravity -> x + gravity -> z*gravity -> z));
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movss (%rsi), %xmm2
movss 0x4(%rsi), %xmm3
movaps %xmm3, %xmm0
addss %xmm3, %xmm0
movaps %xmm2, %xmm1
addss %xmm2, %xmm1
movss 0xc(%rsi), %xmm4
mulss %xmm1, %xmm4
mulss %xmm0, %xmm3
mulss 0x8(%rsi), %xmm0
subss %xmm4, %xmm0
mulss %xmm2, %xmm1
addss %xmm3, %xmm1
addss 0x453e(%rip), %xmm1     # 0x6078
callq 0x10c0
movss %xmm0, (%rbx)
movss (%r14), %xmm2
movss 0x4(%r14), %xmm0
movss 0x8(%r14), %xmm1
mulss %xmm1, %xmm1
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x1b6e
sqrtss %xmm0, %xmm0
jmp 0x1b7f
movss %xmm2, 0x4(%rsp)
callq 0x1120
movss 0x4(%rsp), %xmm2
divss %xmm0, %xmm2
movaps %xmm2, %xmm0
callq 0x1090
movss %xmm0, 0x4(%rbx)
movss (%r14), %xmm0
movss 0x4(%r14), %xmm2
movss 0x8(%r14), %xmm1
mulss %xmm1, %xmm1
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
ucomiss 0x44c8(%rip), %xmm0     # 0x607c
jb 0x1bbc
sqrtss %xmm0, %xmm0
jmp 0x1bcd
movss %xmm2, 0x4(%rsp)
callq 0x1120
movss 0x4(%rsp), %xmm2
divss %xmm0, %xmm2
movaps %xmm2, %xmm0
callq 0x1090
movss %xmm0, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_reg_dump()
uint8_t mpu_reg_dump(void)
{
	uint8_t ii;
	uint8_t data;

	for (ii = 0; ii < st.hw->num_reg; ii++)
	{
		if (ii == st.reg->fifo_r_w || ii == st.reg->mem_r_w)
			continue;
		if (i2c_read(st.hw->addr, ii, 1, &data))
			return 1;
#if defined MPU_DEBUG
		printf_P("%#5x: %#5x\r\r\n", ii, data);
#endif
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x8622(%rip), %rax      # 0xa218
cmpb $0x0, 0x4(%rax)
je 0x1c3e
xorl %ebp, %ebp
leaq 0x7(%rsp), %rbx
movq 0x8606(%rip), %rcx      # 0xa210
cmpb 0xd(%rcx), %bpl
je 0x1c2e
cmpb 0x18(%rcx), %bpl
je 0x1c2e
movzbl (%rax), %edi
movzbl %bpl, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4dda
cmpb $-0x1, %al
je 0x1c47
incb %bpl
movq 0x85e0(%rip), %rax      # 0xa218
cmpb 0x4(%rax), %bpl
jb 0x1c03
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movb $0x1, %al
jmp 0x1c40
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_gyro_fsr(unsigned short)
uint8_t mpu_set_gyro_fsr(uint16_t fsr)
{
	uint8_t data;

	if (!(st.chip_cfg.sensors))
		return 1;

	switch (fsr)
	{
	case 250:
		data = INV_FSR_250DPS << 3;
		break;
	case 500:
		data = INV_FSR_500DPS << 3;
		break;
	case 1000:
		data = INV_FSR_1000DPS << 3;
		break;
	case 2000:
		data = INV_FSR_2000DPS << 3;
		break;
	default:
		return 1;
	}

	if (st.chip_cfg.gyro_fsr == (data >> 3))
		return 0;
	if (i2c_write(st.hw->addr, st.reg->gyro_cfg, 1, &data))
		return 1;
	st.chip_cfg.gyro_fsr = data >> 3;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb $0x1, %bl
cmpb $0x0, 0x82e6(%rip)      # 0xa22a
je 0x1fd0
movzwl %di, %eax
cmpl $0x3e7, %eax            # imm = 0x3E7
jg 0x1f69
cmpl $0xfa, %eax
je 0x1f7e
cmpl $0x1f4, %eax            # imm = 0x1F4
jne 0x1fd0
movb $0x8, 0xf(%rsp)
jmp 0x1f8a
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x1f85
cmpl $0x7d0, %eax            # imm = 0x7D0
jne 0x1fd0
movb $0x18, 0xf(%rsp)
jmp 0x1f8a
movb $0x0, 0xf(%rsp)
jmp 0x1f8a
movb $0x10, 0xf(%rsp)
movb 0xf(%rsp), %al
shrb $0x3, %al
cmpb %al, 0x8291(%rip)       # 0xa228
je 0x1fce
movq 0x8278(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x8266(%rip), %rax      # 0xa210
movzbl 0x6(%rax), %esi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x1fd0
movb 0xf(%rsp), %al
shrb $0x3, %al
movb %al, 0x825a(%rip)       # 0xa228
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_accel_fsr(unsigned char)
uint8_t mpu_set_accel_fsr(uint8_t fsr)
{
	uint8_t data;

	if (!(st.chip_cfg.sensors))
		return 1;

	switch (fsr)
	{
	case 2:
		data = INV_FSR_2G << 3;
		break;
	case 4:
		data = INV_FSR_4G << 3;
		break;
	case 8:
		data = INV_FSR_8G << 3;
		break;
	case 16:
		data = INV_FSR_16G << 3;
		break;
	default:
		return 1;
	}

	if (st.chip_cfg.accel_fsr == (data >> 3))
		return 0;
	if (i2c_write(st.hw->addr, st.reg->accel_cfg, 1, &data))
		return 1;
	st.chip_cfg.accel_fsr = data >> 3;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb $0x1, %bl
cmpb $0x0, 0x8244(%rip)      # 0xa22a
je 0x2066
movzbl %dil, %eax
addl $-0x2, %eax
rorl %eax
cmpl $0x7, %eax
ja 0x2066
leaq 0x44b3(%rip), %rcx      # 0x64b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, 0xf(%rsp)
jmp 0x2020
movb $0x10, 0xf(%rsp)
jmp 0x2020
movb $0x8, 0xf(%rsp)
jmp 0x2020
movb $0x18, 0xf(%rsp)
movb 0xf(%rsp), %al
shrb $0x3, %al
cmpb %al, 0x81fc(%rip)       # 0xa229
je 0x2064
movq 0x81e2(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x81d0(%rip), %rax      # 0xa210
movzbl 0x7(%rax), %esi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x2066
movb 0xf(%rsp), %al
shrb $0x3, %al
movb %al, 0x81c5(%rip)       # 0xa229
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_lpf(unsigned short)
uint8_t mpu_set_lpf(uint16_t lpf)
{
	uint8_t data;

	if (!(st.chip_cfg.sensors))
		return 1;

	if (lpf >= 188)
		data = INV_FILTER_188HZ;
	else if (lpf >= 98)
		data = INV_FILTER_98HZ;
	else if (lpf >= 42)
		data = INV_FILTER_42HZ;
	else if (lpf >= 20)
		data = INV_FILTER_20HZ;
	else if (lpf >= 10)
		data = INV_FILTER_10HZ;
	else
		data = INV_FILTER_5HZ;

	if (st.chip_cfg.lpf == data)
		return 0;
	if (i2c_write(st.hw->addr, st.reg->lpf, 1, &data))
		return 1;
	st.chip_cfg.lpf = data;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb $0x1, %bl
cmpb $0x0, 0x81ae(%rip)      # 0xa22a
je 0x210c
movzwl %di, %eax
cmpl $0xbc, %eax
jb 0x2093
movb $0x1, 0xf(%rsp)
jmp 0x20cc
cmpw $0x62, %di
jb 0x20a0
movb $0x2, 0xf(%rsp)
jmp 0x20cc
cmpw $0x2a, %di
jb 0x20ad
movb $0x3, 0xf(%rsp)
jmp 0x20cc
cmpw $0x14, %di
jb 0x20ba
movb $0x4, 0xf(%rsp)
jmp 0x20cc
cmpw $0xa, %di
jb 0x20c7
movb $0x5, 0xf(%rsp)
jmp 0x20cc
movb $0x6, 0xf(%rsp)
movb 0x8159(%rip), %al       # 0xa22b
cmpb 0xf(%rsp), %al
je 0x210a
movq 0x8139(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x8127(%rip), %rax      # 0xa210
movzbl 0x2(%rax), %esi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x210c
movb 0xf(%rsp), %al
movb %al, 0x8121(%rip)       # 0xa22b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_sample_rate(unsigned short)
uint8_t mpu_set_sample_rate(uint16_t rate)
{
	uint8_t data;

	if (!(st.chip_cfg.sensors))
		return 1;

	if (st.chip_cfg.dmp_on)
		return 1;
	else
	{
		if (st.chip_cfg.lp_accel_mode)
		{
			if (rate && (rate <= 40))
			{
				/* Just stay in low-power accel mode. */
				mpu_lp_accel_mode(rate);
				return 0;
			}
			/* Requested rate exceeds the allowed frequencies in LP accel mode,
			 * switch back to full-power mode.
			 */
			mpu_lp_accel_mode(0);
		}
		if (rate < 4)
			rate = 4;
		else if (rate > 1000)
			rate = 1000;

		data = 1000 / rate - 1;
		if (i2c_write(st.hw->addr, st.reg->rate_div, 1, &data))
			return 1;

		st.chip_cfg.sample_rate = 1000 / (1 + data);

#ifdef AK89xx_SECONDARY
		mpu_set_compass_sample_rate(min(st.chip_cfg.compass_sample_rate, MAX_COMPASS_SAMPLE_RATE));
#endif

		/* Automatically set LPF to 1/2 sampling rate. */
		mpu_set_lpf(st.chip_cfg.sample_rate >> 1);
		return 0;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x810b(%rip)      # 0xa22a
movb $0x1, %bl
je 0x21d3
cmpb $0x0, 0x8116(%rip)      # 0xa244
jne 0x21d3
movl %edi, %r14d
cmpb $0x0, 0x80f6(%rip)      # 0xa234
je 0x215e
leal -0x1(%r14), %eax
cmpw $0x27, %ax
ja 0x2157
movzbl %r14b, %edi
callq 0x247d
xorl %ebx, %ebx
jmp 0x21d3
xorl %edi, %edi
callq 0x247d
movzwl %r14w, %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cmpl %ecx, %eax
cmovael %ecx, %r14d
cmpw $0x5, %r14w
movl $0x4, %ecx
cmovael %r14d, %ecx
movw $0x3e8, %ax             # imm = 0x3E8
xorl %edx, %edx
divw %cx
decb %al
leaq 0x7(%rsp), %rcx
movb %al, (%rcx)
movq 0x8084(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x8072(%rip), %rax      # 0xa210
movzbl 0x1(%rax), %esi
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x21d3
movzbl 0x7(%rsp), %ecx
incl %ecx
xorl %ebx, %ebx
movw $0x3e8, %ax             # imm = 0x3E8
xorl %edx, %edx
divw %cx
movzwl %ax, %edi
movw %di, 0x8062(%rip)       # 0xa22e
shrl %edi
callq 0x206e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_bypass(unsigned char)
uint8_t mpu_set_bypass(uint8_t bypass_on)
{
	uint8_t tmp;

	if (st.chip_cfg.bypass_mode == bypass_on)
		return 0;

	if (bypass_on)
	{
		if (i2c_read(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
			return 1;
		tmp &= ~BIT_AUX_IF_EN;
		if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
			return 1;
		delay_ms(3);
		tmp = BIT_BYPASS_EN;
		if (st.chip_cfg.active_low_int)
			tmp |= BIT_ACTL;
		if (st.chip_cfg.latched_int)
			tmp |= BIT_LATCH_EN | BIT_ANY_RD_CLR;
		if (i2c_write(st.hw->addr, st.reg->int_pin_cfg, 1, &tmp))
			return 1;
	}
	else
	{
		/* Enable I2C master mode if compass is being used. */
		if (i2c_read(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
			return 1;
		if (st.chip_cfg.sensors & INV_XYZ_COMPASS)
			tmp |= BIT_AUX_IF_EN;
		else
			tmp &= ~BIT_AUX_IF_EN;
		if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
			return 1;
		delay_ms(3);
		if (st.chip_cfg.active_low_int)
			tmp = BIT_ACTL;
		else
			tmp = 0;
		if (st.chip_cfg.latched_int)
			tmp |= BIT_LATCH_EN | BIT_ANY_RD_CLR;
		if (i2c_write(st.hw->addr, st.reg->int_pin_cfg, 1, &tmp))
			return 1;
	}
	st.chip_cfg.bypass_mode = bypass_on;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpb %bl, 0x7fdd(%rip)       # 0xa232
jne 0x2262
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x7faf(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7f9d(%rip), %rax      # 0xa210
movzbl 0x4(%rax), %esi
leaq 0x7(%rsp), %rcx
movl $0x1, %edx
callq 0x4dda
movb $0x1, %bpl
testb %bl, %bl
je 0x22ef
cmpb $-0x1, %al
je 0x2259
leaq 0x7(%rsp), %rcx
andb $-0x21, (%rcx)
movq 0x7f78(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7f66(%rip), %rax      # 0xa210
movzbl 0x4(%rax), %esi
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x2259
movl $0xbb8, %edi            # imm = 0xBB8
callq 0x10e0
cmpb $0x0, 0x7f75(%rip)      # 0xa242
movl $0x2, %ecx
movl $0x82, %eax
cmovel %ecx, %eax
movb %al, 0x7(%rsp)
cmpb $0x0, 0x7f5e(%rip)      # 0xa243
je 0x2361
orb $0x30, %al
movb %al, 0x7(%rsp)
jmp 0x2361
cmpb $-0x1, %al
je 0x2259
movb 0x7f2d(%rip), %al       # 0xa22a
leaq 0x7(%rsp), %rcx
movb (%rcx), %dl
andb $-0x21, %dl
shlb $0x5, %al
andb $0x20, %al
orb %dl, %al
movb %al, (%rcx)
movq 0x7f01(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7eef(%rip), %rax      # 0xa210
movzbl 0x4(%rax), %esi
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x2259
movl $0xbb8, %edi            # imm = 0xBB8
callq 0x10e0
cmpb $0x0, 0x7efa(%rip)      # 0xa242
setne %al
shlb $0x7, %al
movb %al, 0x7(%rsp)
cmpb $0x0, 0x7eea(%rip)      # 0xa243
je 0x2361
orb $0x30, %al
movb %al, 0x7(%rsp)
movq 0x7eb0(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7e9e(%rip), %rax      # 0xa210
movzbl 0x17(%rax), %esi
leaq 0x7(%rsp), %rcx
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x2259
movb %bl, 0x7e9f(%rip)       # 0xa232
jmp 0x2257
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_int_latched(unsigned char)
uint8_t mpu_set_int_latched(uint8_t enable)
{
	uint8_t tmp;
	if (st.chip_cfg.latched_int == enable)
		return 0;

	if (enable)
		tmp = BIT_LATCH_EN | BIT_ANY_RD_CLR;
	else
		tmp = 0;
	if (st.chip_cfg.bypass_mode)
		tmp |= BIT_BYPASS_EN;
	if (st.chip_cfg.active_low_int)
		tmp |= BIT_ACTL;
	if (i2c_write(st.hw->addr, st.reg->int_pin_cfg, 1, &tmp))
		return 1;
	st.chip_cfg.latched_int = enable;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
xorl %eax, %eax
cmpb %bl, 0x7cb9(%rip)       # 0xa243
je 0x25ec
testb %bl, %bl
movl $0x30, %ecx
cmovel %eax, %ecx
movb %cl, 0xf(%rsp)
cmpb $0x0, 0x7c91(%rip)      # 0xa232
je 0x25aa
orb $0x2, %cl
movb %cl, 0xf(%rsp)
cmpb $0x0, 0x7c91(%rip)      # 0xa242
je 0x25b8
orb $-0x80, 0xf(%rsp)
movq 0x7c59(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7c47(%rip), %rax      # 0xa210
movzbl 0x17(%rax), %esi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x5044
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0x25ec
movb %bl, 0x7c59(%rip)       # 0xa243
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_gyro_reg(short*)
uint8_t mpu_get_gyro_reg(int16_t *data)
{
	uint8_t tmp[6];

	if (!(st.chip_cfg.sensors & INV_XYZ_GYRO))
		return 1;

	if (i2c_read(st.hw->addr, st.reg->raw_gyro, 6, tmp))
		return 1;
	data[0] = (tmp[0] << 8) | tmp[1];
	data[1] = (tmp[2] << 8) | tmp[3];
	data[2] = (tmp[4] << 8) | tmp[5];
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb $0x1, %bpl
testb $0x70, 0x7c2b(%rip)     # 0xa22a
je 0x2654
movq %rdi, %rbx
movq 0x7c0d(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7bfb(%rip), %rax      # 0xa210
movzbl 0xe(%rax), %esi
leaq 0x2(%rsp), %rcx
movl $0x6, %edx
callq 0x4dda
cmpb $-0x1, %al
je 0x2654
movzwl 0x2(%rsp), %eax
rolw $0x8, %ax
movw %ax, (%rbx)
movzwl 0x4(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rbx)
movzwl 0x6(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0x4(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_accel_reg(short*)
uint8_t mpu_get_accel_reg(int16_t *data)
{
	uint8_t tmp[6];

	if (!(st.chip_cfg.sensors & INV_XYZ_ACCEL))
		return 1;

	if (i2c_read(st.hw->addr, st.reg->raw_accel, 6, tmp))
		return 1;
	data[0] = (tmp[0] << 8) | tmp[1];
	data[1] = (tmp[2] << 8) | tmp[3];
	data[2] = (tmp[4] << 8) | tmp[5];
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb $0x1, %bpl
testb $0x8, 0x7bc0(%rip)      # 0xa22a
je 0x26bf
movq %rdi, %rbx
movq 0x7ba2(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7b90(%rip), %rax      # 0xa210
movzbl 0xf(%rax), %esi
leaq 0x2(%rsp), %rcx
movl $0x6, %edx
callq 0x4dda
cmpb $-0x1, %al
je 0x26bf
movzwl 0x2(%rsp), %eax
rolw $0x8, %ax
movw %ax, (%rbx)
movzwl 0x4(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rbx)
movzwl 0x6(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0x4(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_temperature(int*)
uint8_t mpu_get_temperature(int32_t *data)
{
	uint8_t tmp[2];
	int16_t raw;

	if (!(st.chip_cfg.sensors))
		return 1;

	if (i2c_read(st.hw->addr, st.reg->temp, 2, tmp))
		return 1;
	raw = (tmp[0] << 8) | tmp[1];

	data[0] = (int32_t)((35 + ((raw - (float)st.hw->temp_offset) / st.hw->temp_sens)) * 65536L);
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb $0x1, %bpl
cmpb $0x0, 0x7b55(%rip)      # 0xa22a
je 0x274a
movq %rdi, %rbx
movq 0x7b37(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7b25(%rip), %rax      # 0xa210
movzbl 0x10(%rax), %esi
leaq 0x6(%rsp), %rcx
movl $0x2, %edx
callq 0x4dda
cmpb $-0x1, %al
je 0x274a
movzwl 0x6(%rsp), %eax
rolw $0x8, %ax
cwtl
cvtsi2ss %eax, %xmm0
movq 0x7b01(%rip), %rax      # 0xa218
movswl 0x8(%rax), %ecx
cvtsi2ss %ecx, %xmm1
subss %xmm1, %xmm0
movzwl 0x6(%rax), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
addss 0x3da2(%rip), %xmm0     # 0x64dc
mulss 0x3d9e(%rip), %xmm0     # 0x64e0
cvttss2si %xmm0, %eax
movl %eax, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_accel_bias(int const*)
uint8_t mpu_set_accel_bias(const int32_t *accel_bias)
{
	uint8_t data[6];
	int16_t accel_hw[3];
	int16_t got_accel[3];
	int16_t fg[3];

	if (!accel_bias)
		return 1;
	if (!accel_bias[0] && !accel_bias[1] && !accel_bias[2])
		return 0;

	if (i2c_read(st.hw->addr, 3, 3, data))
		return 1;
	fg[0] = ((data[0] >> 4) + 8) & 0xf;
	fg[1] = ((data[1] >> 4) + 8) & 0xf;
	fg[2] = ((data[2] >> 4) + 8) & 0xf;

	accel_hw[0] = (int16_t)(accel_bias[0] * 2 / (64 + fg[0]));
	accel_hw[1] = (int16_t)(accel_bias[1] * 2 / (64 + fg[1]));
	accel_hw[2] = (int16_t)(accel_bias[2] * 2 / (64 + fg[2]));

	if (i2c_read(st.hw->addr, 0x06, 6, data))
		return 1;

	got_accel[0] = ((int16_t)data[0] << 8) | data[1];
	got_accel[1] = ((int16_t)data[2] << 8) | data[3];
	got_accel[2] = ((int16_t)data[4] << 8) | data[5];

	accel_hw[0] += got_accel[0];
	accel_hw[1] += got_accel[1];
	accel_hw[2] += got_accel[2];

	data[0] = (accel_hw[0] >> 8) & 0xff;
	data[1] = (accel_hw[0]) & 0xff;
	data[2] = (accel_hw[1] >> 8) & 0xff;
	data[3] = (accel_hw[1]) & 0xff;
	data[4] = (accel_hw[2] >> 8) & 0xff;
	data[5] = (accel_hw[2]) & 0xff;

	if (i2c_write(st.hw->addr, 0x06, 6, data))
		return 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb $0x1, %bl
testq %rdi, %rdi
je 0x288a
movq %rdi, %r14
cmpl $0x0, (%rdi)
jne 0x2786
cmpl $0x0, 0x4(%r14)
jne 0x2786
cmpl $0x0, 0x8(%r14)
je 0x289b
movq 0x7a8b(%rip), %rax      # 0xa218
movzbl (%rax), %edi
leaq 0xe(%rsp), %rcx
movl $0x3, %esi
movl $0x3, %edx
callq 0x4dda
cmpb $-0x1, %al
je 0x288a
leaq 0xe(%rsp), %rcx
movzbl (%rcx), %r12d
movzbl 0x1(%rcx), %r13d
movzbl 0x2(%rcx), %ebp
movl (%r14), %eax
movl %eax, 0x14(%rsp)
movl 0x4(%r14), %r15d
movl 0x8(%r14), %r14d
movq 0x7a44(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movl $0x6, %esi
movl $0x6, %edx
callq 0x4dda
cmpb $-0x1, %al
je 0x288a
addl %r14d, %r14d
shrl $0x4, %ebp
xorl $0x48, %ebp
movl %r14d, %eax
cltd
idivl %ebp
movl %eax, %esi
addl %r15d, %r15d
shrl $0x4, %r13d
xorl $0x48, %r13d
movl %r15d, %eax
cltd
idivl %r13d
movl %eax, %edi
movl 0x14(%rsp), %eax
addl %eax, %eax
shrl $0x4, %r12d
xorl $0x48, %r12d
cltd
idivl %r12d
movl %eax, %r8d
leaq 0xe(%rsp), %rcx
movzwl (%rcx), %eax
movzwl 0x2(%rcx), %edx
rolw $0x8, %ax
movzwl %ax, %eax
rolw $0x8, %dx
movzwl %dx, %edx
movzwl 0x4(%rcx), %r9d
rolw $0x8, %r9w
movzwl %r9w, %ebx
addl %r8d, %eax
addl %edi, %edx
addl %esi, %ebx
movb %ah, 0xe(%rsp)
movb %al, 0x1(%rcx)
movb %dh, 0x10(%rsp)
movb %dl, 0x3(%rcx)
movb %bh, 0x12(%rsp)
movb %bl, 0x5(%rcx)
movq 0x79a5(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movl $0x6, %esi
movl $0x6, %edx
callq 0x5044
testl %eax, %eax
setne %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x288a
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: set_int_enable(unsigned char)
static int set_int_enable(uint8_t enable)
{
	uint8_t tmp;

	if (st.chip_cfg.dmp_on)
	{
		if (enable)
			tmp = BIT_DMP_INT_EN;
		else
			tmp = 0x00;
		if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &tmp))
			return 1;
		st.chip_cfg.int_enable = tmp;
	}
	else
	{
		if (!st.chip_cfg.sensors)
			return 1;
		if (enable && st.chip_cfg.int_enable)
			return 0;
		if (enable)
			tmp = BIT_DATA_RDY_EN;
		else
			tmp = 0x00;
		if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &tmp))
			return 1;
		st.chip_cfg.int_enable = tmp;
	}
	return 0;
}

// Assembly:
pushq %rax
cmpb $0x0, 0x7653(%rip)      # 0xa244
je 0x2c31
testb %dil, %dil
setne %al
addb %al, %al
leaq 0x7(%rsp), %rcx
movb %al, (%rcx)
movq 0x760f(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x75fd(%rip), %rax      # 0xa210
movzbl 0x11(%rax), %esi
movl $0x1, %edx
callq 0x5044
testl %eax, %eax
jne 0x2c48
movb 0x7(%rsp), %al
movb %al, 0x7602(%rip)       # 0xa231
jmp 0x2c48
cmpb $0x0, 0x75f2(%rip)      # 0xa22a
je 0x2c48
testb %dil, %dil
je 0x2c4a
cmpb $0x0, 0x75eb(%rip)      # 0xa231
je 0x2c4a
popq %rax
retq
testb %dil, %dil
leaq 0x7(%rsp), %rcx
setne (%rcx)
jmp 0x2c02
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_read_fifo_stream(unsigned short, unsigned char*, unsigned char*)
uint8_t mpu_read_fifo_stream(uint16_t length, uint8_t *data,
														 uint8_t *more)
{
	uint8_t tmp[2];
	uint16_t fifo_count;
	if (!st.chip_cfg.dmp_on)
    {
		return 1;
    }
	if (!st.chip_cfg.sensors)
    {
		return 1;
    }

	if (i2c_read(st.hw->addr, st.reg->fifo_count_h, 2, tmp))
		return 1;
	fifo_count = (tmp[0] << 8) | tmp[1];
	if (fifo_count < length)
	{
		more[0] = 0;
		return 1;
	}
	if (fifo_count > (st.hw->max_fifo >> 1))
	{
		/* FIFO is 50% full, better check overflow bit. */
		if (i2c_read(st.hw->addr, st.reg->int_status, 1, tmp))
			return 1;
		if (tmp[0] & BIT_FIFO_OVERFLOW)
		{
			mpu_reset_fifo();
			return 2;
		}
	}
#if defined MPU_DEBUG
    printf_P("FIFO count: %hd\r\n", fifo_count);
#endif

	if (i2c_read(st.hw->addr, st.reg->fifo_r_w, length, data))
		return 1;
	more[0] = fifo_count / length - 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0x7368(%rip)      # 0xa244
movb $0x1, %bl
je 0x2fb8
cmpb $0x0, 0x733f(%rip)      # 0xa22a
je 0x2fb8
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movq 0x7318(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7306(%rip), %rax      # 0xa210
movzbl 0xc(%rax), %esi
leaq 0x6(%rsp), %rcx
movl $0x2, %edx
callq 0x4dda
cmpb $-0x1, %al
je 0x2fb8
movzwl 0x6(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %r12d
movzwl %bp, %r13d
cmpl %r13d, %r12d
jae 0x2f41
movb $0x0, (%r14)
jmp 0x2fb8
movq 0x72d0(%rip), %rax      # 0xa218
movzwl 0x2(%rax), %ecx
shrl %ecx
cmpl %ecx, %r12d
jbe 0x2f7b
movzbl (%rax), %edi
movq 0x72b3(%rip), %rax      # 0xa210
movzbl 0x13(%rax), %esi
leaq 0x6(%rsp), %rcx
movl $0x1, %edx
callq 0x4dda
cmpb $-0x1, %al
je 0x2fb8
testb $0x10, 0x6(%rsp)
jne 0x2fb1
movq 0x7296(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x7284(%rip), %rax      # 0xa210
movzbl 0xd(%rax), %esi
movzbl %bpl, %edx
movq %r15, %rcx
callq 0x4dda
cmpb $-0x1, %al
je 0x2fb8
xorl %ebx, %ebx
movl %r12d, %eax
xorl %edx, %edx
divl %r13d
decb %al
movb %al, (%r14)
jmp 0x2fb8
callq 0x289f
movb $0x2, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_set_dmp_state(unsigned char)
uint8_t mpu_set_dmp_state(uint8_t enable)
{
	uint8_t tmp;
	if (st.chip_cfg.dmp_on == enable)
		return 0;

	if (enable)
	{
		if (!st.chip_cfg.dmp_loaded)
			return 1;
		/* Disable data ready interrupt. */
		set_int_enable(0);
		/* Disable bypass mode. */
		mpu_set_bypass(0);
		/* Keep constant sample rate, FIFO rate controlled by DMP. */
		mpu_set_sample_rate(st.chip_cfg.dmp_sample_rate);
		/* Remove FIFO elements. */
		tmp = 0;
		i2c_write(st.hw->addr, 0x23, 1, &tmp);
		st.chip_cfg.dmp_on = 1;
		/* Enable DMP interrupt. */
		set_int_enable(1);
		mpu_reset_fifo();
	}
	else
	{
		/* Disable DMP interrupt. */
		set_int_enable(0);
		/* Restore FIFO settings. */
		tmp = st.chip_cfg.fifo_enable;
		i2c_write(st.hw->addr, 0x23, 1, &tmp);
		st.chip_cfg.dmp_on = 0;
		mpu_reset_fifo();
	}
	return 0;
}

// Assembly:
pushq %rax
cmpb %dil, 0x6e8a(%rip)      # 0xa244
je 0x3459
testb %dil, %dil
je 0x3420
cmpb $0x0, 0x6e79(%rip)      # 0xa245
je 0x345d
xorl %edi, %edi
callq 0x2be9
xorl %edi, %edi
callq 0x224a
movzwl 0x6e5f(%rip), %edi      # 0xa246
callq 0x2114
leaq 0x7(%rsp), %rcx
movb $0x0, (%rcx)
movq 0x6e1d(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movl $0x23, %esi
movl $0x1, %edx
callq 0x5044
movb $0x1, 0x6e30(%rip)      # 0xa244
movl $0x1, %edi
callq 0x2be9
jmp 0x3454
xorl %edi, %edi
callq 0x2be9
movb 0x6e03(%rip), %al       # 0xa230
leaq 0x7(%rsp), %rcx
movb %al, (%rcx)
movq 0x6ddd(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movl $0x23, %esi
movl $0x1, %edx
callq 0x5044
movb $0x0, 0x6df0(%rip)      # 0xa244
callq 0x289f
xorl %eax, %eax
popq %rcx
retq
movb $0x1, %al
jmp 0x345b
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_write_mem(unsigned short, unsigned short, unsigned char*)
uint8_t mpu_write_mem(uint16_t mem_addr, uint16_t length,
											uint8_t *data)
{
	uint8_t tmp[2];

	if (!data)
		return 1;
	if (!st.chip_cfg.sensors)
		return 1;

	tmp[0] = (uint8_t)(mem_addr >> 8);
	tmp[1] = (uint8_t)(mem_addr & 0xFF);

	/* Check bank boundaries. */
	if (tmp[1] + length > st.hw->bank_size)
		return 1;

	if (i2c_write(st.hw->addr, st.reg->bank_sel, 2, tmp))
		return 1;
	if (i2c_write(st.hw->addr, st.reg->mem_r_w, length, data))
		return 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb $0x1, %bpl
testq %rdx, %rdx
je 0x3a2b
cmpb $0x0, 0x6873(%rip)      # 0xa22a
je 0x3a2b
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %eax
rolw $0x8, %ax
movw %ax, 0xe(%rsp)
movzbl %dil, %eax
movzwl %r14w, %ecx
addl %eax, %ecx
movq 0x683d(%rip), %rax      # 0xa218
movzwl 0xa(%rax), %edx
cmpl %edx, %ecx
ja 0x3a2b
movzbl (%rax), %edi
movq 0x6823(%rip), %rax      # 0xa210
movzbl 0x1b(%rax), %esi
leaq 0xe(%rsp), %rcx
movl $0x2, %edx
callq 0x5044
testl %eax, %eax
jne 0x3a2b
movq 0x680d(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x67fb(%rip), %rax      # 0xa210
movzbl 0x18(%rax), %esi
movzbl %r14b, %edx
movq %rbx, %rcx
callq 0x5044
testl %eax, %eax
setne %bpl
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_load_firmware(unsigned short, unsigned char const*, unsigned short, unsigned short)
uint8_t mpu_load_firmware(uint16_t length, const uint8_t *firmware,
													uint16_t start_addr, uint16_t sample_rate)
{
	uint16_t ii;
	uint16_t this_write;
	uint8_t *pgm_buf;
	uint8_t jj;
	/* Must divide evenly into st.hw->bank_size to avoid bank crossings. */
#define LOAD_CHUNK  (16)
	uint8_t cur[LOAD_CHUNK], tmp[2];
	pgm_buf = (uint8_t *)malloc(LOAD_CHUNK);

	if (st.chip_cfg.dmp_loaded)
		/* DMP should only be loaded once. */
		return 1;

	if (!firmware)
		return 1;
	for (ii = 0; ii < length; ii += this_write)
	{
		this_write = min(LOAD_CHUNK, length - ii);		
		for (jj = 0; jj < LOAD_CHUNK; jj++) pgm_buf[jj] = firmware[ii+jj];//pgm_read_byte(firmware + ii + jj);
		if (mpu_write_mem(ii, this_write, pgm_buf))
			return 1;
		if (mpu_read_mem(ii, this_write, cur))
			return 1;
		if (memcmp(pgm_buf, cur, this_write))
			return 2;
	}

	/* Set program start address. */
	tmp[0] = start_addr >> 8;
	tmp[1] = start_addr & 0xFF;
	if (i2c_write(st.hw->addr, st.reg->prgm_start_h, 2, tmp))
		return 1;

	st.chip_cfg.dmp_loaded = 1;
	st.chip_cfg.dmp_sample_rate = sample_rate;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movl %edi, 0x4(%rsp)
movl $0x10, %edi
callq 0x10b0
movq %rax, %r13
movb $0x1, %al
movq %r14, 0x18(%rsp)
testq %r14, %r14
je 0x3bf5
cmpb $0x0, 0x673c(%rip)      # 0xa245
jne 0x3bf5
movl %ebp, 0xc(%rsp)
movl %ebx, 0x8(%rsp)
cmpw $0x0, 0x4(%rsp)
je 0x3ba4
movzwl 0x4(%rsp), %eax
movl %eax, 0x10(%rsp)
xorl %eax, %eax
leaq 0x20(%rsp), %r15
xorl %ebp, %ebp
movl 0x10(%rsp), %r12d
subl %eax, %r12d
cmpl $0x10, %r12d
movl $0x10, %ecx
cmovgel %ecx, %r12d
movl %eax, %eax
movq 0x18(%rsp), %rcx
movups (%rcx,%rax), %xmm0
movups %xmm0, (%r13)
movzwl %r12w, %ebx
movzwl %bp, %r14d
movl %r14d, %edi
movl %ebx, %esi
movq %r13, %rdx
callq 0x39a0
testb %al, %al
jne 0x3bef
movl %r14d, %edi
movl %ebx, %esi
movq %r15, %rdx
callq 0x3a36
testb %al, %al
jne 0x3bef
movzwl %r12w, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x10a0
testl %eax, %eax
jne 0x3bf3
addl %r12d, %ebp
movzwl %bp, %eax
cmpw 0x4(%rsp), %ax
jb 0x3b35
movl 0xc(%rsp), %eax
rolw $0x8, %ax
leaq 0x16(%rsp), %rcx
movw %ax, (%rcx)
movq 0x665d(%rip), %rax      # 0xa218
movzbl (%rax), %edi
movq 0x664b(%rip), %rax      # 0xa210
movzbl 0x1d(%rax), %esi
movl $0x2, %edx
callq 0x5044
testl %eax, %eax
movb $0x1, %al
jne 0x3bf5
movb $0x1, 0x6665(%rip)      # 0xa245
movl 0x8(%rsp), %eax
movw %ax, 0x665b(%rip)       # 0xa246
xorl %eax, %eax
jmp 0x3bf5
movb $0x1, %al
jmp 0x3bf5
movb $0x2, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_orientation(unsigned short)
uint8_t dmp_set_orientation(uint16_t orient)
{
	uint8_t gyro_regs[3], accel_regs[3];
	const uint8_t gyro_axes[3] = {DINA4C, DINACD, DINA6C};
	const uint8_t accel_axes[3] = {DINA0C, DINAC9, DINA2C};
	const uint8_t gyro_sign[3] = {DINA36, DINA56, DINA76};
	const uint8_t accel_sign[3] = {DINA26, DINA46, DINA66};

	gyro_regs[0] = gyro_axes[orient & 3];
	gyro_regs[1] = gyro_axes[(orient >> 3) & 3];
	gyro_regs[2] = gyro_axes[(orient >> 6) & 3];
	accel_regs[0] = accel_axes[orient & 3];
	accel_regs[1] = accel_axes[(orient >> 3) & 3];
	accel_regs[2] = accel_axes[(orient >> 6) & 3];

	/* Chip-to-body, axes only. */
	if (mpu_write_mem(FCFG_1, 3, gyro_regs))
		return 1;
	if (mpu_write_mem(FCFG_2, 3, accel_regs))
		return 1;

	memcpy(gyro_regs, gyro_sign, 3);
	memcpy(accel_regs, accel_sign, 3);
	if (orient & 4)
	{
		gyro_regs[0] |= 1;
		accel_regs[0] |= 1;
	}
	if (orient & 0x20)
	{
		gyro_regs[1] |= 1;
		accel_regs[1] |= 1;
	}
	if (orient & 0x100)
	{
		gyro_regs[2] |= 1;
		accel_regs[2] |= 1;
	}

	/* Chip-to-body, sign only. */
	if (mpu_write_mem(FCFG_3, 3, gyro_regs))
		return 1;
	if (mpu_write_mem(FCFG_7, 3, accel_regs))
		return 1;
	dmp.orient = orient;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, %eax
andl $0x3, %eax
leaq 0x31a1(%rip), %rcx      # 0x70f6
movb (%rax,%rcx), %sil
leaq 0x4(%rsp), %rdx
movb %sil, (%rdx)
movl %edi, %esi
shrl $0x3, %esi
andl $0x3, %esi
movb (%rsi,%rcx), %dil
movb %dil, 0x1(%rdx)
movl %ebx, %edi
shrl $0x6, %edi
andl $0x3, %edi
movb (%rdi,%rcx), %cl
movb %cl, 0x2(%rdx)
leaq 0x3173(%rip), %rcx      # 0x70f9
movb (%rax,%rcx), %al
movb %al, (%rsp)
movb (%rsi,%rcx), %al
movb %al, 0x1(%rsp)
movb (%rdi,%rcx), %al
movb %al, 0x2(%rsp)
movl $0x426, %edi            # imm = 0x426
movl $0x3, %esi
callq 0x39a0
movb $0x1, %bpl
testb %al, %al
jne 0x4045
movq %rsp, %rdx
movl $0x42a, %edi            # imm = 0x42A
movl $0x3, %esi
callq 0x39a0
testb %al, %al
jne 0x4045
movb $0x76, 0x6(%rsp)
movw $0x5636, 0x4(%rsp)      # imm = 0x5636
movw $0x4626, (%rsp)         # imm = 0x4626
movb $0x66, 0x2(%rsp)
testb $0x4, %bl
je 0x3fef
orb $0x1, 0x4(%rsp)
orb $0x1, (%rsp)
testb $0x20, %bl
je 0x3ffe
orb $0x1, 0x5(%rsp)
orb $0x1, 0x1(%rsp)
btl $0x8, %ebx
jae 0x400e
orb $0x1, 0x6(%rsp)
orb $0x1, 0x2(%rsp)
leaq 0x4(%rsp), %rdx
movl $0x440, %edi            # imm = 0x440
movl $0x3, %esi
callq 0x39a0
testb %al, %al
jne 0x4045
movq %rsp, %rdx
movl $0x431, %edi            # imm = 0x431
movl $0x3, %esi
callq 0x39a0
testb %al, %al
jne 0x4045
movw %bx, 0x6215(%rip)       # 0xa258
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_fifo_rate(unsigned short)
uint8_t dmp_set_fifo_rate(uint16_t rate)
{
	const uint8_t regs_end[12] = {DINAFE, DINAF2, DINAAB,
																0xc4, DINAAA, DINAF1, DINADF, DINADF, 0xBB, 0xAF, DINADF, DINADF
															 };
	uint16_t div;
	uint8_t tmp[8];

	if (rate > DMP_SAMPLE_RATE)
		return 1;
	div = DMP_SAMPLE_RATE / rate - 1;
	tmp[0] = (uint8_t)((div >> 8) & 0xFF);
	tmp[1] = (uint8_t)(div & 0xFF);
	if (mpu_write_mem(D_0_22, 2, tmp))
		return 1;
	if (mpu_write_mem(CFG_6, 12, (uint8_t*)regs_end))
		return 1;

	dmp.fifo_rate = rate;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movabsq $-0x20200e553b540d02, %rax # imm = 0xDFDFF1AAC4ABF2FE
movq %rax, (%rsp)
movl $0xdfdfafbb, 0x8(%rsp)  # imm = 0xDFDFAFBB
movb $0x1, %bl
cmpl $0xc8, %edi
ja 0x4308
movl %edi, %ebp
movw $0xc8, %ax
xorl %edx, %edx
divw %bp
leaq 0x10(%rsp), %rdx
movb $0x0, (%rdx)
decb %al
movb %al, 0x1(%rdx)
movl $0x216, %edi            # imm = 0x216
movl $0x2, %esi
callq 0x39a0
testb %al, %al
jne 0x4308
movq %rsp, %rdx
movl $0xac1, %edi            # imm = 0xAC1
movl $0xc, %esi
callq 0x39a0
testb %al, %al
jne 0x4308
movw %bp, 0x5f5e(%rip)       # 0xa264
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_tap_axes(unsigned char)
uint8_t dmp_set_tap_axes(uint8_t axis)
{
	uint8_t tmp = 0;

	if (axis & TAP_X)
		tmp |= 0x30;
	if (axis & TAP_Y)
		tmp |= 0x0C;
	if (axis & TAP_Z)
		tmp |= 0x03;
	return mpu_write_mem(D_1_72, 1, &tmp);
}

// Assembly:
pushq %rax
movl %edi, %eax
andl $0x1, %eax
movl $0x30, %ecx
cmovel %eax, %ecx
leal 0xc(%rcx), %eax
testb $0x2, %dil
movzbl %al, %eax
cmovel %ecx, %eax
movb %al, 0x7(%rsp)
testb $0x4, %dil
je 0x449e
orb $0x3, 0x7(%rsp)
leaq 0x7(%rsp), %rdx
movl $0x148, %edi            # imm = 0x148
movl $0x1, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_tap_count(unsigned char)
uint8_t dmp_set_tap_count(uint8_t min_taps)
{
	uint8_t tmp;

	if (min_taps < 1)
		min_taps = 1;
	else if (min_taps > 4)
		min_taps = 4;

	tmp = min_taps - 1;
	return mpu_write_mem(D_1_79, 1, &tmp);
}

// Assembly:
testl %edi, %edi
je 0x44cb
movzbl %dil, %ecx
cmpb $0x4, %cl
movl $0x4, %eax
cmovbl %ecx, %eax
decb %al
jmp 0x44cd
xorl %eax, %eax
pushq %rax
leaq 0x7(%rsp), %rdx
movb %al, (%rdx)
movl $0x14f, %edi            # imm = 0x14F
movl $0x1, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_tap_time(unsigned short)
uint8_t dmp_set_tap_time(uint16_t time)
{
	uint16_t dmp_time;
	uint8_t tmp[2];

	dmp_time = time / (1000 / DMP_SAMPLE_RATE);
	tmp[0] = (uint8_t)(dmp_time >> 8);
	tmp[1] = (uint8_t)(dmp_time & 0xFF);
	return mpu_write_mem(DMP_TAPW_MIN, 2, tmp);
}

// Assembly:
pushq %rax
imull $0xcccd, %edi, %eax     # imm = 0xCCCD
shrl $0x12, %eax
rolw $0x8, %ax
leaq 0x6(%rsp), %rdx
movw %ax, (%rdx)
movl $0x1de, %edi            # imm = 0x1DE
movl $0x2, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_tap_time_multi(unsigned short)
uint8_t dmp_set_tap_time_multi(uint16_t time)
{
	uint16_t dmp_time;
	uint8_t tmp[2];

	dmp_time = time / (1000 / DMP_SAMPLE_RATE);
	tmp[0] = (uint8_t)(dmp_time >> 8);
	tmp[1] = (uint8_t)(dmp_time & 0xFF);
	return mpu_write_mem(D_1_218, 2, tmp);
}

// Assembly:
pushq %rax
imull $0xcccd, %edi, %eax     # imm = 0xCCCD
shrl $0x12, %eax
rolw $0x8, %ax
leaq 0x6(%rsp), %rdx
movw %ax, (%rdx)
movl $0x1da, %edi            # imm = 0x1DA
movl $0x2, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_shake_reject_thresh(int, unsigned short)
uint8_t dmp_set_shake_reject_thresh(int32_t sf, uint16_t thresh)
{
	uint8_t tmp[4];
	int32_t thresh_scaled = sf / 1000 * thresh;
	tmp[0] = (uint8_t)(((int32_t)thresh_scaled >> 24) & 0xFF);
	tmp[1] = (uint8_t)(((int32_t)thresh_scaled >> 16) & 0xFF);
	tmp[2] = (uint8_t)(((int32_t)thresh_scaled >> 8) & 0xFF);
	tmp[3] = (uint8_t)((int32_t)thresh_scaled & 0xFF);
	return mpu_write_mem(D_1_92, 4, tmp);
}

// Assembly:
pushq %rax
movslq %edi, %rax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull %esi, %eax
bswapl %eax
leaq 0x4(%rsp), %rdx
movl %eax, (%rdx)
movl $0x15c, %edi            # imm = 0x15C
movl $0x4, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_shake_reject_time(unsigned short)
uint8_t dmp_set_shake_reject_time(uint16_t time)
{
	uint8_t tmp[2];

	time /= (1000 / DMP_SAMPLE_RATE);
	tmp[0] = time >> 8;
	tmp[1] = time & 0xFF;
	return mpu_write_mem(D_1_90,2,tmp);
}

// Assembly:
pushq %rax
imull $0xcccd, %edi, %eax     # imm = 0xCCCD
shrl $0x12, %eax
rolw $0x8, %ax
leaq 0x6(%rsp), %rdx
movw %ax, (%rdx)
movl $0x15a, %edi            # imm = 0x15A
movl $0x2, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_shake_reject_timeout(unsigned short)
uint8_t dmp_set_shake_reject_timeout(uint16_t time)
{
	uint8_t tmp[2];

	time /= (1000 / DMP_SAMPLE_RATE);
	tmp[0] = time >> 8;
	tmp[1] = time & 0xFF;
	return mpu_write_mem(D_1_88,2,tmp);
}

// Assembly:
pushq %rax
imull $0xcccd, %edi, %eax     # imm = 0xCCCD
shrl $0x12, %eax
rolw $0x8, %ax
leaq 0x6(%rsp), %rdx
movw %ax, (%rdx)
movl $0x158, %edi            # imm = 0x158
movl $0x2, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_get_pedometer_step_count(unsigned int*)
uint8_t dmp_get_pedometer_step_count(uint32_t *count)
{
	uint8_t tmp[4];
	if (!count)
		return 1;

	if (mpu_read_mem(D_PEDSTD_STEPCTR, 4, tmp))
		return 1;

	count[0] = ((uint32_t)tmp[0] << 24) | ((uint32_t)tmp[1] << 16) |
						 ((uint32_t)tmp[2] << 8) | tmp[3];
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %bl
testq %rdi, %rdi
je 0x45e8
movq %rdi, %r14
leaq 0x4(%rsp), %rdx
movl $0x360, %edi            # imm = 0x360
movl $0x4, %esi
callq 0x3a36
testb %al, %al
jne 0x45e8
movl 0x4(%rsp), %eax
bswapl %eax
movl %eax, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_get_pedometer_walk_time(unsigned int*)
uint8_t dmp_get_pedometer_walk_time(uint32_t *time)
{
	uint8_t tmp[4];
	if (!time)
		return 1;

	if (mpu_read_mem(D_PEDSTD_TIMECTR, 4, tmp))
		return 1;

	time[0] = (((uint32_t)tmp[0] << 24) | ((uint32_t)tmp[1] << 16) |
						 ((uint32_t)tmp[2] << 8) | tmp[3]) * 20;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb $0x1, %bpl
testq %rdi, %rdi
je 0x4643
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x3c4, %edi            # imm = 0x3C4
movl $0x4, %esi
callq 0x3a36
testb %al, %al
jne 0x4643
movl 0x4(%rsp), %eax
bswapl %eax
shll $0x2, %eax
leal (%rax,%rax,4), %eax
movl %eax, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_pedometer_walk_time(unsigned int)
uint8_t dmp_set_pedometer_walk_time(uint32_t time)
{
	uint8_t tmp[4];

	time /= 20;

	tmp[0] = (uint8_t)((time >> 24) & 0xFF);
	tmp[1] = (uint8_t)((time >> 16) & 0xFF);
	tmp[2] = (uint8_t)((time >> 8) & 0xFF);
	tmp[3] = (uint8_t)(time & 0xFF);
	return mpu_write_mem(D_PEDSTD_TIMECTR, 4, tmp);
}

// Assembly:
pushq %rax
movl %edi, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x24, %rcx
bswapl %ecx
leaq 0x4(%rsp), %rdx
movl %ecx, (%rdx)
movl $0x3c4, %edi            # imm = 0x3C4
movl $0x4, %esi
callq 0x39a0
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_enable_gyro_cal(unsigned char)
uint8_t dmp_enable_gyro_cal(uint8_t enable)
{
	if (enable)
	{
		uint8_t regs[9] = {0xb8, 0xaa, 0xb3, 0x8d, 0xb4, 0x98, 0x0d, 0x35, 0x5d};
		return mpu_write_mem(CFG_MOTION_BIAS, 9, regs);
	}
	else
	{
		uint8_t regs[9] = {0xb8, 0xaa, 0xaa, 0xaa, 0xb0, 0x88, 0xc3, 0xc5, 0xc7};
		return mpu_write_mem(CFG_MOTION_BIAS, 9, regs);
	}
}

// Assembly:
subq $0x18, %rsp
testl %edi, %edi
je 0x49c9
movabsq $0x350d98b48db3aab8, %rax # imm = 0x350D98B48DB3AAB8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movb $0x5d, 0x8(%rdx)
jmp 0x49df
movabsq $-0x3a3c774f55555548, %rax # imm = 0xC5C388B0AAAAAAB8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movb $-0x39, 0x8(%rdx)
movl $0x4b8, %edi            # imm = 0x4B8
movl $0x9, %esi
callq 0x39a0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_interrupt_mode(unsigned char)
uint8_t dmp_set_interrupt_mode(uint8_t mode)
{
	const uint8_t regs_continuous[11] =
	{0xd8, 0xb1, 0xb9, 0xf3, 0x8b, 0xa3, 0x91, 0xb6, 0x09, 0xb4, 0xd9};
	const uint8_t regs_gesture[11] =
	{0xda, 0xb1, 0xb9, 0xf3, 0x8b, 0xa3, 0x91, 0xb6, 0xda, 0xb4, 0xda};

	switch (mode)
	{
	case DMP_INT_CONTINUOUS:
		return mpu_write_mem(CFG_FIFO_ON_EVENT, 11,
												 (uint8_t*)regs_continuous);
	case DMP_INT_GESTURE:
		return mpu_write_mem(CFG_FIFO_ON_EVENT, 11,
												 (uint8_t*)regs_gesture);
	default:
		return 1;
	}
}

// Assembly:
subq $0x28, %rsp
movabsq $-0x496e5c740c464e28, %rax # imm = 0xB691A38BF3B9B1D8
movq %rax, 0x18(%rsp)
movl $0xd9b409b6, 0x1f(%rsp) # imm = 0xD9B409B6
movabsq $-0x496e5c740c464e26, %rax # imm = 0xB691A38BF3B9B1DA
movq %rax, 0x8(%rsp)
movl $0xdab4dab6, 0xf(%rsp)  # imm = 0xDAB4DAB6
cmpl $0x2, %edi
je 0x4aa9
movb $0x1, %al
cmpl $0x1, %edi
jne 0x4abd
leaq 0x8(%rsp), %rdx
jmp 0x4aae
leaq 0x18(%rsp), %rdx
movl $0xa82, %edi            # imm = 0xA82
movl $0xb, %esi
callq 0x39a0
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: readBit(unsigned char, unsigned char, unsigned char, unsigned char*)
int8_t readBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t *data) {
    uint8_t b;
    uint8_t count = readByte(devAddr, regAddr, &b);
    *data = b & (1 << bitNum);
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl $0x1, %r15d
leaq 0x7(%rsp), %r14
movl $0x1, %edx
movq %r14, %rcx
callq 0x4dda
movl %ebp, %ecx
shll %cl, %r15d
andb (%r14), %r15b
movb %r15b, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq