#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 *, int, ...);
void bar(void) {
  char *str = "HTTP/0.9/1.0/1.1 200";
  char http[] = "HTTP";
  printf("0x%08x 0x%08x 0x%08x 0x%08x\n", *(uint32_t *)str,
         *((uint32_t *)str + 1), *((uint32_t *)str + 2),
         *((uint32_t *)str + 3));
  printf("HTTP 0x%08x\n", *(uint32_t *)"HTTP");
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xee7(%rip),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r8d
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xeb0(%rip),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x50545448,%esi
mov    $0x392e302f,%edx
mov    $0x302e312f,%ecx
mov    $0x312e312f,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x50545448,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"HTTP/0.9/1.0/1.1 200\00"
@__const.bar.http = [5 x i8] c"HTTP\00"
@.str.1 = [29 x i8] c"0x%08x 0x%08x 0x%08x 0x%08x\0A\00"
@.str.2 = [13 x i8] c"HTTP 0x%08x\0A\00"
@.str.3 = [5 x i8] c"HTTP\00"
define void @bar() {
%1 = alloca i8*
%2 = alloca [5 x i8]
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = bitcast [5 x i8]* %2 to i8*
%4 = load i8*, i8** %1
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = load i8*, i8** %1
%8 = bitcast i8* %7 to i32*
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = load i8*, i8** %1
%12 = bitcast i8* %11 to i32*
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = load i8*, i8** %1
%16 = bitcast i8* %15 to i32*
%17 = getelementptr inbounds i32, i32* %16, i64 3
%18 = load i32, i32* %17
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %10, i32 %14, i32 %18)
%20 = load i32, i32* bitcast ([5 x i8]* @.str.3 to i32*)
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %20)
ret void
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"0x%08x 0x%08x 0x%08x 0x%08x\0A\00"
@.str.2 = [13 x i8] c"HTTP 0x%08x\0A\00"
define void @bar() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 1347703880, i32 959328303, i32 808333615, i32 825110831)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 1347703880)
ret void
}