LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_gyro_fsr(unsigned short*)
uint8_t mpu_get_gyro_fsr(uint16_t *fsr)
{
	switch (st.chip_cfg.gyro_fsr)
	{
	case INV_FSR_250DPS:
		fsr[0] = 250;
		break;
	case INV_FSR_500DPS:
		fsr[0] = 500;
		break;
	case INV_FSR_1000DPS:
		fsr[0] = 1000;
		break;
	case INV_FSR_2000DPS:
		fsr[0] = 2000;
		break;
	default:
		fsr[0] = 0;
		break;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movzbl 0x8c99(%rip), %eax      # 0xc228
movq %rax, -0x10(%rbp)
subq $0x3, %rax
ja 0x35d9
movq -0x10(%rbp), %rax
leaq 0x4f40(%rip), %rcx      # 0x84e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movw $0xfa, (%rax)
jmp 0x35e2
movq -0x8(%rbp), %rax
movw $0x1f4, (%rax)          # imm = 0x1F4
jmp 0x35e2
movq -0x8(%rbp), %rax
movw $0x3e8, (%rax)          # imm = 0x3E8
jmp 0x35e2
movq -0x8(%rbp), %rax
movw $0x7d0, (%rax)          # imm = 0x7D0
jmp 0x35e2
movq -0x8(%rbp), %rax
movw $0x0, (%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_accel_fsr(unsigned char*)
uint8_t mpu_get_accel_fsr(uint8_t *fsr)
{
	switch (st.chip_cfg.accel_fsr)
	{
	case INV_FSR_2G:
		fsr[0] = 2;
		break;
	case INV_FSR_4G:
		fsr[0] = 4;
		break;
	case INV_FSR_8G:
		fsr[0] = 8;
		break;
	case INV_FSR_16G:
		fsr[0] = 16;
		break;
	default:
		return 1;
	}
	if (st.chip_cfg.accel_half)
		fsr[0] <<= 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movzbl 0x8c2a(%rip), %eax      # 0xc229
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x3641
movq -0x18(%rbp), %rax
leaq 0x4ee0(%rip), %rcx      # 0x84f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movb $0x2, (%rax)
jmp 0x3647
movq -0x10(%rbp), %rax
movb $0x4, (%rax)
jmp 0x3647
movq -0x10(%rbp), %rax
movb $0x8, (%rax)
jmp 0x3647
movq -0x10(%rbp), %rax
movb $0x10, (%rax)
jmp 0x3647
movb $0x1, -0x1(%rbp)
jmp 0x365f
cmpb $0x0, 0x8be5(%rip)      # 0xc233
je 0x365b
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
shll %ecx
movb %cl, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_lpf(unsigned short*)
uint8_t mpu_get_lpf(uint16_t *lpf)
{
	switch (st.chip_cfg.lpf)
	{
	case INV_FILTER_188HZ:
		lpf[0] = 188;
		break;
	case INV_FILTER_98HZ:
		lpf[0] = 98;
		break;
	case INV_FILTER_42HZ:
		lpf[0] = 42;
		break;
	case INV_FILTER_20HZ:
		lpf[0] = 20;
		break;
	case INV_FILTER_10HZ:
		lpf[0] = 10;
		break;
	case INV_FILTER_5HZ:
		lpf[0] = 5;
		break;
	case INV_FILTER_256HZ_NOLPF2:
	case INV_FILTER_2100HZ_NOLPF:
	default:
		lpf[0] = 0;
		break;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movzbl 0x8bac(%rip), %eax      # 0xc22b
movq %rax, -0x10(%rbp)
subq $0x7, %rax
ja 0x36e1
movq -0x10(%rbp), %rax
leaq 0x4e70(%rip), %rcx      # 0x8504
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movw $0xbc, (%rax)
jmp 0x36ea
movq -0x8(%rbp), %rax
movw $0x62, (%rax)
jmp 0x36ea
movq -0x8(%rbp), %rax
movw $0x2a, (%rax)
jmp 0x36ea
movq -0x8(%rbp), %rax
movw $0x14, (%rax)
jmp 0x36ea
movq -0x8(%rbp), %rax
movw $0xa, (%rax)
jmp 0x36ea
movq -0x8(%rbp), %rax
movw $0x5, (%rax)
jmp 0x36ea
jmp 0x36e1
movq -0x8(%rbp), %rax
movw $0x0, (%rax)
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_sample_rate(unsigned short*)
uint8_t mpu_get_sample_rate(uint16_t *rate)
{
	if (st.chip_cfg.dmp_on)
		return 1;
	else
		rate[0] = st.chip_cfg.sample_rate;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpb $0x0, 0x8b45(%rip)      # 0xc244
je 0x3707
movb $0x1, -0x1(%rbp)
jmp 0x3719
movw 0x8b20(%rip), %cx       # 0xc22e
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_gyro_sens(float*)
uint8_t mpu_get_gyro_sens(float *sens)
{
	switch (st.chip_cfg.gyro_fsr)
	{
	case INV_FSR_250DPS:
		sens[0] = 131.f;
		break;
	case INV_FSR_500DPS:
		sens[0] = 65.5f;
		break;
	case INV_FSR_1000DPS:
		sens[0] = 32.8f;
		break;
	case INV_FSR_2000DPS:
		sens[0] = 16.4f;
		break;
	default:
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movzbl 0x8ac9(%rip), %eax      # 0xc228
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x37c5
movq -0x18(%rbp), %rax
leaq 0x4db0(%rip), %rcx      # 0x8524
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movss 0x4d0b(%rip), %xmm0     # 0x8494
movss %xmm0, (%rax)
jmp 0x37cb
movq -0x10(%rbp), %rax
movss 0x4cf5(%rip), %xmm0     # 0x8490
movss %xmm0, (%rax)
jmp 0x37cb
movq -0x10(%rbp), %rax
movss 0x4cdf(%rip), %xmm0     # 0x848c
movss %xmm0, (%rax)
jmp 0x37cb
movq -0x10(%rbp), %rax
movss 0x4cc9(%rip), %xmm0     # 0x8488
movss %xmm0, (%rax)
jmp 0x37cb
movb $0x1, -0x1(%rbp)
jmp 0x37cf
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_accel_sens(unsigned short*)
uint8_t mpu_get_accel_sens(uint16_t *sens)
{
	switch (st.chip_cfg.accel_fsr)
	{
	case INV_FSR_2G:
		sens[0] = 16384;
		break;
	case INV_FSR_4G:
		sens[0] = 8092;
		break;
	case INV_FSR_8G:
		sens[0] = 4096;
		break;
	case INV_FSR_16G:
		sens[0] = 2048;
		break;
	default:
		return 1;
	}
	if (st.chip_cfg.accel_half)
		sens[0] >>= 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movzbl 0x8a3a(%rip), %eax      # 0xc229
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x3839
movq -0x18(%rbp), %rax
leaq 0x4d30(%rip), %rcx      # 0x8534
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movw $0x4000, (%rax)         # imm = 0x4000
jmp 0x383f
movq -0x10(%rbp), %rax
movw $0x1f9c, (%rax)         # imm = 0x1F9C
jmp 0x383f
movq -0x10(%rbp), %rax
movw $0x1000, (%rax)         # imm = 0x1000
jmp 0x383f
movq -0x10(%rbp), %rax
movw $0x800, (%rax)          # imm = 0x800
jmp 0x383f
movb $0x1, -0x1(%rbp)
jmp 0x3858
cmpb $0x0, 0x89ed(%rip)      # 0xc233
je 0x3854
movq -0x10(%rbp), %rax
movzwl (%rax), %ecx
sarl %ecx
movw %cx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
cmpb $0x0, 0x89af(%rip)      # 0xc244
je 0x38ea
cmpb $0x0, -0x5(%rbp)
je 0x38a3
movb $0x2, -0x6(%rbp)
jmp 0x38a7
movb $0x0, -0x6(%rbp)
movq 0x896a(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x8958(%rip), %rax      # 0xc210
movl $0x1, %edx
leaq -0x6(%rbp), %rcx
movzbl %sil, %edi
movzbl 0x11(%rax), %esi
callq 0x7360
cmpl $0x0, %eax
je 0x38df
movl $0x1, -0x4(%rbp)
jmp 0x3969
movb -0x6(%rbp), %al
movb %al, 0x8949(%rip)       # 0xc231
jmp 0x3962
cmpb $0x0, 0x8939(%rip)      # 0xc22a
jne 0x38fc
movl $0x1, -0x4(%rbp)
jmp 0x3969
cmpb $0x0, -0x5(%rbp)
je 0x3914
cmpb $0x0, 0x8928(%rip)      # 0xc231
je 0x3914
movl $0x0, -0x4(%rbp)
jmp 0x3969
cmpb $0x0, -0x5(%rbp)
je 0x3920
movb $0x1, -0x6(%rbp)
jmp 0x3924
movb $0x0, -0x6(%rbp)
movq 0x88ed(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x88db(%rip), %rax      # 0xc210
movl $0x1, %edx
leaq -0x6(%rbp), %rcx
movzbl %sil, %edi
movzbl 0x11(%rax), %esi
callq 0x7360
cmpl $0x0, %eax
je 0x3959
movl $0x1, -0x4(%rbp)
jmp 0x3969
movb -0x6(%rbp), %al
movb %al, 0x88cf(%rip)       # 0xc231
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_power_state(unsigned char*)
uint8_t mpu_get_power_state(uint8_t *power_on)
{
	if (st.chip_cfg.sensors)
		power_on[0] = 1;
	else
		power_on[0] = 0;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0x889b(%rip)      # 0xc22a
je 0x399a
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
jmp 0x39a1
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: mpu_get_int_status(short*)
uint8_t mpu_get_int_status(int16_t *status)
{
	uint8_t tmp[2];
	if (!st.chip_cfg.sensors)
		return 1;
	if (i2c_read(st.hw->addr, st.reg->dmp_int_status, 2, tmp))
		return 1;
	status[0] = (tmp[0] << 8) | tmp[1];
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpb $0x0, 0x8867(%rip)      # 0xc22a
jne 0x39cb
movb $0x1, -0x1(%rbp)
jmp 0x3a2a
movq 0x8846(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x8834(%rip), %rax      # 0xc210
movb 0x12(%rax), %al
leaq -0x12(%rbp), %rcx
movl $0x2, %edx
movzbl %sil, %edi
movzbl %al, %esi
callq 0x6df0
movsbl %al, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $-0x1, %edx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x3a0f
movb $0x1, -0x1(%rbp)
jmp 0x3a2a
movzbl -0x12(%rbp), %eax
shll $0x8, %eax
movzbl -0x11(%rbp), %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpb $0x0, 0x83e6(%rip)      # 0xc244
jne 0x3e69
movb $0x1, -0x1(%rbp)
jmp 0x3fc1
cmpb $0x0, 0x83ba(%rip)      # 0xc22a
jne 0x3e7b
movb $0x1, -0x1(%rbp)
jmp 0x3fc1
movq 0x8396(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x8384(%rip), %rax      # 0xc210
movb 0xc(%rax), %al
leaq -0x1a(%rbp), %rcx
movl $0x2, %edx
movzbl %sil, %edi
movzbl %al, %esi
callq 0x6df0
movsbl %al, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $-0x1, %edx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x3ec2
movb $0x1, -0x1(%rbp)
jmp 0x3fc1
movzbl -0x1a(%rbp), %eax
shll $0x8, %eax
movzbl -0x19(%rbp), %ecx
orl %ecx, %eax
movw %ax, -0x1c(%rbp)
movzwl -0x1c(%rbp), %eax
movzwl -0x4(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3eef
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x3fc1
movzwl -0x1c(%rbp), %eax
movq 0x831e(%rip), %rcx      # 0xc218
movzwl 0x2(%rcx), %ecx
sarl %ecx
cmpl %ecx, %eax
jle 0x3f61
movq 0x830d(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x82fb(%rip), %rax      # 0xc210
movb 0x13(%rax), %al
leaq -0x1a(%rbp), %rcx
movl $0x1, %edx
movzbl %sil, %edi
movzbl %al, %esi
callq 0x6df0
movsbl %al, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $-0x1, %edx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x3f48
movb $0x1, -0x1(%rbp)
jmp 0x3fc1
movzbl -0x1a(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3f5f
callq 0x3270
movb $0x2, -0x1(%rbp)
jmp 0x3fc1
jmp 0x3f61
movq 0x82b0(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x829e(%rip), %rax      # 0xc210
movb 0xd(%rax), %dl
movw -0x4(%rbp), %ax
movq -0x10(%rbp), %rcx
movzbl %sil, %edi
movzbl %dl, %esi
movzbl %al, %edx
callq 0x6df0
movsbl %al, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $-0x1, %edx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x3fa7
movb $0x1, -0x1(%rbp)
jmp 0x3fc1
movzwl -0x1c(%rbp), %eax
movzwl -0x4(%rbp), %ecx
cltd
idivl %ecx
subl $0x1, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x2(%rbp)
movzbl 0x807f(%rip), %eax      # 0xc244
movzbl -0x2(%rbp), %ecx
cmpl %ecx, %eax
jne 0x41d6
movb $0x0, -0x1(%rbp)
jmp 0x427e
cmpb $0x0, -0x2(%rbp)
je 0x4241
cmpb $0x0, 0x8062(%rip)      # 0xc245
jne 0x41ee
movb $0x1, -0x1(%rbp)
jmp 0x427e
xorl %edi, %edi
callq 0x3880
xorl %edi, %edi
callq 0x2860
movzwl 0x8043(%rip), %edi      # 0xc246
callq 0x2670
movb $0x0, -0x3(%rbp)
movq 0x8005(%rip), %rax      # 0xc218
movl $0x23, %esi
movl $0x1, %edx
leaq -0x3(%rbp), %rcx
movzbl (%rax), %edi
callq 0x7360
movb $0x1, 0x8014(%rip)      # 0xc244
movl $0x1, %edi
callq 0x3880
callq 0x3270
jmp 0x427a
xorl %edi, %edi
callq 0x3880
movb 0x7fe2(%rip), %al       # 0xc230
movb %al, -0x3(%rbp)
movq 0x7fc0(%rip), %rax      # 0xc218
movl $0x23, %esi
movl $0x1, %edx
leaq -0x3(%rbp), %rcx
movzbl (%rax), %edi
callq 0x7360
movb $0x0, 0x7fcf(%rip)      # 0xc244
callq 0x3270
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: accel_self_test(int*, int*)
static int accel_self_test(int32_t *bias_regular, int32_t *bias_st)
{
	int jj, result = 0;
	float st_shift[3], st_shift_cust, st_shift_var;

	get_accel_prod_shift(st_shift);
	for(jj = 0; jj < 3; jj++)
	{
		st_shift_cust = labs(bias_regular[jj] - bias_st[jj]) / 65536.f;
		if (st_shift[jj])
		{
			st_shift_var = st_shift_cust / st_shift[jj] - 1.f;
			if (fabs(st_shift_var) > test.max_accel_var)
				result |= 1 << jj;
		}
		else if ((st_shift_cust < test.min_g) ||
						 (st_shift_cust > test.max_g))
			result |= 1 << jj;
	}

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
leaq -0x24(%rbp), %rdi
callq 0x53d0
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0x4a96
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rdx
subl (%rcx,%rdx,4), %eax
cltq
movq %rax, %rcx
negq %rcx
cmovnsq %rcx, %rax
cvtsi2ss %rax, %xmm0
movss 0x3678(%rip), %xmm1     # 0x8068
divss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movslq -0x14(%rbp), %rax
movss -0x24(%rbp,%rax,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4a0f
jp 0x4a0f
jmp 0x4a54
movss -0x28(%rbp), %xmm0
movslq -0x14(%rbp), %rax
divss -0x24(%rbp,%rax,4), %xmm0
movss 0x363a(%rip), %xmm1     # 0x8060
subss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x2c(%rbp), %xmm0
callq 0x5500
ucomiss 0x77c8(%rip), %xmm0     # 0xc208
jbe 0x4a52
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x4a86
movss -0x28(%rbp), %xmm1
movss 0x779f(%rip), %xmm0     # 0xc200
ucomiss %xmm1, %xmm0
ja 0x4a74
movss -0x28(%rbp), %xmm0
ucomiss 0x7792(%rip), %xmm0     # 0xc204
jbe 0x4a84
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x4a86
jmp 0x4a88
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x49b7
movl -0x18(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: gyro_self_test(int*, int*)
static int gyro_self_test(int32_t *bias_regular, int32_t *bias_st)
{
	int jj, result = 0;
	uint8_t tmp[3];
	float st_shift, st_shift_cust, st_shift_var;

	if (i2c_read(st.hw->addr, 0x0D, 3, tmp))
		return 0x07;

	tmp[0] &= 0x1F;
	tmp[1] &= 0x1F;
	tmp[2] &= 0x1F;

	for (jj = 0; jj < 3; jj++)
	{
		st_shift_cust = labs(bias_regular[jj] - bias_st[jj]) / 65536.f;
		if (tmp[jj])
		{
			st_shift = 3275.f / test.gyro_sens;
			while (--tmp[jj])
				st_shift *= 1.046f;
			st_shift_var = st_shift_cust / st_shift - 1.f;
			if (fabs(st_shift_var) > test.max_gyro_var)
				result |= 1 << jj;
		}
		else if ((st_shift_cust < test.min_dps) ||
						 (st_shift_cust > test.max_dps))
			result |= 1 << jj;
	}
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movq 0x775a(%rip), %rax      # 0xc218
movb (%rax), %al
leaq -0x23(%rbp), %rcx
movl $0xd, %esi
movl $0x3, %edx
movzbl %al, %edi
callq 0x6df0
movsbl %al, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $-0x1, %edx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x4af7
movl $0x7, -0x4(%rbp)
jmp 0x4c37
movzbl -0x23(%rbp), %eax
andl $0x1f, %eax
movb %al, -0x23(%rbp)
movzbl -0x22(%rbp), %eax
andl $0x1f, %eax
movb %al, -0x22(%rbp)
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movb %al, -0x21(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0x4c31
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
subl (%rcx,%rdx,4), %eax
cltq
movq %rax, %rcx
negq %rcx
cmovnsq %rcx, %rax
cvtsi2ss %rax, %xmm0
movss 0x3513(%rip), %xmm1     # 0x8068
divss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movslq -0x1c(%rbp), %rax
cmpb $0x0, -0x23(%rbp,%rax)
je 0x4bef
movl 0x7671(%rip), %eax      # 0xc1e4
cvtsi2ss %rax, %xmm1
movss 0x3918(%rip), %xmm0     # 0x8498
divss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movslq -0x1c(%rbp), %rcx
movb -0x23(%rbp,%rcx), %al
addb $-0x1, %al
movb %al, -0x23(%rbp,%rcx)
cmpb $0x0, %al
je 0x4baf
movss 0x38f9(%rip), %xmm0     # 0x849c
mulss -0x28(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
jmp 0x4b89
movss -0x2c(%rbp), %xmm0
divss -0x28(%rbp), %xmm0
movss 0x349f(%rip), %xmm1     # 0x8060
subss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x30(%rbp), %xmm0
callq 0x5500
ucomiss 0x7621(%rip), %xmm0     # 0xc1fc
jbe 0x4bed
movl -0x1c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
orl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x4c21
movss -0x2c(%rbp), %xmm1
movss 0x75f8(%rip), %xmm0     # 0xc1f4
ucomiss %xmm1, %xmm0
ja 0x4c0f
movss -0x2c(%rbp), %xmm0
ucomiss 0x75eb(%rip), %xmm0     # 0xc1f8
jbe 0x4c1f
movl -0x1c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
orl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x4c21
jmp 0x4c23
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4b1c
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movw %di, %cx
movw %cx, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movq %rdx, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4c6a
movb $0x1, -0x1(%rbp)
jmp 0x4d1f
cmpb $0x0, 0x75b9(%rip)      # 0xc22a
jne 0x4c7c
movb $0x1, -0x1(%rbp)
jmp 0x4d1f
movzwl -0x4(%rbp), %eax
sarl $0x8, %eax
movb %al, -0x12(%rbp)
movzwl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
movzwl -0x6(%rbp), %ecx
addl %ecx, %eax
movq 0x7575(%rip), %rcx      # 0xc218
movzwl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jle 0x4cb1
movb $0x1, -0x1(%rbp)
jmp 0x4d1f
movq 0x7560(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x754e(%rip), %rax      # 0xc210
movb 0x1b(%rax), %al
leaq -0x12(%rbp), %rcx
movl $0x2, %edx
movzbl %sil, %edi
movzbl %al, %esi
callq 0x7360
cmpl $0x0, %eax
je 0x4ce5
movb $0x1, -0x1(%rbp)
jmp 0x4d1f
movq 0x752c(%rip), %rax      # 0xc218
movb (%rax), %sil
movq 0x751a(%rip), %rax      # 0xc210
movb 0x18(%rax), %dl
movw -0x6(%rbp), %ax
movq -0x10(%rbp), %rcx
movzbl %sil, %edi
movzbl %dl, %esi
movzbl %al, %edx
callq 0x7360
cmpl $0x0, %eax
je 0x4d1b
movb $0x1, -0x1(%rbp)
jmp 0x4d1f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu.c
// Function: get_accel_prod_shift(float*)
static int get_accel_prod_shift(float *st_shift)
{
	uint8_t tmp[4], shift_code[3], ii;

	if (i2c_read(st.hw->addr, 0x0D, 4, tmp))
		return 0x07;

	shift_code[0] = ((tmp[0] & 0xE0) >> 3) | ((tmp[3] & 0x30) >> 4);
	shift_code[1] = ((tmp[1] & 0xE0) >> 3) | ((tmp[3] & 0x0C) >> 2);
	shift_code[2] = ((tmp[2] & 0xE0) >> 3) | (tmp[3] & 0x03);
	for (ii = 0; ii < 3; ii++)
	{
		if (!shift_code[ii])
		{
			st_shift[ii] = 0.f;
			continue;
		}
		/* Equivalent to..
		 * st_shift[ii] = 0.34f * powf(0.92f/0.34f, (shift_code[ii]-1) / 30.f)
		 */
		st_shift[ii] = 0.34f;
		while (--shift_code[ii])
			st_shift[ii] *= 1.034f;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x6e35(%rip), %rax      # 0xc218
movb (%rax), %al
leaq -0x14(%rbp), %rcx
movl $0xd, %esi
movl $0x4, %edx
movzbl %al, %edi
callq 0x6df0
movsbl %al, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $-0x1, %edx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x541c
movl $0x7, -0x4(%rbp)
jmp 0x54ec
movzbl -0x14(%rbp), %eax
andl $0xe0, %eax
sarl $0x3, %eax
movzbl -0x11(%rbp), %ecx
andl $0x30, %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movb %al, -0x17(%rbp)
movzbl -0x13(%rbp), %eax
andl $0xe0, %eax
sarl $0x3, %eax
movzbl -0x11(%rbp), %ecx
andl $0xc, %ecx
sarl $0x2, %ecx
orl %ecx, %eax
movb %al, -0x16(%rbp)
movzbl -0x12(%rbp), %eax
andl $0xe0, %eax
sarl $0x3, %eax
movzbl -0x11(%rbp), %ecx
andl $0x3, %ecx
orl %ecx, %eax
movb %al, -0x15(%rbp)
movb $0x0, -0x18(%rbp)
movzbl -0x18(%rbp), %eax
cmpl $0x3, %eax
jge 0x54e5
movzbl -0x18(%rbp), %eax
cmpb $0x0, -0x17(%rbp,%rax)
jne 0x5494
movq -0x10(%rbp), %rax
movzbl -0x18(%rbp), %ecx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x54db
movq -0x10(%rbp), %rax
movzbl -0x18(%rbp), %ecx
movss 0x2ffc(%rip), %xmm0     # 0x84a0
movss %xmm0, (%rax,%rcx,4)
movzbl -0x18(%rbp), %eax
movl %eax, %ecx
movb -0x17(%rbp,%rcx), %al
addb $-0x1, %al
movb %al, -0x17(%rbp,%rcx)
cmpb $0x0, %al
je 0x54d9
movq -0x10(%rbp), %rax
movzbl -0x18(%rbp), %ecx
movss 0x2fd7(%rip), %xmm0     # 0x84a4
mulss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x54a9
jmp 0x54db
movb -0x18(%rbp), %al
addb $0x1, %al
movb %al, -0x18(%rbp)
jmp 0x546e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: init_dump_struct()
static void init_dump_struct()
{
    dmp.tap_cb = NULL;
    dmp.android_orient_cb = NULL;
    dmp.orient = 0;
    dmp.feature_mask = 0;
    dmp.fifo_rate = 0;
    dmp.packet_length = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq $0x0, 0x6d09(%rip) # 0xc248
movq $0x0, 0x6d06(%rip) # 0xc250
movw $0x0, 0x6d05(%rip)      # 0xc258
movw $0x0, 0x6cfe(%rip)      # 0xc25a
movw $0x0, 0x6cf7(%rip)      # 0xc25c
movb $0x0, 0x6cf2(%rip)      # 0xc25e
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x4(%rbp)
movq 0x36bc(%rip), %rax      # 0x91c2
movq %rax, -0x10(%rbp)
movl 0x36ba(%rip), %eax      # 0x91ca
movl %eax, -0x8(%rbp)
movzwl -0x4(%rbp), %eax
cmpl $0xc8, %eax
jle 0x5b24
movb $0x1, -0x1(%rbp)
jmp 0x5b9b
movzwl -0x4(%rbp), %ecx
movl $0xc8, %eax
cltd
idivl %ecx
subl $0x1, %eax
movw %ax, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x1a(%rbp)
movzwl -0x12(%rbp), %eax
andl $0xff, %eax
movb %al, -0x19(%rbp)
leaq -0x1a(%rbp), %rdx
movl $0x216, %edi            # imm = 0x216
movl $0x2, %esi
callq 0x4c40
cmpb $0x0, %al
je 0x5b6f
movb $0x1, -0x1(%rbp)
jmp 0x5b9b
leaq -0x10(%rbp), %rdx
movl $0xac1, %edi            # imm = 0xAC1
movl $0xc, %esi
callq 0x4c40
cmpb $0x0, %al
je 0x5b8c
movb $0x1, -0x1(%rbp)
jmp 0x5b9b
movw -0x4(%rbp), %ax
movw %ax, 0x66c5(%rip)       # 0xc25c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movb $0x0, -0x2(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5e78
movzbl -0x2(%rbp), %eax
orl $0x30, %eax
movb %al, -0x2(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x5e8e
movzbl -0x2(%rbp), %eax
orl $0xc, %eax
movb %al, -0x2(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x5ea4
movzbl -0x2(%rbp), %eax
orl $0x3, %eax
movb %al, -0x2(%rbp)
movl $0x148, %edi            # imm = 0x148
movl $0x1, %esi
leaq -0x2(%rbp), %rdx
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x1, %eax
jge 0x5edd
movb $0x1, -0x1(%rbp)
jmp 0x5eec
movzbl -0x1(%rbp), %eax
cmpl $0x4, %eax
jle 0x5eea
movb $0x4, -0x1(%rbp)
jmp 0x5eec
movzbl -0x1(%rbp), %eax
subl $0x1, %eax
movb %al, -0x2(%rbp)
movl $0x14f, %edi            # imm = 0x14F
movl $0x1, %esi
leaq -0x2(%rbp), %rdx
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
movl $0x5, %ecx
cltd
idivl %ecx
movw %ax, -0x4(%rbp)
movzwl -0x4(%rbp), %eax
sarl $0x8, %eax
movb %al, -0x6(%rbp)
movzwl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, -0x5(%rbp)
leaq -0x6(%rbp), %rdx
movl $0x1de, %edi            # imm = 0x1DE
movl $0x2, %esi
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
movl $0x5, %ecx
cltd
idivl %ecx
movw %ax, -0x4(%rbp)
movzwl -0x4(%rbp), %eax
sarl $0x8, %eax
movb %al, -0x6(%rbp)
movzwl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, -0x5(%rbp)
leaq -0x6(%rbp), %rdx
movl $0x1da, %edi            # imm = 0x1DA
movl $0x2, %esi
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %si, %ax
movl %edi, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movl -0x4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movzwl -0x6(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
sarl $0x18, %eax
andl $0xff, %eax
movb %al, -0xa(%rbp)
movl -0x10(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, -0x9(%rbp)
movl -0x10(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x8(%rbp)
movl -0x10(%rbp), %eax
andl $0xff, %eax
movb %al, -0x7(%rbp)
leaq -0xa(%rbp), %rdx
movl $0x15c, %edi            # imm = 0x15C
movl $0x4, %esi
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
movl $0x5, %ecx
cltd
idivl %ecx
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
sarl $0x8, %eax
movb %al, -0x4(%rbp)
movzwl -0x2(%rbp), %eax
andl $0xff, %eax
movb %al, -0x3(%rbp)
leaq -0x4(%rbp), %rdx
movl $0x15a, %edi            # imm = 0x15A
movl $0x2, %esi
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
movl $0x5, %ecx
cltd
idivl %ecx
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
sarl $0x8, %eax
movb %al, -0x4(%rbp)
movzwl -0x2(%rbp), %eax
andl $0xff, %eax
movb %al, -0x3(%rbp)
leaq -0x4(%rbp), %rdx
movl $0x158, %edi            # imm = 0x158
movl $0x2, %esi
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x60e9
movb $0x1, -0x1(%rbp)
jmp 0x612f
leaq -0x14(%rbp), %rdx
movl $0x360, %edi            # imm = 0x360
movl $0x4, %esi
callq 0x4d30
cmpb $0x0, %al
je 0x6106
movb $0x1, -0x1(%rbp)
jmp 0x612f
movzbl -0x14(%rbp), %ecx
shll $0x18, %ecx
movzbl -0x13(%rbp), %eax
shll $0x10, %eax
orl %eax, %ecx
movzbl -0x12(%rbp), %eax
shll $0x8, %eax
orl %eax, %ecx
movzbl -0x11(%rbp), %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_set_pedometer_step_count(unsigned int)
uint8_t dmp_set_pedometer_step_count(uint32_t count)
{
	uint8_t tmp[4];

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, -0x8(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x7(%rbp)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x6(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, -0x5(%rbp)
leaq -0x8(%rbp), %rdx
movl $0x360, %edi            # imm = 0x360
movl $0x4, %esi
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x61b9
movb $0x1, -0x1(%rbp)
jmp 0x6202
leaq -0x14(%rbp), %rdx
movl $0x3c4, %edi            # imm = 0x3C4
movl $0x4, %esi
callq 0x4d30
cmpb $0x0, %al
je 0x61d6
movb $0x1, -0x1(%rbp)
jmp 0x6202
movzbl -0x14(%rbp), %eax
shll $0x18, %eax
movzbl -0x13(%rbp), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movzbl -0x12(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x11(%rbp), %ecx
orl %ecx, %eax
imull $0x14, %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl $0x14, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, -0x8(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x7(%rbp)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x6(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, -0x5(%rbp)
leaq -0x8(%rbp), %rdx
movl $0x3c4, %edi            # imm = 0x3C4
movl $0x4, %esi
callq 0x4c40
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x2(%rbp)
cmpb $0x0, -0x2(%rbp)
je 0x6590
movq 0x2c63(%rip), %rax      # 0x91ce
movq %rax, -0xb(%rbp)
movb 0x2c61(%rip), %al       # 0x91d6
movb %al, -0x3(%rbp)
leaq -0xb(%rbp), %rdx
movl $0x4b8, %edi            # imm = 0x4B8
movl $0x9, %esi
callq 0x4c40
movb %al, -0x1(%rbp)
jmp 0x65ba
movq 0x2c40(%rip), %rax      # 0x91d7
movq %rax, -0x14(%rbp)
movb 0x2c3e(%rip), %al       # 0x91df
movb %al, -0xc(%rbp)
leaq -0x14(%rbp), %rdx
movl $0x4b8, %edi            # imm = 0x4B8
movl $0x9, %esi
callq 0x4c40
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_enable_lp_quat(unsigned char)
uint8_t dmp_enable_lp_quat(uint8_t enable)
{
	uint8_t regs[4];
	if (enable)
	{
		regs[0] = DINBC0;
		regs[1] = DINBC2;
		regs[2] = DINBC4;
		regs[3] = DINBC6;
	}
	else
		memset(regs, 0x8B, 4);

	mpu_write_mem(CFG_LP_QUAT, 4, regs);

	return mpu_reset_fifo();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
cmpb $0x0, -0x1(%rbp)
je 0x65f6
movb $-0x40, -0x5(%rbp)
movb $-0x3e, -0x4(%rbp)
movb $-0x3c, -0x3(%rbp)
movb $-0x3a, -0x2(%rbp)
jmp 0x6609
leaq -0x5(%rbp), %rdi
movl $0x8b, %esi
movl $0x4, %edx
callq 0x1080
leaq -0x5(%rbp), %rdx
movl $0xa98, %edi            # imm = 0xA98
movl $0x4, %esi
callq 0x4c40
callq 0x3270
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: dmp_enable_6x_lp_quat(unsigned char)
uint8_t dmp_enable_6x_lp_quat(uint8_t enable)
{
	uint8_t regs[4];
	if (enable)
	{
		regs[0] = DINA20;
		regs[1] = DINA28;
		regs[2] = DINA30;
		regs[3] = DINA38;
	}
	else
		memset(regs, 0xA3, 4);

	mpu_write_mem(CFG_8, 4, regs);

	return mpu_reset_fifo();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
cmpb $0x0, -0x1(%rbp)
je 0x6656
movb $0x20, -0x5(%rbp)
movb $0x28, -0x4(%rbp)
movb $0x30, -0x3(%rbp)
movb $0x38, -0x2(%rbp)
jmp 0x6669
leaq -0x5(%rbp), %rdi
movl $0xa3, %esi
movl $0x4, %edx
callq 0x1080
leaq -0x5(%rbp), %rdx
movl $0xa9e, %edi            # imm = 0xA9E
movl $0x4, %esi
callq 0x4c40
callq 0x3270
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
movb %al, -0x2(%rbp)
movabsq $-0x496e5c740c464e28, %rax # imm = 0xB691A38BF3B9B1D8
movq %rax, -0x10(%rbp)
movl $0xd9b409b6, -0x9(%rbp) # imm = 0xD9B409B6
movabsq $-0x496e5c740c464e26, %rax # imm = 0xB691A38BF3B9B1DA
movq %rax, -0x20(%rbp)
movl $0xdab4dab6, -0x19(%rbp) # imm = 0xDAB4DAB6
movzbl -0x2(%rbp), %eax
movl %eax, -0x24(%rbp)
subl $0x1, %eax
je 0x6718
jmp 0x66f6
movl -0x24(%rbp), %eax
subl $0x2, %eax
jne 0x6730
jmp 0x6700
leaq -0x10(%rbp), %rdx
movl $0xa82, %edi            # imm = 0xA82
movl $0xb, %esi
callq 0x4c40
movb %al, -0x1(%rbp)
jmp 0x6734
leaq -0x20(%rbp), %rdx
movl $0xa82, %edi            # imm = 0xA82
movl $0xb, %esi
callq 0x4c40
movb %al, -0x1(%rbp)
jmp 0x6734
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/MotionSensor/inv_mpu_lib/inv_mpu_dmp_motion_driver.c
// Function: decode_gesture(unsigned char*)
static int decode_gesture(uint8_t *gesture)
{
	uint8_t tap, android_orient;

	android_orient = gesture[3] & 0xC0;
	tap = 0x3F & gesture[3];

	if (gesture[1] & INT_SRC_TAP)
	{
		uint8_t direction, count;
		direction = tap >> 3;
		count = (tap % 8) + 1;
		if (dmp.tap_cb)
			dmp.tap_cb(direction, count);
	}

	if (gesture[1] & INT_SRC_ANDROID_ORIENT)
	{
		if (dmp.android_orient_cb)
			dmp.android_orient_cb(android_orient >> 6);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xc0, %eax
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0x3f, %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6af7
movzbl -0x9(%rbp), %eax
sarl $0x3, %eax
movb %al, -0xb(%rbp)
movzbl -0x9(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
addl $0x1, %edx
movb %dl, %al
movb %al, -0xc(%rbp)
cmpq $0x0, 0x5768(%rip)      # 0xc248
je 0x6af5
movq 0x575f(%rip), %rax      # 0xc248
movb -0xb(%rbp), %cl
movzbl %cl, %edi
movzbl -0xc(%rbp), %esi
callq *%rax
jmp 0x6af7
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x6b26
cmpq $0x0, 0x5741(%rip)      # 0xc250
je 0x6b24
movq 0x5738(%rip), %rax      # 0xc250
movzbl -0xa(%rbp), %ecx
sarl $0x6, %ecx
movzbl %cl, %edi
callq *%rax
jmp 0x6b26
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movb %sil, %dl
movb %dil, %sil
movb %sil, -0x1(%rbp)
movb %dl, -0x2(%rbp)
movb %al, -0x3(%rbp)
movq %rcx, -0x10(%rbp)
movb -0x1(%rbp), %al
leaq -0x11(%rbp), %rdx
movzbl %al, %edi
movzbl -0x2(%rbp), %esi
callq 0x6bd0
movb %al, -0x12(%rbp)
movzbl -0x11(%rbp), %eax
movzbl -0x3(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movb -0x12(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: readBitW(unsigned char, unsigned char, unsigned char, unsigned short*)
int8_t readBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data) {
    uint16_t b;
    uint8_t count = readWord(devAddr, regAddr, &b);
    *data = b & (1 << bitNum);
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movb %sil, %dl
movb %dil, %sil
movb %sil, -0x1(%rbp)
movb %dl, -0x2(%rbp)
movb %al, -0x3(%rbp)
movq %rcx, -0x10(%rbp)
movb -0x1(%rbp), %al
leaq -0x12(%rbp), %rdx
movzbl %al, %edi
movzbl -0x2(%rbp), %esi
callq 0x6c70
movb %al, -0x13(%rbp)
movzwl -0x12(%rbp), %eax
movzbl -0x3(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movb -0x13(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: readBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*)
int8_t readBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t *data) {
    // 01101001 read byte
    // 76543210 bit numbers
    //    xxx   args: bitStart=4, length=3
    //    010   masked
    //   -> 010 shifted
    uint8_t count, b;
    if ((count = readByte(devAddr, regAddr, &b)) != 0) {
        uint8_t mask = ((1 << length) - 1) << (bitStart - length + 1);
        b &= mask;
        b >>= (bitStart - length + 1);
        *data = b;
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movb %dil, %sil
movb %sil, -0x1(%rbp)
movb %dl, -0x2(%rbp)
movb %cl, -0x3(%rbp)
movb %al, -0x4(%rbp)
movq %r8, -0x10(%rbp)
movb -0x1(%rbp), %al
leaq -0x12(%rbp), %rdx
movzbl %al, %edi
movzbl -0x2(%rbp), %esi
callq 0x6bd0
movb %al, -0x11(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
je 0x6d3d
movzbl -0x4(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movzbl -0x3(%rbp), %ecx
movzbl -0x4(%rbp), %edx
subl %edx, %ecx
addl $0x1, %ecx
shll %cl, %eax
movb %al, -0x13(%rbp)
movzbl -0x13(%rbp), %ecx
movzbl -0x12(%rbp), %eax
andl %ecx, %eax
movb %al, -0x12(%rbp)
movzbl -0x3(%rbp), %ecx
movzbl -0x4(%rbp), %eax
subl %eax, %ecx
addl $0x1, %ecx
movzbl -0x12(%rbp), %eax
sarl %cl, %eax
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movb -0x11(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)