#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 */

/* Variables and functions */
int /*<<< orphan*/ g(int *);
int /*<<< orphan*/ h(char *);
f(int c, int d) {
  if (c) {
    int x[] = {3, 0, 1};
    g(x);
  } else {
    int y[] = {2, 5, 9};
    g(y);
  }
  if (d) {
    char s[] = "hi";
    h(s);
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115a <f+0x3a>
mov    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <g@plt>
jmp    1177 <f+0x57>
mov    0xeab(%rip),%rax
mov    %rax,-0x24(%rbp)
mov    0xea9(%rip),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x24(%rbp),%rdi
call   1040 <g@plt>
cmpl   $0x0,-0xc(%rbp)
je     119e <f+0x7e>
mov    0xe90(%rip),%ax
mov    %ax,-0x27(%rbp)
mov    0xe88(%rip),%al
mov    %al,-0x25(%rbp)
lea    -0x27(%rbp),%rdi
call   1030 <h@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
test   %edi,%edi
je     113e <f+0x1e>
mov    0xed7(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xec4(%rip),%rax
jmp    114f <f+0x2f>
mov    0xed0(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xebd(%rip),%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1040 <g@plt>
test   %ebx,%ebx
je     1172 <f+0x52>
movb   $0x0,0x2(%rsp)
movw   $0x6968,(%rsp)
mov    %rsp,%rdi
call   1030 <h@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.f.x = [3 x i32] [i32 3, i32 0, i32 1]
@__const.f.y = [3 x i32] [i32 2, i32 5, i32 9]
@__const.f.s = [3 x i8] c"hi\00"
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [3 x i32]
%7 = alloca [3 x i32]
%8 = alloca [3 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = bitcast [3 x i32]* %6 to i8*
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%14 = call i32 @g(i32* %13)
br label %19
15: ; preds = %2
%16 = bitcast [3 x i32]* %7 to i8*
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%18 = call i32 @g(i32* %17)
br label %19
19: ; preds = %15, %11
%20 = load i32, i32* %5
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = bitcast [3 x i8]* %8 to i8*
%24 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%25 = call i32 @h(i8* %24)
br label %26
26: ; preds = %22, %19
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
@__const.f.x = [3 x i32] [i32 3, i32 0, i32 1]
@__const.f.y = [3 x i32] [i32 2, i32 5, i32 9]
@__const.f.s = [3 x i8] c"hi\00"
define i32 @f(i32 %0, i32 %1) {
%3 = alloca [3 x i32]
%4 = alloca [3 x i32]
%5 = alloca [3 x i8]
%6 = icmp eq i32 %0, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = bitcast [3 x i32]* %3 to i8*
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%10 = call i32 @g(i32* %9)
br label %15
11: ; preds = %2
%12 = bitcast [3 x i32]* %4 to i8*
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%14 = call i32 @g(i32* %13)
br label %15
15: ; preds = %11, %7
%16 = icmp eq i32 %1, 0
br i1 %16, label %20, label %17
17: ; preds = %15
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%19 = call i32 @h(i8* %18)
br label %20
20: ; preds = %17, %15
ret i32 undef
}