#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 /*<<< orphan*/ formats;

/* Variables and functions */
int /*<<< orphan*/ sdp_seq_alloc(void **);
void add_opush(void) {
  unsigned char formats[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff};
  void *dtds[sizeof(formats)];
  unsigned int i;
  unsigned char dtd = 0x08;
  for (i = 0; i < sizeof(formats); i++)
    dtds[i] = &dtd;
  sdp_seq_alloc(dtds);
}


x86 assembly (clang, -O0):
<add_opush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x7(%rbp)
mov    0xedc(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xed4(%rip),%al
mov    %al,-0x1(%rbp)
movb   $0x8,-0x45(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    $0x7,%rax
jae    1167 <add_opush+0x57>
mov    -0x44(%rbp),%eax
lea    -0x45(%rbp),%rcx
mov    %rcx,-0x40(%rbp,%rax,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1140 <add_opush+0x30>
lea    -0x40(%rbp),%rdi
call   1030 <sdp_seq_alloc@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_opush>:
sub    $0x48,%rsp
movb   $0x8,0xf(%rsp)
lea    0xf(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    %rax,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    %rax,0x38(%rsp)
mov    %rax,0x40(%rsp)
lea    0x10(%rsp),%rdi
call   1030 <sdp_seq_alloc@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.add_opush.formats = [7 x i8] c"\01\02\03\04\05\06\FF"
define void @add_opush() {
%1 = alloca [7 x i8]
%2 = alloca [7 x i8*]
%3 = alloca i32
%4 = alloca i8
%5 = bitcast [7 x i8]* %1 to i8*
store i8 8, i8* %4
store i32 0, i32* %3
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = icmp ult i64 %8, 7
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds [7 x i8*], [7 x i8*]* %2, i64 0, i64 %12
store i8* %4, i8** %13
br label %14
14: ; preds = %10
%15 = load i32, i32* %3
%16 = add i32 %15, 1
store i32 %16, i32* %3
br label %6
17: ; preds = %6
%18 = getelementptr inbounds [7 x i8*], [7 x i8*]* %2, i64 0, i64 0
%19 = call i32 @sdp_seq_alloc(i8** %18)
ret void
}

LLVM IR (-O2):
define void @add_opush() {
%1 = alloca [7 x i8*]
%2 = alloca i8
%3 = bitcast [7 x i8*]* %1 to i8*
store i8 8, i8* %2
%4 = getelementptr inbounds [7 x i8*], [7 x i8*]* %1, i64 0, i64 0
store i8* %2, i8** %4
%5 = getelementptr inbounds [7 x i8*], [7 x i8*]* %1, i64 0, i64 1
store i8* %2, i8** %5
%6 = getelementptr inbounds [7 x i8*], [7 x i8*]* %1, i64 0, i64 2
store i8* %2, i8** %6
%7 = getelementptr inbounds [7 x i8*], [7 x i8*]* %1, i64 0, i64 3
store i8* %2, i8** %7
%8 = getelementptr inbounds [7 x i8*], [7 x i8*]* %1, i64 0, i64 4
store i8* %2, i8** %8
%9 = getelementptr inbounds [7 x i8*], [7 x i8*]* %1, i64 0, i64 5
store i8* %2, i8** %9
%10 = getelementptr inbounds [7 x i8*], [7 x i8*]* %1, i64 0, i64 6
store i8* %2, i8** %10
%11 = call i32 @sdp_seq_alloc(i8** %4)
ret void
}