#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 */
int /*<<< orphan*/ printf(char *, ...);
void print_mcu8(uint8_t *mcu, uint32_t num_mcu, uint8_t sfh, uint8_t sfv) {
  printf("mcu numéro %d\n", num_mcu);
  for (uint32_t i = 0; i < (uint32_t)(64 * sfv * sfh); i++) {
    if (!(i % (sfh * 8)))
      printf("\n");
    printf("%d ", mcu[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_mcu8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x6,%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    119c <print_mcu8+0x8c>
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1175 <print_mcu8+0x65>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113d <print_mcu8+0x2d>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mcu8>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%ebx
mov    %edx,%r12d
mov    %rdi,%r14
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
imul   %r12d,%ebx
shl    $0x6,%ebx
test   %ebx,%ebx
jle    118d <print_mcu8+0x6d>
shl    $0x3,%r12d
mov    %ebx,%ebp
lea    0xeba(%rip),%r15
xor    %ebx,%ebx
jmp    1177 <print_mcu8+0x57>
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
je     118d <print_mcu8+0x6d>
mov    %ebx,%eax
cltd
idiv   %r12d
test   %edx,%edx
jne    1160 <print_mcu8+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1160 <print_mcu8+0x40>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"mcu num\C3\A9ro %d\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [4 x i8] c"%d \00"
define void @print_mcu8(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 0, i32* %9
br label %12
12: ; preds = %34, %4
%13 = load i32, i32* %9
%14 = load i32, i32* %8
%15 = mul nsw i32 64, %14
%16 = load i32, i32* %7
%17 = mul nsw i32 %15, %16
%18 = icmp slt i32 %13, %17
br i1 %18, label %19, label %37
19: ; preds = %12
%20 = load i32, i32* %9
%21 = load i32, i32* %7
%22 = mul nsw i32 %21, 8
%23 = srem i32 %20, %22
%24 = icmp ne i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %19
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %27
27: ; preds = %25, %19
%28 = load i32*, i32** %5
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %27
%35 = load i32, i32* %9
%36 = add nsw i32 %35, 1
store i32 %36, i32* %9
br label %12
37: ; preds = %12
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"mcu num\C3\A9ro %d\0A\00"
@.str.2 = [4 x i8] c"%d \00"
define void @print_mcu8(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = shl i32 %2, 6
%7 = mul i32 %6, %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = shl nsw i32 %2, 3
%11 = zext i32 %7 to i64
br label %14
12: ; preds = %21, %4
%13 = tail call i32 @putchar(i32 10)
ret void
14: ; preds = %9, %21
%15 = phi i64 [ 0, %9 ], [ %25, %21 ]
%16 = trunc i64 %15 to i32
%17 = srem i32 %16, %10
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = tail call i32 @putchar(i32 10)
br label %21
21: ; preds = %19, %14
%22 = getelementptr inbounds i32, i32* %0, i64 %15
%23 = load i32, i32* %22
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = add nuw nsw i64 %15, 1
%26 = icmp eq i64 %25, %11
br i1 %26, label %12, label %14
}