#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 /*<<< orphan*/ uint8_t;

/* Variables and functions */
int MFRC522_Debug_DumpSector(int /*<<< orphan*/ *, int);
int MFRC522_Debug_CardDump(uint8_t *CardID) {
  int ret_int = 0;
  {
    int i;
    for (i = 0x0; i < 0x40; i += 4) {
      ret_int |= MFRC522_Debug_DumpSector(CardID, i);
    }
  }
  return ret_int;
}


x86 assembly (clang, -O0):
<MFRC522_Debug_CardDump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x40,-0x10(%rbp)
jge    1154 <MFRC522_Debug_CardDump+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <MFRC522_Debug_CardDump+0x1a>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MFRC522_Debug_CardDump>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdi,%r12
xor    %esi,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebp
mov    %r12,%rdi
mov    $0x4,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%r14d
or     %ebp,%r14d
mov    %r12,%rdi
mov    $0x8,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%r15d
mov    %r12,%rdi
mov    $0xc,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebp
or     %r15d,%ebp
or     %r14d,%ebp
mov    %r12,%rdi
mov    $0x10,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%r14d
mov    %r12,%rdi
mov    $0x14,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebx
or     %r14d,%ebx
mov    %r12,%rdi
mov    $0x18,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%r15d
or     %ebx,%r15d
or     %ebp,%r15d
mov    %r12,%rdi
mov    $0x1c,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebx
mov    %r12,%rdi
mov    $0x20,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    %r12,%rdi
mov    $0x24,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    %r12,%rdi
mov    $0x28,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%r14d
or     %ebx,%r14d
or     %r15d,%r14d
mov    %r12,%rdi
mov    $0x2c,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebx
mov    %r12,%rdi
mov    $0x30,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    %r12,%rdi
mov    $0x34,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    %r12,%rdi
mov    $0x38,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    %r12,%rdi
mov    $0x3c,%esi
call   1030 <MFRC522_Debug_DumpSector@plt>
or     %ebp,%eax
or     %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @MFRC522_Debug_CardDump(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 64
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32*, i32** %2
%10 = load i32, i32* %4
%11 = call i32 @MFRC522_Debug_DumpSector(i32* %9, i32 %10)
%12 = load i32, i32* %3
%13 = or i32 %12, %11
store i32 %13, i32* %3
br label %14
14: ; preds = %8
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 4
store i32 %16, i32* %4
br label %5
17: ; preds = %5
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @MFRC522_Debug_CardDump(i32* %0) {
%2 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 0)
%3 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 4)
%4 = or i32 %3, %2
%5 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 8)
%6 = or i32 %5, %4
%7 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 12)
%8 = or i32 %7, %6
%9 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 16)
%10 = or i32 %9, %8
%11 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 20)
%12 = or i32 %11, %10
%13 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 24)
%14 = or i32 %13, %12
%15 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 28)
%16 = or i32 %15, %14
%17 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 32)
%18 = or i32 %17, %16
%19 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 36)
%20 = or i32 %19, %18
%21 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 40)
%22 = or i32 %21, %20
%23 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 44)
%24 = or i32 %23, %22
%25 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 48)
%26 = or i32 %25, %24
%27 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 52)
%28 = or i32 %27, %26
%29 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 56)
%30 = or i32 %29, %28
%31 = tail call i32 @MFRC522_Debug_DumpSector(i32* %0, i32 60)
%32 = or i32 %31, %30
ret i32 %32
}