#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*/ printf(char *, ...);
void print_response_reg(uint32_t *emmc) {
  printf("RESPONSE:-----------------------------------\n");
  printf("RESP3: 0x%08X\n", *(emmc + 0x1C / 4));
  printf("RESP2: 0x%08X\n", *(emmc + 0x18 / 4));
  printf("RESP1: 0x%08X\n", *(emmc + 0x14 / 4));
  printf("RESP0: 0x%08X\n", *(emmc + 0x10 / 4));
}


x86 assembly (clang, -O0):
<print_response_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%esi
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%esi
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%esi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_response_reg>:
push   %rbx
mov    %rdi,%rbx
lea    0xf11(%rip),%rdi
call   1030 <puts@plt>
mov    0x1c(%rbx),%esi
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%esi
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%esi
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%esi
lea    0xec0(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"RESPONSE:-----------------------------------\0A\00"
@.str.1 = [15 x i8] c"RESP3: 0x%08X\0A\00"
@.str.2 = [15 x i8] c"RESP2: 0x%08X\0A\00"
@.str.3 = [15 x i8] c"RESP1: 0x%08X\0A\00"
@.str.4 = [15 x i8] c"RESP0: 0x%08X\0A\00"
define void @print_response_reg(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 7
%6 = load i32, i32* %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 6
%10 = load i32, i32* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 5
%14 = load i32, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 4
%18 = load i32, i32* %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %18)
ret void
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"RESP3: 0x%08X\0A\00"
@.str.2 = [15 x i8] c"RESP2: 0x%08X\0A\00"
@.str.3 = [15 x i8] c"RESP1: 0x%08X\0A\00"
@.str.4 = [15 x i8] c"RESP0: 0x%08X\0A\00"
@str = [45 x i8] c"RESPONSE:-----------------------------------\00"
define void @print_response_reg(i32* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%3 = getelementptr inbounds i32, i32* %0, i64 7
%4 = load i32, i32* %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds i32, i32* %0, i64 6
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds i32, i32* %0, i64 5
%10 = load i32, i32* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds i32, i32* %0, i64 4
%13 = load i32, i32* %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %13)
ret void
}