#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 */
struct ath_hal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ath_hal_set_ofdm_weak_det(struct ath_hal *, int, int, int,
                                             int, int, int, int);
void ath_hal_enable_ofdm_weak_det(struct ath_hal *ah, int enable) {
  if (enable)
    ath_hal_set_ofdm_weak_det(ah, 50, 40, 48, 1, 77, 64, 16);
  else
    ath_hal_set_ofdm_weak_det(ah, 127, 127, 63, 0, 127, 127, 31);
}


x86 assembly (clang, -O0):
<ath_hal_enable_ofdm_weak_det>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1161 <ath_hal_enable_ofdm_weak_det+0x51>
mov    -0x8(%rbp),%rdi
mov    $0x32,%esi
mov    $0x28,%edx
mov    $0x30,%ecx
mov    $0x1,%r8d
mov    $0x4d,%r9d
movl   $0x40,(%rsp)
movl   $0x10,0x8(%rsp)
call   1030 <ath_hal_set_ofdm_weak_det@plt>
jmp    118d <ath_hal_enable_ofdm_weak_det+0x7d>
mov    -0x8(%rbp),%rdi
mov    $0x7f,%r9d
mov    $0x3f,%ecx
xor    %r8d,%r8d
mov    %r9d,%esi
mov    %r9d,%edx
movl   $0x7f,(%rsp)
movl   $0x1f,0x8(%rsp)
call   1030 <ath_hal_set_ofdm_weak_det@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ath_hal_enable_ofdm_weak_det>:
push   %rax
test   %esi,%esi
je     1136 <ath_hal_enable_ofdm_weak_det+0x26>
mov    $0x32,%esi
mov    $0x28,%edx
mov    $0x30,%ecx
mov    $0x1,%r8d
mov    $0x4d,%r9d
push   $0x10
push   $0x40
jmp    1152 <ath_hal_enable_ofdm_weak_det+0x42>
mov    $0x7f,%esi
mov    $0x7f,%edx
mov    $0x3f,%ecx
xor    %r8d,%r8d
mov    $0x7f,%r9d
push   $0x1f
push   $0x7f
call   1030 <ath_hal_set_ofdm_weak_det@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
%struct.ath_hal = type { i32 }
define void @ath_hal_enable_ofdm_weak_det(%struct.ath_hal* %0, i32 %1) {
%3 = alloca %struct.ath_hal*
%4 = alloca i32
store %struct.ath_hal* %0, %struct.ath_hal** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load %struct.ath_hal*, %struct.ath_hal** %3
%9 = call i32 @ath_hal_set_ofdm_weak_det(%struct.ath_hal* %8, i32 50, i32 40, i32 48, i32 1, i32 77, i32 64, i32 16)
br label %13
10: ; preds = %2
%11 = load %struct.ath_hal*, %struct.ath_hal** %3
%12 = call i32 @ath_hal_set_ofdm_weak_det(%struct.ath_hal* %11, i32 127, i32 127, i32 63, i32 0, i32 127, i32 127, i32 31)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
%struct.ath_hal = type { i32 }
define void @ath_hal_enable_ofdm_weak_det(%struct.ath_hal* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @ath_hal_set_ofdm_weak_det(%struct.ath_hal* %0, i32 50, i32 40, i32 48, i32 1, i32 77, i32 64, i32 16)
br label %8
6: ; preds = %2
%7 = tail call i32 @ath_hal_set_ofdm_weak_det(%struct.ath_hal* %0, i32 127, i32 127, i32 63, i32 0, i32 127, i32 127, i32 31)
br label %8
8: ; preds = %6, %4
ret void
}