#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 scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void f2m_print(uint32_t t, uint32_t *A) {
  uint32_t i;
  printf("0x");
  for (i = 0; i < t; i++)
    printf("%.8X ", A[t - i - 1]);
}


x86 assembly (clang, -O0):
<f2m_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1177 <f2m_print+0x67>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    -0x18(%rbp),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1136 <f2m_print+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2m_print>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xede(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %rbx,%rbx
jle    1155 <f2m_print+0x45>
lea    0xece(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    -0x8(%r14,%rbx,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <f2m_print+0x30>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"0x\00"
@.str.1 = [6 x i8] c"%.8X \00"
define void @f2m_print(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
%5 = alloca i64
store i64 %0, i64* %3
store i64* %1, i64** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %5
br label %7
7: ; preds = %20, %2
%8 = load i64, i64* %5
%9 = load i64, i64* %3
%10 = icmp slt i64 %8, %9
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = load i64*, i64** %4
%13 = load i64, i64* %3
%14 = load i64, i64* %5
%15 = sub nsw i64 %13, %14
%16 = sub nsw i64 %15, 1
%17 = getelementptr inbounds i64, i64* %12, i64 %16
%18 = load i64, i64* %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %18)
br label %20
20: ; preds = %11
%21 = load i64, i64* %5
%22 = add nsw i64 %21, 1
store i64 %22, i64* %5
br label %7
23: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"0x\00"
@.str.1 = [6 x i8] c"%.8X \00"
define void @f2m_print(i64 %0, i64* nocapture %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp sgt i64 %0, 0
br i1 %4, label %5, label %14
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ 0, %2 ]
%7 = xor i64 %6, -1
%8 = add i64 %7, %0
%9 = getelementptr inbounds i64, i64* %1, i64 %8
%10 = load i64, i64* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %10)
%12 = add nuw nsw i64 %6, 1
%13 = icmp eq i64 %12, %0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
ret void
}