#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ i2cinit();
void BSP_TempSensor_Init(void) {
  i2cinit();
  (*((volatile uint32_t *)0x40004528)) &= ~0x04;
  (*((volatile uint32_t *)0x4000452C)) =
      ((*((volatile uint32_t *)0x4000452C)) & 0xFFFFF0FF) + 0x00000000;
  (*((volatile uint32_t *)0x40004400)) &= ~0x04;
  (*((volatile uint32_t *)0x40004420)) &= ~0x04;
  (*((volatile uint32_t *)0x4000451C)) |= 0x04;
}


x86 assembly (clang, -O0):
<BSP_TempSensor_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <i2cinit@plt>
mov    $0x40004528,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    $0x40004528,%eax
mov    %ecx,(%rax)
mov    $0x4000452c,%eax
mov    (%rax),%ecx
and    $0xfffff0ff,%ecx
add    $0x0,%ecx
mov    $0x4000452c,%eax
mov    %ecx,(%rax)
mov    $0x40004400,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    $0x40004400,%eax
mov    %ecx,(%rax)
mov    $0x40004420,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    $0x40004420,%eax
mov    %ecx,(%rax)
mov    $0x4000451c,%eax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    $0x4000451c,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_TempSensor_Init>:
push   %rax
xor    %eax,%eax
call   1030 <i2cinit@plt>
andl   $0xfffffffb,0x40004528
fb
andl   $0xfffff0ff,0x4000452c
ff f0 ff ff
andl   $0xfffffffb,0x40004400
fb
andl   $0xfffffffb,0x40004420
fb
orl    $0x4,0x4000451c
04
pop    %rax
ret

LLVM IR (-O0):
define void @BSP_TempSensor_Init() {
%1 = call i32 (...) @i2cinit()
%2 = load volatile i32, i32* inttoptr (i64 1073759528 to i32*)
%3 = and i32 %2, -5
store volatile i32 %3, i32* inttoptr (i64 1073759528 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1073759532 to i32*)
%5 = and i32 %4, -3841
%6 = add i32 %5, 0
store volatile i32 %6, i32* inttoptr (i64 1073759532 to i32*)
%7 = load volatile i32, i32* inttoptr (i64 1073759232 to i32*)
%8 = and i32 %7, -5
store volatile i32 %8, i32* inttoptr (i64 1073759232 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 1073759264 to i32*)
%10 = and i32 %9, -5
store volatile i32 %10, i32* inttoptr (i64 1073759264 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 1073759516 to i32*)
%12 = or i32 %11, 4
store volatile i32 %12, i32* inttoptr (i64 1073759516 to i32*)
ret void
}

LLVM IR (-O2):
define void @BSP_TempSensor_Init() {
%1 = tail call i32 (...) @i2cinit()
%2 = load volatile i32, i32* inttoptr (i64 1073759528 to i32*)
%3 = and i32 %2, -5
store volatile i32 %3, i32* inttoptr (i64 1073759528 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1073759532 to i32*)
%5 = and i32 %4, -3841
store volatile i32 %5, i32* inttoptr (i64 1073759532 to i32*)
%6 = load volatile i32, i32* inttoptr (i64 1073759232 to i32*)
%7 = and i32 %6, -5
store volatile i32 %7, i32* inttoptr (i64 1073759232 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1073759264 to i32*)
%9 = and i32 %8, -5
store volatile i32 %9, i32* inttoptr (i64 1073759264 to i32*)
%10 = load volatile i32, i32* inttoptr (i64 1073759516 to i32*)
%11 = or i32 %10, 4
store volatile i32 %11, i32* inttoptr (i64 1073759516 to i32*)
ret void
}