#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 uint8_t;
typedef int uint32_t;

/* Variables and functions */
void configureBlePatch(void) {
  uint8_t *pPatchTab = (uint8_t *)(0x21000000 + 0x0398);
  uint32_t *pIrqPatch = (uint32_t *)(0x21000000 + 0x0434);
  pPatchTab[142] = 0;
  pPatchTab[66] = 1;
  pPatchTab[73] = 2;
  pPatchTab[117] = 3;
  pPatchTab[28] = 4;
  pPatchTab[105] = 5;
  pPatchTab[106] = 6;
  pPatchTab[70] = 7;
  pIrqPatch[21] = 0x210041bd;
}


x86 assembly (clang, -O0):
<configureBlePatch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21000398,%eax
mov    %rax,-0x8(%rbp)
mov    $0x21000434,%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,0x238(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x108(%rax)
mov    -0x8(%rbp),%rax
movl   $0x2,0x124(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0x1d4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x4,0x70(%rax)
mov    -0x8(%rbp),%rax
movl   $0x5,0x1a4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x6,0x1a8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x7,0x118(%rax)
mov    -0x10(%rbp),%rax
movl   $0x210041bd,0x54(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<configureBlePatch>:
movl   $0x0,0x210005d0
movl   $0x1,0x210004a0
movl   $0x2,0x210004bc
movl   $0x3,0x2100056c
movl   $0x4,0x21000408
movl   $0x5,0x2100053c
movl   $0x6,0x21000540
movl   $0x7,0x210004b0
movl   $0x210041bd,0x21000488
ret

LLVM IR (-O0):
define void @configureBlePatch() {
%1 = alloca i32*
%2 = alloca i32*
store i32* inttoptr (i64 553649048 to i32*), i32** %1
store i32* inttoptr (i64 553649204 to i32*), i32** %2
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 142
store i32 0, i32* %4
%5 = load i32*, i32** %1
%6 = getelementptr inbounds i32, i32* %5, i64 66
store i32 1, i32* %6
%7 = load i32*, i32** %1
%8 = getelementptr inbounds i32, i32* %7, i64 73
store i32 2, i32* %8
%9 = load i32*, i32** %1
%10 = getelementptr inbounds i32, i32* %9, i64 117
store i32 3, i32* %10
%11 = load i32*, i32** %1
%12 = getelementptr inbounds i32, i32* %11, i64 28
store i32 4, i32* %12
%13 = load i32*, i32** %1
%14 = getelementptr inbounds i32, i32* %13, i64 105
store i32 5, i32* %14
%15 = load i32*, i32** %1
%16 = getelementptr inbounds i32, i32* %15, i64 106
store i32 6, i32* %16
%17 = load i32*, i32** %1
%18 = getelementptr inbounds i32, i32* %17, i64 70
store i32 7, i32* %18
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 21
store i32 553664957, i32* %20
ret void
}

LLVM IR (-O2):
define void @configureBlePatch() {
store i32 0, i32* inttoptr (i64 553649616 to i32*)
store i32 1, i32* inttoptr (i64 553649312 to i32*)
store i32 2, i32* inttoptr (i64 553649340 to i32*)
store i32 3, i32* inttoptr (i64 553649516 to i32*)
store i32 4, i32* inttoptr (i64 553649160 to i32*)
store i32 5, i32* inttoptr (i64 553649468 to i32*)
store i32 6, i32* inttoptr (i64 553649472 to i32*)
store i32 7, i32* inttoptr (i64 553649328 to i32*)
store i32 553664957, i32* inttoptr (i64 553649288 to i32*)
ret void
}